Introduction: A Mixed Generation Clock
Hi all,
Started this project 1 month back, because of my bad health (Got caught by dengue) it took a longer time. I normally make Arduino based project, so to do a clock project was quite interesting.
To make an interesting project I checked a lot of clock-related projects and clock faces, and finally came up with making a mix generation clock.
It contains a minute sandglass, a 90-degree watch dial to give the hour and 2 seven segment display to show the minutes.
Let's build it.
Step 1: Materials Required
- 4 Piece 1cm * 3cm * 8cm (h*w*l) wood block. with.
- Icecream sticks.
- 2 piece of 180 servo motor
- 2 piece of seven-segment display.
- Wood drill machine.
- Ardunio nano.
- Power supply 5v 1Amp.
- Sapre wood pieces.
- Female to Female cable.
- Sandglass of one minute.
Step 2: Setting Up Sand-glass and Servo
- Make a square hole in one of the frames so that it can easily attach to the servo.
- mark the servo outline put it on wood, and make whole near to each other using a drill.
- Secure the servo using some hot glue or super glue.
- Created a small box same size as sandglass.
- Attached servo gearhead in the middle of the box as shown in the figure.
- Made a small hole in another side of the box so that it will give space for the screwdriver to mount the box to the servo.
- Attach the servo pin to pin number 12 of Arduino.
- Run the attached code.
- Send 0 and 180 in the serial monitor and check for sandglass rotation.
- Fix the flaws if any.
Attachments
Step 3: Make the Frame
- Now attach other wood pieces and make it a square box.
- Decide the second servo position for hour dail.
- Use ice cream stick to cover the front face.
Step 4: Make the Dail
- With help of super glue attach the servo head to it.
- Then use the attached program, open the serial monitor of the Arduino app.
- Send 0,8,16,24,32,40,48,56,64,72,80,88,96 one by one and set the wood piece.
- These are the 12 intervals of the clock with each 8 degrees difference.
- Servo signal pin is attached to pin 12, you can change accordingly to set the dial.
Attachments
Step 5: Seven-segment Display for Mins
- Using the drill with the smallest drill bit create whole in the front face.
- 10 in the upper row and 10 in the lower row.
- So that 2 seven segment display can slide easily and after that use the super glue to fix it.
- By this time we are done with the whole clock.
- Now we need to set the seven segment display.
Pins of two seven segment display.
static const uint8_t digital_pins[] = {2, 3, 4, 5, 6, 7, 8};
static const uint8_t analog_pins[] = {A0, A1, A2, A3, A4, A5, 9};
1st seven segments: a,b,c,d,e,f,g pins of the diagram will be connected to 2, 3, 4, 5, 6, 7, 8 pins of the Arduino.
2nd seven segments: a,b,c,d,e,f,g pins of the diagram will be connected to A0, A1, A2, A3, A4, A5, 9 pins of the Arduino.
Run the code and check if it is blinking 9 to 0 properly or not.
Attachments
Step 6: Assemble All
- Once everything is assembled the clock will look like as per the image.
- Pin 12 for hour hand servo.
- Pin 11 for sandglass servo.
- Other pins are same as per seven-segments pins.
- Set time by changing the values of below number in the program.
- int hours = 1;
- int minutes = 9;
- int sec = 0;