Post Go back to editing

AD8221 to measure thermocouple with common power pin

Product Number: AD8221

Hello,

i am trying to read a thermocouple which has a shared pin with a heater.

The heater is suplied with pwm from another isolated galvanicaly circuit.

I have attached a schematic, where you can see how things look like.

R5 - is the heater

R6 - is the thermocouple

V4- is the pwm source for the heater

The gain for the amplifier is set at x100.

Of course, in simulation everything works :)

But in real life, when i apply power to the heater, the values go crazy.

The PWM frequency is 40khz at 50% duty ( 25us period).

I  read the amplifier output using a 1msps adc in the "off period" of the pwm signal... this gives me a window of roughly 12.5us.

What do you think of this aproach? Is it posible to read the voltage accross the thermocouple in this manner. Or do i need to drastically change the design aproach?

Parents
  • Hello moro,

    in the simulation your heating does not affect the measurement circuit - it only shares a potential.

    In real life you have unexpected coupling and unwanted current paths, by which the heating pwm may affect your AD8221 inputs (differentially and as common mode disturbance). So it's no real suprise, that the values with heating are not usable.

    It sounds like a good approach, to measure during the PWM off phase. But keep in mind: the ADC needs some sampling time (ok, not very much in case of a 1 MSPS ADC), the AD8221 needs some settling time, and even the network of (parasitic) coupling capacitances and conductor resistance may need some settling time. So sampling at the end of the off period might help, but it may still be not good enough.

    I would indeed recommend to change the approach. If possible keep the heating circuit and the temperature measurement circuit as separate as possible.

    If this is not possible you might try to measure the temperature less often (maybe only once in 100ms or once in 1s) and to switch the heating pwm off for 100µs ... 1ms before you sample the temperature value.

    If 1 temperature sample per second is sufficient for you, I would even recommend to switch the heating PWM off for one complete mains cycle and to measure the thermovoltage several times during these 20ms and take the average (to elminiate also the influence of 50Hz interference from the mains).

    best regards

    Achim

  • Hello,  the heating element is far away from the AD8221 circuit.

    By the way, what is the settling time for the AD8221 ?   

  • By the way, what is the settling time for the AD8221 ?   

    just as given in the datasheet...

  • Hmmm, to be honest i forgot about settling time parameter in my design...

    It seems i  should try to give a headroom of at least 13-15us in "pwm off time" before reading with the adc the result from the ad8221.

    By the way, are there any high speed "in-amps"  parts regardless to the ad8221 ?

    The initial design goal was to be able to do 3 temperature readings in the "off period of the pwm", but given the current situation, i need at least 45-50us to do this.

    The adc itself samples quite fast, in 4us max, i get 3 samples averaged ( using LTC2368-24).

    Given this, it seems i need a lower pwm frequency.

    Thanks Achim for the hints.

  • Hello,

    i readjusted the design by placing some RC filters at the entrance of the amp ( R7/C1  & R8/C2),  and also placing some caps on each leg of the thermocouple sensor (C4,C3)

    I also decreased the pwm frequency to 150hz with ~10% dutycycle, therefore i have a "off time" window 5.8 miliseconds.

    I have attached a capture with the analog signals  measured across each leg of the thermocouple, and at the output of the amplifier.

    Also i have placed a marker where i sample the signal with the adc.

    There i have about 4 pwm cycles, then i turn off the pwm, wait some time and capture the signal via adc.

    But my hope was to be able to sample somewhere between the pwm pulses.

    Unfortunately i see between the pulses the amplifier reacts a bit slow, please see closeup picture

    Or it doesnt have time to recover?  I am wondering because i removed all the caps from the thermocouple and the rc filter, and the behaviour is the same.

    What do you think?

  • Hello Moro,

    I think you're just following two contradictory strategies.

    When you filter, you try to suppress the electrical interferences by averaging them out. To improve this you have to take longer timeconstants of the filter and therefore slower reaction times of your signal chain.

    When you try to sample between the PWM-pulses you go the other direction. You accept, that there is a significant interference during the pulse, but you try to make your signal chain fast enough, so that it can recover from the interference during the PWM-off phase (which should give you a sufficient time window for sampling).

    I think you cannot follow both directions at the same time, since they have conflicting requirements.

    Your measurements give valuable information. During the PWM-on phase the differential signal at the amplifier input reaches several hundred mV. Trying to amplify this by a factor of 100 completely overdrives your AD8211 (and maybe also some part of the further signal chain to the ADC).One or several parts of your signal chain leave the area of linear operation and come to a "strange operating condition".

    When the PWM-pulse is over, tp-tn take just some 10µs to recover. But the overdrive condition in your signal chain takes much longer to recover (many ms). Your filtering with 10kOhm/100nF may contribute significantly to this long recovery time, so you should remove these filter in the first step. But it also could be, that the overdriven signal chain itself takes a time to recover from the strange operating condition in which you have pushed it before. So my recommendation for the next step would be: remove the additional filtering and repeat this measurement.

    There's an additionial valuable information in the measurements you've shown. When you switch of the PWM, the ADC signal recovers from the interference after ~15ms. But even in the rest of the PWM-pause there ist still another electrical interference from the 50Hz mains. It's visible as a "small" 20ms ripple on the ADC-signal in your first measurement.

    This is much smaller than the distortion by the PWM. But it is still in the range of ~100mV at the ADC, which corresponds to ~1mV at the thermocouple, so this is still much too high for reasonable thermocouple measurements.

    Therefore I would again recommend:

    a) remove your filtering and repeat the measurements to find the PWM-recovery time without your RC filters

    b) for your final measurement switch the PWM off for the complete recovery time you found in a) plus additional 20ms. During these 20ms without PWM-distortion sample the ADC not only once, but sample it many times and calculate numerically the average ADC-value during these 20ms.

    This may in the end be good enough for the temperature accuracy you require - or it may not. In the second case, you probably have to go for the fundamental change of your setup.

    best regards

    Achim

  • Hello Achim,

    i adjusted the capacitors in the filtering circuit,  i have  replaced the 100nf with 10nf. 

    Now the signal looks much better, and the results are quite stable,  i can read ex. 2.62x milivolt,  there is small variation of several tenth's of microvolt which is quite acceptable ( due to adc noise).

    Overall, the final value measured -2.76 ~ -2.78 mV and looks quite stable ( doing 128 adc samples between pwm pulses)

    Also the output of the AD8221 looks much better.

    By the way, the 50hz noise i noticed is coming from my measurement setup ( if i unplug the ac/dc adapter from the laptop the ripple is almost invisible).

    This is how the signal looks like between pwm pulses.

    In my design AD8221 is supplied with a reference voltage of 1.25V ( coming from a MAX6070AAUT12).

    The amplifier outputs a value of +978mV, 

    Between TP and Gnd i measure 937mV

    Between TN and GND i measure 946mV

    This gives me about -9mV diferential voltage at the input of the amplifier.  Since this is a negative voltage swing, then i expect the output to be under the reference level.

    Given the values from above and considering the 100 gain...  i would expect to have a output voltage of 1250mV + ( -9 * 100).

    Shouldn't the output of the amplifier value be somewhere at 350mV? Or i am missing something here?

    I ask this because my experience with opamps is quite poor...

