### Author Topic: Best way of measuring current with shunt  (Read 8777 times)

0 Members and 1 Guest are viewing this topic.

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Best way of measuring current with shunt
« on: April 22, 2012, 02:36:51 pm »
Hi,

I'm working right now in a Open Soucer project but I have doubts about the a measuring current circuit. I need to measure the current in the power supply and I want to make a high side measurement. The problem is that I want it to be as cheap as possible.

So what I want to do, is to use a cheap opamp like the LM324 to set up an amplifier differential amplifier, and measure the current in high side. What I don't know if I can connect the LM324 to a voltage greater than its supply. The datasheet seems to point that the maximum voltage in the input must not exceed VDD + 1.5V.  I would be measuring currents up to 1A in a 50mohm shunt which would be 50mV at full range but the voltage I'll be using to supply that current could get up to 16V so the commom mode voltage might be too high.

Can anyone advice me on this? should I use another opamp? should I use low side instead high side measurement? (I'd rather prefer high side)

Thank you!

#### robrenz

• Super Contributor
• Posts: 3035
• Country:
• Real Machinist, Wannabe EE
##### Re: Best way of measuring current with shunt
« Reply #1 on: April 22, 2012, 03:09:51 pm »
The other voltage drops in your circuit required to achieve 1amp thru your circuit and shunt is separate from the voltage across the shunt. If you dont exceed 1 amp through the shunt,you wont exceed 50mV across the shunt.

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #2 on: April 22, 2012, 03:22:37 pm »
I know that the voltage in the shunt won't exceed 50mV but the opamp will be using 3.3V in VDD and 0V in VDD- . Since the relative voltage of the shunt to the GND will be 16 V in the worst case, won't be that a problem since the VDD of the opamp is several times below those 16V?

• Super Contributor
• Posts: 1013
• Country:
##### Re: Best way of measuring current with shunt
« Reply #3 on: April 22, 2012, 03:34:27 pm »
The usual way is to use 2 potential dividers (relative to ground) 1 on each side of the shunt. It does need close-tolerance resistors, but mount them physically close to each other for thermal stability. This way it brings the measured values below the power rail potential.

#### nctnico

• Super Contributor
• Posts: 26560
• Country:
##### Re: Best way of measuring current with shunt
« Reply #4 on: April 22, 2012, 04:34:28 pm »
The usual way is to use 2 potential dividers (relative to ground) 1 on each side of the shunt. It does need close-tolerance resistors, but mount them physically close to each other for thermal stability. This way it brings the measured values below the power rail potential.
There are special chips for this purpose if the voltage isn't too high. IIRC Zetex has several of them for a low price.
The problem with the divider resistors is that they need to be matched closely (0.1% resistors) and that the differential signal needs to be amplified a lot. This cannot be achieved with low cost opamps. You'll need a special differential opamp chip.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #5 on: April 22, 2012, 05:12:30 pm »
Thank guys, I'll check out the IC's recommended from zetex. Any other recomendations?

#### SeanB

• Super Contributor
• Posts: 16249
• Country:
##### Re: Best way of measuring current with shunt
« Reply #6 on: April 22, 2012, 05:50:43 pm »

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #7 on: April 22, 2012, 06:34:42 pm »
Thank you buy I already look at that website and all of the IC's I've checked so far are over 1'5€ which is too much for my objective. Does anyone know any IC for less than 1€ it doesn't need to be too precise.

#### ejeffrey

• Super Contributor
• Posts: 3604
• Country:
##### Re: Best way of measuring current with shunt
« Reply #8 on: April 22, 2012, 06:47:50 pm »
I know that the voltage in the shunt won't exceed 50mV but the opamp will be using 3.3V in VDD and 0V in VDD- . Since the relative voltage of the shunt to the GND will be 16 V in the worst case, won't be that a problem since the VDD of the opamp is several times below those 16V?

Why can't you use the 16 V positive supply for your opamp?  If you do that, a simple differential op-amp circuit will do exactly what you want.  You need a rail-to-rail opamp, but those are not too hard to come by.

#### Simon

• Global Moderator
• Posts: 17680
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Best way of measuring current with shunt
« Reply #9 on: April 22, 2012, 06:53:48 pm »
maxim make some nice high side current measures. you opamp should be powered from the 16V supply. you need to make sure that you inputs can work to the supply voltages. you could use potential dividers to drop the two voltages but that will reduce the accuracy.

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #10 on: April 22, 2012, 08:47:23 pm »
I've seen Maxim IC's... but none of them are under 1€ or is there?

I want to power it from 3.3V because is the only regulated supply. I don't know what the input supply will be. It would have an input from 5V up to 16V.

I will have to limit the input possibilities but I want it to be flexible.

#### ejeffrey

• Super Contributor
• Posts: 3604
• Country:
##### Re: Best way of measuring current with shunt
« Reply #11 on: April 22, 2012, 09:04:10 pm »
I want to power it from 3.3V because is the only regulated supply. I don't know what the input supply will be. It would have an input from 5V up to 16V.

I will have to limit the input possibilities but I want it to be flexible.

An opamp doesn't really care what the supply voltage is, or even if it varies a bit.  Most opamps have really amazingly good power supply rejection.  Too much ripple will obviously cause problems, but there is a very good chance this will just work.

#### T4P

• Super Contributor
• Posts: 3697
• Country:
##### Re: Best way of measuring current with shunt
« Reply #12 on: April 23, 2012, 03:52:11 pm »
How about INA168 ? Someone ordered something wrong and sent 3 of them chips to me .

#### Mechatrommer

• Super Contributor
• Posts: 11418
• Country:
• reassessing directives...
##### Re: Best way of measuring current with shunt
« Reply #13 on: April 23, 2012, 06:13:24 pm »
most single chip "differential opamp" work up to KHz range only. a jellybean LM071/2/4 can do to 1-3MHz with 3 opamps setup. my voltage divider on another thread is one way of my thinking to measure this kind or current shunt measurement, but as some people said, i might lose some SNR there. since you are only interested at current value of around 50mV, you may put ac coupler at your differential opamps? and add extra gain to the stage to make your output at V level, not mV. maybe 20X? so your 1amp will output a nice 1V on the output (but that will make your 072 BW way way lower.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #14 on: April 23, 2012, 07:47:08 pm »
Well I've just discarded the LM324 because its input offset is too high and also since the input voltage will be the same as the VDD of the opamp when I use the LM324 if I use a 5 VDD supply at about 3.4 Volts input in V+ it saturates even when in the shunt there is only a couple of milivolts.

I've checked the INA169 and is like 2€. Still too expensive for my project. I need to find some cheaper way. I've seen a AN of Microchip which uses 2 MCP6H02 two make an "instrumentation amp" that doesn't seem bad but I wonder if there is an alternative of the same price about 1€ which uses only 1 chip.

Any ideas?

#### nctnico

• Super Contributor
• Posts: 26560
• Country:
##### Re: Best way of measuring current with shunt
« Reply #15 on: April 23, 2012, 08:42:28 pm »
IMHO most of your problems go away if you power the opamp from the 9V to 16V supply. With the usual bypassing you shouldn't have to worry about noise from the supply. If the opamp's input can go to the supply rails you can construct a simple substracting amplifier.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.

#### Twistx77

• Regular Contributor
• Posts: 147
• Country:
##### Re: Best way of measuring current with shunt
« Reply #16 on: April 24, 2012, 07:47:28 pm »
Well, at the end I'll be using a MAX4372 which is not that expensive here, is 1,39€ which is not that bad for a real current amplifier.

Thank you to all of you!

Smf