Replacing Analog Dial With Digital in Alarm Clock

by ChristerB2 in Circuits > Arduino

322 Views, 6 Favorites, 0 Comments

Replacing Analog Dial With Digital in Alarm Clock

IMG_20240413_194802123.jpg
IMG_20240512_155031785_HDR.jpg
dial.png

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

  1. I couldn’t find the right size
  2. I want to be able to customize it.

So I’ll create the segments with led-strips and 3d-print the casing.

Supplies

Find Out How Large the Digits Should Be

20cm.png
8.png
sifferstorlek.png
strip sketch dim.png
  • 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

strip sketch dim.png
digit1.png
digit1.5.png
digit2.png
digit3.png
digit4.png
digit5.png
digit6.png
IMG_20240516_204305744.jpg
IMG_20240516_204319752.jpg
  • 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.

Disassemble the Clock

Alarm Clock project - Disassembly

Model the Dial

IMG_20240509_085209965_BURST000_COVER.jpg
IMG_20240509_085215375_HDR.jpg
IMG_20240509_090438160.jpg
Dial1.png

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

dial2.png
dial3.png
Dial4.png
dial5.png
  • 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

Alarm Clock Print

Solder the Strip

IMG_20240519_090727565.jpg
strip1.jpg
IMG_20240519_092320469.jpg
  • 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

Alarm Clock attach 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

Alarm Clock Assembly
IMG_20240512_155031785_HDR.jpg
IMG_20240517_192546124.jpg

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