While fooling around with my arduino, I was inspired to make a ticking time bomb like one in movies and cartoons. When a switch is flipped, it counts down from ten on a LED display, beeps at an increasing pace, and lights an electrical igniter or incandescent light when it reaches zero.

This device is intended for theatrical and entertainment purposes only! Do NOT use this for evil.

Step 1: Materials

You will need:

-A two digit LED display
-8 220 ohm resistors
-1 68 ohm resistor
-1 100 ohm resistor
-2N3906 transistor
-TIP31 transistor
-20 male pin headers(optional)
-SPDT toggle switch
-Bolts & nuts/banana jacks/binding posts(you decide, I'll discuss this later)
-A tone buzzer
-A low voltage electrical igniter(optional)
-Perf board
-5 x 2.5 x 2 project box(optional)
-An Arduino
-Power supply for Arduino
-22 gauge hookup wire

The total cost comes to around $8 or $13, depending on whether or not you use the project box.

Also, this design is only capable of lighting a very low power electrical igniter or light. If you want anything that uses more power, you will have to use an external power supply.
I am trying to make a C4 prop like the one from Counterstrike: Global Offensive and was wondering how I could replace the switch with a keypad and have a code to start the timer as well as replace the count down display with a blinking LED please help me figure out how I could do this and what code I would have to change. Note that i am incredibly inexperienced in arduino and would probably need to be spoon fed the code. Thanks
<p><a href="http://www.g4ledonline.com/g4-led-bulb-tower/G4-5050-Led-18smd-Led-G4-Led-Dimmable-Led-G4-Capsule-DC-12V-G4-Led.html" rel="nofollow">http://www.g4ledonline.com/g4-led-bulb-tower/G4-5050-Led-18smd-Led-G4-Led-Dimmable-Led-G4-Capsule-DC-12V-G4-Led.html</a></p>
I'm new to this so I definitely would.
<p>Hi,</p><p>Sorry it took me so long, I accidentally missed your reply. This code reads a momentary switch, counts down from five by blinking a led, and then turns on a green light and a solenoid for a second, and then resets. It is only the loop portion, so the setup and beginning will still need to be changed.</p><p>If you have a basic knowledge of Arduino, or an hour of time to learn, you should be able to fill in the rest. Otherwise, just reply and I should be able to help you out.</p><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div> <br><div><br>void loop( ) { <br><div><br>digitalWrite(countdownLED, LOW);<br>switchState = digitalRead(switchPin);<br><br>if (switchState == HIGH) {<br><br><div>for (int i = 0; i &lt; 6; i++) {<br><br>digitalWrite(countdownLed, HIGH);<br>delay(500);<br>digitalWrite(countdownLed, LOW);<br>delay(500);<br><br>} <br>digitalWrite(greenLed, HIGH);<br>digitalWrite(solenoid, HIGH);<br>delay(1000);<br>digitalWrite(greenLed, LOW);<br>digitalWrite(solenoid, LOW);<br>} else { <br>delay(10);<br>digitalWrite(greenLed, LOW);<br><p>digitalWrite(solenoid, LOW);</p> }<br><br>}</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
I love this design and need a little help tweaking it. I have a pinewood derby track setup and I'm wanting to use a solenoid to start the race. Here's what I was thinking. Momentary switch to start timer, at 0 green led and solenoid would start race and hold for a short time and reset automatically till momentary is hit again to start next race. Is this possible with your design? Thanks
Yeah, it is certainly possible. Would you need any help writing the code?
Cool project! I am in the process to make one of these, too. <br> <br>Once the timer is counted down to 0, the time bomb starts over again after a couple of seconds. I wonder how you could make the time looping stop, so that the timer does not start off from itself again. It would be awesome if the timer runs once when the time bomb is switched on. <br> <br>I am thankful for any hints! <br> <br>
The easiest way would be to change this line of code at the end of the loop, &quot;delay(9000);&quot;, in to this:<br> <br> if (1==1) { delay(10000); }<br> <br> This will delay forever, and you will need to unplug the arduino in order to break the delay, unless you add some code. Of course, this will leave the display on and displaying 0. If you want to shut it off, you should turn off all leds and then delay forever. To turn all leds off, use this code:<br> <br> digitalWrite(light, HIGH);<br> digitalWrite(led1, HIGH);<br> digitalWrite(led2, HIGH);<br> digitalWrite(led3, HIGH);<br> digitalWrite(led4, HIGH);<br> digitalWrite(led5, HIGH);<br> digitalWrite(led6, HIGH);<br> digitalWrite(led7, HIGH);<br> digitalWrite(oneLed, HIGH);<br> digitalWrite(beep, HIGH);
Thanks seraine! <br> <br>What would be the hard way? I mean, is there a way to stop the infinite delay (for instance this... if (1==1) { delay(10000); } ... ) by using a &gt;switch&lt; ? I would love to have it running the timer over again every time I turn it on with the switch. <br> <br> <br>
It should actually be pretty simple. All you should have to do is replace the infinity delay with this code:<br> <br> if (switchState == HIGH) { switchState = digitalRead(switchPin); }<br> <br> This line of code should work.<br>
Anyway I could get you to make one of these for me. I have all the stuff but I am new at all of this. If not do you have more pictures or video on hooking up the arduino to the right places. Thanks. Sanders87@hotmail.com
Instead of making a step by step video of the connections, I recommend that you learn to read schematics. It is a skill that you will frequently require when working with electronics, and you really should learn to do it. Without this skill, you will be severely limited in what you can construct. There are many guides on learning to read schematics, such as this one: https://learn.sparkfun.com/tutorials/how-to-read-a-schematic/overview If there are any If there are any specific connections you are confused about, feel free to ask. However, I will not give a complete, step by step guide to every connection that must be made.
2 questions: 1 what happens if you press the button a second time? 2 any way you could tie in a keypad that would allow an input to deactivate the countdown, and activate a second circuit to play a .midi or .wav file and throw confetti in the air? lol<br/>I am not good with circuitry, but your instructible is very informative and looks very cool!
The program ignores all input while it is doing the action (beeping, changing numbers). The program begins taking input again nine seconds after the sequence finishes. To tie in a keypad, you would have to attach to your Arduino to a keypad as other Instructables have shown, and change a lot of the code. Right now, the code delays for 10-500 milliseconds while running, based on how fast it is beeping. While it is delaying, it cannot accept input, and the code would have to change to check for input about every ten milliseconds. <br> <br>Throwing confetti or playing a .midi file would be much easier. In the very last number change, when the light/electronic igniter is lit, you would just have to send a signal to your confetti thrower. The hard part would be making a confetti thrower. As far as changing code/wiring goes, you would only need to add two wires and about four lines of code.
Airsoft battle

About This Instructable


20 favorites


Bio: I am 14 years old, and I'm interested in many different things - electronics, chemistry, robotics, basketball, chess and much, much more.
More by seraine: Arduino Ticking Time Bomb Motion Activated Servo Low Voltage Electrical Igniters
Add instructable to: