Go Down

Topic: Powering Arduino directly from car battery (Read 12541 times) previous topic - next topic

Techxorcist

Mar 22, 2017, 06:39 pm Last Edit: Mar 22, 2017, 07:52 pm by Techxorcist
I'm planning out an arduino project,and one of the roadblocks I've come across is powering the Arduino off the car's battery, as i know how sensitive to voltage spikes electronics are, and  how the voltage of a car battery can spike and fluctuate while running.

I have tried reading a few forum posts to understand the best way to go about creating a circuit to safeguard the arduino by regulating the voltage coming from the car battery, but my knowledge in electronics does not go much further than A Level/High School physics, and so the terminology used in a lot of these posts is a bit beyond me.

From what I have read I know I need to use some combination of resistors, capacitors, diodes and zeners (which are new to me), but am struggling to get a grasp how to actually go about it.

Could someone explain to me in simple terms a couple of things.
  • First, how a zener actually works and how it is wired up,
  • Secondly, in simple terms how to go about assembling the circuit, or better yet point me in the direction of an 'off the shelf' product that would do the job


Many thanks

*edit*
The arduino will need constant power, even when the car is off, and preferably it needs to stay on even when the car is started (as power is generally cut to other devices and sent to the starter motor instead, from what I understand)

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Techxorcist

Use a car power adapter, contains all those goodies for you.
https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=car+cell+phone+charger
Connect to the USB port on your Arduino.
I forgot to mention, the arduino is going to be hidden, so preferably I'd like to keep that socket free to use for other things.

The arduino will need constant power, and sometimes that socket it either switched (ie off when the car is off) or will temporarily switch off when the car is started.

DVDdoug

#3
Mar 22, 2017, 07:50 pm Last Edit: Mar 22, 2017, 08:03 pm by DVDdoug
Your car's voltage may be "worse" than mine, but I'm running an Arduino in a car with the car's "12V" into the Arduino's Vin pin.  


The Arduino's on-board regulator is a reasonably-good "filter".   The Arduino specs say:
Quote
The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The biggest concern is usually if you are powering lots of "stuff" through Arduino's regulator.    The higher the applied voltage (and it can be about 15V) the more current you are "dropping" across the regulator and the hotter the regulator gets.   Also, the more current you put-through the regulator the hotter it gets.    

So for example, if you are just running the Arduino and a couple of LEDs you should be OK with the vehicle-power.

Quote
First, how a zener actually works and how it is wired up,
A zener alone won't do it.

An LM7812 voltage regulator is easy to wire-up (just add 2 capacitors) and the TO220-package version can dissipate more power than the Arduino's "little" regulator.    Or, if you're running lots of 5V stuff and you need more 5V current, you can buy a 5V switching regulator board/module and power the Arduino off that (bypassing the Arduino's linear voltage regulator).

P.S.
You do need to protect the Arduino's signal  inputs from anything greater than +5V (or anything negative).     A simple zener & resistor or regular diode & resistor circuit can do that.   Here's a link, if you are connecting anything from the existing car electronics to your Arduino.

CrossRoads

You can find versions with flying leads (vs power socket adapter) that can be connected to an always-live circuit in your fuse box.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Techxorcist

Thanks for all the replies, the arduino is going to be used to control a series of NeoPixels, to replace the DRLs in the car, and because they're going to replace the LEDs that already exist, there is already a regulated 5V supply which will be used to power the Neopixels, with only the signal wire coming from the Arduino to control the color/brightness.

Hopefully the arduino won't be pulling that much current at all, as it won't be directly powering the Neopixels.

I may buy one of those direct hardwired car chargers just to be on the safe side, which also means the power can be cut off if the car is to be left for an extended period of time.

As for inputs, I won't be wiring anything directly from the Car's electronics. To control the NeoPixels I'm going to add in an additional control panel and also allow bluetooth control, so I shouldn't have to worry about too much voltage going into the input pins.



Go Up