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:
- Good chassis connections! The +ve input comes via a resettable PTC Fuse (200ma) .... followed by
- a Germainium or Schottky diode with less than 0.5v Fwd voltage, to protect reverse spikes and reverse connections...
- 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 )
- 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?