Author Topic: Using opamp to sense current over a shunt in both directions ?  (Read 1837 times)

0 Members and 1 Guest are viewing this topic.

Offline OddTopic starter

  • Contributor
  • Posts: 46
  • Country: no
Using opamp to sense current over a shunt in both directions ?
« on: January 22, 2020, 09:21:40 pm »
So I have a 2m \$\Omega\$ shunt on the low side of a design, which is used to sense current up to 40A , (about 100mV or so). 
I wish to make it readable by AD (0-5v)  - both ways , so that the AD input would look like:

5v = -40A
2.5v= 0A
0v= 40A

I do know it is easy to do with a shunt current sensor amplifier but is it fairly easy using an OPAMP ?

« Last Edit: January 22, 2020, 09:37:02 pm by Odd »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #1 on: January 22, 2020, 10:06:24 pm »
Did you try to search internet for "bidirectional current sense application note"? If not - then do it ;) There are notes from TI, maxim and analog devices. Just to name one or two: https://www.analog.com/en/design-center/reference-designs/circuit-collections/bidirectional-current-sense-circuit-with-separate-charge-discharge-output.html

https://www.analog.com/media/en/technical-documentation/application-notes/an105fa.pdf
 
The following users thanked this post: Odd

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9914
  • Country: us
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #2 on: January 22, 2020, 11:27:14 pm »
Search "high side current sense amplifier"  There are many and some are bidirectional.

 
The following users thanked this post: Odd

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6713
  • Country: ca
  • Non-expert
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #3 on: January 22, 2020, 11:51:19 pm »
This is the sort of thing you are looking for:
http://www.ti.com/tool/CIRCUIT060007
http://www.cafelogic.com/2010/sensing-bidirectional-current-with-a-single-supply-op-amp/

But most likely there is a better solution in the appnote ogden linked, that would give you better precision. eg an off the shelf high side monitor IC. With less hassle and no caveats like needing matched high precision resistors.

What would help is to post some idea of accuracy and bandwidth requirements.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Odd

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #4 on: January 23, 2020, 01:25:49 pm »
I've used the TI INA219 http://www.ti.com/product/INA219
It's a 12 bit high-side I2C voltage and current monitor.

Did you really want an analog voltage?
TI makes the same thing with only analog output, INA169 http://www.ti.com/product/INA169

Looking through all the variants, I think that I'll use the INA226 http://www.ti.com/product/INA226 in the future.
It's got 16 bits and less offset (but a different package).
 
The following users thanked this post: Odd

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: de
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #5 on: January 23, 2020, 02:48:33 pm »
I do know it is easy to do with a shunt current sensor amplifier but is it fairly easy using an OPAMP ?
You can build differential amplifier with an opamp... But to get good accuracy you will need precision resistors, low input offset voltage amp, etc. It might be cheaper to use CSA at some point.
 
The following users thanked this post: Odd

Offline connectTek

  • Regular Contributor
  • *
  • Posts: 100
  • Country: au
 
The following users thanked this post: Odd

Offline connectTek

  • Regular Contributor
  • *
  • Posts: 100
  • Country: au
« Last Edit: January 23, 2020, 03:08:28 pm by connectTek »
 
The following users thanked this post: Odd

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #8 on: January 24, 2020, 02:09:02 am »
Yeah, the Allegros are pretty nice.
Still, there is something to be said in some situations for a fixed shunt resistor and a separate, detachable sense on it.
You can change the sense electronics without disrupting the big current.
« Last Edit: January 24, 2020, 02:10:50 am by Renate »
 
The following users thanked this post: Odd

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1449
  • Country: ua
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #9 on: January 24, 2020, 09:08:31 am »
Item on the photo looks like automotive fuse (large current type) but not like shunt.
 
The following users thanked this post: Odd

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #10 on: January 24, 2020, 12:52:38 pm »
Item on the photo looks like automotive fuse...
That's because it is.
This is my setup, the fuse has a resistance of about 0.5 milliohm.
I use it as current sense shunt.
That way I don't need extra wiring or separate shunt.
Yes, I had to calibrate it.

I'm planning on upgrading the INA219 to an INA226.
I just have to disconnect the tiny wires, not disturbing anything.
I can even run both the old and the new sensor at the same time to check calibration.
 
The following users thanked this post: Odd

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19678
  • Country: gb
  • 0999
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #11 on: January 25, 2020, 05:25:05 pm »
Did you calibrate it at different currents? The fuse's resistance will quite likely have a significant positive temperature coefficient. If you've not taken that into account, I doubt it's worth using a supper accurate sense amplifier.
 
The following users thanked this post: schmitt trigger, Odd

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Using opamp to sense current over a shunt in both directions ?
« Reply #12 on: January 25, 2020, 09:20:31 pm »
The fuse's resistance will quite likely have a significant positive temperature coefficient.
Oh,  I presumed that it would have some sort of temperature coefficient.
The main reason for using a better ADC would be to have a standard breakout board for other projects that use real sense resistors.

For this specific case getting something with a lower / more stable offset will be useful.
I'm more concerned with whether the electrons are going in or out.
Absolute accuracy is not that critical.
 
The following users thanked this post: Odd


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf