Arduino Uno powered in a car with a battery. Working 24/7.

Hello :slight_smile:
I have built an arduino-based gps system (Uno + Ublox NEO-6M), but I totally forgot about supplying power to my device.
What I'm trying to accomplish?
I want Arduino to work all the time. 24/7. When the engine is ON, battery is charging, and Arduino is powered from car's 12v bus (which powers cigarette, radio, etc.), and when engine is shutting down, Arduino is powered from the battery. This is how I would like this to work, but I'm not sure, how to make it happen. I'm more programmer than electrician, so I'm asking you, guys, for help :slight_smile:
What kind of battery should I use, and how it should be mounted? I know, that cars' 12V rails can have destructive spikes and will drop-out when the starter motors fires up. I read a lot of topics on the Internet, but I haven't found a solution satisfying me enough.
Thanks! :slight_smile:

I have an Atmega328 on a Veroboard circuit powered from a 12v battery (which is charged with a regular 12v alernator). It is powered through a 7805 voltage regulator and has been running 24/7 for about 2 years.

I presume (but I have not tried it) that you can run an Arduino by providing a regulated 5v power supply to the 5v pin.

...R

What battery are you using? li-pol / li-ion? Which one is better in that case? And could you be more specific how your circuit looks like? Part how to get arduino powered while the battery is charging.

P.

pablo7890:
What battery are you using?

200 Ah Lead acid

...R

Seriously the best way is to put a charge regulator in front of a lipo and a transformer in front of that. I'm guessing a charge regulator with an auto shutdown is available. Either way you're pulling mAh's and a cars battery carries hundreds of amps.

A solar panel would compensate for the low drain.

dhtmldude:
Seriously the best way is to put a charge regulator in front of a lipo and a transformer in front of that.

Please explain the role of a transformer in a DC electrical system

Please explain the need for any small battery when there is a huge 12v lead-acid battery available.

...R

I'm by no means an expert on the matter, but I've done something similar so thought now was a good a time as any for my first (hopefully) helpful post. First any kind of lithium battery charging in a car unsupervised just sounds dangerous, odds are pretty good you'll end up trying to explain to the insurance company why your car burned to the ground. In my opinion i would just run some wires from the fuse panel under the hood (maybe the one inside depending on free fuse holders) through the firewall to where ever you have the duino, this is where i was unsure, i'm not sure where the best place would be to place the 5v regulator ? i put mine after the fuse. Then just wire your duino to the regulator :slight_smile: as Robin2 stated your working with a battery that provides hundreds of amps and you'll be drawing mAh. Another thing to consider as to the solar panel which i feel is unnecessary is that your stereo (mine at least) already draws a steady 200mAh when the car is off for the clock memory. On a side note i thought transformers were used in ac circuits ? i may be wrong i'm in the process of teaching myself dc and the only thing i know about ac is how to change plugs and switches. Although if your duino starts to pull several amps then id consider the solar panel but even still i'm sure you'll start your car at least once in the couple hundred hours it would need to kill the battery. Bear in mind you'll need about 30% of your batteries capacity to start and about 45% if it's cold (in my jimmy at least anyways), so that could mean you'd need more current for larger engines and if there's significant wear on your starter. If i happen to be blowing smoke out of my *** on any of this please feel free to leave some constructive criticism :slight_smile:

Robin2:
Please explain the role of a transformer in a DC electrical system

Please explain the need for any small battery when there is a huge 12v lead-acid battery available.

...R

i call it a transformer, its a dc 2 dc converter, step down converter, whatever you want to call it. its role is to convert 12 volts into the 5 volts the duino requires. Theoretically you can do away with the battery after that and just have your circuit drain the battery @ mAh. Would it kill your battery? Maybe not over night, do the math. How many amps does the duino drain? How many Amps is your reserve capacity? Any chances of you leaving the car parked for weeks or months at a time? What the hell are you trying to accomplish anyway :slight_smile:

dhtmldudes transformer would be a voltage regulator ? . It does all depend on the current your pulling tho. In my jimmy i have a pi controlling a mega with some of my own sensors and tied into everything i can control or monitor in my car windows, locks, wipers, accelerometer, and some impact sensors attached to the frame(monitor most of the sensors for the mud bogs, i know when im going to break down before it happens, usually) even have it monitoring ODB. When my car is off i pull ~800 mAh increasing to ~1.3 amps when everything is on. In the summer it can sit a full month (forgot to shut it off when i parked at the airport) before i notice a difference when i start it, i tested it in the early stages and got 2.5 months before it completely drained the battery. Winter tho is a whole other story (live in northern Canada) i can leave it about a week in the cold before my jimmy wont start without a boost.

