Introduction: Crazy Countdown Timer

Picture of Crazy Countdown Timer
This is my interpretation of the stereotypical time bomb that you see in so many cheesy action movies. The hero has to figure out which line to cut to stop the timer and keep the bomb from exploding.

In this case, we have 3 wires. One wire stops the timer (yay!), another wire speeds up the timer (panic!), and a third wire sets the timer to zero (uh-oh!).

This instructable is a sequel to my basic clock instructable: 
and it is basically a port of a project I did last summer for the XL_Star board from

The main difference from the basic clock is that I added 3 button inputs that are handled by some jumper wires instead of buttons, and I updated the software.

The software now counts down, check the wire status, and add the required code to do the right thing based on wires cut, as well as adding the final action when the timer hits 0.

Step 1: Parts

For this Instructable, you will need:

1 Arduino (I used an Arduino-nano)
1 LTC-617 clock display (you might need to solder male headers onto it)
many jumper wires
1 button
4 resistors: 10k or close (to prevent short between gnd and 5v on button press, and for the "crazy wires" buttons)
(optionally) Something to make an interesting action for when the clock hits zero.

For me this was a no-cost project as I already had all the parts.
The clock display was part of a grab bag I bought long ago. I imagine they should be very inexpensive and might even be salvageable from old clock radios.
Little buttons and resistors are also salvageable from old electronics (reset buttons from old computers, for example), and also very inexpensive to purchase.
The Arduino starts at around $15 on eBay, though I would expect anyone would be unlikely to ever use it for only just this one project, unless you really do use it with a large amount of explosives ;)

I used a breadboard for easy connections, but that's not necessary.

Step 2: Make the Connections

Picture of Make the Connections

There are quite a few wires that need to be hooked up, but if you go carefully and double check each line as you hook it up, it should be pretty straightforward. If you have already built the Arduino Clock from my earlier Instructable, you just need to add the 3 crazy wires, and you need to move the button to A5. For the clock I had it on A4, but it makes sense to keep the 3 crazy wires together.

