Installing Arduino in a car

Hi folks.

After some opinions …

I have just completed a digital Speedometer to replace the old (inaccurate) Cable driven one in my car.
I have it working and I tested it using my lap top as the power supply.

It detects a pulse emitted from a sensor I have in the gear box, calculates the speed and distance then display the values on a couple of 0.98” OLED screens I installed in the dashboard.

I'm at the final stage of installing and power it from the cars own power supply which is 12 volts.

The Arduino Web site says the on board regulator can handle up to 20v or more, so I thought it may be OK to connect input jack on the Arduino to the cars power supply with a 1 amp fuse.

I assume the cars voltage wont spike more than 20v, but just to make sure I did some searching and found this post :=> Connecting Arduino DUE to a 12V car battery - Motors, Mechanics, Power and CNC - Arduino Forum
I think the general recommendations are to use an external regulator & power supply that can cater for spikes and noise that may be found in a cars power supply.

I’m wondering if the following is a good choice?
http://www.icstation.com/icstation-lm2596-power-module-125v-conver-p-2902.html
It seems to handle a large enough range ?
Thanks for your help

Gee after 49 reads.. Does anyone have some thoughts to share?

I assume every car is different but I've been running one in a vehicle for a couple of years and I'm just using the onboard regulator.

I don't have a fuse other than whatever is already in the car's fuse panel. A 1 Amp fuse might give a little extra protection to the wiring, but if the Arduino somehow shorts-out, it's too late to protect the Arduino...

I did use a [u]protection diode[/u] on an input line where there is a chance of the voltage exceeding 5V.

That module looks like it should handle any transients from the car supply ok.
Newer cars have clean 12V supply connectors that should be usable as is also.
For example, my 2004 VW Jetta Wagon had 12V outlets, I never had issues running a Duemilanove for days at a time from that. I have a 2014 VW Jetta Wagon now, it unfortunately powers down the outlets when the car turns off.

sammypati:
Gee after 49 reads.. Does anyone have some thoughts to share?

I got DC DC buck converters and they beat 78xx regulators, but they do cost more.
I paid just over $1.60 each for 5. A 7805 and heatsink might run 10 cents plus wasted power.

The converter output V is adjustable down to 1.1V. It can turn 6V to 5V, 7805 can't.

The regulator wastes all power over its rated voltage. That's where the heat comes from.
The converter makes low waste heat, delivers more current at the rated voltage.
Your car uses fuel to make electric. It's your choice.

Caveat with cheap converters, check the max Amps, those are output. Make sure it's twice what's needed.

Thanks for your advice everyone.
My car is an old 1979 alfa romeo
i suspect the voltage isnt very stable.

Ill give the dc to dc converter and a 1a fuse just in case.

Thanks again

The voltage is probably a lot more stable than you might think. An accumulator the size of a car battery does wonders to smooth things out.

You could put a capacitor across the input 12V and ground and another across the output V and ground.
Check with hardware guys, or at least their sites to try and get values. These would be the 47uF here:
Grumpy Mike on decoupling caps.

If the 12V is spiky, you might want a couple other small caps on the 12V side to flatten those, the PWM switcher converter will take care of the rest.

You could also read about what a "zener diode" does, and there is another device with similar functionality designed specifically for your automotive issue, but I can't remember the name right now.

This is just out from ST, it might fit the bill:-

I've order a couple of these:
http://www.ebay.com/itm/231496271386?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I got 5 of these buck converters at bulk price.

I'm waiting on a few of these .9V+ to 5V boosters.

If you buy different things in bulk and want them all at once, you have to click a box.
Otherwise you get bags and boxes in the mail over weeks, harder to track.
But bulk rate shipping charge is a flat $1.70 to here, yeah I cover many with one!

I got 5mW red laser modules there, bags of 10 for less that $4.40 last time.

Many think an automobile is just a 12 volt system with a few spikes, it is actually a very complicated electrical / electronic systems. If that were that simple, automotive qualified electronics would be much cheaper. Your electrons can get transients of over 100v for many milliseconds. It depends on what is happening within the electrical system. There are several modules in the vehicle that have transient protection in them, that will help reduce the total transient in the vehicle as they will adsorbe it but not all as there is also a voltage drop across the module power feed. Typically lower end vehicles have less electronics and will get higher voltage transients.

When you have to get a jump start some companies jump the vehicle with a large 24V battery, that will put about 21 volts on the vehicles electrical system until the engine starts then the voltage will go up. The OEM modules are designed to tolerate this and also if that battery is connect backwards, it use to be the module had to survive 60 seconds; sorry I do not know the current specification.

Example: You have a dead battery and the alternator is full out charging the battery. The battery gets disconnected but the alternator is still connected to the electrical system. That alternator is a highly inductive load; as the alternator magnetic field collapses voltage will rise on the output terminals until the energy is adsorbed somewhere in the system. Some remove the diodes and use them to generate line voltages to power AC equipment.

