Functional Hollow LED Clock
by dslrdiy in Workshop > 3D Printing
1950 Views, 15 Favorites, 0 Comments
Functional Hollow LED Clock
I always loved LEDs devices, from keyboards to smart lights bulbs. RGB LEDs are always great to have in your setup specially if you are a streamer, because practical lights are always nice to see on a scene. But what happens for a regular user? Sometimes it is not the perfect fit for a room or a office, unless... you add some functional use like a clock, a charger station, and a night light! Let's make it!.
Supplies
- ESP32 or ESP8266 both work with WLED.
- WS2812B 30LED/M LED Strip (we just need 24 LEDs, so you can make more than one clock).
- 3D Printed Case.
- 7mm Clear Glue Gun Sticks or 6mm Acrylic Rods or Optic Fiber Side Glow.
- Two-Output USB Charger.
- Power Cord Extension.
- Spare USB Cable.
- Button Module.
- Female Dupont Cables.
Designing It With Fusion 360
This clock was designed using fusion 360, basically it is a hollow cylinder with text, the thickness of the walls is 2mm.
I used circular pattern to create the holes for the rods.
The base is hollow to put the usb charger and the ESP board.
There are Two back covers. You can use the one you like or just leave open the back.
The diffusers can be 3d printed or you can use just paper.
Assembling the Clock
- Add the diffusers to the clock, I 3d printed my diffusers using white PLA, but you can use just paper or any translucent material.
- Solder the cables on the LED Strip, you will need to add a small Resistor (100Ohm) between the Data cable (center pad) ann the Dupont Cable that goes to the ESP32 (or ESP8266).
- Pass through the cables in the bottom hole of the clock.
- Use hot glue to place the LED Strip, Remember to arrange the LEDs of the strip that light the numbers goes clockwise.
- Glue the back cover (Optional). You can leave the clock without the back cover because it will light the wall behind the clock if you want.
- Cut the rods. Using a small saw of a hobby knife cut the rods in the right amount (around 47mm).
- Glue the rods using hot glue, place the rods in the center of holes so the LEDs lights the rods.
- Place and glue the center piece.
- Pass through the cables in the base hole.
- Glue the Base to the clock.
- Split a spare USB cable and strip the Red and Black cable. (Red for Positive and Black for Negative)
- Solder the Positive LED Strip Cable, and the two Red cables of the USB cable.
- Solder the Negative LED Strip Cable, and the two Black cables of the USB cable.
- Use electrical tape or shrinking tubes to protect the soldered cables.
- Connect the Cables, ESP Board and Button using female-female DuPont cables:
- Connect Data cable (Din of LED strip) to GPIO16 of the ESP32.
- Connect Vcc Pin of the Button to GPIO17 of the ESP32.
- Connect Center Pin of the Button to GND of the ESP32.
- Secure the pins with a little of hot glue.
- Place the ESP32 (or ESP8266) and the Charger inside the base.
- Glue the Button cover.
- Done!.
Programming the ESP
This is an easy step and quick step.
- Connect the ESP32 or ESP8266 to your computer using a micro USB to USB cable, wait for the driver installation or download the drivers for your board:
- Go to the website: https://install.wled.me/ (this installation webpage will only work on Chrome)
- Click on Install. (I installed 0.14.0-b1 version)
- Select your USB Serial Port (COM_) and click Connect.
- Click on Install WLED and Confirm Install.
- Wait for a couple of minutes until the installation is complete.
- Click on NEXT once the installation is Complete.
- Enter your Wifi Network Name and Password so your ESP is easily configured.
- Click on VISIT DEVICE so the installation page will direct you to your new WLED device.
- DONE!.
Configure the Clock in WLED
Go to the Config Menu and then LED Preferences.
- Select the length of the strip: 24
- Select GPIO button: 17
- Click on Save.
Go to the Config Menu and then Time & Macros.
- Select your time zone GMT.
- Find in Google what it is your Time zone. (or you can click on the Get location button).
- For me it is GMT-4 (GMT minus 4 hours, so I have to enter the correction in seconds. -4 hrs x 60min x 60 secs = -14400 secs)
- Scroll down to Clock Title and configure the next.
- Select "Analog Clock Overlay"
- First LED: 12
- Last LED: 23 (23 because we start counting from 0 up to 23 - total 24 LEDs)
- 12h LED: 17 (17 is the LED that will be the 12Hr in our clock)
- Select "Show 5min marks" (you can unselect this if you do not want showing seconds)
- Click on Save.
- It is done! You can see the clock already working.
The inner LEDs will be controlled by the effect you select. There are 101 effects! you can choose from.
Configure the Actions of the Button
Because we want this working as a night light lamp, we configure the button actions.
Go to the Config Menu and then Time & Macros.
- Scroll down up to button actions.
- In button 0 row configure:
- short: 0
- long: 1
- double: 2
- and Save.
By default the short press of the button will turn on and off the Clock.
Then we configure the preset tab with the next:
- Select New Preset
- Enter the Name of the action: Night
- Enter the Label for the Preset: 1
- Enter the action:
&A=32
Note: This action turn the brightness to 32 from 255 that it is the maximum. If you wanna know more about all the instructions available you can go to: API Configuration
And Save!. This preset will work for a long press of the button. Whenever you long press the button the brightness will go from the last brightness you have to 25% (or 32/255).
For the second preset (double press) I configured set brightness to 255 or 100%.
&A=255
But you can select any preset effect you want. For example I will configure an automatic brightness reduction.
- Go to Time & Macros in the Config Menu.
- Scroll down to Time-controlled presets.
- Enter the Hours you want to activate the presets:
- At: 19:00 I will activate preset number 3 (Preset 3 is AutoBrightness to 25%)
- At: 8:00 I will activate preset number 4 (Preset 4 is AutoBrightness to 100%)
- and Click Save.
Now you must create the presets 3 and 4. Similar to presets 1 and 2.
And in this case because our brightness will automatically turn down and up. I can use my button for other purposes like a Night Light and regular preset I like.
I will go to the color wheel and select warm light, solid, and maximum brightness. Then I will go to preset tab and save the actual effect as Label ID 1. (this will replace the last preset number 1)
Then I will select my favorite effect like Chase Rainbow and save it as Preset Label 2 to replace old preset number 2.
That way I will have:
- Short press: Nightlight.
- Long press: Favorite effect.
- Automatic Brightness at 8:00 and 19:00
Done!
Now you have a Functional Hollow LED Clock! It won't just be an ornamental clock. It will be:
- Smart light.
- Night Light.
- Practical Light.
- Charger.
- Clock.
Leave a comment below if you would like to see a better version of this clock! WLED offers UserMods so we can develop new functions color.