Introduction: Prop Bomb

Picture of Prop Bomb

My friend and i built this prop for airsoft/paintball matches.  Its sort of like capture the flag only disarm the "bomb".
How it works is there is a predetermined time limit (which u can change in the code) and the opposing team has that much time to find the code and the bomb and disarm it.  How they find the code is up to you... capture a person? sure!  Find it hidden somewhere? sure! or whatever!  When the bomb is turned on it asks for a code and you can enter in any four number combo and that is the disarm code for that round.  If the person puts in the wrong code it will add 1min 30sec to the time when the time runs out? BOOM! well thats what it says on the screen and it makes a funky noise = ]  This is version 1.0 hopefully in the future we will add wires to unplug to disarm it and some other neat things but for now this is perfect and works well for what we want!  I hope you enjoy the instructable!

Step 1: Supplies

Picture of Supplies

You will need the following electronic components:

1 Arduino                          (We use duemilanove and you can buy these everywhere online)
1 Arduino Proto-Shield  (or if you want just a breadboard or protoboard)
1 LCD Screen 16x2       ( we used this one from sparkfun! http://www.sparkfun.com/products/255)
1 Numeric KeyPad        ( we used another one from sparkfun! http://www.sparkfun.com/products/8653)
1 Potentiometer             ( we used a 50k i believe! bought from raidoshack awhile ago)
1 8Ohm Speaker           ( tore one out of an old toy, but you can find them EVERYWHERE!)
1 Green LED 
1 Red LED
4 1k Ohm resistors

Other Materials:

Some sort of case ( we found ours at a thrift store but i think they sell them at walmart)
a chunk of wood   ( this is to bring the arduino off of the bottom of the case and up towards the top)
Screws                    (to attach the arduino to the chunk of wood)
Heat shrink tubing

Tools you'll need:

Soldering Iron
Solder
Wire     (we used alot of old computer cable so it would stay kinda together)
Wire Cutters
Hot Glue Gun
Hot Glue
Saw
Dremel
Screw driver



Step 2: Cutting Up Your Box

Picture of Cutting Up Your Box

This is basically up to you how you want the layout to be ... you could have everything inside so when u open it up u can see all of the nice hardware and it looks more low budget (as if this isn't low budget enough!) or you can make it clean where you only see the keypad and such.... anyways its all up to you its really just a style thing.
We cut the square out for the lcd screen and then drilled the holes for the LEDS, then cut out the keypad and we just eyed everything as far as positioning. We did all our cutting with a dremel and razor blade.

We then cut the slots in the back:  First we cut a hole for the potentiometer to fit through, then we cut another hole in the back just for the power adapter hole and then also a hole for the USB cable just for programming if we needed to we wouldn't have to take the arduino out.
all of these holes and such are your call for style so just do a layout of everything until you get it how you like it then make the cuts.

Step 3: Placing the Arduino

Picture of Placing the Arduino

This again will depend on your case height and such as you can see here we had to use a piece of scrap wood to pull the arduino off of the case.  We glued the wood to the case and then screwed the arduino into the wood.  You'll notice the way the wires sag in this photo ... thats a good thing you'll want them to be longer than you need in order to open and close the box without pulling the wires or breaking connections!

Step 4: Wiring and Such

Picture of Wiring and Such

You'll have to just follow the schematic we unfortunately didn't make a step by step on this.   
Heres a quick outline to go along with the schematic
Arduino pins :

DPin 0 = Nothing
DPin 1 = Nothing
DPin 2 = Pin 8 on keypad
DPin 3 = Red LED
DPin 4 = Green LED
DPin 5 = Nothing
DPin 6 = Nothing
DPin 7 = Pin 4 LCD
DPin 8 = Pin 6 LCD
DPin 9 = Speaker +
DPin 10 = Pin 11 LCD
DPin 11 = Pin 12 LCD
DPin 12 = Pin 13 LCD
DPin 13 = Pin 14 LCD
APin 0 = Pin 2 Keypad
APin 1 = Resistor to Pin 3 Keypad
APin 2 = Pin 4 Keypad
APin 3 = Resistor to Pin 5 Keypad
APin 4 = Resistor to Pin 6 Keypad
APin 5 = Resistor to Pin 7 Keypad

LCD Screen Pins:

Heres the missing pins on the LCD
LCD pin1 = Potentiometer 5v
LCD pin 2 = Potentiometer GND
LCD pin 3 = Potentiometer Middle 
LCD pin 5 = GND
LCD pin 15 = 5v
LCD pin 16 = GND

That should be all of them .... on the spark fun website if you follow the links on the supplies page there are some really great tutorials that explain how to hook up the pad and the lcd.  

Step 5: Uploading the Code

Picture of Uploading the Code

Heres the code you will need to get it to work the way ours does as always feel free to make it better!

/*Airsoft Bomb
Version 1.1Creators:
Chase Cooley&&&&&&&&&&&&
Joey Meyer*/

#include <Keypad.h>#include <LiquidCrystal.h>
#include <Tone.h>
#define pound 14
Tone tone1;int Scount = 0; // count seconds
int Mcount = 0; // count minutesint Hcount =0; // count hours
int Dcount = 0; // count daysint val = 0;
long secMillis = 0; // store last time for second addlong interval = 1000; // interval for seconds
char password[4];int currentLength = 0;
int i = 0;char entered[4];
int ledPin = 3; //red lightint ledPin2 = 4; //green light

LiquidCrystal lcd(7,8,10,11,12,13);const byte ROWS = 4; //four rows
const byte COLS = 3; //three columnschar keys[ROWS][COLS] = {
{'1','2','3'},{'4','5','6'},
{'7','8','9'},{'*','0','#'}
};
byte rowPins[ROWS] = {18, 2, 14, 16}; //connect to the row pinouts of the keypadbyte colPins[COLS] = {17, 19, 15}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
pinMode(ledPin, OUTPUT); // sets the digital pin as outputpinMode(ledPin2, OUTPUT); // sets the digital pin as output
tone1.begin(9);lcd.begin(16, 2);
Serial.begin(9600);lcd.clear();
lcd.setCursor(0,0);lcd.print("Enter Code: ");
while (currentLength < 4){
lcd.setCursor(currentLength + 6, 1);lcd.cursor();
char key = keypad.getKey();key == NO_KEY;
if (key != NO_KEY){
lcd.print(key);password[currentLength] = key;
currentLength++;delay(200);
}}
if (currentLength == 4){
lcd.noCursor();lcd.clear();
lcd.home();lcd.print("You've Entered: ");
lcd.setCursor(6,1);lcd.print(password[0]);
lcd.print(password[1]);lcd.print(password[2]);
lcd.print(password[3]);delay(3000);
lcd.clear();currentLength = 0;
}}

void loop(){
char key2 = keypad.getKey(); // get the keylcd.setCursor(0,0);
timer();if (key2 != NO_KEY)
{while (key2 == NO_KEY)
{key2 = keypad.getKey();
}if (key2 != NO_KEY)
{lcd.clear();
lcd.setCursor(0,0);lcd.print("Enter Code: ");
while (currentLength < 4){
lcd.setCursor(currentLength + 6, 1);lcd.cursor();
char key2 = keypad.getKey();if (key2 != NO_KEY)
{lcd.print(key2);
entered[currentLength] = key2;currentLength++;
delay(200);lcd.noCursor();
lcd.setCursor(currentLength + 5, 1);lcd.print("*");
lcd.setCursor(currentLength + 6, 1);lcd.cursor();
}}
if (currentLength == 4){
if (entered[0] == password[0] && entered[1] == password[1] && entered[2] == password[2] && entered[3] == password[3]){
lcd.noCursor();lcd.clear();
lcd.home();lcd.print(" Defused ");
currentLength = 0;delay(2500);
lcd.setCursor(0,1);lcd.print("Reset the Bomb");
}else
{lcd.noCursor();
lcd.clear();lcd.home();
lcd.print(" Wrong ");lcd.setCursor(0,1);
lcd.print(" Add - 1:30 ");if (Mcount < 14)
{Mcount = Mcount + 1;
}if (Scount < 59)
{Scount = Scount + 30;
}delay(1500);
currentLength = 0;}
}}
}}

void timer(){
if ( Mcount >= 15 ){
while ( Mcount >= 15){
lcd.noCursor();lcd.clear();
lcd.home();lcd.print(" !BoOm! ");
tone1.play(NOTE_A2, 200);digitalWrite(ledPin, HIGH); // sets the LED on
tone1.play(NOTE_A2, 200);delay(10); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED offtone1.play(NOTE_A2, 200);
delay(10); // waits for a seconddigitalWrite(ledPin2, HIGH); // sets the LED on
tone1.play(NOTE_A2, 200);delay(10); // waits for a second
digitalWrite(ledPin2, LOW); // sets the LED offtone1.play(NOTE_A2, 200);
delay(10); // waits for a secondchar key4 = keypad.getKey();
if (key4 != NO_KEY){
while (key4 == NO_KEY){
key4 = keypad.getKey();}
if (key4 = '#'){
lcd.clear();lcd.print("Reset the Bomb");
}}
}if ( Mcount == 60) // if Mcount is 60 do this operation
{//delay (32); // good place to fine tune timing
Mcount = 0; // reset McountHcount ++;
}if (Hcount> 23)
{Dcount++;
Hcount = 0; // have to reset Hcount to "0" after 24hrs}

lcd.setCursor (0,1); // sets cursor to 2nd linelcd.print ("Timer: ");
lcd.print (Dcount);lcd.print (":");
lcd.print (Hcount);lcd.print (":");
lcd.print (Mcount);lcd.print (":");
lcd.print (Scount);
if (Scount >59) // if 60 do this operation{
Mcount ++; // add 1 to McountScount = 0; // reset Scount
//delay (58); // changes ms per min}
if (Scount < 60) // do this oper. 59 times{
unsigned long currentMillis = millis();//delay (988); // changing by one = 60 ms a min
if(currentMillis - secMillis > interval){
tone1.play(NOTE_G5, 200);secMillis = currentMillis;
Scount ++; // add 1 to ScountdigitalWrite(ledPin2, HIGH); // sets the LED on
delay(10); // waits for a seconddigitalWrite(ledPin2, LOW); // sets the LED off
delay(10); // waits for a second}
}}

Step 6: Testing!

Heres a quick video on it working


If you like this plz vote for me!  This is my first contest entry thanks for looking at my instructable!

Comments

Daniel AugustoG made it! (author)2017-02-19

https://www.youtube.com/watch?v=I8_UMfjKdw0

This is a very nice project, congrats on the beauty of the final product!

Ondra1342 (author)2016-08-16

hello, what battery powers the project?

Ondra1342 (author)2016-08-12

Hi, is the need to have Arduino Proto-Shield, breadboard or protoboard? Thank you for answer

adrian.dinica.5 (author)2016-06-29

k =(-} A=(+) at the displai 1 at - and 2 at +

РоманР (author)2015-02-14

Can I use instead of the Arduino http://www.ebay.com/itm/Starter-Kit-for-arduino-Uno-R3-Breadboard-Jumper-Wires-9V-Battery-Connector-/171533172142?pt=LH_DefaultDomain_0&hash=item27f02c7dae ?

vžalys (author)2014-07-07

hi, there is way how to make defusable with wires cutting?

bcavaciuti (author)vžalys2014-10-26

He says he might put pull out wires inside for defusing.

I am not even a novice in electronics so I don't know if this is possible but if I could I would ... have 3-8 wires of different colours connected to the circuit and have it set a random wire as the defusing wire (preferably in conjunction with a keypad+LCD) so that when you carefully pull it out it "diffuses" the bomb. This will allow the people with the bomb a chance to win in the last few seconds even though they don't have the code but a low enough chance that its not normally worth it early on.

To have cutting wires it would be the same just with wires screwed in on both sides for easy restocking but this does mean wasted wire which is kinda pointless for a game.

irondirtboy11 (author)2011-04-25

i dont know what an "arduino" is :/

Here i can show you:

http://lmgtfy.com/?q=Arduino

http://en.wikipedia.org/wiki/Arduino
also more information at
www.arduino.cc
its basically a tiny computer

aversione beta (author)2013-01-31

Hello,
the code does not make me see the time, why?
Can you give me a hand? Thank you!

Here. I can give you my hand.... :)

daznovia (author)2014-03-04

same error as black engel, too bad you cannot respond to solve this

daznovia (author)2014-02-18

can you please check your in mails ?

MaltheF (author)2013-06-03

After nearly 4 hours of rewriting the code, I made it work, and added a few improvements, like making the timer count down, instead of up, which I think looks better for a bomb scenario, I plan on releasing the code once I've rewritten everything.

mb inventor (author)2012-10-13

this is awsome good joj

kilofeenix (author)2012-09-22

This is exactly what i've been looking for!! exactly for the same reason too. but...anyway to do this using a duel 7 segment display instead of the lcd screen?
just want the red led to signify wrong code and green to signify the correct code.

yellowcouch (author)kilofeenix2012-09-30

You could do this with a 7 segment fairly easily, and changing the code to just do red as wrong and green as good will be extremely easy.
on the arduino.cc website there is a good section on controlling 7 segments

Fixerized (author)2012-04-12

Hello everybody,

First of all I've got to say that I've never used Arduino, but I'm very interested in this aprticular project, because I'm an airsoft player and I've been looking for a timed bomb for a long time.

Well, then is time for my question: Could it be posible to use this to activate a relay? (Which in turn, activates a piezo siren)

If it is possible, could someone help me with the code? I'm totally green in programming.


Thanks and sorry for my poor English.

yellowcouch (author)Fixerized2012-04-13

Hey Fixerized,
Thanks for your interest in the project. There is no reason i can see that you couldn't use a relay with this project. That said I dont believe it will be a problem of coding, but rather a Hardware problem. Here are a few sites and other instructables that might be helpful.
https://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino/
https://www.instructables.com/id/Arduino-Controlled-Relay-Box/
http://www.sparkfun.com/tutorials/119
let me know if you have more questions.

Fixerized (author)yellowcouch2012-04-14

Thanks for the help,

AFAIK, I should get a digital pin to high level when i want the relay to activate, this is easy.

The problem comes when we get to the programming part... I don't know what should I change in the code to activate the relay instead of emitting the tone.

Oh, and I don't understand something... What does the potentiotemeter do?

Lot of thanks!

yellowcouch (author)Fixerized2012-04-16

I think you keep the code the same, it will play the tune through the speaker the same. I think you just need the power supply for the speaker.... (because it'll be greater than 5 volts i'd imagine) The potentiometer is to adjust the brightness of the lcd screen.

Fixerized (author)yellowcouch2012-04-17

I will use some batteries for the horn, and that's why I wanted to use the relay, It allows me to use some "heavy" sound parts haha

And I was kinda sleepy that day, the use of of the pot was clear... xDD

I could tell you when I finish it, if you want ;)

And thanks again!

black.engel (author)2012-01-12

Hello,
i need HELP please :(

the code have more errors:

sketch_jan12a.cpp:6:46: error: Keypad.h: No such file or directory
sketch_jan12a.cpp:7:18: error: Tone.h: No such file or directory
sketch_jan12a:8: error: 'Tone' does not name a type
sketch_jan12a:16: error: 'LiquidCrystal' does not name a type
sketch_jan12a:18: error: expected unqualified-id before '{' token
sketch_jan12a:18: error: expected unqualified-id before ',' token
sketch_jan12a:18: error: expected unqualified-id before '{' token
sketch_jan12a:18: error: expected unqualified-id before ',' token
sketch_jan12a:19: error: expected unqualified-id before '{' token
sketch_jan12a:19: error: expected unqualified-id before ',' token
sketch_jan12a:19: error: expected unqualified-id before '{' token
sketch_jan12a:20: error: expected declaration before '}' token

can you help me please?

yellowcouch (author)black.engel2012-01-13

it looks like you dont have the libraries for downloaded for the keypad or tones
you can get them from www.arduino.cc

black.engel (author)yellowcouch2012-01-14

Hello,

thank you for the help.

I have download the keypad and tone file from www.arduino.cc
Now i have only this errors.

sketch_jan14a.pde:-1: error: expected unqualified-id before '{' token
sketch_jan14a.pde:-1: error: expected unqualified-id before ',' token
sketch_jan14a.pde:-1: error: expected unqualified-id before '{' token
sketch_jan14a.pde:-1: error: expected unqualified-id before ',' token
sketch_jan14a.pde:-1: error: expected unqualified-id before '{' token
sketch_jan14a.pde:-1: error: expected unqualified-id before ',' token
sketch_jan14a.pde:-1: error: expected unqualified-id before '{' token
sketch_jan14a.pde:-1: error: expected declaration before '}' token

Can you help me please?

youwish (author)2011-11-07

And would you be willing to build one of these, then sell it?

furrysalamander (author)2011-08-24

What's the overall price on this thing?

If you already have the arduino and wires ect... some of the basic electronic things like soldering iron and solder and other tools it will cost about 30$ to make. If you need to buy the arduino and the shield and so on then it will cost about 70$ to make. If you need tools and such you are looking at upwards 100. It also depends on what case you use and how creative you want to get with the designs. This particular one cost me about 40$ but i had the arduino, wires, push buttons, and leds along with the tools to do it. The cost was in the lcd screen, key pad, speaker, case and time = ] I know this is a lengthy and non definitive answer but but its going to be different for everyone depending on the situation and style. Most everything was bought at sparkfun's website you can go there and price the things you need if you want to get real precise.

youwish (author)yellowcouch2011-11-07

Hi, I'm very interested in building this product, but have no experience whatsoever in arduinos, or programming and whatnot, can you direct me to a site that can teach me the basics and how to do this?

Okay I have basic eletronics tools, soldering iron, multimeter, etc. But no arduino or other stuff like that. So would that be about $70, right?

69.75$ with shipping if you order everything straight from spark fun (minus wire) but with some more research and robbing other electronic devices you could knock that price down a bit. If you used perf board instead of the shield, took leds and speakers from other sources: computer speark, toys, ect... Then that will drop the price of parts to 47.85$ with shipping. I think if you got a little more crafty then you could cut the cost a little more maybe using a different display or just regular buttons and not the keypad but those are relatively cheap compared to the headache of making them from scratch or modifying it. I hope this helps you and again if you have any questions feel free to ask!

jimmy1988 (author)2011-11-06

Th code is not displaying the time. I need HELP.

Peasy93 (author)2011-09-24

hi its an amazing project
but i have the same problem like Soul1974

sketch_sep25a.cpp:6:20: error: Keypad.h: No such file or directory
sketch_sep25a:19: error: expected unqualified-id before '{' token
sketch_sep25a:19: error: expected unqualified-id before ',' token
sketch_sep25a:19: error: expected unqualified-id before '{' token
sketch_sep25a:19: error: expected unqualified-id before ',' token
sketch_sep25a:20: error: expected unqualified-id before '{' token
sketch_sep25a:20: error: expected unqualified-id before ',' token
sketch_sep25a:20: error: expected unqualified-id before '{' token
sketch_sep25a:21: error: expected declaration before '}' token

Please help me

soul1974 (author)Peasy932011-09-27

Pm me and i will send you the code

FalconFour (author)2011-06-16

Yeehck. Okay, the code for this thing makes baby Jesus cry. I'll leave the critique at that, but I did spend about 15 minutes going over and optimizing the code line by line, and creating a MUCH more elegant and less "just so happens to not catch the Arduino on fire, by sheer luck" style code...

The code and the preceding discussion from members of the Arduino community collectively scratching their heads, is located here:

http://arduino.cc/forum/index.php/topic,64119.msg467415.html#msg467415

Hope it helps!

yellowcouch (author)FalconFour2011-07-07

thank you sir! This is the first thing i've coded in the arduino language usually use csharp so thanks for making it better!

soul1974 (author)FalconFour2011-06-16

Thanks again,

You have helped I have post numerous requests to the creators with no luck.
If it was not for your help I would have stayed clear of Arduino projects.

Thanks again I will make sure you get taged in the project.

oldboffin (author)2011-06-14

Very nice, should have ( 220 ohm ? ) resistors in series with the LEDs if they are not 5v types.

yellowcouch (author)oldboffin2011-07-07

ya the 220 ohm resistors wouldn't be a bad addition = ]

soul1974 (author)oldboffin2011-06-21

Thanks for the tip

soul1974 (author)2011-06-06

HI I am having trouble compiling the code I keep getting these errors:

sketch_jun06a.cpp:6:46: error: Keypad.h: No such file or directory
sketch_jun06a.cpp:7:19: error: Tone.h: No such file or directory
sketch_jun06a:8: error: 'Tone' does not name a type
sketch_jun06a:16: error: 'LiquidCrystal' does not name a type
sketch_jun06a:18: error: expected unqualified-id before '{' token
sketch_jun06a:18: error: expected unqualified-id before ',' token
sketch_jun06a:18: error: expected unqualified-id before '{' token
sketch_jun06a:18: error: expected unqualified-id before ',' token
sketch_jun06a:19: error: expected unqualified-id before '{' token
sketch_jun06a:19: error: expected unqualified-id before ',' token
sketch_jun06a:19: error: expected unqualified-id before '{' token
sketch_jun06a:20: error: expected declaration before '}' token

Please help!

yellowcouch (author)soul19742011-06-09

Hey soul 1974 it looks like you dont have the libraries downloaded from the arduino.cc website i sent you a pm that should take care of it let me know how it goes!

soul1974 (author)yellowcouch2011-06-19

HI,

I downloaded all the libraries but it seems the code is corupt, could you please respond to my PM and email me the code. I realywant to get this project to work I have posted on numerous forums for help and I am getting alot from FalconFour but I am still not getting your results please help.

soul1974 (author)yellowcouch2011-06-15

Thanks for all the help, pleae could you send me the code in a txt file i will pm my email address to you,it seems the problem is in the code.

yellowcouch (author)2011-04-26

also i ve had a couple questions about how this thing is powered and the answer is a 9v. battery = ]

yellowcouch (author)2011-03-31

thanks for the compliments! Atom i will for sure stay outta air ports well any mass transit for that matter lol. and spark2flame post a photo of yours i'd love to see what it looks like. And airsoft although i do have a paintball gun air soft is usually the choice = ]

spark2FLAME (author)2011-03-31

Wow, very cool looking prop and useful too! I will definitely be making this for the next skirmish. Oh and by the way, do you paintball or airsoft?

atombomb1945 (author)2011-03-31

It should go with out saying that you should avoid Airports with this.

Nice set up.

About This Instructable

53,977views

121favorites

License:

Bio: i like things that blink and buzz
More by yellowcouch:Cheap and Fast Dog BedProp bombA Nintendo Controller Pillow that really works!
Add instructable to: