Introduction: Barbie Arduino Car Alarm
Background: Barbie had a really nice convertible sports car from her boyfriend Max Steel, but every time she would park it at the beach Ken and his buddies would be messing around with her car. She decided that it was time she had a car alarm installed so that if Ken or anyone messed with her car, EVERYONE would be looking at him, and the Cops would hopefully arrest him as well. My Daughter and I thought we could help Barbie with her problem.
The scope of this project involved all the things an actual car alarm would do.
1) Turn alarm system on and off with a remote
1.1) Beep when the alarm is turned on or off
2) Alarm when on and the vehicle is bumped
3) Run the alarm for a short time before turning it off (unless bumped again)
4) Override for the alarm if accidentally bumped (Alarm system off stops alarm)
And - YES you could use this as a real car alarm with some minor modifications
1) passiver buzzer (+ - S)**
2) tilt switch (tried ball, but mercury worked better) (+ - S) w/LED
3) button(for tests) (+ S and 10k pull-down)
4) IR detector (+ - S) w/LED
5) remote control
6) 5 AA batteries fed in to GND and VIN pins on sensor board (You could hook to DC port as well)
!!! Do NOT use batteries and your USB for power !!!
7) Arduino Sensor Shield v4.0
** Note: (+ - S) means that the sensor required + (Voltage) - (Ground) and S (Sense/Signal Pin)
Our IR Transmitter is the MakeIt:Robot Remote Control IR transmitter from Radio Shack But with a little testing
you could use any IR transmitter e.g. "extra" buttons on the TV remote. (I promise Barbie won't care.)
This is a great reference for the IR receivers: https://arduino-info.wikispaces.com/IR-RemoteCont...
Some of these parts were from the "37 Sensor Kit" available from various places online
TO DO: Add a two color blinking LED to show when alarm is armed (RED) and not (GREEN)
Written for and tested on Arduino Uno 1.6.4
Step 1: Prepare the Arduino Board
First we need to prepare the Arduino board. On ours we have mounted a Arduino Sensor Shield which allows easy access to all the pins on the Arduino via the center section of the board (sets of 3 pins) and also provides V+ and Gnd with each signal pin which can be used as needed.
You can also load the code on your Arduino at this time.
Available at Github: BARBIE CAR ALARM CODE
Or click the code link below to download it to your PC. After you load it, disconnect power from your Arduino.
Step 2: Attach the Sensor, Beeper and IR Receiver
Next attach the motion sensor switch, the passive beeper and the IR receiver to the board as follows:
The beeper is attached to pin 8 and it needs ground and V+
The motion switch is attached to pin 6 and it needs ground and V+ for the LED
The IR receiver is attached to pin 11 and it needs ground and V+ for the LED and the receiver.
Optional for testing: Push button switch attached one connection to pin 5 with pull-down 10K resistor between Gnd and 5, and other switch wire to V+
Step 3: Test It
1)Connect power to your alarm.
2)Click the upper right button to arm the alarm. (double beep)
3)Wiggle the tilt switch.
- (If LED light on tilt switch doesn't light up, then you most likely have it wired wrong or tilted the wrong direction. LED on = Not active motion LED off = Motion trigger)
4)Click the upper left button to disarm the alarm. (double beep)
- (If LED light on IR receiver doesn't flicker, then you most likely have it wired wrong.)
- If the motion sensor is triggered the system will alarm 10 times (so it's not so annoying.)
- If the motion sensor is triggered during an alarm the system will reset the alarm beep count and continue beeping 10 more times.
- If the disarm button is pressed the alarm will stop and the system will disarm.
Note: If the system is armed it will not arm again (no double beep) If it is disarmed it will not disarm again (no double beep)
Step 4: Mount It in the Car
Since this was just a fun project for me an my daughter we didn't go to great lengths to mount it. Eventually it will come out and become some other project somewhere else. That being said, you will notice a lot of blue painters tape. It works great to stick things temporarily and not leave residue behind when you decide to remove it.
You'll need to tape down: Battery Pack, Arduino Board, Beeper, IR Receiver (Outside of car somewhere!) and motion sensor (Someplace you can adjust the tilt until its correct.)
We have a be nice policy.
Please be positive and constructive.