Go Down

Topic: Ammeter to measure current flow in and and out of car battery (Read 1 time) previous topic - next topic

ArduinJoe

I have a 100A 75mv shunt across the negative terminal on the leisure battery in my campervan, and a simple digital ammeter which measures current flowing out of the battery. I also have a switch installed which flips the polarity on the meter and allows me to measure current flowing into the battery - from the alternator when the engine is running, a solar panel or mains hookup when parked up.

Could this be achieved using the Arduino (and preferably my existing shunt) without the need for a polarity reversing switch? I'd like to throw up a value on an LCD display which automatically moves from positive to negative as current flows into or out of the 12v battery.

Thanks in advance!

LarryD

Quote
Could this be achieved using the Arduino (and preferably my existing shunt) without the need for a polarity reversing switch?

An unmodified Arduino measures one polarity only example: 0 to +5Volts with 5V as the A/D reference.
The way you have it in your schematic isn't the same as how you have it wired up!

ArduinJoe

That's what I figured. So is there something clever can be done electronically to use two analogue inputs - one to measure current flowing one way, the other when it flows in the opposite direction?

jremington

No, that can't be done with voltage levels that low, except with additional rather sophisticated circuitry (i.e. precision operational amplifier rectifiers). You will have a hard time measuring those few mV with the Arduino even in one direction only.
"It seems to run on some form of electricity"

mrsummitville

#4
Dec 28, 2013, 03:17 am Last Edit: Dec 28, 2013, 03:39 am by mrsummitville Reason: 1

I have a 100A 75mv shunt across the negative terminal on the leisure battery in my campervan, and a simple digital ammeter which measures current flowing out of the battery. I also have a switch installed which flips the polarity on the meter and allows me to measure current flowing into the battery - from the alternator when the engine is running, a solar panel or mains hookup when parked up.

Could this be achieved using the Arduino (and preferably my existing shunt) without the need for a polarity reversing switch? I'd like to throw up a value on an LCD display which automatically moves from positive to negative as current flows into or out of the 12v battery.

Thanks in advance!


Do you feel comfortable building the "Improved Absolute Value Circuit" seen here ...
http://www.analog.com/library/analogdialogue/archives/44-04/absolute.html

You will need to adjust some of the R's for a Gain of 50X
50 x 75mv = 3.75 Volts connected to Analog Input #1

Then use Analog Input #2 to detect Charge Mode or Discharge Mode.


Alternatively ...
You could break the connection between Op Amp A1 and Op Amp A2.
Then feed the output of Op Amp A1 into Analog Input #1 (Charge Amps).
Then feed the output of Op Amp A2 into Analog Input #2 (Discharge Amps).

Lots of electronic options here ...

Go Up