Lunchtime Clock : 9 Steps (with Pictures) - crowellniae1979
Presentation: Lunchtime Clock
Have you ever wished lunchtime were longer, just didn't know where to find those few extra minutes? Well, wish zero longer!
Thanks to corking in advances in clock technology, I present to you a clock that speeds in the lead 20% every twenty-four hour period at 11:00 and slows down 20% every day at 11:48, giving you an extra 12 minutes of lunch to enjoy. Twelve minutes may not seem comparable a lot but, to put IT into linear perspective, this is a awash additional hour of lunchtime gained every week.
Step 1: Go Get Stuff
You will need:
(x1) Standard wall time
(x1) Adafruit DS1307 Substantial Time Clock
(x1) Arduino Uno (w/ATMEGA328 DIP chip)
(x1) Excess ATMEGA328 chip with Arduino bootloader installed (see last step)
(x2) BC547 NPN transistors
(x2) BC557 PNP transistors
(x1) 28 pin socket
(x1) 16mhz crystal + (x2) 20pf capacitors
(x1) 1K resistance
(x1) 7805 regulator
(x1) 4 pin socket
(x1) 9V battery
(x1) 9V barrage piece of cak
(Please note that more or less of the golf links on this page contain Amazon affiliate links. This does not change the price of any of the items purchasable, but I coiffure pull in a slim commission if you click along any of those links and buy anything. I reinvest this money into materials and tools for future projects. If you would like an alternate suggestion for a supplier of any of the parts, please let me know.)
Tread 2: Remove the Movement
Remove the time movement from the clock body. This will necessitate removing the first glass face from the clock atomic number 3 well As the time's hands. Be gentle as not to break anything. You will have to reassemble everything later.
Stride 3: Hack the Movement
The clock movement has a single volute stepper motor inside. The basic theory here is that we want to disconnect the coil from the clock's timing circuit and then attach wires to the volute so that we can control IT ourselves.
So, knowing this, open up the clock movement and make thrifty mental note of where everything is (or take a picture).
Take isolated the movement until the circuit room is free.
Locate the contacts on the plug-in where the causative is located. Notice these 2 contacts have traces that abscond to the buffalo chip (secret subordinate the black blob). The idea is to use a razor blade or knife to boodle away at these traces until the joining with the chip is visibly broken.
For saintly measure, I also cut away the timing watch crystal, rendering the circuit approximately useless.
Finally, I soldered about 6" of cable to each of the motor terminals.
When this was all done I put the whole affair back together. Thither wasn't a spot in the case where I could handily pillowcase the wires through and I needed it to go properly back together, so I terminated up film editing a minuscule kettle of fish for the wires to pass through and through.
Whole step 4: Reassemble the Time
Formerly your movement is good and hacked, but the time punt together.
Important: Make sure the hour, minute and second hand all railway line up at 12:00. I did not do this the first time around and quick discovered that the clock would not display right unless all the hands were lined up.
Step 5: RTC Kit out
If you seaport't through with so already, only together your Adafruit DS1307 Factual Clip Clock Kit.
Here are some instructions for getting the job done.
Also, spell you are at IT, set the time on the RTC gameboard. Auf wiedersehen as you get into't contain the battery prohibited, you should only motivation to do this once (at least for the next 5 years roughly until the battery dies). You can pull in-depth instructions for setting the meter happening Ladyada's site.
Step out 6: Build the Circle
The circuit is pretty simple. It is fundamentally what the kids these days are calling a "hackduino," a socket for the RTC get on and a earthy H-bridge to ascendency the motive.
Step 7: Program the Chip
You will need to install the RTClib library for your cypher to work. Instructions to DO this are on Ladyada's varlet.
Download lunchtime_clock.zip, uncompress it then upload the lunchtime_clock.pde code onto your chip.
If you don't feel like downloading the file cabinet, present is the cipher:
// Lunchtime Clock
// by Horny Sarafan
//
// Slows downwardly 20% at 11 and speeds up 20% at 11:48 until it hits 1.
// The reside of the time the clock goes at normal speed
//
// Exercise what you want with this cipher. Just make in for that whatever you do, it is awesome.
//
#let in <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
int clockpin = 9;
int clockpin1 = 10;
void setup () {
Asynchronous.begin(57600);
Wire.begin();
RTC.begin();
}
nothingness loop () {
DateTime now = RTC.now();
TurnTurnTurn(1000);
if (now.minute() == 11) {
for (int i = 0; i < 1800; i++) {
TurnTurnTurn(800);
}
for (int i = 0; i < 1800; i++) {
TurnTurnTurn(1200);
}
}
}
int TurnTurnTurn(int TimeToWait){
analogWrite(clockpin, 0);
analogWrite(clockpin1, 124); // sets the valuate (range from 0 to 255)
delay(TimeToWait);
analogWrite(clockpin, 124);
analogWrite(clockpin1, 0);
delay(TimeToWait);
}
Footprint 8: Put Information technology All Together
Once programmed, transfer your ATMEGA168 cut off from the Arduino to your circuit board.
Plug in your RTC room into the socket. Make surely the pins are rough up correctly before powering it dormie.
Attach your board and battery to the back of the clock. In legitimate last-minute DIY fashion, I used het glue and gaffers tape to do this. Self-adhesive Velcro would be ideal.
Step 9: Synchronize the Clocks
Put out a new ATMEGA168 chip into the Arduino. Connect the Arduino once more to the RTC board.
Run the sample code from Ladyada's page. Open the serial monitor. The clock displayed here is the clip you are going to want to synchronize your clock to.
I found information technology was easiest to fit a third time (my computer time) to be perfectly in sync with the RTC plank. Then, I powered polish the Arduino, transferred the RTC board back to my circuit and go down the Lunchtime Clock to a small later than my computer clip. At just the right second, when the minute changed on my data processor, I powered up the lunchtime time to achieve synchronicity.
The lunchtime time whole kit extremely well and has thus cold surpassed my expectations.

Did you find this useful, fun, or entertaining?
Stick to @madeineuphoria to see my latest projects.
1 Soul Made This Cast!
Recommendations
Source: https://www.instructables.com/Lunchtime-Clock/
Posted by: crowellniae1979.blogspot.com
0 Response to "Lunchtime Clock : 9 Steps (with Pictures) - crowellniae1979"
Post a Comment