Page 1 of 1

### Ampmeter using Op-amp

Posted: Sat Feb 18, 2006 5:47 pm
Trying to build an ampmeter using an LM324 op-amp to measure plus/minus 50 amps with a 1mv/amp shunt = +/- 50mv to the op-amp. The "-" of the shunt is also ground of the op-amp 12 volt supply. The ADC input is 0 - 5 VDC. Since the op_amp input goes negative, can I design the circuit with the +/- voltage in, and the op-amp input floats, with a range of minimum 0 to 100mv? The LM324 has 3 other sections in use.

### Re: Ampmeter using Op-amp

Posted: Sat Feb 18, 2006 6:35 pm
You can use a voltage divider to get your + and - voltages to feed the op amps requirements.

However you have to watch the rail voltages with out side sources as they may conflict.

### Re: Ampmeter using Op-amp

Posted: Sat Feb 18, 2006 6:47 pm
The input of the LM324 can probably handle signals that are slightly below ground. The output can't.

This will force you to add an offset to the signal. Your input signal range is from minus 50 millivolts to plus 50 milivolts. Adding an offset of 50 millivolts will change the signal range to 0 to 100 millivolts. Amplifying this with a gain of 50 will give a range from 0 to 5 volts, which matches the input range of your A/D converter. An input of 0 volts should result in a 2.5 volt signal going to the A/D converter.

This will require a reference voltage to generate the 50 millivolt offset. Some A/D converters bring an internal reference voltage out and allow it to be lightly loaded. If this is available, it is probably the best option.

Otherwise, a reference such as the TL431 or one of its relatives can be used to get a stable reference voltage which is then attenuated and adjusted to provide the 50 millivolt offset.

<small>[ February 18, 2006, 06:48 PM: Message edited by: stephen ]</small>

### Re: Ampmeter using Op-amp

Posted: Sat Feb 18, 2006 7:35 pm
Brain fart...

<small>[ February 18, 2006, 07:38 PM: Message edited by: RonH ]</small>

### Re: Ampmeter using Op-amp

Posted: Sat Feb 18, 2006 8:26 pm
Allegro makes a selection of hall effect isolated curent monitors that operate on a 5 volt supply and have a linear output voltage. You may find one of these easier to work with. I think they have one specifically for the +/-50A range.

### Re: Ampmeter using Op-amp

Posted: Sun Feb 19, 2006 12:04 pm
Watch the input offset voltage of the LM324: I believe the worst case offset is spec'd at about 20mV and there goes your accuracy!

The last time had to build something like this, I decided that an LT1014 was a better choice. You can add trimpots to adjust the offset of the LM324, but in the end it may be simpler to just throw a precision opamp at the problem. The extra cost of a precision amp ends up being about the same as the additional resistors, trimmers etc to get rid of the 324's offset.

### Re: Ampmeter using Op-amp

Posted: Sun Feb 19, 2006 1:52 pm
Hello there,

You said that the " (-) end of the shunt connects
to the (-) of the power supply". If this is
true then it's going to be very hard to do what
you want (measure dual polarity signals).

I had to do the same exact thing once but i was
able to connect the (-) end of the shunt to the
center of a resistive divider, which formed
signal ground.
This resistive divider was made from two series 1k
resistors and connected between the +8v supply
and the other side of the +8v supply (power
supply ground), forming
a signal ground biased at +4 volts dc.
The (-) end of the shunt was connected to this
signal ground, not the ground of the +8v supply.
This allowed sensing of plus and minus current
signals.

The gain was adjusted to about 200 which provided
my ac v meter with just enough to measure ac current (using the voltage scale).
The shunt was also 1mv/amp (0.001 ohm) made
from a strip of brass.

I used this setup for a number of years before
moving to a "current transformer" combined with
an ac meter (i only had to measure ac currents
not dual polarity dc currents).

You might also mention what kind of accuracy you
are looking for. As others have already mentioned
there are some issues that arise due to op amp
offsets that affect accuracy greatly when using
a general purpose op amp like this one for
instrumentation applications.

Take care,
Al

### Re: Ampmeter using Op-amp

Posted: Sun Feb 19, 2006 11:23 pm
The LM324 does have a fair amount of offset. This can be trimmed out when you add the 50 millivolt offset. It is better if you can use an op amp with lower offset.

However, your choice may be based on other factors such as cost and avaliability.

<small>[ February 19, 2006, 11:29 PM: Message edited by: stephen ]</small>

### Re: Ampmeter using Op-amp

Posted: Mon Feb 20, 2006 10:06 am
Accuracy not a very big issue, Out of the +/- 50 amps, near zero would be nice to know if + or - within say 1/2 amp and at 30 amps say within an amp or 2. More to know if the battery is getting charged. As far as the LM324, that was something I had laying around, and bought a few more as spares. Cost not an object, even at \$5.00 each for the few I need (the whole project is over \$13K). Would be nice with a replacement not to have to go through redesign of the other sections which include a variable resistance fuel gage, LM335 temperature sensor, and a Auto type O2 sensor, and same pinouts. But since I do my own PC boards anything is possible to simplify the design troubleshooting.