EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Kamel on February 04, 2021, 10:51:29 am

Title: issue with my design using AD8236 op-amp
Post by: Kamel on February 04, 2021, 10:51:29 am
Hello everyone,

I am designing a circuit to measure the current passing through a load using a shunt resistor and an instrumental amplifier AD8236, but i am obtaining a wrong output value in my circuit but i don't know where is my mistake. I attached my schematic and here is the link of the amplifier

https://www.analog.com/media/en/technical-documentation/data-sheets/AD8236.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/AD8236.pdf)

Thanks in advance.
Title: Re: issue with my design using AD8236 op-amp
Post by: mvs on February 04, 2021, 11:41:43 am
REF input should not be connected to -Vs.
2-opamp instrumentation amplifier has it limitations.


Read carefully section COMMON-MODE INPUT VOLTAGE RANGE in the datasheet on page 17.
Calculate output voltage of opamp A for your edge cases, it should be always between the rails. 
Title: Re: issue with my design using AD8236 op-amp
Post by: Kamel on February 04, 2021, 11:47:29 am
Thank you for your response, but in the data sheet it says "Rail-to-rail input and output"
Title: Re: issue with my design using AD8236 op-amp
Post by: mvs on February 04, 2021, 12:07:51 pm
Thank you for your response, but in the data sheet it says "Rail-to-rail input and output"
If you connect both REF and -IN to -Vs, opamp A will be in saturation. It does not matter if it rail-to-rail or not.
It should be obvious for EE, but AD could write it in bold on first page of their datasheet.
Title: Re: issue with my design using AD8236 op-amp
Post by: Kamel on February 04, 2021, 12:15:01 pm
ok thanks, may you suggest any solution
Title: Re: issue with my design using AD8236 op-amp
Post by: Zero999 on February 04, 2021, 12:25:37 pm
Maybe I'm having a brainfart, but I can't see why the ref pin can't go to -Vs in this case, as it shouldn't exced the common mode range of any of the op-amps inside the AD8236.

Anyway, why do you need a differential amplifier? Can't you use an ordinary op-amp, in the non-inverting congifuration?
Title: Re: issue with my design using AD8236 op-amp
Post by: Kamel on February 04, 2021, 12:30:22 pm
the voltage drop is so small (33mVolt) that's why i am using instrumental amplifier
Title: Re: issue with my design using AD8236 op-amp
Post by: Zero999 on February 04, 2021, 01:21:04 pm
the voltage drop is so small (33mVolt) that's why i am using instrumental amplifier
It's not a differential signal though, so why use an instrumentation amplifier? There are plenty of good op-amps available, with a very low input offset voltage, such as the TSZ121, which has a lower offset than the AD8236 and is cheaper from my local distributor.

https://www.st.com/resource/en/datasheet/tsz121.pdf (https://www.st.com/resource/en/datasheet/tsz121.pdf)
Title: Re: issue with my design using AD8236 op-amp
Post by: Terry Bites on February 04, 2021, 04:02:21 pm
https://tools.analog.com/en/diamond/#difL=-0.1&difR=0.1&difSl=0.1&gain=100&l=0&pr=AD8236&r=0&sl=0&tab=1&ty=1&vn=0&vp=5&vr=0 (https://tools.analog.com/en/diamond/#difL=-0.1&difR=0.1&difSl=0.1&gain=100&l=0&pr=AD8236&r=0&sl=0&tab=1&ty=1&vn=0&vp=5&vr=0)
You are outside the common mode range for this amp.

Better still use a chip designed for the job https://www.onsemi.com/products/amplifiers-comparators/current-sense-amplifiers/ncs199a3rsqt2g (https://www.onsemi.com/products/amplifiers-comparators/current-sense-amplifiers/ncs199a3rsqt2g)
Cheap and precise!
Title: Re: issue with my design using AD8236 op-amp
Post by: Zero999 on February 04, 2021, 10:41:22 pm
Maybe I'm having a brainfart, but I can't see why the ref pin can't go to -Vs in this case, as it shouldn't exced the common mode range of any of the op-amps inside the AD8236.
I was having a brainfart.  :palm:

Look at the internal schematic of the op-amp. Suppose the input is 10mV, the output must be 873mV. The golden rule to remember is the op-amp will keep the voltages at both inputs equal. If pins 1 and 6 are at 0V and pin 4 is at 10mV, the voltage on both of op-amp A's inputs must be at 0V and the voltage on both of op-amp B's inputs 10mV. The voltage across RG must be 10mV. In order to get 10mV across RG, op-amp A's output needs to go negative. No current can flow through op-amp A's 210k resistor, as it's got 0V across it, so it has to flow through the 52k5, which is connected to op-amp A's output, which must be negative.
(https://www.eevblog.com/forum/beginners/issue-with-my-design-using-ad8236-op-amp/?action=dlattach;attach=1165484;image)
Title: Re: issue with my design using AD8236 op-amp
Post by: Terry Bites on February 05, 2021, 09:26:29 am
Use the AD tool- It does not lie.
The op-amps inside are not magic.
Rail To Rail is a trade mark not a fact. They mean it might go within 10mV of a rail with no load.
Figure 2 on the data sheet clearly shows the operating regions. Your input CMV is outside the box.
So RtR or not it will fail to operate as hoped for.
You need to read between the lines of most data sheets- You've been spec'd.
Its common to stick a standard (properly rated) diode to ground to lift the non inverting terminal 600mV to put the CMV back in the box.
Title: Re: issue with my design using AD8236 op-amp
Post by: Kamel on February 05, 2021, 12:18:19 pm
hello again, I have fixed it by putting another 5v power supply for the op-amp
Title: Re: issue with my design using AD8236 op-amp
Post by: Terry Bites on February 05, 2021, 01:24:37 pm
A negative supply for V-?
Title: Re: issue with my design using AD8236 op-amp
Post by: Zero999 on February 05, 2021, 01:30:56 pm
Use the AD tool- It does not lie.
The op-amps inside are not magic.
Rail To Rail is a trade mark not a fact. They mean it might go within 10mV of a rail with no load.
Figure 2 on the data sheet clearly shows the operating regions. Your input CMV is outside the box.
So RtR or not it will fail to operate as hoped for.
You need to read between the lines of most data sheets- You've been spec'd.
Calculators are all good to save time, but one needs to understand why they produce the results they do. Yes, it should have been obvious to me, it won't work, but one needs to peer inside and look at the internal schematic to see why.
Quote
Its common to stick a standard (properly rated) diode to ground to lift the non inverting terminal 600mV to put the CMV back in the box.
How would that work? Please post a schematic showing how to apply that to the original poster's application. I can see how that would work, if the source were floating, such as a microphone, but not when the input is referenced to 0V.
Title: Re: issue with my design using AD8236 op-amp
Post by: Kamel on February 05, 2021, 05:56:36 pm
hello, now i have 2 power supplies, one for the load which is maximum 6 volts and ground for the load, the second one is 5 volts and ground for the opamp, and the result as calculated, and the 2 grounds are not connected.
Title: Re: issue with my design using AD8236 op-amp
Post by: Terry Bites on February 07, 2021, 10:00:10 pm
You cant actually float a source, input bias current has to come from somewhere. You can analyze the the voltages of the various nodes but the internal op-amps characteristics of a real product are not available to the user.   :blah:

You might want to see the analysis of an idealized two opamp device, if so read on...