Arduinos in Cars - Basic power supply protection suggestions

Hello
I was looking for a 'sticky' or a definitive guide to providing a reasonably safe V-in for in-car Arduino projects?

As we all know, cars are never 12volts and spikes, drop outs and reverse spikes are a fact of life, and yes people connect jumpleads and even your lovely project the wrong way around!

My last project is still running after about 7 years in a campervan, but the component count was huge: external 1Amp 7805, 220 uF and 100nF 50v Capacitors with TVS and fat diodes ... with further TVS, reverse clamping diodes and 100nF caps on every analogue pin! Resistor dividers were 33k up 10k down. Certainly overkill.

I looked hard for a definitive post... and this old thread was very useful -

especially Wawa's comments about needless components and keeping less than 1mA so that the Analogue pin's internal protection is sufficient (brilliant use of a 1:15 divider and 16x ADC readings, thus hardware matches software, less maths - pity so many people didn't get it!)
BUT the focus was always on the Arduino, never its supply rail?

Does anyone have experience or a good link?

My suggestion is as follows:

  1. Good chassis connections! The +ve input comes via a resettable PTC Fuse (200ma) .... followed by
  2. a Germainium or Schottky diode with less than 0.5v Fwd voltage, to protect reverse spikes and reverse connections...
  3. in series with a 150ohm 750mW resistor to drop 5 or 6 volts off the 10v to 15v provided... so that the onboard Arduino 5v regulator can cope (many projects will use the 5v rail for displays, sensors etc and it wont survive dropping up to 10v at 50mA - 500mW )
  4. after this resistor is finally my Vin pin, and connecting it to ground are: a fat 220 uF cap to smooth it, in parallel with a 100nF cap (both rated 50v) to take out noise (canbus.. eek!) also a 15v bi-directional TVS diode for spikes.

Is that going to cut it?

My resistor divider measuring the vehicle battery voltage is as per Wawa's suggestion - 150Kohms between the PTC and the pin (no protection, but tiny current?!) and 10Kohms to ground along with a 100nF 50v cap for the noise, using the 1.1v ref (adjusted in my code to be 1.073 as measured on my particular Nano).

I am useless at inductance, and I am very restricted for space anyway, so apart from coils does anyone have any solid advice?

This is a complex subject and rule of thumbs can often lead you astray and work until it doesn’t. It takes that sort of protection (sometimes more) to help a tiny logic level device survive in a harsh environment, you may find some situations where this isn’t enough. There are engineers who spend their entire careers working on this issue and finding better solutions.

I run an in a vehicle Arduino with "12V" directly into Vin and It's been OK for a few years. The onboard regulator provides some protection.

I'd expect that to work in most vehicles and I'd say the odds of a voltage spike killing the Arduino are low. (I never actually thought about reversed jumper cables, but that might kill other more important things in the car.)

So... As with all risks, you have to consider not only the odds, but the costs & consequences of a failure. If my Arduino dies the car still works and I'll have to buy another one (and find a solution). It's not the end of the world.

Germanium diode?

Connecting to "Vin?"

Nowadays, switchmode regulators are available! :roll_eyes:

DVD Doug - that's very useful to know. Thank you.
I only have about one square centimetre to squeeze everything into so reducing the protection to a Cap and a few SMD components seems very possible. As you say - a new Nano isn't a killer. Will be fun to find out.

Something i may have to look into myself. May just chance some regulator circuits. Working on a project for my 1985 chevy and the old voltage systems sometimes are unpredictable. Alternator output varies between 13.2 to 16 volts randomly. Sometimes it spikes a little about 16. Highest ive seen it go is 17.5 on the meter. Possible connection fault somewhere on the alternator voltage regulator. But when it jumps up a buzzing can be heard through the stereo at times. Hoping to code some attiny 85s to do a couple tasks with displays. Ill try out a couple regulators that can handle some inconsistent input voltage and hopefully it won't be an issue. I have new connections to rewire the alternator regulator so hopefully thatll smooth it out somewhat.

The issue with transients is it could be too fast to be seen on a multimeter.