Google "Load Dump" to get an idea of what I am stating. There are many devices that will protect your arduino but a simple diode will not do anything except protect from reverse battery. Even though your SMPS is rated at 40V a surge of about 50V or greater will destroy it, depending on the quality of the semiconductors used in its construction. I cannot say when or if this will occur in your vehicle but I would expect it to happen many times in the life of the vehicle. Some of the newer vehicles have load dump protection in the alternator but that is in the 40V range.

This is on all brands with the older typically being the worst offenders. Sorry for the length but that is what Google gave me.

Happy Motoring.

This link will give you an idea of what to expect.
"https://www.google.com/search?q=automotive+load+dump&biw=960&bih=496&tbm=isch&imgil=qcttITTK0-cixM%253A%253BfRk0aETCYBlsqM%253Bhttp%25253A%25252F%25252Fwww.maximintegrated.com%25252Fen%25252Fapp-notes%25252Findex.mvp%25252Fid%25252F4240&source=iu&pf=m&fir=qcttITTK0-cixM%253A%252CfRk0aETCYBlsqM%252C_&usg=__xiyCJDpugZOT1keu7D5mPatv3K0%3D#imgrc=qcttITTK0-cixM%253A%3BfRk0aETCYBlsqM%3Bhttp%253A%252F%252Fwww.maximintegrated.com%252Fen%252Fimages%252Fappnotes%252F4240%252F4240Fig01.gif%3Bhttp%253A%252F%252Fwww.maximintegrated.com%252Fen%252Fapp-notes%252Findex.mvp%252Fid%252F4240%3B306%3B218"

I agree with all who say, that it will work fine.

If you want to be on an absolutely safe side i would use a 7808 voltage regulator between the battery and your Arduino. You do not need any capacitors as you are not using an AC power supply. Any spikes would be reduced by the internal Arduino power supply.

However, you will not really need the voltage regulator. It will just make your design a little bit safer and reduce the load on the Arduino integrated power regulator.

arduinoaleman

Arduinoaleman, I can't agree with your recommendation. I don't consider it safer at all. It's basically poor advice to ask that they toss a 7808 in there with no caps as a "catch-all". It serves little purpose other than to create waste heat. You will need the caps EVEN when running with DC and it is an unnecessary point of failure that will need to be dealt with.

A simple and affordable buck regulator (as mentioned) will do the task better and cooler. Many of these are rated at up to 40V at the input pins.

Arduinoaleman, I have to agree with pwillard that your advice in this, and other threads is bad. It is rather naive.

For example the statement :-

You do not need any capacitors as you are not using an AC power supply.

Is total crap, and shows little knowledge of electronics. In fact using batteries is all the more reason to have capacitors, look up about supply impedance.

This is a forum for beginners but that does not mean we will tolerate beginners giving advice especially when it is as bad as the advice you are giving.

a car battery has an extremely low internal resistance. so you will not see many spikes and surges when connecting a device to your car power supply. an 8volts power regulator will just reduce the voltage from 12 volts to 8 volts.

a fully loaded car battery can have even more than 13 volts. so reducing the load on the arduino power regulator is not a bad idea.

it will run cooler and has extra protection. however, as i said before, you no not really need it.

i usually use a combination of a 1000µF and a 100nF ceramics capacitor. however, when your input voltage is as stable as a car battery, it is just a waste of space and money.

large capacitors are considered to compensate for short power drops. you will not have these in car electronics.
and in case you have a power drop due to some device in your car, the capacitor would feed primarily the device and not the power regulator.

ceramic capacitors will filter high frequency noise.

cars are like computers nowadays. and if the power supply would be as bad as you consider it to be, the car would probably stop at every other corner.

i usually have the tendency to use too many capacitors. in this case i still would do without them.

large capacitors are considered to compensate for short power drops. you will not have these in car electronics.

Seriously?

arduinoaleman, a car battery will give you lots of spikes. What happens when you start the car? Starter motors can draw 500 amps. Look up 'load dump'-100v+ spikes.

gilshultz:
Example: You have a dead battery and the alternator is full out charging the battery. The battery gets disconnected but the alternator is still connected to the electrical system. That alternator is a highly inductive load; as the alternator magnetic field collapses voltage will rise on the output terminals until the energy is adsorbed somewhere in the system. Some remove the diodes and use them to generate line voltages to power AC equipment.

Google "Load Dump" to get an idea of what I am stating.

Load dumps don't just happen, though. You need to either physically disconnect the battery or have it internally go open circuit or otherwise lose all its capacity in a seriously unusual manner. The alternator needs a sudden, massive downward shift in load. It is most definitely not something you should expect to see.
Now I'm all for protection, but worrying about load dumps is on the extreme end of things.

And if someone tried to jump start my car from 24 volts, I'd bloody well send them a bill for anything they broke.