3D Printed WiFi Word Clock
A couple of years ago I've made a 30x30cm laser cut word clock inspired by the Adafruit 8x8 matrix word clock. To keep the electronics simple I decided to retrieve time via wifi instead of adding a realtime clock. The clock always runs on-time and automatically adjusts for daylight saving time. That clock has been running for years.
With the addition of a 3d printer, I could create this clock with a smooth front finish. The project consists of five 3d printed parts. An individual addressable LEDstrip and an ESP8266 microcontroller.
The size is 200x200x15.75mm (7.87x7.87x0.62inch).
The total print time is around 8 hours, and with the right preparation you'll be able to finish printing and putting everything together in one day.
At the moment the clock is available in Dutch (NL) and English (EN) but I would love to add more languages.
WARNING: The current draw is normally around 0.3-0.5A, but can be as high as 2A during animations. For this reason animations are off by default in the code. Be careful not to overload your USB port, power supply or microcontroller. Power the strip directly with 5V or check the power ratings of your board before using the animations.
Assumptions for this project
- You have a general understanding of electric circuits
- You know how to solder
- You know how to use your 3D printer
- You have used the Arduino IDE before and know how to add libraries.
Don't worry if you don't have all skills yet. There are great instructables on all of these subjects.
Supplies
Parts and materials
- 250g Filament. I've used Prusament Galaxy Black PLA, but any dark colored filament will work.
- D1 mini v4 ESP8266 Microcontroller. You can use a different ESP8266 microcontroller but you'll need to redesign the breadboard and microcontroller housing.
- 1.35 meter (4.5 feet) of 5v Individual addressable LED-strip 60 LEDs per meter. I use SK6812 but WS2812b strips work fine as well. As long as they work with the Adafruit NEOPIXEL library and use 5V.
- Logic level shifter (See notes for alternatives)
- 5v (USB-C) power supply. Take at least a 2A one. I used the 2 ampere usb charger of an old smartphone.
- Wires. Have at least 3 different colors of 50cm (20 inch). I often use wires from ethernet cables.
- Mini breadboard 170 holes
- Breadboard jumper wire set
- 4 m3 screws 10mm length. (See notes for alternatives)
- 4 m3 nuts. (See notes for alternatives)
- Solder.
- Heat shrink or electric isolation tape.
- A light defusion material. Can be just a piece of paper.
- Optional: Glue. (See notes)
Tools
- A 3d printer with a 21cm x 21cm (8.2x8.2inch) printbed.
- A soldering iron.
- wire cutting and stripping tool. Buy a wirestripper like shown on the picture. It's worth is.
- Scissors
- Screwdriver
- File (if you need to remove a bit of remaining 3D print support)
- Advised: multimeter.
Notes
- The WS2812b LED's need a 5V signal to operate. Testing has found that it often works with 3.3v logic as well, so you could drop the logic level shifter. For reliable operation I don't recommend this. I used the logic level shifter because it is cheap and easy but on internet you'll find more options to control the LED's with a 3.3v microcontroller.
- I place M3 nuts in the back during printing but if you don't want to do that you can use small 3mm screws or you drill a bigger hole and use heat set inserts.
- Usually the LED strips and the breadboard have tape already on the back but you might need glue.
3D Printing
There are 5 objects to print. The back, the divider, the front, the bottom of the controller casing and the top of the casing. I've printed in (prusament) PLA with a 0.6mm nozzle. In general I've printed with a 0.4mm layer height and a 0.2mm first layer. Filament use and print times below are with these settings on a Prusa MK4. If you only have a 0.4mm nozzle I would recommend to print everything with a 0.2mm layer height.
- Back: 91 gram. 31 meter filament. 2h52m. Between layer 1.8mm and 3.6mm I've used a layer height of 0.2mm for the small wireholes. How to do this in pursa slicer
- Divider: 38 gram. 12 meter filament. 1h21m.
- Front: 95 gram. 32 meter filament. 3h7m. The first layer height should be 0.15mm. At layer 10.55mm you can add a pause to insert four M3 nuts. How to do this in purse slicer. Optional: select the bottom of the front for the placement of the seam. Optional: set vertical perimeter to 1.
- Controller case bottom and top (together): 26 gram. 9 meter filament. 45m. Add support on build plate only. How to do this in pursa slicer.
I recommend printing the back first so you can work on the LED's while printing the other parts.
LED Strip
- With scissors, cut 9 pieces of LED strip with 9 LED's on each strip.
- Cut and strip the following wires to connect the individual strips.
- 4 times 55mm (2 inch) +5V (blue in the picture)
- 4 times 35mm (1.3 inch) +5V
- 1 time 200mm (7.5 inch) +5V
- 4 times 55mm (2 inch) GND (white in the picture)
- 4 times 35mm (1.3 inch) GND
- 1 time 200mm (7.5 inch) GND
- 8 times 45mm (1.7 inch) DATA (reddish in the picture)
- 1 time 200mm (7.5 inch) DATA
- Stick the 9 strips to the plate using the adhesive tape which is usually on the back of the strips. Otherwise glue it in place. Pay attention to the DATA in (Din) and DATA out (DO) indication on the strips. You'll start with Din on the bottom right and then alternate the direction with every strip. See the attached drawing indicating the Din en DO placement for every strip.
- Connect the strips by soldering the wires. Don't touch the PLA with your soldering iron. It will melt. Connect every DO with the Din of the strip above. Connect every GND with GND of the strip above and every +5V with +5V of the strip above. In this way you end up with a continuous connected strip.
- Connect the long wires to the right side of the bottom strip.
- To be able to insert your long wires in the breadboard we need to solder jumper wires to the long wires. Strip 15mm of the long wires. Wrap the copper of a long wire around one end of a jumper wire with a similar color. Solder the connection and use head shrink or electric tape to cover the connection.
Optional: If you have an Arduino Uno you can test your strip to see if your soldering was successful. Follow this tutorial if you need help: https://www.youtube.com/watch?v=9hJyyUTflXA
Electronics
- If your D1 mini does not have headers, solder headers to the microcontroller.
- Insert the jumper wires to the breadboard as shown on the picture and diagram.
- Insert the logic level converter with the high voltage side as shown on the picture (HV side on the bottom).
- Insert the D1 mini as shown in the picture.
- Stick your breadboard to the electronics bottom part.
Assembly
- Cut your piece of light diffuser to 16x16cm (6.3x6.3 inch).
- Stick it to the inside of the front with some tape. Make sure your tape doesn't cover the letters.
- Insert the divider in the LED area. Make sure to rotate it correctly. The decider should be flush with the walls of the back (check the picture).
- Place the front over the back making sure the wires don't get stuck in between the edges.
- Rotate the clock, insert and fasten the screws.
- Connect the long wires from your clock to the breadboard. 5V to HV. Ground to GND. Data to H3. (check the picture)
- Insert the electronics bottom. If it's hard to insert, use a file to remove some extra material from the protrusions.
Programming Your Microcontroller
- Install all software, drivers and the board support package in the Arduino IDE. You can follow the D1 mini getting started
- Add the following libraries in the Arduino IDE
- Adafruit Neopixel
- ArduinoJson by Benoit Blanchon
- WiFiManager by Tzapu
- Connect your board to your computer with a usb-c cable. Make sure to connect the cable to a usb-c port or a usb 3.1 port on your computer.
- Download and open the wwclock Arduino files (WWClock.ino and all the .h files and store them in a folder called WWClock).
- Other language than English: In the file WWClock.ino uncomment the correct files for the language of your clock. You'll find these between the lines START USER INPUT and END USER INPUT. You need a clock configuration file and a language file.
- In the clock configuration file (for example EN9x9.h) check or set the correct timezone and correct led strip type.
- Upload the project to your microcontroller.
- If you see "WIFI" light up everything works as intended.
Finalizing
- With the clock powered, search with your computer or phone for a wifi network "WWClock" and enter the password 01234567 (you might get a message: internet is not available. Connect anyway)
- In your browser go to http://192.168.4.1 You should see the WiFi Manager.
- Enter the settings for your home network and select save credentials.
- If everything works your clock will reboot and display the time!
- Cover the electronics with the top.
- Enjoy!
Nice to Know
Over the air updates
The WWClock.ino code has the option to update the code Over the air to make it easier to change your colors. Connect with your computer to the same network as the clock. In the Arduino IDE go to tools -> port. If your clock is found you'll be able to select it under "Network ports". If you try to upload new code you'll need to enter a password: 01234567
Brightness
- In some of my clocks I introduced automatic brightness adjustment based on room lighting. Both with a photoresistor and with a BH1750 i2c lux meter. To keep this project simple I did not add brightness adjustment but you could add it yourself. Based on a light intensity meter, or based on the time of day.