I'm assuming you already know the basics of getting your Arduino going, so I won't get into those details. If not, there are a lot of nice examples online to get you started (I like the ones at

Here are the connections that need to be made. On the left is the pin of the LTC, on the right is the Arduino pin. For example, LTC pin 4 is connected to Arduino pin digital7. nc means that pin of the LTC is not connected to anything.
For more details on the LTC connections, please refer to my Arduino Clock Instructable:

The button is connected in the usual buttony way using a pull-down resistor which connects the pin to gnd for LOW, and the button when pressed connects it to 5v for HIGH. As a side effect, pressing the button also connects 5v to gnd, which is why we need that 10k resistor to keep it from being a short.
The Crazy Wires are connected just like the button, with a connected wire being always HIGH as if the button was pressed. I used 2 jumper wires: one m-m and one m-f so that it can be easily disconnected in the middle. The jumper wires connect the pin to 5v, and the pin is also connected with a 10k pull-down resistor to gnd to make it a proper LOW when the main jumper wire is disconnected.

LTC - Arduino
1 - nc
2 - nc
3 - nc
4 - d7
5 - d3
6 - d2
7 - d11
8 - d10
9 - d4
10 - gnd
22 - d9
23 - d5
24 - d6
25 - A0
26 - d8
27 - d12
28 - A1
29 - gnd

5v - button - A5 - 10k resistor - gnd

crazy wires:
5v - red jumper wire - A4 - 10k resistor - gnd
5v - blue jumper wire - A3 - 10k resistor - gnd
5v - yellow jumper wire - A2 - 10k resistor - gnd

pin D13 is already hooked up to an LED

I didn't have space near the Arduino, so in the picture you'll see that the button is connected through a few extra jumper wires.

Note that pin 1 on the clock display is at the bottom left (the pins are under the display area), and every hole counts, even the ones that don't have any connections. On this LTC display, "pins" 11 to 21 are just holes.

Step 3: Install (upload) the Software

Picture of Install (upload) the Software

The final step is to download the attached software sketch, and upload it to your Arduino.

That's all there is to it - you now have your very own Crazy Countdown Timer!

You can press the button to set the time. Hold the button down to set it quickly. If you hold it for longer than 5 seconds, it will go 10 times as fast.

The centre hour:minute colon blinks for the seconds when there is more than an hour left on the countdown timer, otherwise it displays minutes:seconds and the colon remains steady.

The software has some comments to help you figure it out, but essentially it keeps track of time by checking the value of millis(), and every time 1000 millis have gone by it counts down by 1 second. Millis() returns the number of milliseconds since startup.
When in panic mode, it counts down 10 times as fast - decrementing the second indicator every 10th of a second.

As with my earlier Arduino Clock Instructable, this won't be as accurate as using a real time clock (RTC), but it's good enough for our countdown timer.

When the timer hits zero, the action right now is to turn on the LED that is already connected to D13 (you can see it light up in the video when I disconnect the red wire). Since the pin will provide 5 volts, you can actually also use it to do other actions, like turning on/off a relay or even running a little sound gadget from an old greeting card, for example. You could also modify the code to do more interesting things - for example, you could connect a speaker or buzzer and use the Arduino Pitches library to make a noise (see the Arduino's built-in Digital-Tone_Melody example).


Step 4: Adding an External Action

To give an example of an external action, I connected the inside sound bits of a greeting card to the action pin.

It's actually quite easy to do - the Arduino action pin and gnd take the place of the battery, and magically it all works :)

In the video you'll see I soldered 2 header pins to the sound circuit to make it easy to connect. One pin is on the + side of the battery holder, and the other is on the -'ve side.

Connect the + side to pin D13, the action pin.
Connect the - side to gnd.

Now when pin D13 goes on (high) as the timer hits zero, it provides 5 volts to the sound gadget, and viola! Annoying sounds are the price of letting the timer hit zero!


ErgoE2 (author)2016-12-15

Hi. Can you help me to use LTC-637D1P-12S??


Amritpal104 (author)2016-11-09

Wow great projet for fun. Thaks for share. I want to change it little bit according to my requirement. Two switch. One for add the 5 min in the timer by press it every time. And other to play/pause the timer. And i will ise tm 1637 digital tube. Will u help me with it?

MiaC9 (author)2016-03-20

I am working on very similar project but I am having issues with the wires not detecting when they have been pulled. I sometimes have to wiggle the wire to get it to "notice" its unplugged. Did you experience this at all? I am going to have less issues if I solder the wires directly into the board?

DaveJ1 (author)2016-01-04

I'm trying to figure out how to modify the code so that it starts after a button press- but am not having much luck...any advice? Want to be able to see the display, and adjust the time, but not have it start counting down until I want it to.

I tried changing the state of the timer_paused variable based on an input, but that didn't do anything, at least not the way I tried to implement it!

ntewinkel (author)DaveJ12016-01-07

Hi Dave,

I think you can just do that with a while loop at the top of the loop() function.

Something like this, assuming you have added a proper start button:

while (digitalRead(STARTBUTTON) == LOW) {

clock_show_time(hours, minutes);

Hope that helps :)


blok alex (author)2015-05-31

I will use the crazy countdown timer but

we will help me for make the timer with 2 set points
one timer select by a switch 30 min and 15 min to 0

kavi99 (author)2015-05-31

I used mega 2560 and it works fine :)

KOTSOS5 (author)2015-02-05

Perfect! just perfect my friend, thank you very much, the code works great with no problems, even when i used 4 common cathode displays! i've just changed the code a bit and added some npn transistors but still works great.

KOTSOS5 (author)KOTSOS52015-02-13

Here is mine construction

ntewinkel (author)KOTSOS52015-02-15

Awesome! Thanks for sharing the pic :)

german6336 (author)2014-11-22

Hi, I need to do a timer with a button that start every 30 mins in one push and with other button countdown selected timer; like a coin machine but I dont know how to do

biggio98 (author)2014-10-26

can I use a normal 7 segments 4 digit display (like this one:


ntewinkel (author)biggio982014-10-27

I just found a discussion in the related clock instructable:

The display I used is Common Anode. So any 4 digit common-anode display will work as long as you connect the wires to the right segments and digits.

ntewinkel (author)biggio982014-10-27

You could. The clock display I used doesn't have any smarts built-in, so as long as the connections are the same it should all work the same. The tricky thing is that some displays are common anode, and some are common cathode. I forget what this LTC display is, but the code and connections could be changed a tiny bit to make either one work. The trick is that each digit is controlled by a single IO pin.

ntewinkel (author)2014-10-04

There is also a tutorial to get started with:

ntewinkel (author)2014-10-04

You could try this other instructable:

The 1602 LCD is actually a fair bit easier to display things on than the clock display I used.

jpietrzak (author)2014-08-05


Love this! Will do pretty much what I need! Just wondering, can this do hours too?

ntewinkel (author)jpietrzak2014-08-05

Yes, it does hours. If I recall correctly it will show hours:minutes until hours is 0 and then it shows minutes:seconds. And I think when showing hours the dot flashes for every second.

ptrobrn (author)2014-03-07

Is there a wiring diagram?

ntewinkel (author)ptrobrn2014-03-07

Nope, sorry. Just a wordy explanation of connections in step 2 ;)
If you want to create one using Fritzing or something, please share and I'll be more than happy to look it over.

