Cheap opamp for current sense setup. - Page 1
Forum section: electronics / projects

author: lk
author_rank: Regular Contributor
timestamp: September 14, 2012, 10:37:26 am
content: 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 nethttp://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 circuithttps://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

author: poptones
author_rank: Frequent Contributor
timestamp: September 14, 2012, 10:44:49 am
content: Where are you? If you just need one or two why not find a workable National or Maxim part and request a sample?

author: lk
author_rank: Regular Contributor
timestamp: September 14, 2012, 10:48:31 am
content: In Denmark, maybe a sample would be an option, but my guess is that there are strings attached

author: Rerouter
author_rank: Super Contributor
timestamp: September 14, 2012, 10:52:21 am
content: 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 rangesyes 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,

author: PSR B1257
author_rank: Frequent Contributor
timestamp: September 14, 2012, 11:18:37 am
content: 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.

author: lk
author_rank: Regular Contributor
timestamp: September 14, 2012, 11:40:31 am
content: 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?

author: Short Circuit
author_rank: Frequent Contributor
timestamp: September 14, 2012, 12:01:53 pm
content: Why not use one of the many current sense amplifiers?Those work very well for this kind of current range.

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 14, 2012, 12:15:05 pm
content: TL071 family, darwin polarity reversal but nonetheless the 8th wonder of the world.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: September 14, 2012, 01:13:55 pm
content: QuoteThat'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,625VThere is a little offset of course do to the resistors (1%, not selected) and the op amp itself.

author: BravoV
author_rank: Super Contributor
timestamp: September 14, 2012, 01:55:58 pm
content: 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.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: September 14, 2012, 02:58:52 pm
content: 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.

author: lk
author_rank: Regular Contributor
timestamp: September 14, 2012, 05:16:19 pm
content: 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 outAs 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

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 14, 2012, 10:24:53 pm
content: Quote from: lk on September 14, 2012, 05:16:19 pmi 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.

author: ptricks
author_rank: Frequent Contributor
timestamp: September 15, 2012, 12:52:38 am
content: I use the LM358 for current sensing and it works fine, no problems at all.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 16, 2012, 11:01:14 am
content: 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.

author: lk
author_rank: Regular Contributor
timestamp: September 17, 2012, 09:21:28 am
content: 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 winsBut lets see when i get the hardware to play with.-lk

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 17, 2012, 11:42:11 am
content: 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

author: T4P
author_rank: Super Contributor
timestamp: September 17, 2012, 01:18:42 pm
content: Quote from: Mechatrommer on September 17, 2012, 11:42:11 amWell that's the reason i never buy single opamps too