Introduction: Lunchtime Clock

Picture of Lunchtime Clock

Have you ever wished lunchtime were longer, but didn't know where to find those few extra minutes? Well, wish no longer!

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

Picture of Go Get Stuff

You will need:

(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

Picture of Remove the Movement

Remove the clock movement from the clock body. This will require removing the front glass face from the clock as well as the clock's hands. Be gentle as not to break anything. You will have to reassemble everything later.

Step 3: Hack the Movement

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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, 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"


int clockpin = 9;
int clockpin1 = 10;

void setup () {

void loop () {

DateTime now =;


if (now.hour() == 11) {
for (int i = 0; i < 1800; i++) {

for (int i = 0; i < 1800; i++) {

int TurnTurnTurn(int TimeToWait){

analogWrite(clockpin, 0);
analogWrite(clockpin1, 124); // sets the value (range from 0 to 255)

analogWrite(clockpin, 124);
analogWrite(clockpin1, 0);


Step 8: Put It All Together

Picture of 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

Picture of 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.


Yonatan24 (author)2015-12-14

Definitely an interesting 'Ible, Now EVERYONE KNOWS YOUR SECRET! ;)

Antzy Carmasaic made it! (author)2015-11-12

Inspired by this instructable, I made an enhanced IoT version using Intel Edison which allows us to control it wirelessly to shorten or lengthen hours at will:

Thanks for sharing such an awesome project!

gandrews-1 (author)2015-09-23

Firstly, this is a great project! Really like the idea.

I did a bit of investigation with a similar clock mechanism... if you attach the coil connections to a scope you can see that the method of operation is indeed to switch polarity. The signal is as follows... from a baseline of zero volts, raise coil voltage to battery voltage (a bit less than +1.5v) for 32mS, the turn off for 968mS, then apply reverse voltage (a bit less than -1.5v) for 32mS and then turn off for 968mS.

So in any given 1 second period the power need only be applied for 3.2% of the time.

You could hugely reduce your power consumption by sleeping for 96% of the time and only applying current to the coil when awake, alternating polarity each second.

vincent7520 (author)2013-04-21

If I ever see one of my employee use this clock, he's fired immediately !

(now, I wouldn't mind having the same in my own office !!!!… ;) ;)

RodCastler (author)2012-10-04

hi! nice project. Why are you using 50% duty cicles in your tutnturnturn function instead of digitalwrite(pin,on) ?

randofo (author)RodCastler2012-10-04

It is not a DC motor. It is a single coil stepper motor. Power it on will make it move one step and then stop.

giangtoxom (author)2012-06-24

Hi Randofo, your project is great !!
I'm going to make it for all my radio station wall clock (just to sync real time to them)
If so, how is write code "lunchtime_clock" cause I don't need it speed up or slow down, just run the real time load from RTC chip ?
Thanks in advance !

DerekK19 (author)2012-06-14

I love this idea. Simple, elegant and soo cool. I'm tempted to go the whole hog though and have a "work time" clock that speeds up at 8am and slows down again at 5pm. Of course the party poopers will say that you have to adjust all the office computer clocks and everyone's watches, but for novelty value this is a real winner. I promise I will build one

larryb64 (author)2011-08-20

I don't care what anyone else says... It's creative and genius...
and did anyone else get the Douglas Adams reference below... NICE!!!

wellebh (author)2011-04-19

This is pure genius.

rustygray (author)2011-01-20

Naysayers be doomed. This is an interesting concept of relativity and time.

If you think 30 seconds is a short time, try holding your hand 2 inches over a candle for 30 seconds, then be allowed only 30 seconds for a bathroom break to realize how fast it goes by.

Time is relative, and if the lunch break can appear longer, then your mind tells you it is.

Fabulous idea and could be fun for pranks and practical jokes.

campbellu2002 (author)rustygray2011-01-20

Time is an illusion, lunchtime double so :p

42 ;-)

Pe-ads (author)campbellu20022011-01-29

Is that a Douglas Adams quote? true!

PACW (author)rustygray2011-01-23

True enough - but your example was a bit G. G. Libbian (Libbyesque?) for my comfort!

Time is fleeting; madness takes its toll...

ForgetMyProfile (author)2011-01-20

Isn't it funny to see how all these people react to this ible?

Some clearly don't get it, some think you can accomplish the same outcome by setting the clock back 12 minutes, some people talk about the time stamp on a time card machine, some people talk about small businesses v. whatever else there is, some think they'll lose money, some want to discuss the programming.

But I guess I'll join the majority and say VERY IMPRESSIVE. GOOD JOB.

dread (author)ForgetMyProfile2011-01-23

I agree. The ible doesn't proscribe where you use this. If you want to try "to get away" with something at work, and you think you can, and feel that's a good thing to try, then great, have fun with it.

My lunch room at work doesn't have a clock, nor does anyone care when I eat lunch (or when I show up or go home for that matter) but I didn't think to use this at work when I saw it. As they say: "everything is relative".

For that matter, the ible includes source code for noon hour but there's nothing stopping you from adapting that for other uses. I cannot think of any at the moment, but I'm definitely bookmarking this just in case it might come in handy adding to another project.

However, I like weird clocks, and this one is very subtle that the fun in it seems to be "how long would it take anyone to notice", plus the sheer enjoyment of actually getting it working (which some people seem to miss on this website as well).

PACW (author)2011-01-23

Very very nice! I must admit the electronics is beyond me but I like anything that reminds people just how arbitrary time is! Be sure to post again when you start selling these, I don't need a longer lunch hour but I like bendy timepieces.

Jollyrgr (author)2011-01-22

This works if it is the ONLY clock in the building where you work. Thus it must be a VERY small business. At my location we have clocks on:

*Cell phones
*Time clocks

Likely after a day or two someone will catch on this clock has a problem and go to replace the battery or replace the clock.

randofo (author)Jollyrgr2011-01-22

We have about 20 people... I see how well they clean the shared kitchen... The likelihood of them even thinking about changing a clock battery is about nil. Come to think of it, the last clock sat with a dead battery for months.

Anyhow, it is only at most incorrect visually 12 minutes. Most of the time it is only off a matter of a few minutes. I feel that this discrepancy is not enough for most people to notice or care. Even if they did, the fact that the clock is correct about 90% of the time would probably dissuade anyone from changing it. I'm guessing it would take most people a long while to figure out what is going on in spite of the abundance of alternative clocks.

Clearly this won't work in every single work environment and I don't believe I made that claim, but I think you are wrong that this will work in none.

Honus (author)2011-01-19

Awesome. I bet you could sell boatloads of them on ThinkGeek.

eoutlaw (author)Honus2011-01-21

I was thinking exactly the same! This is a great idea and execution. You should definitely pitch this to Randofo, prepare to make millions, haha.

agis68 (author)2011-01-20

well...i don't get it!!!, Maybe cause i live in a democratic country where anyone office staff can choice by self the right time and last of his lunchtime or for more breaks. Is enough to report his employer that he needs some minutes to eat something.
Teachers can't do that but they (we) have one free hour for every 4 hours of teaching. Bus drivers also have their breaks but generally every staff can break in a spirit of understanding of freedom and human rights and maybe some times health problems. We (greeks) invented democracy and we apply it. So simple. Only in Army forces have restricted Lunchtime hour, for the rest people its free!!!

Flying_MashedPotatoes (author)2011-01-20

so basicly, the special clock speeds up to get to lunch time 12minutes early, then, during the lunch hour, it slows down at the right speed to line up with the proper time.

cprocjr (author)2011-01-17

Amazing! I just need to figure out how to change all the clocks in the building so that no one catches on.

JohnJY (author)cprocjr2011-01-17

Or just set back every clock in the building 12 minutes.

cprocjr (author)JohnJY2011-01-17

1. That is really easy to catch because it is always wrong. People have watches/computers.

2. That doesn't actually extend lunch, it just shifts it forward.

pcgirl (author)cprocjr2011-01-20

No. It adds 12 minutes to your lunch break. Ignore how the clock works for a minute and just think of it , as if someone has turned the clock forward 12 minutes when you weren't looking. Then when you go to lunch, they turn it back to the normal time. You get an extra 12 minutes. The clock is just being that sneaky person, but electronically. :) I think it rocks!

cprocjr (author)pcgirl2011-01-20

I was replying to 94. The clock in the instructable actually does extend the time.

JohnJY (author)cprocjr2011-01-20

Yeah, whoops. Haha. Anyway, the concept is amazing.

pcgirl (author)2011-01-20

I have been trying to think of a person who can do this for me.. Absolutely love it. :D

Yerboogieman (author)2011-01-17

Well then I would lose $1.73 for those 12 minutes I am spending not getting paid.

pcgirl (author)Yerboogieman2011-01-20

Well, yes, if your boss doesn't use that particular clock to pay you.

Unless I am completely misunderstanding this.

Give it some more thought, if the hour between 11 and "12" is faster by twelve mins, it will say it is "12" at 11:48 - when you write your timecard with your lunch break on it, the clock will say 12 - 1 when in actual fact it is 11:48 - 1..... because it looks like a standard hour, nobody will be the wiser

But, that's now how most time clocks that actually stamp a card work. They are normally hooked to a central server where a manager, supervisor, or corporation can adjust it for accuracy and security.

This will work for small shops where a manager is always relying on a single clock for timing... otherwise it's just fun to have around.

Bad Maxx (author)somewhiteguy2011-01-20

Being the majority of people work for small businesses (in the USA) and do not punch their time in, it would be relevant for most of us.
Per the Small Business Administration (SBA). Small enterprises account for 52 percent of all U.S. workers.

sumatra (author)2011-01-18

Your Instructable would be a lot stronger if you explained your circuit and code. How did you arrive at the circuit and the values for the AnalogWrites? Do you really need the transistors? The ATMega can source/sink 40ma, and I'd be surprised if the clock coil needed anywhere close to that amount of current.

randofo (author)sumatra2011-01-18

The value was arrived at because 255 was too much and 100 was not enough. I meant to stick in 127, but put in 124 for some reason and that seems to work fine.

I added an H-bridge because the motor is a single coil stepper and needs to be powered in phase (i.e. you need to reverse the polarity).

TurnTurnTurn(x) is a variable for pausing between steps of the motor, whereas x is the delay time. 1000 is equivalent to one second.

Every day at 11:00, the clock goes into a routine that slows down 80% for 3,600 rotations and then speeds up to 120% for 3,600 rotations and then resumes normal operation.

imarcianoloco (author)randofo2011-01-20

The H-bridge only amplifies the signal it receives from the control pins it's connected to. Polarity stays the same, so I do believe it would work without the H-bridge, just connect the pins directly to the stepper coil... :)

randofo (author)imarcianoloco2011-01-20

This is flip-flopping it:

analogWrite(clockpin, 0);
analogWrite(clockpin1, 124);

analogWrite(clockpin, 124);
analogWrite(clockpin1, 0);

MichaelAtOz (author)2011-01-20

Fantastic concept, great 'ible.

Perhaps two buttons one to pause one to advance X steps, will allow the time to be adjusted?

Chinasaur (author)2011-01-20

Great! How about a bluetooth version so you can accelerate or decelerate time whenever you need to from your cellphone?

Bad Maxx (author)2011-01-20

This is completely awesome! You seriously could sell these!!!!!!!!

fly_boy_bc (author)2011-01-20

Once I read the first paragraph I BELLY LAUGHED for half an hour! This is the most fantastic instructable ever! Even if your boss caught you he'd be so impressed he'd give you a raise rather than grief!


zack247 (author)2011-01-20

haha this is great!

Skyriam (author)2011-01-20

This is incredible, congratz! I'm having a hard time understanding it though... Where does the extra 12 minutes come from if at 1 oclock its back at the regular time? My guess is it makes you go out for lunch early, makes the boss think is lunch time but its actually 12 minutes to lunch time... Am I right? Thanks for ur time!

randofo (author)Skyriam2011-01-20

Yes, lunch starts at 11:48. The clock reads 12 then.

tahirhh (author)2011-01-19

Very clever idea, five stars. ;)

About This Instructable




Bio: My name is Randy and I founded the Instructables Design Studio. I'm also the author of the books 'Simple Bots,' and '62 Projects to ... More »
More by randofo:Large Motor ProjectsRemove a Wheelchair Motor BrakeBuild a Robot
Add instructable to: