Author Options:

Arduino 12V Car-alarm with PIR sensor and remote control - expertise needed. :-) Answered

Hi all,

This is my first "big" Arduino project and my first fritzing, so please bear with me. :-)


- Build the cheapest possible car alarm system with a loud siren
- It should be possible to activate/deactivate the alarm with a remote control.
- The alarm will once activated, sense any motion in the car (if someone breaks a window and tries to steal anything) and set of the alarm.
- The system should not drain the car battery so it should draw a minimum of power.

I've managed to build the first few things, but some vital steps are still needed and I hope you can help me sort these out.

Components used so far:

Arduino Pro Mini
- TIP122 transistor
- 2.2KOhm resistor
- 1N4002 diode
- Mini piezo siren (I used a 107dB siren with an operating voltage of 6-15Vdc and current consumption of 140mA)
- Breadboard
- Lots of wires

I'm currently waiting for my PIR sensor to arrive together with the RF receiver/transmitter module, so for now I've added a basic switch to act as the PIR sensor and another for the RF module (activate/deactivate).

The components I'm waiting for are:

- An RF module that I need to order once i find the right one.
- http://www.ebay.com/itm/261041100836?_trksid=p2060...

Questions that still remain and that I hope you can help me with:

1. The arduino should be powered by the cars 12V battery, however I've read that the car battery must be regulated as it delivers anywhere from 12 - 16V. I could connect it directly to RAW but in case the battery peaks above 16V i risk damaging the Arduino. I'm very unsure as to how I do this regulating best? One option could be to buy a "DC-DC step down converter - 4-35Vdc > 1,23-30Vdc" and set it to 5V, but maybe a more simple and/or cheaper solution exists?

2. Since the power consumption should be kept to a minimum, I plan to add the RF before the step down converter so the powering of the regulator (step down converter?) only happens if the alarm is activated from the remote. First question is: can I use a TIP120 for this and simply connect the RF to base, and the regulator to the collector? Second: In this case, the Arduino will be powered off the hard way by cutting power when deactivating the alarm from the remote - can the arduino take that in the long run? and finally, the RF receiver needs to get its power from somewhere, so what can I do here - is the best thing to use a 12V RF module instead of the Arduino 5V RF module or can this be solved some other way?

3. Any good ideas for minimizing power consumption?

4. Anything I can do to further improve the design? :-)

I'll update this post as I progress with the project including a more detailed step guide to how to implement this and the source code I'm using.

Instructables arduino posts and commets have helped me a lot during over the past few weeks working with Arduino so I hope you can help me reach the finish line with this project.




i dont know if PIR would be appropriate in a car. The inside of a car can get 172F or more. I can see a sudden temp change setting the alarm off.

Leaving my tunafish sandwich for lunch in the car is a bad idea then?

Depending on where the arduino is placed, it too may well be beyond the recommended temps for reliable operation.

You could be right. "Luckily" I live in Denmark where 98% of the time you have crappy weather... There are plenty of times where I wish it were different but in this case I'm in luck! ;-)

Hmmm, I thought Denmark was relatively free of car theft but you might want to look into commercially produced alarm units specifically for your model car which is tied into the lights, horn, and possibly starter electronics. Maybe older, scrapped or surplus units are better to hack if you want a real alarm.

True, Denmark has only few car thefts, but I'm completely in love with this Arduino thing and this is a really good start-up project for learning a lot about relays, regulators, etc. etc. so that's the main reason for building this.

1. The Arduino does not need much power and your alternator should never give more than 14.5V.
If in doubt I would just use a 5 or 9V fixed regulator to get the input voltage done.

2. Low power devices are the key here, if you use something that needs 500mA or more to run then you missed your own goal by selecting the wrong parts.
Arduino modules are available with quite low power consumptions and you can even get those that are powered by the RF energy of the active remote.
I would not like to mix external and internal components for a project like this.
The TIP120 might be a bit of overkill for such a low load but it will work as intended.
But if you turn the Arduino completely off with the remote it won't harm it either.
Keep in mind the alarm is usually only off when you use the car, so power consumption here would not be an issue anyway.
Means you can simply use an input pin to on the receiver to stop the progrm or deactivate the sensors and input switches.

3. As said for low standby consumption the best way is by startig with low power devices.
If that is not possible consider a triggered mode of operation.
Instead of constantly blasting energy to those sensors only do once or twice a second (testing required to check startup current and time required to actually work properly).

