Thanks to great in advances in clock technology, I present to you a clock that speeds up 20% every day at 11:00 and slows down 20% every day at 11:48, giving you an extra twelve minutes of lunch to enjoy. Twelve minutes may not seem like a lot but, to put it into perspective, this is a full additional hour of lunchtime gained every week.

Step 1: Go Get Stuff
(x1) Standard wall clock
(x1) Adafruit DS1307 Real Time Clock Kit
(x1) Arduino (w/ATMEGA168 DIP chip)
(x1) Extra ATMEGA168 chip with Arduino bootloader installed (see last step)
(x2) BC547 PNP transistors
(x2) BC557 NPN transistors
(x1) 28 pin socket
(x2) 22pF capacitors
(x1) 16mhz crystal
(x1) 1K resistor
(x1) 7805 regulator
(x1) 4 pin socket
(x1) 9V battery and connector
Step 2: Remove the Movement
Step 3: Hack the Movement
The clock movement has a single coil 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 coil so that we can control it ourselves.
So, knowing this, open up the clock movement and make careful mental note of where everything is (or take a picture).
Take apart the movement until the circuit board is free.
Locate the contacts on the circuit board where the motor is located. Notice these two contacts have traces that go off to the chip (hidden under the black blob). The idea is to use a razor blade or knife to scratch away at these traces until the connection with the chip is visibly broken.
For good measure, I also cut away the timing crystal, rendering the circuit more or less useless.
Lastly, I soldered about 6" of wire to each of the motor terminals.
When this was all done I put the whole thing back together. There wasn't a spot in the case where I could conveniently slip the wires through and I needed it to go properly back together, so I ended up cutting a small hole for the wires to pass through.
Step 4: Reassemble the Clock
Once your movement is good and hacked, but the clock back together.
Important: Make sure the hour, minute and second hand all line up at 12:00. I did not do this the first time around and quickly discovered that the clock would not display right unless all the hands were lined up.
Step 5: RTC Kit
If you haven't done so already, but together your Adafruit DS1307 Real Time Clock Kit.
Here are some instructions for getting the job done.
Also, while you are at it, set the time on the RTC board. So long as you don't take the battery out, you should only need to do this once (at least for the next 5 years or so until the battery dies). You can get in-depth instructions for setting the time on Ladyada's site.
Step 6: Build the Circuit
The circuit is pretty simple. It is basically what the kids these days are calling a "hackduino," a socket for the RTC board and a crude H-bridge to control the motor.
Step 7: Program the Chip
You will need to install the RTClib library for your code to work. Instructions to do this are on Ladyada's page.
Download lunchtime_clock.zip, uncompress it and then upload the lunchtime_clock.pde code onto your chip.
If you don't feel like downloading the file, here is the code:
// Lunchtime Clock
// by Randy Sarafan
//
// Slows down 20% at 11 and speeds up 20% at 11:48 until it hits 1.
// The rest of the time the clock goes at normal speed
//
// Do what you want with this code. Just make certain that whatever you do, it is awesome.
//
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
int clockpin = 9;
int clockpin1 = 10;
void setup () {
Serial.begin(57600);
Wire.begin();
RTC.begin();
}
void loop () {
DateTime now = RTC.now();
TurnTurnTurn(1000);
if (now.hour() == 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 value (range from 0 to 255)
delay(TimeToWait);
analogWrite(clockpin, 124);
analogWrite(clockpin1, 0);
delay(TimeToWait);
}
Step 8: Put It All Together
Once programmed, transfer your ATMEGA168 chip from the Arduino to your circuit board.
Plug in your RTC board into the socket. Make sure the pins are lined up correctly before powering it up.
Attach your circuit board and battery to the back of the clock. In true last-minute DIY fashion, I used hot glue and gaffers tape to do this. Self-adhesive Velcro would be ideal.
Step 9: Synchronize the Clocks
Put 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 time displayed here is the time you are going to want to sync your clock to.
I found it was easiest to set a third clock (my computer clock) to be perfectly in sync with the RTC board. Then, I powered down the Arduino, transferred the RTC board back to my circuit and set the Lunchtime Clock to a minute later than my computer time. At just the right moment, when the minute changed on my computer, I powered up the lunchtime clock to achieve synchronicity.
The lunchtime clock works extremely well and has thus far surpassed my expectations.

































