Replacing Analog Dial With Digital in Alarm Clock
by ChristerB2 in Circuits > Arduino
529 Views, 9 Favorites, 0 Comments
Replacing Analog Dial With Digital in Alarm Clock
Need: a clock in the bedroom with large digits to know what the time is in the middle of the night – or in the morning. Time to get up yet?
Have: This classic, but large, battery powered alarm clock. It ticks though. I want it to be silent!
The idea is to swap the analog hands to a digital display – those are quiet.
I could go for ready-made 7-segment displays but
- I couldn’t find the right size
- I want to be able to customize it.
So I’ll create the segments with led-strips and 3d-print the casing.
Supplies
- A classic (large) alarm clock
- An LED strip (I used an Adafruit DotStar LED Strip with 60 LEDs per meter)
- Microcontroller Lolin/Wemos D1 mini
- Soldering equipment
- Wires for connecting the strips
- 5V power supply
- power connector (or use the usb port on the microcontroller)
- 3d filament
- 3d printer
- Autodesk Fusion
Find Out How Large the Digits Should Be
- Measure the dial - the space in the clock we have for displaying the time.
- Open a new project in Autodesk Fusion and draw a circle the size of the dial.
- Download a digital font such as https://www.dafont.com/ds-digital.font
- Draw numbers e.g. "2222" with the font in the circle and adjust the size of the font to make it just fit the circle.
- Adjust the size so that a segment of the digit consists of a certain number of LEDs. In my case, I had an LED strip with 60 LEDs per meter. There is 1.67 cm between each LED. I have 2 LEDs per segment.
Model the 7-segment Digit
- Draw a sketch with the strip forming an 8. To know approximately where the LEDs are.
- Draw a sketch with the seven segments. You could use the digital font above. I drew my own to be able to make extra space for the strip where it wraps inside for segement 6.
- Extrude the segments and make "chamfers" which are angled towards the LED strip. About 45 degrees makes the light rays from the LEDs bouche forward against the diffusion filter.
- Extrude walls for the segments. 15 mm is enough to make the light diffuse.
- Cut holes in the segment walls for the LED strip.
- Extrude a cover/light filter of approximately 0.2 mm.
- OffsetFaces on the light filter backwards on all parts except the segments to the same thickness as the dial. This prevents light from leaking out.
- Print and test.
Downloads
Disassemble the Clock
Model the Dial
This step can be tricky but kind of rewarding.
The dial, the part with the hands showing the time, is probably connected with screws to the casing.
- Draw a circle the size of the dial in Autodesk Fusion.
- Extrude to the same thickness as the original dial.
- Model the connectors that the screws will go into.
- Print and test that the screw holes match (make a hole in the dial first to save filament and time).
Add the Digits to the Dial
- Make a hole in the dial where the digitis should be.
- Make four copies of the digit and move them to their locations in the dial.
- Model a colon between the hour and minute digits.
- Extrude what's left of the hole in the dial to the same thickness as the original dial.
Print the Dial
Solder the Strip
- Solder the microcontroller to the strip. Note the direction on the strip (blue circle in the image above). The arrow should be pointing in the direction where the data travels from the microcontroller into the strip.
- VBUS/5V to VCC
- GND to GND
- pin 4 to DI
- pin 5 to CL
- Cut the strip after LEDS_PER_SEGMENT * 7 number of LEDS. In my case LEDS_PER_SEGMENT = 2 => 14 LEDS per digit. We need 4 of those and then a short strip for the colon (with maybe 2 LEDS).
- Solder the strips with 4 cm of wires between the strips. Rembember to check the direction - the arrows on the strips! And put the shorter strip for the colon between the second and third digit-strips.
- Isolate the solder joints on the strip with some hot glue. The strips might get very close and may accidentally short circuit another part of the strip.
- Connect the end of the strip(s) to the power connector. This will power the strip and the microcontroller.
Attach the Strip
Program the Micro Controller
The microcontroller does not have an internal clock. It has to get the current time from a time service online on each startup.
The current time is displayed on the clock by turning on or off the segments in each digit. "09:15" is translated into 0, 9, 1, 5 and sent to the ClockDisplay class, which keeps track of what LEDs in the strip should be lit or not.
The main loop asks ClockDisplay which LED's to turn on and off and does so accordingly.
Assemble the Clock
Future Improvements
- Model and print the back side.
- Add a button on the back side for arming the alarm
- Connect the alarm clock to Home Assistant - smart home
- When the button is pressed in the evening the alarm is set
- Shut the curtains
- Turn off all lights
- In the morning gradually turn on the lights