4. Add sensors/swtiches for what you need.
Glass breaking sensor, ultrasonic, air pressure...
Also consider adding a relay to interrupt the car's computer or ignition system when the alarm is active.
No point in having an alarm if someone just ignores the sound and drives off with it ;)
Take lots of pics and make an Instructable out of it.

Hi Downunder35m.

THANKS for the reply - really great to get some input on this!

1. I've now installed a regulator and set it for 5V (4.5V to be on the safe side and connected it to RAW). It's a good point that perhaps a fixed regulator will do the job better, so I'll look in to that once I have everything running in the test setup.

2. Agree. Low power devices must be the way to go and maybe a 12V RF device in front powering the Arduino on/off would be silly since the device usually would be on when the car is turned off, thus drawing power... That means that I'm on the right track in bullet 1, when I installed the 5V regulator, except it should be fixed output voltage and not adjustable.

I'm a bit confused when it comes to the modules that are powered by the RF energy of the active remote and that it (as I understand it) is a great way to optimize. Can you elaborate for me - that sounds really interesting?

Also, you are probably right about the TIP122, it was all I had in my drawer. Do you have an advice on what I could use instead to further minimize power consumption?

You also mention internal and external components. Do you mean that me having a regulator as a separate device is something I should avoid?

3. Good point about only testing once or twice a second - I'll add that.

4. Excellent - some good ideas - thanks!

And... I'll definitely add an Instructable once I have most of the project complete - have already gathered some of the pictures needed. :-)

The Arduino needs 5V minum to operate properly and will accept a max of 15 through the power connection, some of the small models only use 5V as they don't have a voltage regulator on board.

On these sensors I can't really give much info as I never used them for my projects.
But I do know they cost a few bucks more than your normal variety.
A google search for RF powered sensors should give you some info to get going and decide if you really need them or if cheaper is good enough.

I would roll it up from the other end:
Check what you need in terms of sensors and what you can actually get.
Check what voltage requirements they have and create a nice little box with all included to connect them, e.g. voltage regulators, screw terminals, LED control light and maybe a USB port for ease of later program changes.
And then think of ways to get low on the power side like:
Using a NO relay contact to seperate the ignition - won't use any power at all and once you deactivate the alarm the relay is activated.
Even if you use a standard car type relay it would take over 2 weeks to actually drain your battery....

Point taken regarding the 5V. I'm going to change it to 6-7V on the RAW input. Reason being that I have the siren running on 6-15V and I don't want to add another regulator so by having 6-7V I can power both the Arduino and the siren... Hmm, but on second thought, that may consume more power since the RAW input port uses the Arduino internal regulator which I suspect probably consumes more power than just connecting to VCC... thoughts?

RF powered sensors for Arduino. As I understand it you mean a low power 12V RF receiver connected to the car battery that supplies the PIR sensor with power and once the PIR sensor registers motion, it starts the Arduino with the alarm circuit. Is that what you mean? Or, do you mean that I have the sensor running with its own battery and once it detects motion it sends signal to Arduino to start up?

I'll have to look in the the NO relay contact - that sounds like a good way of ensuring no power is consumed when the alarm is off, but ofcourse the most important thing is to ensure that the system uses as little power as possible while armed.

Anyway - Just a few minutes ago I finished the first "complete" version with regulator, RF communication (two Arduinos), siren, PIR and LED to signal an alarm. Works quite well and the signal from RF seems to be fairly stable although sometimes it takes a little while for the receiver to register the message sent by the transmitter - probably because I've added a 100ms delay in the receiver causing it not always to listen for messages when the transmitter sends it.

I need to optimize it as you say with regards to power consumption, but yes, probably the best way to go is to first finish off the overall design as much as possible and then think about power optimizations. I'm working on the few additions and then adding it on instructables.


1 year ago

You may want to have a city mode / country mode feature.

In city mode the alarm goes on immediately and prevents ignition.

In country mode the alarm waits for the car to travel 5 to ten minutes before blaring the horn cutting gas flow and flashing the lights.

Ha ha... Good point - although that mode would be quite funny here in Copenhagen as well... Theifs desperately trying to cover themselves behind the wheel while the siren and horn is blasting...

So in country mode, instead of alarming you it scares the cows off the field and you still have no clue where the car ended up?
Don't get me wrong but 5 minutes around here means your car is basically lost already and by the time you find it it is either burnt or only an empty shell LOL