Load cell offset drift cancellation circuit

OBW0549

Joined Mar 2, 2015
3,566
...but that arrangement will only clip voltage higher than Vdd (or lower than 0V) by the diode's forward voltage, which in a typical schottky diode is about 450mv. In my case I'd like to clip the voltage at exactly Vdd and 0V, respectively, if possible. I'm all eyes and ears if you have a better idea.
OK, instead of connecting the clamp diodes to ground and Vdd, construct a pair of "clamp supplies" for the purpose: get a cheap, dual opamp and configure the two sections as unity-gain buffers; one buffer's input connects to a voltage divider set to give you +0.45V, and the other buffer's input connects to a voltage divider set for (Vdd - 0.45V). Now connect the clamp diodes to the outputs of the opamps, instead of ground and Vdd. (NOTE: you'll need to pick an opamp whose output short-circuit current is greater than the instrumentation amplifier's output short-circuit current, so when the instrumentation amp and the clamp disagree on what the output voltage should be, the clamp always wins.)

To answer your question, I found that circuit in the last pages of the attached file... the relics of which where found being firmly grasped by the still-juicy, but thoroughly mummified remains (if that were possible) of the evil priest Imhotep.
Imhotep wasn't evil, he was just corrupt. Darned fine architect, though...
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
get a cheap, dual opamp and configure the two sections as unity-gain buffers
Thanks, you make the answer sound so obvious, this clearly shows my lack of experience... I'll be using an MC1458 for that purpose then, it has a minimum short circuit capability of ±25mA (up to ±40mA, according to it's datasheet), whereas the AD8221 is only 18mA

Imhotep wasn't evil, he was just corrupt. Darned fine architect, though...
Ah, the pitfalls of misplaced love... what a woman can do to a man of weak character...
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
OK, instead of connecting the clamp diodes to ground and Vdd, construct a pair of "clamp supplies" for the purpose: get a cheap, dual opamp and configure the two sections as unity-gain buffers; one buffer's input connects to a voltage divider set to give you +0.45V, and the other buffer's input connects to a voltage divider set for (Vdd - 0.45V). Now connect the clamp diodes to the outputs of the opamps, instead of ground and Vdd. (NOTE: you'll need to pick an opamp whose output short-circuit current is greater than the instrumentation amplifier's output short-circuit current, so when the instrumentation amp and the clamp disagree on what the output voltage should be, the clamp always wins.)


Imhotep wasn't evil, he was just corrupt. Darned fine architect, though...
OB, I've already finished designing the complete circuit. One question, is a resistor in series with the output of the Gain instrumentation amplifier (before the signal goes into the ADC) still needed for the voltage limiting arrangement?
 

OBW0549

Joined Mar 2, 2015
3,566
OB, I've already finished designing the complete circuit. One question, is a resistor in series with the output of the Gain instrumentation amplifier (before the signal goes into the ADC) still needed for the voltage limiting arrangement?
I'd put one there, between the instrumentation amplifier output and the two clamp diodes. 1K ohm or thereabouts should do the trick...
 

meyssam

Joined Sep 4, 2015
2
Hi. I'm from iran and i work for ASA company that makes commercial weigh-indicators. maybe i can help you (camartinez) solve the problem. did you solved it yet??
 

meyssam

Joined Sep 4, 2015
2
Hi. I'm from iran and i work for ASA company that makes commercial weigh-indicators. maybe i can help you (camartinez) solve the problem. did you solved it yet??
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
Hi. I'm from iran and i work for ASA company that makes commercial weigh-indicators. maybe i can help you (camartinez) solve the problem. did you solved it yet??
Thanks for your generous offer. I designed and built a circuit a couple of months ago based on all the comments and recommendations given to me in this forum, but I've not tested it yet since there's some coding involved that I haven't gotten around to write just yet. I landed a huge project with one of my customers (unrelated to load cells) during that time that's gotten my time completely saturated. I really appreciate your generous offer. Most of my observations and doubts are listed in this thread, and I'd me more than grateful if you took the time to review them and add your own, if you feel like it. Also, you may like to take a look at this other thread, which is very closely related to what we've been discussing here.
Thanks again!
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
Alright. Here's a video of the load cell's output,which has been amplified using an AD8221 instrumentation amplifier with a gain set by a 470Ω resistor. (G = 1 + 49.4K/Rg = 106.1)

The AD8221 output is fed directly into an AD7680 ADC, but it's also connected to a couple of diodes which in turn are connected to adjustable positive and negative sources in order to clamp any under or over voltage trying to reach the ADC. I built that circuit exactly the way OBW0549 described it in post #61


You can see in the video what happens when I apply pressure to the load cell. The signal's center is at 2.5V thanks to its having been offset by sourcing 3V into the AD8221 reference pin (question, where did that 0.5V go?)

