Author Topic: Cheap opamp for current sense setup.  (Read 12806 times)

0 Members and 1 Guest are viewing this topic.

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Cheap opamp for current sense setup.
« on: September 14, 2012, 10:37:26 am »
Greetings, 

I would like to measure some current flowing to a PC from a 24 volt PV system I found this nice page on the net http://www.piclist.com/techref/io/sensor/amps.htm , and this does exactly what I need it to do. To measure current from around 2.5 to 3.5 amps at around 24V. But… ?

The op amp that my simulations work best with is the MCP6021, there is hardly any error between the current flowing through the “shunt” resistor and the op amp output, but I would like to see if there is significantly cheaper op amp that has similar performance, it does not need to be of the rail-to-rail type, and it would be great if I could get it without having to pay 25$ shipping from digikey ?

I have simulated in LTspice with the following NE5532, LM358, TL072, but none of those come close the the performance of the MCP6021.

Here is the circuit
https://www.circuitlab.com/circuit/pasbc6/current-sense/

It just looks nicer there, I'm sure that there are dedicated currentsense "devices" for stuff like this, but i have not looked in this direction.


-lk
 

Offline poptones

  • Frequent Contributor
  • **
  • Posts: 709
  • Country: 00
Re: Cheap opamp for current sense setup.
« Reply #1 on: September 14, 2012, 10:44:49 am »
Where are you? If you just need one or two why not find a workable National or Maxim part and request a sample?
 

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Cheap opamp for current sense setup.
« Reply #2 on: September 14, 2012, 10:48:31 am »
In Denmark, maybe a sample would be an option, but my guess is that there are strings attached :)
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Cheap opamp for current sense setup.
« Reply #3 on: September 14, 2012, 10:52:21 am »
ok so you are always at a raised input voltage, look for a precision op amp, and you should be fine, its likely the offset voltage killing your circuit, as the rail to rail would not contribute anything, providing your input and output voltage is inside there respective ranges

yes there are chips to do this, but a low offset op amp does the job much better when you have the option, (under 1mV ideally)

still that circuit is un-ideal and is better done in a full differential layout, to do as such, remove both 10M resistors, and move the inverting terminals 100K resistor to the op amps output rather than ground,
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Cheap opamp for current sense setup.
« Reply #4 on: September 14, 2012, 11:18:37 am »
You don't rely need a fancy for that purpose.
I simulated the circut with a LM324 and it worked fine. As you see, the op amp gives you 1V output voltage per amp.

But a LM358 or a little more precisely TL071 would also work.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Cheap opamp for current sense setup.
« Reply #5 on: September 14, 2012, 11:40:31 am »
Rerouter: i need to study what you write in a bit more detail to understand what it is you are explaining to me :), but i will get back to it.

PSR B1257: the circuit works with all the op amps i have tried, however i found that the output voltage did not reliable match the what i was expecting from a given current, it could be off at 300 to 500 millivolts ,depending on the current. and is the LM324 not just the quad version of the LM358?

 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: nl
    • White Bream electronics R&D
Re: Cheap opamp for current sense setup.
« Reply #6 on: September 14, 2012, 12:01:53 pm »
Why not use one of the many current sense amplifiers?
Those work very well for this kind of current range.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Cheap opamp for current sense setup.
« Reply #7 on: September 14, 2012, 12:15:05 pm »
TL071 family, darwin polarity reversal but nonetheless the 8th wonder of the world.
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
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Cheap opamp for current sense setup.
« Reply #8 on: September 14, 2012, 01:13:55 pm »
Quote
it could be off at 300 to 500 millivolts
That's strange.

I just tested the circuit (with a Schottky diode insteat of the 100mR resistor, since I only got 10mR here) with a TL071 and it worked.
U_Schottkey=372mV and U_out=3,625V
There is a little offset of course do to the resistors (1%, not selected) and the op amp itself.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: Cheap opamp for current sense setup.
« Reply #9 on: September 14, 2012, 01:55:58 pm »
LF411 ? Dirt cheap, accuracy not too shabby since it has offset adjust from the factory standard 0.5 mV that can even down further, and speed wise is not too bad.
« Last Edit: September 14, 2012, 02:00:35 pm by BravoV »
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Cheap opamp for current sense setup.
« Reply #10 on: September 14, 2012, 02:58:52 pm »
There are probably hundreds of other suitable op amps of course.
And by a quick look across the datasheets of both, I cant make out any significant difference.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Cheap opamp for current sense setup.
« Reply #11 on: September 14, 2012, 05:16:19 pm »
PSR B1257: i ran the simulation again this time with the TL071, and it looks to be perfect for this application. My problems in the earlier post came from the lm358.
Thank you all for your input, i really appreciate you taking the time to help out

As a follow up question, does anyone know why the original designer of this circuit selected the resistors with those high values, one of my coworkers, suggested that i replace all re resistors with 100 times lower values. But i don't fully understand how that would affect the system, apart from higher power consumption?


-lk
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Cheap opamp for current sense setup.
« Reply #12 on: September 14, 2012, 10:24:53 pm »
i ran the simulation again this time with the TL071, and it looks to be perfect for this application.
i think most jellybeans can do the job acceptably or at least tunable for "not so sensitive application". the problem is when you start to have headache or too particular about low level volt or noise measurement etc. no jellybeans can give you that without complicated "Agilent level" of circuitry. and i dont trust simulation too much but thats just my 2cnts.
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
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Cheap opamp for current sense setup.
« Reply #13 on: September 15, 2012, 12:52:38 am »
I use the LM358 for current sensing and it works fine, no problems at all.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3908
  • Country: us
Re: Cheap opamp for current sense setup.
« Reply #14 on: September 16, 2012, 11:01:14 am »
For current shunt amplifiers the two most important parameters are common mode rejection and input offset voltage.  Pretty much anything in a bipolar or non-micropower JFET will work, assuming your requirements are not extreme.  It is fairly easy to calculate the maximum error due to these two terms for any given opamp and decide if it is good enough.
 

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Cheap opamp for current sense setup.
« Reply #15 on: September 17, 2012, 09:21:28 am »
Thanks for all the replies and suggestions,

but the tl071 seems to fit the bill perfectly, its very cheap, in my simulations i only see an error of 6% at sub 1Amp, and much lower at the amp range where i intend it to run in this project, i have to power it with both positive and negative voltage. I hope i can do this with a max232, and that means that i might as well add logging capability. And the chip is dirt cheap, and i can null the input offset, and the package only contains one amplifer, so at least on paper, i have multiple wins :) But lets see when i get the hardware to play with.

-lk
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Cheap opamp for current sense setup.
« Reply #16 on: September 17, 2012, 11:42:11 am »
if you can provise your circuit to accomodate 2 opamps and leave 1 opamp not connected (in future it might be). i bought TL072 at the same price as TL071 so basically half the price per opamp. if you really need the single opamp TL071, it means the offset trim pins on it are really important for you or for other compatibilty or performance reason. or if feasible, get all family 071,072,074 in 10 unit each, save shipping cost per opamp, will be a nice collection but just me :P
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
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Cheap opamp for current sense setup.
« Reply #17 on: September 17, 2012, 01:18:42 pm »
if you can provise your circuit to accomodate 2 opamps and leave 1 opamp not connected (in future it might be). i bought TL072 at the same price as TL071 so basically half the price per opamp. if you really need the single opamp TL071, it means the offset trim pins on it are really important for you or for other compatibilty or performance reason. or if feasible, get all family 071,072,074 in 10 unit each, save shipping cost per opamp, will be a nice collection but just me :P
Well that's the reason i never buy single opamps too  :P
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf