Author Options:

Is it possible to create a voltmeter to test car batteries with an arduino and 3 leds? Answered

I am trying to figure out how to wire an arduino as a voltage meter to test the voltage on car batteries and lead acid batteries in other things. I want to output the readings in 3 different colors leds (green, yellow, red) that correspond to the voltage range. Im a n00b in this field and Id hate to fry any components trying to figure this out without guidance, my main concern is making the voltage and current safe for the arduino, so I need to know any additional components necessary to make this work. I know  I need to implement a voltage divider, etc to bring the voltage to a range the arduino can handle but do not know if the 1/4w resistors I have on hand will suffice. Id appreciate any feedback on how to hook this up and even more so anyone able to provide sample code and/or urls with hints to get this working.


An Arduino is complete overkill for something you can do with a couple of opamps, but its your money.....

You want a fairly high resistance potential divider, but not too much: if you make the chain say 1K, 12mA will flow in it. A 330 Ohm and a 560 Ohm would give you a reasonable range to work with.  Put the 330 Ohm to ground, and the 560 Ohm to the battery. Put the cathode of a diode to the top of the 330, and join the 560. Put the anode of the diode to +5V. Put the cathode to the input to the arduino analogue channel.

Or with a couple of resistors and transistors, for that matter; if all  you want is high/mid/low/dead this sounds like a great opportunity to build an extinction voltmeter.

Extinction voltmenter: Basically, a circuit where a light goes on and off at a specific voltage. The traditional simple version for AC was an NE2 bulb in series with a potentiometer with a calibrated dial. Turn the dial back and forth until the bulb is just barely lighting or going out, and the knob points to the voltage. There were also go/no-go versions which lit up around 100 and 200 volts, just so you could tell a 110VAC circuit from 220V; I haven't seen one that also handled 440.

Of course this requires that something in the circuit have a sharp threshold response. The NE2 provided that; for an LED version you'd have to throw together a bit more circuitry. (eg that zeiner diode). The lower-threshold circuits also have to be able to tolerate the highest voltage you expect to measure, of course.

(Then there are stories about the electrician my grandfather used to work with, and his not-quite-suicidal way of determining whether a circuit was 110V, 220V, or 440V. No, I'm not going to describe it here; it's very much a "don't even think about trying this, kids" item.)

I think all you need are a Zener diode in series with your LED and the current-limiting Resistor.  Each LED will light up if voltage exceeds the Zener voltage.  If you want to JUST MONITOR voltage of the battery, that's all you need.  If you want to TEST the battery you should add some kind of load-bank.... like a headlight ... or big resistor... to place some amount of LOAD on the battery during testing.  Most bad-car-batteries will indicate lower voltage when a load is placed on them.  The zener would be wired in opposite direction compared to the LED.