Edit: On a side note when doing the math on how long the battery will last DON'T base it off of the cold cranking amps that's only what the battery can supply for 30 seconds per cell at -18 . I made that mistake at first.

cgroshko:
dhtmldudes transformer would be a voltage regulator ?

i use this to step down the voltage:

http://www.amazon.ca/dp/B00CE75K0W/ref=sr_ph?ie=UTF8&qid=1448141697&sr=1&keywords=12+volt+transformer

before i used this http://www.amazon.ca/gp/product/B00SY37S00?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00, and it overheated.

Fair enough I've read of buck converters to step up voltage have never heard of one to step down :slight_smile:
I'm currently using this one with no heat issues that I've noticed at least, but your transformer one looks like it'd do a better job.

dhtmldude:
i call it a transformer, its a dc 2 dc converter, step down converter, whatever you want to call it.

This a programming forum and programs only work if they are very precisely constructed.

Using precise technical terms seems like a good idea. That way there is no confusion.

A transformer is an AC to AC voltage converter. Transformers are the principal reason that AC is widely used.

...R

Robin2:
This a programming forum and programs only work if they are very precisely constructed.

Using precise technical terms seems like a good idea. That way there is no confusion.

A transformer is an AC to AC voltage converter. Transformers are the principal reason that AC is widely used.

...R

AC to DC converters, also known as transformers, use the same principle that a DC to DC converter, also known as a transformer, uses. A primary coil inducts a current onto a secondary coil and the number of winds in the coils determines the amount of current being stepped up or down. Coincidentally they look exactly the same.

dhtmldude:
AC to DC converters, also known as transformers, use the same principle that a DC to DC converter, also known as a transformer, uses. A primary coil inducts a current onto a secondary coil and the number of winds in the coils determines the amount of current being stepped up or down. Coincidentally they look exactly the same.

I think you will find that there is a rectifier on the output side that converts the AC output from the transformer into DC to drive your model train, or whatever.

...R

I want Arduino to work all the time. 24/7

I am intrigued as to why it must run 24/7 even with the engine not running but I assume that there must be a reason. Would you care to share it with us ?

dhtmldude:
A primary coil inducts a current onto a secondary coil and the number of winds in the coils determines the amount of current being stepped up or down.

Which still gives you AC on the secondary coil. A rectifier is then used to convert the AC to DC.

npkamen:
Which still gives you AC on the secondary coil. A rectifier is then used to convert the AC to DC.

Bingo. What's that called?

Thanks for all your replies ! I got some new knowledge from them :slight_smile: Really appreciate it.
I did a lot of research about the topic in past few days, and I decided to use li-poly battery. I believe it's worth to give it a shot. I've found a complex scheme for a case similar to mine. Take a look at the AtairLabs's post:
http://forum.arduino.cc/index.php?topic=22596.msg170746#msg170746
On the input I am going to put LM7805 voltage regulator with capacitors, of course.
Does it have a chance to work properly?


UKHeliBob:
I am intrigued as to why it must run 24/7 even with the engine not running but I assume that there must be a reason. Would you care to share it with us ?

Sure :slight_smile: I designed a simple gps system with gsm features. Eg. I send SMS to Arduino and I get instant reply with current gps coordinates. Also with the PHP script on my webserver I can real-time follow my car on Google Maps' map embedded.
"GPS-side" is handled with Ublox NEO-6M v2 module, and "GSM-side" is handled with old phone (SE K800i) connected directly to arduinos digital pins, communicating through AT commands/serial port.
Also there is a feature which allows to save gps logs on microSD card.
That's pretty much all the stuff I'm trying to get powered :slight_smile:

I can real-time follow my car on Google Maps'

It sounds like you expect your car to be put on a trailer and towed away. Is that likely ?

pablo7890:
On the input I am going to put LM7805 voltage regulator with capacitors, of course.
Does it have a chance to work properly?

I thought I dealt with that in Reply #1

...R