problem with differential amplifier

Discussion in 'General Electronics Chat' started by johnjerome1992, Jul 21, 2013.

  1. johnjerome1992

    Thread Starter New Member

    Jul 21, 2013
    5
    0
    hi

    i am doing a project where i have to sense dc current to the load and protect the load from over current using a mosfet and also ac current to the load and protect the load from over current using a triac

    i am using a series resistor of 0.01 ohm for current sensing. i have to amplify the voltage drop across this resistor.
    the problem is the load voltage is at around 12v to 15v fluctuating from a battery and the op amp i am using is lm358 with supply +5v and ground.

    now when i use the attached circuit across the r sense my output was saturating so i am using a voltage divider and a voltage follower at both ends of the r sense so that the input voltage to diff amplifier is less than 5v but still i am not getting the output as expected i am getting a constant voltage around 200mv to 1v.

    pls help me to find the mistake i might be doing
     
  2. Engr

    Member

    Mar 17, 2010
    114
    5
    johnjerome1992 i assume Rsense will be accross V1 and V2, is it correct? If that is the case I suggest using a PGA so that you have a better control of the gain and your circuit will be very simple.
     
    johnjerome1992 likes this.
  3. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    Does your circuit share any common connection with the circuit being sensed? If so, then you probably (I should probably just say "might") have an input common-mode problem.
     
    johnjerome1992 likes this.
  4. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    A differential amp circuit such as you show, requires a low offset voltage op amp and tight tolerance on the resistor values to keep the common-mode offset voltage low. The best way is to use a differential amplifier, such as one of these, which have the resistors internally trimmed for low offset, or use a high-side current sense amplifier
     
    johnjerome1992 likes this.
  5. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    I meant to ask what the typical range of currents is that you are trying to measure.
     
    johnjerome1992 likes this.
  6. johnjerome1992

    Thread Starter New Member

    Jul 21, 2013
    5
    0
    thank you all
    to make myself clear i have attached the circuit diagram.

    the first circuit has all that i want to do in that the circuit 2 is working both in simulation and hardware. but the circuit 1 is working in simulation but not working in hardware.

    also i have some constraints firstly the cost should be less so i cant go for high side current sense amplifier also i think the offset is affecting but how to overcome it without going for a direct ic to do the job, and i am new to PGA what does it do i searched but dint understand .

    my target is to get a linearly varing output from circuit 1 as the current varies in R sense . say 2v for 10A, and the typical range of current that i want measure is still 15A.

    the problem now is when i try to increase the current in the load by decreasing the rheostat the output sometime remains constant around 0.5v or sometime increase but not linearly it suddenly saturates.
    i am not able to understand what is happening

    thanks in advance .
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    The LM358 has an input bias current that can be as high 500nA. With a 270kΩ resistor, that could over 130μV error right there. With two amps, that could give you over 200uV of error.

    You are using a 10Ω variable resistor as your load, so if it is turned down to about 1Ω then you'd have roughly 10A of current (let's call this you "max" current, even if it isn't), giving you about 100mV of voltage across the sense resistor. But you are using a voltage divider which gives you only about 10mV of differential signal. Now consider that the input offset voltage of each amplifier can be as high as 9V, and the offset voltage of the two amplifiers can completely swamp your maximum signal.
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You slipped a decimal point (actually, 3 of them) there. It is much worse. However, on the bright side :rolleyes:, the input voltage followers actually only see about 24.5k each, not 270k. 24k resistors in the feedback path would reduce the current-induced errors, but they and the offset voltages would still swamp out the signal.

    Not sure where the 9V comes from.:confused:

    @johnjerome1992:
    The first two op amps are configured as voltage followers. The attenuators in front of them mean that, for a 1Amp load, your differential signal at the inputs to the diff amp will only be 0.91mV. This will be swamped by the input offset voltages and currents of the voltage follower op amps.
    Your diff amp has a gain of 200, which means you will get about 180mV out for a 1Amp load. This will also be swamped by the op amp's offset voltage.


    If you buy a decent op amp and 0.1% resistors, you will have spent more than a high side current sense amp would set you back.
     
    Last edited: Jul 22, 2013
  9. tindel

    Active Member

    Sep 16, 2012
    568
    193
    Here is a good app note about current sensing.
    http://www.linear.com/docs/12479

    Have you considered a low-side current sense? The 358 input common mode range includes ground, so that would get you a single amplifier with a gain of 35; therefore, at 10 amps you will have 100mV*35 = 3.5V Also a gain of 35 gives you larger bandwidth than an amplifier with a gain of 200. My biggest concern for you is that you could have 9mV of offset voltage over temp... which translates into about 9% error at 10A, and more at lower currents. I'd choose a different amplifier. There are many available with less than 100uV of offset.

    Also, one of the most important aspects of having a good current sense amplifier is using good kelvin connections. The basic idea is to have the connections of of the amplifier resistors on the pad of the sense resistor. It doesn't take much trace distance to have another 10mohms of resistance giving you big errors in your telemetry.
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    I almost put them in parallel, but was thinking real quick that worst case would be dependent on whether the bias current was positive or negative. But you're right.

    It was a typo -- I could swear I types 9mV, but the combination of my keyboard and my vision let it slip by. It's the max input offset voltage over temp.
     
  11. johnjerome1992

    Thread Starter New Member

    Jul 21, 2013
    5
    0
    thank you all

    so my choice of op amp for this job is a bad choice ok what if i use 741 with offset nulling circuit but i need a single suply opamp or how to work with it in single supply any ideas or any other single supply op amp with an option for offset nulling
     
  12. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    You're kidding about the LM741 aren't you?

    Try something with specs like the LT1006 which is single supply compatible.
     
  13. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Is "offset nulling" really a strong requirement - even for single supply operation?
    I doubt.
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    What is your actual load? I don't mean just the resistance range - I mean, what is it?
     
    johnjerome1992 likes this.
  15. tindel

    Active Member

    Sep 16, 2012
    568
    193
    I like the suggestion of the LT1006 after looking at the datasheet. I haven't used it before - looks like a nice amplifier for this use. Low off-set voltage, low power, it will be a bit slow (20kHz @ G = 35) - but that's okay in this application, I'd bet.

    http://www.linear.com/product/LT1006

    I'd still consider a low-side amplifier... less parts... and therefore cheaper - if you insist on a high-side, I'd probably purchase a dedicated high side-amplifier like the LTC6101 instead of dividing it down and then amplifying it like you posted. Also less parts.

    http://www.linear.com/product/LTC6101
     
    johnjerome1992 likes this.
  16. johnjerome1992

    Thread Starter New Member

    Jul 21, 2013
    5
    0
    Thank you all

    Actually in my project the low side that is the return path is common for all the loads but the current sensing has to be done for a different group of loads and more over the return path is mainly through the body or the chassis of the robot.

    My loads are just lighting loads upto 5 amps and a horn or siren upto 2 amps so mainly all are resistive loads only.

    And the high side current sense amplifiers are not available in my local electronic shops.
    so is there any way that i can sense the current using the LM358 opamp that i have ,any modification to the circuit that if i do so that i can at-least get some output that varies with current.

    I tried to increase my supply to the op amp also but no output

    or any other options that i have.
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You can't make a silk purse out of a sow's ear.

    Now that I've gotten that out of my system, try this. Your actual results will depend on op amp offset voltages and currents, and resistor tolerances.

    Be sure to add a 100nF cap across the IC's Vcc and ground pins, with short leads, as close to the IC as possible.
     
    johnjerome1992 likes this.
  18. johnjerome1992

    Thread Starter New Member

    Jul 21, 2013
    5
    0
    @Ron H yes the saying is true believe me i really experienced it in this project.

    thank you all luckily i got a MAX4080 IC. It was a SMD type but i managed to rig it up.
    yes it was a direct replacement for whole circuit and its working perfectly now.

    Once again thank you all for your right guidance
    I am learning a lot from this forum.
     
  19. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    Another consideration is the resistor tolerance. For 1% resistors the voltage differential mismatch at the op amp inputs with a 12V supply could be as high as 1.2V * 1% = 12mV
     
Loading...