Diy Arduino Clock

by tapish101 in Circuits > Arduino

818 Views, 9 Favorites, 0 Comments

Diy Arduino Clock

IMG_20210614_154402__01.jpg
Diy Arduino Clock without RTC

This instructable is for the proof of concept of flap display clock. The main motive is lower power consumption, so i am using single dc motor for both the flaps. The idea came to me from the video on mechanical counters https://www.youtube.com/watch?v=lwt8QujQv5s

Each minute flap has 5 min difference which helps and make both hour and minute flaps 12, for each one rotation of minute flaps, hour flap rotate by 1/12th (30 degree). Initially i thought to make entire project from cardboard, but the gears from cardboard is certainly not a good idea or if i have access to laser cutter, probably it will work.

And a warning, don't expect aesthetic:)

Material req:

  • Arduino
  • Cardboard
  • Paper glue
  • DC motor (mine from old dvd driver)
  • Plastic gears (i extracted from old dvd drivers)
  • Cheap proximity sensor (used for encoder)
  • Acrylic (for bigger gears)
  • Transistor
  • Resistor
  • Diode
  • and some more complementary components

Creating the Parts

2.jpg
3.jpg
4.jpg
7.jpg
6.jpg
IMG_20210608_165956__01.jpg

The flaps are made from double layer thick paper and circular pieces (i don't know what to call them) from cardboard and assemble them for complete flaps, see the image above.

Repeat the step twice, i don't know how to explain this part but you get the idea from pics that to make, and also make an encloser for the body from cardboard.

Now create the gears from acrylic sheet, the bigger one have 24 teeth and smaller one have 8 teeth.

Take a look to mechanical counter video reference in intro part for better understanding how every thing is working.

Electronic Part

8.jpg
IMG_20210523_212256.jpg
IMG_20210512_182955__01.jpg
IMG_20210512_183015__01.jpg
Untitled__01.jpg
IMG_20210523_212249.jpg
Untitled2__01.jpg

Assemble the DC motor with very high reduction ratio and attach the output of motor to the encoder which is simply a circular paper with 12 holes for each 30 degree movement,proximity sensor is used to run dc motor in close loop control and achieve the precise 30 degree rotation every time. To attach the motor with the flaps there is a simple modular connector.

The circuit to drive the motor is bit tricky. So there is problem with dc motor, since the rotating motor likes to keep rotating even when when power is discontinued, to overcome this issue i have another input pin on driver circuit as motorstop pin which short both the motor pins and tries to stop it as the power to drive the motor discontinue.

In the simplified circuit diagram i haven't added the resistors take them also into consideration.

Assembling Everything Together

IMG_20210614_154402__011.jpg

Assemble everything together, while assembling the only problem i have is the calibration, its imp to assemble the hour flaps such that when minute flaps turns to zero the same time hour flaps rotate, also position of sensor is important. Take your time in this step, try and error with eventually calibrate it.

The Code

As mentioned above, the project don't use the RTC, so the time keeping is achieved by using the Arduino's timer interrupts, a very good instructable on Arduino's timer interrupt can be found here https://www.instructables.com/Arduino-Timer-Interrupts/

The ISR runs every second and counts second in sec variable which moves the motor after every 300 sec.

The timer interrupts drifts on average about 13 sec in one day, which also compensated in code.

To calibrate the clock an external push button is used which connect 5v supply to its motor VCC pin and can be used to calibrate the clock

The full code and be found at my github https://github.com/tapish101/Diy-clock