Use of AD623 Instrumentation Amplifier

Discussion in 'The Projects Forum' started by BenFranske, Jun 23, 2014.

  1. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    Hi, I am trying to replace an analog ammeter with an AVR to measure current (up to 300A). I have an existing 300A/50mV shunt which is used for the analog ammeter. Obviously I don't want to read this directly into the AVR ADC as I will end up with very poor resolution with a maximum of 50mV. I got a couple of AD623 instrument amps to try and boost the voltage to rectify this situation but seem to be unable get it working correctly.

    I am initially starting with a planned gain of 100 so that 50mV will become 5.0V, full scale on the AVR input, so I'm using a 1.02kO gain resistor. My problem is that even though the AD623 is supposed to be rail-to-rail it doesn't seem to be working... If I apply a 41.9mV differential across the input of the amp I am only getting 1.217V on the output instead of the 4.19V I am expecting... If I remove the gain resistor and turn it into a unity gain amp I do in fact get 41.9mV on the output as I would expect. Only low gain resistors seem to be giving the amplification I expect. I have tried using Rg=3.89kO and Rg=100 ohms which should be gains of around 26 and around 1000 respectively with actual outputs of 1.107V and 1.229V. So for the gain of 26 things seem to be working about right but for the gain of 1000 which should clearly give the full 5V rail (or close to it) on Vout I only get a max of 1.229V.

    Any idea on why this may not be working in full rail-to-rail style? I am feeding it as single supply with 5V if that matters.

    Thanks!
    -Ben
    K0BEN
     
  2. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Could you post a schematic?
     
  3. dougc314

    Member

    Dec 20, 2013
    38
    11
    My hunch is that you are exceeding the input voltage range. How is the shunt being used?
    What is the difference between the expected voltages on the shunt, and the power rails of the opamp? Can you post a circuit drawing?
     
  4. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    I will work on putting together a schematic.

    Right now I've simplified for testing purposes and am not using the shunt or the AVR at all, just concentrating on the in-amp. I am applying 41.9mV to Vin+ and have Vin- tied to ground (i.e. the difference on the Vin pins is measured at 41.9mV). I can then meter the Vout pin against ground and see that when I have set the in-amp at unity gain I am getting 41.7mV (about what I'd expect). If I increase the gain to 26 by using an Rg value of 3.89kOhms I get 1.107V on Vout (again about what I would expect). If I boost the gain up to 100 by using a Rg value of 1.02kOhms I only get 1.217V on Vout (not the about 4.19V I would expect).
     
  5. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    Are you sure the resistor is actually 1.02k ohm?
     
  6. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    Yes, it meters as 1.02k
     
  7. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Great suggestion!!!!

    You can get results like this if the 41.9 mV that you are applying is biased outside of the power supply rails.

    Did you check this??

    Mark
     
  8. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    Ok, here's a quick and dirty schematic showing my test circuit. If I understand the idea correctly I don't think that a bias is a problem here as Vin- and Vs- are tied to the same ground. That said... in my final circuit that won't be the case and I'm going to need some advice on isolation, but let's cross that bridge when we come to it.
     
  9. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    hi Ben.
    Your circuit will not work as expected, look at the Sim.
    The signal input differential is about 3v!
    E

    Ignore the model pin numbers!!
     
  10. Tesla23

    Active Member

    May 10, 2009
    318
    67
    Check out the datasheet Fig23:

    [​IMG]
     
  11. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    That's very interesting. I wouldn't have expected the maximum output voltage to be so strongly affected by the common-mode voltage.
     
  12. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    Neither would I which is why I glossed over it I suppose. Ok, so are there suggestions for coming up with a better plan. I guess I could go with a hall effect sensor but those are a little pricy for 300A (unless someone has a good part/source I haven't found yet) and I already have the shunt in place though it would be nice as it would isolate the circuit at the same time. I guess that I could also go through a couple of in-amps and amplify in stages. I don't need super precise readings but it would be nice to have at least 1A resolution. Since I'm working with a 10 bit ADC this means I need to boost 50mV up to at least 1.5v (a gain of 30) which I can't do with this in-amp (at least in a single stage).

    Thoughts?
     
  13. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    hi Ben,
    I guess you know the AD623 is a differential input amplifier.

    For a Gain of say 100, the highest Vin diff would be ~35mV.
    I use the AD623 for weigh scale bridges, powered by 5V and the best I can get is around 3.5V.

    I use a R2R OPA after the AD623 to bring the Vout upto around 4.096V, which drives a 12 bit ADC.

    How is your shunt resistor connected to the current rail.?
    Is one end considered 0V ref.?

    E
     
  14. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    You could add a simple rail-rail opamp non-inverting amp after the in-amp to get the gain you want.
     
  15. BenFranske

    Thread Starter New Member

    Apr 5, 2011
    10
    0
    I had someone else point out to me after carefully scrutinizing the datasheet that going to a dual +/-5v supply would seem to fix the issue, see figure 20 on the datasheet. This seems to indicate that with this in-amp high gain values are really only useful if you're running a dual supply. In my case it may be easier to run through an additional op-amp instead as I don't have a -5v supply available and would have to add that in.

    I think I'm going to create a separate post to discuss this project as a whole because 1) I think people might find it interesting but 2) it's off topic for this thread and 3) I need some advice on dealing with isolation. Watch for another thread "High Voltage Power Monitoring with AVR" coming soon.
     
Loading...