I want to assemble an Arduino project that would be powered by car, and also it should be power-independent to some degree. This project will be a simple car alarm system, with gps reciever and will send messages by gsm network (yep, there're plenty of those, but it's just a hobby project). But I'm a beginner in electrics, so I don't know much about subject. Recently I connected new car stereo system by myself, and proud of it - that should give you some idea :) (there was no ISO connecter in my old car though, so I had to discover and sort wires).

I plan to get positive wire from cigarette lighter, and connect negative to car body.

I need a battery (I'm thinking SLA), and a charger that will be able to charge it from 12V car electrics. Since charger will be connected to lighter (which powered through ingition), it will be active only when engine is running, so it wouldn't drain my car battery.

So, can I just get any car charger, say for usb or some phone, and charge my battery with this? Which will have an arduino project connected to it at the same time?

Or I need some failsafe? I heard smth about "voltage regulator", but I don't know what it is.

Links to appropriate chargers available online will be appreciated.

First, a note - there is already a negative in the cigarette lighter, no need to run a wire to chassis.

For your skill level, what you are proposing is quite complex. Instead I suggest the following setup:

1. Purchase a Seeeduino Stalker Waterproof Solar Kit. This kit is great. It comes with an Arduino with clock, SD card and XBee interface. It also comes with a solar panel, lithium battery and the charging circuitry on board. It can charge via the USB port or the solar panel. For the GPS, you may also want to look at their GPSBee which can slot into the board.

2. Purchase a cigarette lighter to USB charger. This will convert the car 12V to USB 5V which can power the battery.

3. In the car, connect the Stalker to the USB charger, and locate the stalker somewhere on the dash or parcel tray where it can also charge from the solar panel when the car is off.

4. Now you just have to spend hundreds of hours writing the code and debugging. Good luck!

• I've never used one myself, but what's a practical way to connect a GPSBee and GSM modem at the same time? Jul 14, 2013 at 14:23
• Solar charger is hardly needed, because as a alarm system, it must be hidden somewhere, not lying on a dashboard. So I need a battery anyway.
– Sly
Jul 14, 2013 at 15:43
• @PeterJ GPSBee communicates using the Arduino UART, so a GSM modem will have to communicate via 2 digital pins using the SoftwareSerial library. The SoftwareSerial library that comes with Arduino 1.0+ is based on NewSoftSerial and is pretty good. Jul 15, 2013 at 1:42
• @Sly The stalker comes with both solar and battery. You don't need to attach the solar panel though. However, for GPS you will need the antenna to have some view of the sky, if it is hidden away you wont get very good reception. You could run the panel and antenna to the parcel tray and have the electronics hidden. Jul 15, 2013 at 1:45

One thing to consider is the need for a battery. If you power down the GSM modem when not sending / moving you might find the power draw is only in the order of 500mW so you probably won't have an issue unless your car is sitting for over a month. If that sounds OK you could just pull apart a 12V lighter to USB charging adapter, connect it to something with permanent power and use that to power the Arduino.

Another way to get a power backup simply would be to use the car to USB charger again but connect it to the charging input on one of the USB "battery extenders" designed to for extending the life / recharging of USB phones and tablets etc while on the go. Once again the other side would provide the 5V regulated output over the USB port that could be used to power the Arduino.

One thing if you go that way to be aware of is that most Li-Ion batteries should only be charged at temperatures around 0°C to 45°C and discharged at –20°C to 60°C. The pack should have protection circuitry to avoid that happening but make sure to mount it in a spot where it won't get direct sunlight, even then I've measured temperatures up to 70°C in the interior of a car. Having said that many commercial GPS tracking units do use Li-Ion batteries.

However is your case when -30°C is on the cards a Li-Ion based solution isn't likely to be ideal so an SLA battery may be better. Rather than continually cycling the battery I'd still recommend powering the system continously and use a product such as the DEI 520T 12-volt Back-up Battery and Sensor System to provide enough power to keep the system running a few hours after the battery is disconnected during theft. It also has a seperate output to detect when the battery is disconnected you can use to trigger an alarm, although note it's 12V and shouldn't be connected directly to the Arduino.

The output from that will be filtered somewhat but still around the 12-14V mark. Even if your Arduino can accept a voltage that high most (all?) use a linear regulator so it will be much more efficient to use a switching regulator to drop down the voltage. If using an Arduino that can be powered from USB once again you could use a car USB charging adapter or otherwise use a variable output switching regulator. A search for LM2596 on e-bay will show lots of cheap ready-made modules.

Car power systems have some quite large and nasty voltage spikes (including voltage reversal) and designing a reliable power supply from scratch is a bit of a larger and more complex undertaking than it sounds. I'd keep it simple and use proven off-the-shelf stuff for a start.

• Well, as I said, this is a simple alarm project - it wouldn't do much good, if it can be disabled just by unplugging car battery, would it? Battery extender - good idea, but I thought Arduino requires 9V to power up, not 5V? And third - here, in Russia, we have temperatures as low as -30°C, what it will do to battery extender?
– Sly
Jul 14, 2013 at 15:39
• @Sly, it depends on the Arduino many can be USB bus powered and on some others you could bypass the on-board regulator and use the 5V directly. But the Li-Ion proposed in both answers won't be suitable down to -30°C. Tomorrow I'll update the answer with a way to use an SLA. Jul 15, 2013 at 3:09