tveres (author)2013-12-03

So the red wire goes to the A4 leg and teh 10K resistor goes there too?

ntewinkel (author)tveres2013-12-03

That's correct. the resistor is a pull-down resistor. When the wire is connected, the pin sees 5v, but when the wire is not connected, we need the resistor-to-ground to make the pin see 0v. Without the resistor connecting to ground, that pin would be not-connected or "floating" which can cause odd results. We need a pretty decent value resistor there to make sure we don't get a straight 5v to gnd short :)
This tutorial might explain it better:

ps, I later learned that the Arduino has internal pull-up and pull-down resistors that can be used. So instead of those physical resistors the code could be changed to use the internal resistors.

tveres (author)ntewinkel2013-12-03

Thank you.

SurreyShepp (author)2013-11-12

can anyone help cant download this as an .ino file i am rather new to this.

ntewinkel (author)SurreyShepp2013-11-12

You should be able to right-click and save the file that's linked at the bottom (underneath "Enjoy"). Or just click on it, then copy and paste all of the contents into a blank Arduino window.


SurreyShepp (author)ntewinkel2013-11-12

thanks i have managed to change the file extention it now shows as a .ino file but arduino 1.0.5 doesnt like it cant open in in the arduino program. sorry this is my first every project. it the prefect thing i need but i think i kind of have no idea what i am doing

SurreyShepp (author)SurreyShepp2013-11-12

ok finally getting it to show but when i verifiy it i get crazytimer:12: error: stray '#' in program any ideas anyone

sorry to be a pain

SurreyShepp (author)SurreyShepp2013-11-14

working like a dream now

mate sorted problems can wait to put it in is box and use it in a game

ntewinkel (author)SurreyShepp2013-11-14

Awesome! I'm happy to hear that. Sorry I wasn't able to help much more - it's been quite busy here.

If you're new to Arduino and would like some more easy tutorial style circuits to try out, I highly recommend this Oomlout one:
You don't have to buy the kit, it just makes it easier to get all the parts, but it's much less expensive to source the pieces separately (like on eBay, for example).

If you need help on any of your future projects, has a great forum with some very helpful people there.


ctwal12 (author)2013-02-18

i was wondering if you would be interested in selling this product to me. if interested please reply back soon and tell me your cost.

davew1234 (author)2012-09-03

Thanks for this, I'm using it as a countdown timer and it's working awesome!! Love it!

eXtremeSomething (author)2012-05-03

Yes I stopped the Bomb.... ohhhh my only usb cable

Jakwiebus (author)2012-04-30

so the brains behind this all in the little Arduino?

'cause I want to make a box that locks itself from the inside, and only opens after a preset amount of time (as seen in the city of ember), but I can't figure out how to make the timer. after seeing this, I think I'll have to go Arduino.
could this setup be programmed so it'll count down in hours?

anyway, good project, looks awesome!

ntewinkel (author)Jakwiebus2012-04-30

Hi Jakobus9,

Yes, it's all in the Arduino. It's amazing what that little thing can do!

Do you mean counting down hours and minutes as on a clock? Because my code already does that for when the time is over an hour (it switches to minutes:seconds when it's less than an hour).
If you want just hours you could just use two of the digits, or swap out the clock display with a smaller 2-digit display. You'd have to modify the code a little, but everything has been done before - you'd mostly have to chop out pieces.

Thanks for the compliments!
and good luck with your project :)

Jakwiebus (author)ntewinkel2012-04-30

I have a question running about it:

I'm talking about weeks and months, which I think is with arduino indeed pretty easy to do.
though I would like to only use an arduino as last resort... you can make robots out of this little board, it would be to tempting to pull it out of my project and try to make something cool with it.

ntewinkel (author)Jakwiebus2012-04-30

I added some ideas to your question :)

UnusualTravis (author)2012-04-30

But its always the Blue wire!

About This Instructable




Bio: Hi There! I'm a mobile app developer (iPhone and Android) in British Columbia, Canada. I also write firmware, and enjoy dabbling with electronic circuits ... More »
More by ntewinkel:Arduino Nano with WIZ550io = Easy InternetArduino Echo LocatorCrazy Countdown Timer
Add instructable to: