Measuring current using OpAmp. Broken OpAmp?

Discussion in 'Test & Measurement Forum' started by dbrckovi, Apr 27, 2019.

  1. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Hello!

    I'm trying to create a simple current sensor using OpAmp as shown in the following schematic: http://tinyurl.com/y43jfjky
    It all works as expected in simulation, but when I wire it up using real components, the OpAmp behaves strangely.

    My real circuit has the same setup as in the simulation...
    - The current through 0.1 ohm resistor is 22mA.
    - Voltage on IN+ pin is 2.2 mV
    - pot values are exactly as in the schematic

    However, my real Opamp Always outputs around 4V, which causes IN- pin voltage to be around 400 mV.
    Shouldn't the OpAmp lower the output voltage so IN+ and IN- match?
    This is the OpAmp I'm using: RC4558P

    This is an image of how I wired the circuit on the perfboard (the one with parralel copper lines)
    CurrentSensor.PNG
    (I scratched the 4 copper leads behind the OpAmp and one above the ground pin of the potentiometer.)

    I had the same circuit on the breadboard yesterday and it was working (roughly). I was getting very strange values because my breadboard has couple of ohms of contact resistance, which completely screwed my measuremens. I was hoping to get better accuracy using perfboard, but now the OpAmp doesn't seem to work, and I'm not sure of anything any more :)

    Does this look like a malfunctioning OpAmp to you?
    Is it possible that I burned the OpAmp while soldering?

    Thank you.
     
  2. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    I forgot to mention two things.
    - The image doesn't show the load resistor
    - The current sense resistor is actualy 10 x 1 Ohm resistors in parallel.
     
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    4,632
    735
    Where is the datasheet for the opamp?
    No. I am not going to google it. YOU want help, you be helpful to people YOU want help from.

    The schematic you show is the conceptual schematic. It is for conveying the concept.
    It IS NOT an actual circuit schematic. So. Next you will need to provide the actual circuit schematic. I don't care how you do it. Draw it on paper with a pencil. Or use Visio. Or dedicated circuit drawing program like MultiSim, LT Spice, etc.
     
  4. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    What's wrong with the circuit on the link?
     
  5. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi db,
    I have clipped your link image.
    Eric

    Updated:
    EDITED: Add a OPA d/s

    AA1 28-Apr-19 08.47.gif
     
  6. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi db,
    The d/s states a dual power supply is required, how is it powered.?
    Also what effect do you get on the output of the OPA.?
    E
     
  7. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Ty Eric.

    The OpAmp is powered by 5V on the Vcc+, and GND on the Vcc-.
    Is this the problem?

    "Recommended operating conditions" table shows the minimum is 5V on Vcc+ and -5V on Vcc-.
    I thought these are just recommended values and that anything between +15 and -15 would be OK as long as VCC+ is higher than Vcc-.
     
  8. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi db,
    That RC OPA is almost the same as the old 741, it does not work well on a single supply, its a very old specification.

    Is the output showing a minimum voltage above zero of about 1v.?

    E
     
  9. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi qb,
    This is a LTSpice sim of your circuit, using a 741 OPA.
    E
    Added 2nd Sim for comparison , using a dual supply
     
    dbrckovi likes this.
  10. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Thank you.

    I just tried it on the breadboard according to this schematic, and it doesn't work correctly when IN+ is lower than 800mV.

    Vouiltage doubler.png

    When IN+ is above 800mV, the output is doubled as expected, but when I drop it below, the output jumps to cca 4V.
    I'll try to think of something else.
     
  11. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    Hi,
    Which ever type of single supply powered OPA you use, it will never read zero Vout for zero load current.
    What is the Vout connected too.?
    E
     
  12. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Out will be connected to ground through 10k pot which I'm using as a voltage divider (as shown in the schematic) It will also be connected to arduino analog IN which I will use to measure the voltage.

    But I think I understand what the problem is. The inputs can't be too close to Vcc- because of minimum threshold voltage required to operate the internal transistors. I didn't think of that before your post, and now it's kinda obvious.

    I will try to find the -5V line. I'm using an old PC power supply. It should have -5V somewhere :)
     
  13. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi,
    One option is to sum out the minimum 1V Vout offset in Arduino program, have you considered that option.?
    E
     
  14. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Hm, but in this case, I don't know how to bring my input voltages to above 1V level.
    I guess I could put the current sense resistor in front of the load, but then OpAmp inputs will be too close to Vcc+ (I guess)
     
  15. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi.
    Assume that with no current the Vout is 800mV, now use a pot and a resistor add offset to the input, so the Vout is 1v.
    Increase the input load current to its maximum value, the Vout will limit at 5Vsupply-1.5V, ie: 3.5V. [ its a poor OPA]

    So 1v thru 3.5v is the Vout range.
    What max current do you want measure??

    E
     
  16. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    I think I didn't explain it right.
    In my original schematic, the output is always around 4V no matter what current goes through 0.1 ohm resistor.

    As I understand that's because 800mV is the minimum voltage I need to bring to OpAmp input in order for output to do anything.
    In my original example, I was trying to measure 22mA of current. This gave me 2.2mV of voltage drop across current sense resistor, which is nowere near 800mV the OpAmp needs to start working.
     
  17. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi,
    As you want to measure 0mA thru 22mA, a 0.1R Shunt resistor will only give 0mV to 2.2mV.
    What voltage would like to get from the OPA output.?
    With a 1k1 and 9k7 that is only 8.8+1 Gain ie; 9.8 say 10, so Vout will only be 22mV

    Thats a very low input to an ADC.
    E

    EDIT:
    I think it would be helpful if you explained more detail about the project
     
  18. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    That is the same conclusion I got to in the last 4-5 posts.
    The question is already answered.
    I wasn't aware that OpAmps have minimum input voltage and your LTSpice charts showed that.
    Thank you.

    I will connect the Vcc- to -5V and that should bring the input into OpAmps operating range.
    If not, I will experiment further.
     
  19. ericgibbs

    Moderator

    Jan 29, 2010
    7,719
    1,559
    hi,
    OK,
    If the Arduino ADC Vref is set to say 5V, thats 1023 max counts, so try to increase the input to much greater than 22mV.
    An ADC in of 22mV is (0.022/5) *1023 = ~ 5 counts.!

    Post your new circuit when ready and we can run it in simulation,

    E

    EDIT:
    This image shows one option, its not elegant.
     
  20. dbrckovi

    Thread Starter New Member

    Sep 3, 2018
    10
    0
    Ahh. I think I understand.
    I'll try it with the voltage divider between R4 and IN+
    Thanks.
     
Loading...