Introduction: Bag Alarm
Today we will be showing you how to make your very own bag alarm! This alarm system can be integrated into purses, backpacks, suitcases, pretty much any kind of bag. It can then be used to protect your personal belongings from theft, misplacement, and even nosey siblings. This system will use photoresistors to tell when the bag is open then send power to a small speaker to deter the theif, and alert you and anyone around you that your bag is being opened. This will come in serious handy when you need to leave your bag around some untrustworthy classmates and or co-workers. By following the next simple steps you can secure your favorite personal belongings for a lifetime!
Step 1: Materials
1. Parrallax Breadboard
2. Wires of varying lengths
3. 1 220 ohm resistor
4. 20 gauge wires
5. 1 photo resistor
6. 7-14 volt speaker
7. 1 TIP120 transistor
8. Parrallax breadboard enclosure (optional)
9. 1 103 capacitor
10. Basic Stamp Editor v2.5.3.
11. Switch
2. Wires of varying lengths
3. 1 220 ohm resistor
4. 20 gauge wires
5. 1 photo resistor
6. 7-14 volt speaker
7. 1 TIP120 transistor
8. Parrallax breadboard enclosure (optional)
9. 1 103 capacitor
10. Basic Stamp Editor v2.5.3.
11. Switch
Step 2: Step One
1. Begin by creating a basic photo-resistor by using a: 220 ohm resistor, 103 capacitor, photo-resistor, and 1 20 gauge wire
Install the parts as depicted in the picture above.
Install the parts as depicted in the picture above.
Step 3: Step Two
2. Now you will need to test the amount of light inside the bag you plan to use, (in a completely sealed bag it should be around 4000 to 10000). Use the code provided to test the light constant.
' {$STAMP BS2}
' {$PBASIC 2.5}
timeleft VAR Word
timeright VAR Word
DO
HIGH 5
HIGH 3
PAUSE 3
RCTIME 5, 1, timeleft
RCTIME 3, 1, timeright
DEBUG HOME, "timeleft =", DEC5 timeleft
DEBUG CR, "timeright =", DEC5 timeright
LOOP
' {$STAMP BS2}
' {$PBASIC 2.5}
timeleft VAR Word
timeright VAR Word
DO
HIGH 5
HIGH 3
PAUSE 3
RCTIME 5, 1, timeleft
RCTIME 3, 1, timeright
DEBUG HOME, "timeleft =", DEC5 timeleft
DEBUG CR, "timeright =", DEC5 timeright
LOOP
Step 4: Step Three
3. Now install your speaker by running another wire from another PIN on the breadboard. You will use: 2 20 gauge wires, 1 TIP 120 transistor, and your 7-14 volt speaker.
Install as shown above.
Install as shown above.
Step 5: Step 4
4. Now you have to write your code in basic stamp to test your device and make sure its working. Use the code below and substitute the left constant variable for your own. ( in a brightly lit area, the speaker should come on after around 5 seconds).
' {$STAMP BS2}
' {$PBASIC 2.5}
timeleft VAR Word
leftconstant CON 4000
PAUSE 5000
DO
GOSUB read_p
GOSUB alarm
LOOP
read_p:
HIGH 5
PAUSE 3
RCTIME 5, 1, timeleft
RETURN
alarm:
IF (timeleft < leftconstant) THEN
DO
FREQOUT 4, 2000, 4000
LOOP
ENDIF
PAUSE 20
RETURN
' {$STAMP BS2}
' {$PBASIC 2.5}
timeleft VAR Word
leftconstant CON 4000
PAUSE 5000
DO
GOSUB read_p
GOSUB alarm
LOOP
read_p:
HIGH 5
PAUSE 3
RCTIME 5, 1, timeleft
RETURN
alarm:
IF (timeleft < leftconstant) THEN
DO
FREQOUT 4, 2000, 4000
LOOP
ENDIF
PAUSE 20
RETURN
Step 6: Step Six
6. You've now created your own bag alarm! You can use your enclosure if you wish. Just place your board inside, run the switch, your speaker, and photo-resistor to the outside of the enclosure like we did. ( we drilled holes for these).
barely fit in our enclosure
barely fit in our enclosure
Step 7: Step 7
7. Done! Now you have a fully portable alarm system for your bag. Just place your valuables into a pocket along with your alarm. Now if anyone tries to open your bag without your consent, they will be greeted with a very unpleasant and aggravating sound.
Enjoy!
- Joe, Cody, Jordan
Enjoy!
- Joe, Cody, Jordan