Using an Arduino to Measure voltage of a 12V Car Battery

Hey, I'm currently working on a car battery (12V lead acid battery) monitoring system that I plan on making into a PCB design.

I'm currently researching ways I will measure voltage and they simplest way I feel is a voltage divider.
The arduino will be powered off a seperate battery and I'd like this system to work when the car is running and off.
When a car is running it can reach up to 14.6V or so due to the altenator so I'd say 15V to be safe.

What would be the best way to go about this, such as resistor values & ratings, reading it into the analog of the arduino, protection (perhaps a zener diode?) etc.

Any insight would be extremely helpful.
Thanks

Automotive electrical circuits are extremely noisy and hazardous to electronics. You will need protection against high voltage spikes, electrical noise and voltage reversals.

There is plenty of design information online, for example Transient Voltage Suppression in Automotive Applications

LED volt meters are available for the price of a cup of coffee.
Leo..

You can add a protection diodes to your voltage divider.

Or, the AVR chip (Arduino Uno, etc.) actually has small (low current) diodes already built-in and if your voltage divider resistors are in the ballpark of 10K, that limits the current and the built-in diodes can probably handle it.

I have a couple of these.

Personally first I would heed the advice of jremington's post. Then I would likely take the divider route. Finally I would do as Wawa suggested which is what I did on an old car I had. Unless you plan to do something with the voltage readings a DC voltmeter can be had off the shelf for less than you will have invested in parts.

Ron

Be especially aware of your ground or negative connection. If the car ground opens up all the current will go through YOUR ground connection. Fuses for both + and - are necessary.

First answer, second example is excellent.

I've used this, others would probably suggest some changes. I was using a Mega2560, so 5v input on the Arduino pins - adjust the divider resistor values if your Arduino does 3.3v
One important thing to note is I use a separate regulated +5vdc supply for sensors and similar, which those schottky protection diodes would feed back into - not into the Arduino internal supply!
The BZT03C18 is like a high power zener but also able to handle much higher surge currents like a TVS.

For permanently powering your Arduino in a car you need something like one of those cheap adjustable switching supplies like this, and set it to 7 or 8 volts and connect to the input barrel or Vin pin.

Put something like this in front of that adjustable supply, even though they are fairly robust, you cant underestimate the noise and spikes available in a car!

image

EDIT
In the first diagram I've essentially got two protection systems in place, the zener then the schottkys, which is a bit of overkill. You may only need to choose one system. I could have a particularly noisy car and I was annoyed at losing previous projects for non-obvious reasons (most likely noisy electricals)