Another mystery is the noise that appears when the signal is reaching its maximum span allowed by the clamping diodes, which is about +5V at the top and -0.25V at the bottom. My wild guess is that it has something to do with both clamping diodes when their forward voltage is being reached. I say that because after the signal reaches those limits the noise seems to disappear.


EDIT: it is worth noticing that the noise appearing at 0:03 only affects the bottom side of the waveform (when the load cell is being excited with -5V) and the transition between excitation pulses, in which no voltage is being applied to the load cell.
 
Last edited:

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
I tweaked the voltage limiting part of the circuit (voltage delivered into the ADC should never be above 5V and never below 0V), because my previous version was working ok when limiting the positive voltage below 5V. But the negative side was not working the way I expected, since even at its lowest (highest?) setting it allowed the signal to reach about -0.5V before it effectively clipped it.
But then I realized that schottky diodes have a forward voltage of around 0.45V. So I changed the way I had configured the low voltage limiting part of the arrangement, and I think this time it's going to work ok.

Capture.JPG

I only have one doubt, though. I understand that any over-voltage being delivered by the AD8221 is being effectively sunk into U1 (which is a good'ol MC1458), but it seems to me that the MC1458 is going to have to source current into the AD8221 so as to counteract an under-voltage situation. And I have a bad feeling about that....

@OBW0549, I'd really like to hear your opinion about this, if you have the time.
 

#12

Joined Nov 30, 2010
18,224
it seems to me that the MC1458 is going to have to source current into the AD8221 so as to counteract an under-voltage situation.
I don't see a problem with that.
If you are concerned about how much current, you can add a resistance in series with the signal from InstAmp. IIRC ADC converters have quite a high input impedance so a few hundred ohms will still be within your error budget.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
I don't see a problem with that.
If you are concerned about how much current, you can add a resistance in series with the signal from InstAmp. IIRC ADC converters have quite a high input impedance so a few hundred ohms will still be within your error budget.
Good point, I had forgotten that @OBW0549, had recommended a 1k resistor at the InstAmp's output anyway... right before the voltage limiting arrangement. Like this:

Capture.JPG
 

#12

Joined Nov 30, 2010
18,224
So...do the math. How much will a 1K resistor diminish the voltage into the input impedance of the ADC?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
So...do the math. How much will a 1K resistor diminish the voltage into the input impedance of the ADC?
:confused::eek:

Alright... I'll try to answer the question... see if I can avoid making a fool of myself.

The AD7680's datasheet says that:

In applications where harmonic distortion and signal-to-noise ratio are critical, the analog input should be driven from a low impedance source. Large source impedances significantly affect the ac performance of the ADC. This may necessitate the use of an input buffer amplifier. The choice of the op amp is a function of the particular application. When no amplifier is used to drive the analog input, the source impedance should be limited to low values.

Also, the following graph shows how much input impedance affects total harmonic distortion:

Capture2.JPG


I could not find the ADC's input impedance in the datasheet. Wouldn't I need to use that value to calculate how much voltage if an input resistor were to be used?
Assuming that the ADC's input impedance is about 1M, then the lost voltage would be V*1M/(1k+1M) = V*0.999001. That is, about 0.1% of the input voltage would be lost.

So... have I earned a star, or do I get to spend a few minutes at the corner wearing donkey ears? o_O
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
Analog input leakage
Ahhhhh... I understand now... but your datasheet says ±1µA (it also says it's preliminary) while mine says ±0.3µA ...
so probably a more realistic value would be ±0.3mV, which is a loss of 0.006% considering a 5V full scale... not too shabby...

question, why don't they use "input impedance" instead of "input leakage" in the datasheet? How would the input circuit look inside? Something like a decoupling 30pF cap in series?
 

OBW0549

Joined Mar 2, 2015
3,566
Just use the 1 kΩ resistor between the IA's output and the clamp circuit & ADC input. I seriously doubt you'll notice any effect on performance from it.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,254
Just use the 1 kΩ resistor between the IA's output and the clamp circuit & ADC input. I seriously doubt you'll notice any effect on performance from it.
Thanks OB. Fortunately, I had to place a 0Ω resistor at the IA's output as a bridge in my original PCB that I can easily replace! :)

Have you watched the video in post #68? What do you think?
 

#12

Joined Nov 30, 2010
18,224
Something like a decoupling 30pF cap in series?
You found it. Page 7, bottom right. There is no input current except the leakage.
why don't they use "input impedance" instead of "input leakage" in the datasheet?
There is no intentional input current, therefore there is no equivalent resistance. The leakage is a constant (dependent on temperature, not voltage) so it has no similarity to a resistor.
 
Top