I was trying to make a clock with arduino with a single motor but it was not possible with the standard method as there has to be at least two needles
Hours, and minutes so I tried something new. In this clock there are six divisions in an hour instead of five, each division representing ten minutes.
For eg. If the needle is after 12 and points the second division the time is 12:20.
The project is easy and the coding part is also quite simple
Step 1: You'll need....
- arduino: 1
- dc motor: 1
- l293d: 1
- breadboard or you can solder
Step 2: Making the dial
To make the dial first cut a circle of cardboard with a radius of 7cm. Then divide the circle into 4 equal sectors of 90 degrees. Mark the point as 12, 3 , 6, and 9. Then divide each sectors into three equal parts of 30 degrees each. Mark the points as 1,2,4,5,7,8,10, and 11. Then divide each sector of 30 degree into 6 equal parts of 5 degrees each. Mark them as 10,20,30,40, and 50.
Now make small hole according to your motor and fix the motor in it. Cut a needle from cardboard or fix any stick to the motor for the needle
And the dial is ready
Step 3: Connecting arduino and motor
Connecting l293D to Arduino
- Pin 1 of l293D to enable (5v)
- pin 2 of l293D to pin 3 Arduino
- pin 3 of l 293D to pin motor
- pin 6 of l293D to pin motor
- pin 4 of l293D to ground
- pin 7 of l293D to pin 4 Arduino
- pin 8 of l293D to 5v
- pin 16 of l293D to 5v
Connect motors to 3 and 6 pin of the ic
NOTE: DO NOT CONNECT THE MOTOR DIRECTLY TO ARDUINO. IT WILL DESTROY YOUR IT.
Step 4: Program
delay(11); // you need to change the value according to your motor speed
Now just upload the code, set the time and a arduino clock is ready