Reply
  • Hello Achim,

    i adjusted the capacitors in the filtering circuit,  i have  replaced the 100nf with 10nf. 

    Now the signal looks much better, and the results are quite stable,  i can read ex. 2.62x milivolt,  there is small variation of several tenth's of microvolt which is quite acceptable ( due to adc noise).

    Overall, the final value measured -2.76 ~ -2.78 mV and looks quite stable ( doing 128 adc samples between pwm pulses)

    Also the output of the AD8221 looks much better.

    By the way, the 50hz noise i noticed is coming from my measurement setup ( if i unplug the ac/dc adapter from the laptop the ripple is almost invisible).

    This is how the signal looks like between pwm pulses.

    In my design AD8221 is supplied with a reference voltage of 1.25V ( coming from a MAX6070AAUT12).

    The amplifier outputs a value of +978mV, 

    Between TP and Gnd i measure 937mV

    Between TN and GND i measure 946mV

    This gives me about -9mV diferential voltage at the input of the amplifier.  Since this is a negative voltage swing, then i expect the output to be under the reference level.

    Given the values from above and considering the 100 gain...  i would expect to have a output voltage of 1250mV + ( -9 * 100).

    Shouldn't the output of the amplifier value be somewhere at 350mV? Or i am missing something here?

    I ask this because my experience with opamps is quite poor...

Children
  • Hello,

    if your measured values would be exact, the expected ADC-value would indeed be 1250mV - (9mV*100). But have a close look at the accuracy of tp and tn values. If each of them would be off by some mV, a completely different ADC-value would be calculated.

    In your graph it seems to me, that the resolution of tp and tn is already in the mV-range, so the accuracy-limit of (tp-tn) is for sure several mV. And therefore the measured ADC-value may vary several hundred mV from the value you calculated based on measured tp and tn.

    A thermovoltage of -9mV would probably correspond to a temperature difference of 100°C ... 200°C over the thermocouple. (Exact value depends on type of your thermocouple). You have the system in front of you, so you may judge best, if this big temperature difference is realistic or if the 9mV were simple wrong (due to inaccuracy of tp, tn measurement).

    By the way, the 50hz noise i noticed is coming from my measurement setup ( if i unplug the ac/dc adapter from the laptop the ripple is almost invisible).

    You have opened the GND-loop by unplugging the ac/dc adapter, and this eliminated the 50Hz interference. If you can ensure, that the GND-loop will never be formed again (e.g. by an end-user, which creates an own GND-connection), you may be able to continue without 50Hz suppression.

    best regards

    Achim