Problems using differential Op Amp as ADC input

Discussion in 'The Projects Forum' started by dball387, Sep 30, 2013.

  1. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    Hello all,
    I am having problems using a differential Op Amp to detect voltage drop across a small shunt resistor:Voltage drop across it is about 0.04v
    I set up the Op amp as an ADC input with op amp gain of 2 (i think):
    10k on both Vin pins to op amp with the ground resistor and the feedback resistor as 20k.
    When current flowed through the shunt, the ADC value increased by 2 (and it was stable: only occasionally fluctuating +-1 from the increased value )

    However, I would prefer a throw of perhaps 4+ debug values but when i set up for 4x gain (replacing the 20k with 40k), the ADC values went haywire!
    It was fluctuating +-10 values and i have no clue what is going on.

    Also, when current through shunt was 0, i got an ADC value of about 140...Why is this and can i reduce it whilst getting higher gain?
    Because i would prefer to start much closer to 0 and get more playing room :)

    Help would be very much appreciated,

    Thanks in advance,

    D
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    The common-mode gain of your circuit is determined by the resistor tolerances. This will give an output offset voltage for any DC voltage on the measurement shunt resistor.

    What DC voltage level is on the shunt resistor?

    You can null this offset voltage by changing one of the 40kΩ resistors to 37.5kΩ and add a 5kΩ pot in series (connected as a rheostat).
     
  3. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    -Across the shunt resistor, V+ is 12 volts (or there abouts) with range of about 0.02 to 0.6 volt drop across the shunt resistor, (depending on the rest of the circuitry-this op amp and adc is for current sense of the main circuit)

    -Resistor tolerances?
    How does this relate to the base value that i got when the power supply was detached from the main circuitry ie no potential or current across shunt?

    - Also, do you have any ideas about the mad fluctuations or what might cause them?

    Thanks for replying ;) ,

    D
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    The common-mode gain gives an error when the 12V is applied. Otherwise it doesn't affect the output voltage

    If you have an offset with no voltage on the shunt resistor, then that is likely due to intrinsic op amp offset. What op amp are you using and what is it powered by?

    What does 10 counts in "mad fluctuations" amount to in volts?

    If the fluctuations are due to noise, then you could add a LP filter capacitor across each 40k resistor to reduce it.
     
  5. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    It is a 741 type op amp between 5v and 0v ground. (op output going to pic or similar so 5v max)
    The fluctuations amount to to about +- 0.2 volts. Aiming for resolution of about 0.02 (or 0.01 ideally: we can always hope ;) )
    Will try the capacitors to see if they help ;)

    Thanks again,

    D
     
  6. BobTPH

    Active Member

    Jun 5, 2013
    789
    114
    A 741 opamp is useless on a single 5V supply. Get a rail-to-rail single supply opmap.

    Bob
     
  7. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    Ye ye i hear ya ;)
    Should it solve any of my problems? :p
    Could improve resolution somewhat?

    Cheers,

    D
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Posting your circuit would surely help us help you.

    There are dedicated IC called "current sense amplifiers" that are intended to measure the voltage on a "floating" shunt resistor, then amplify and transfer that voltage to a ground referenced output.

    They are particularly ideal for driving an A2D. One example
     
  9. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    really just a high side current sensing amp.
    Rs is 0.1 Ohm
    R2 and R4 = 20k (stable) or 40k (unstable)
    R1 and R3 = 10k
    with amp output as ADC input

    Got rail to rail ordered (MAX 4389 if my memory serves) to try out within a day or 2 :>

    Cheers,

    D
     
  10. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Where are your caps?

    Are people allergic to caps these days? ;)
     
  11. dball387

    Thread Starter New Member

    Sep 15, 2013
    22
    2
    Ohh!
    A rare sighting of a traditionalist :p Down with caps!

    Nah. just wasnt sure where i should add them :)
    Stupidity: Not allergy :p

    D
     
Loading...