Author Topic: Fluctuation in ADC readings  (Read 21321 times)

dave333

  • Guest
Fluctuation in ADC readings
« on: July 10, 2008, 08:06:47 AM »
I'm using a T100MD888 to monitor the power output and amperage draw of an induction power supply.  The 888 is powered by it's own 24V supply.  The control circuitry and feedbacks of the induction heater are powered by a separate +/-12 volt supply.  The ground of the +/-12 supply and the 0v of the 24V supply are common.  My feedback signals are attenuated using a LF347 op amp.  My problem is that the ADC readout in the PLC jumps around.  If I measure the voltage input directly at the ADC input to the PLC, I get a steady input. For example, 2.50V +/- .01V.   I would expect to get an ADC reading of 2048.  What I do get is a variable reading that will jump around from about 1920 to 2170.  I'm reading the value using a custom function called every 1 second.

I need to get a more stable reading.  Do you have any suggestions.

Thanks

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Fluctuation in ADC readings
« Reply #1 on: July 10, 2008, 11:41:50 AM »
Usually the ADC reading could move around +/- 2 to 3 LSB but not as much as you experience. You can check if the ADC is functioning properly by connecting a potentiometer that draws power from the ADC 5V ref and 0V and the center arm will be fed to the ADC input. You should be able to get a stable reading.

There are several possible sources of error when connecting to other devices:

1) Noise coupled to the ADC input from inductive system.
2) OpAmp output may oscillate a bit.
3) bad or noisy ground connection.

The PLC ADC inputs are very sensitive and fast and can pick up transient voltages easily.

If you connect an oscilloscope to the ADC input you probably can see transient noise or some AC signal imposed on the analog input. A multi-meter will never pick it up since multi-meter measure average voltage over several hundred ms.

To get to the root of the problem may require some shielding of noise or filtering of power input.

A quick way of tackling the issue is to take a large number of samples over 1 second and take the average.

E.g. you can measure the ADC every 0.1 second and then add the value to a variable say S = S+ADC(1). After 10 counts you can then divide S by 10 to get the average value. That would give you a much more stable reading than individual readings.
« Last Edit: July 10, 2008, 04:50:10 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

dave333

  • Guest
Re:Fluctuation in ADC readings
« Reply #2 on: July 10, 2008, 11:54:59 AM »
Thanks for responding so quickly.  I will look at it on a scope and see if I can filter the noise.  Also, the averaging idea looks like it may also work for my application.

dave333

  • Guest
Re:Fluctuation in ADC readings
« Reply #3 on: July 14, 2008, 04:04:40 PM »
I've filtered my analog inputs and am now getting a stable reading.  This in combination with the average lets me display a very stable readout.  However, I'm reading 6 different inputs and each one has an effect on the other analog channels.  If I run only ADC3, everything is great.  When I add ADC2, it effects my readout on ADC3.  If I add ADC4, it gets worse.  Are the analog inputs isolated? Is there anything I can do to make the inputs independent of each other?  I'd appreciate any help you can provide.  My customer is bugging me for shipment of this prototype system and this is the onl thing holding it up.


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Fluctuation in ADC readings
« Reply #4 on: July 14, 2008, 10:16:46 PM »
Is each of the analog input connected to some voltage signal?

There is really only one ADC converter but multiplexed to 8 analog pins.  When you run the ADC(n) function the Analog to Digital converter is switched to the analog input pin 1-8.

Thus, if an analog input is left floating then it can give a reading that is close to its neighboring analog channel because the ADC retains some of the past reading. But if the analog channel has been connected to a stable signal then reading of its neighboring channel should not have any effect on its reading.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

dave333

  • Guest
Re:Fluctuation in ADC readings
« Reply #5 on: July 15, 2008, 10:13:55 AM »
Thanks.  I got it working OK.  My problem was that I was calling out 3 ADC channels one right after another in the same custom function.  I separated them and called them out in separate custom functions and everything reads properly.

nugrozt

  • Newbie
  • Posts: 9
  • I'm a llama!
    • View Profile
problem with reading input ADC
« Reply #6 on: June 16, 2010, 06:55:48 PM »
I had a problem with reading the input ADC, I made the DAQ using a thermocouple to read the temperature in the furnace, the problem I faced was, reading the input ADC unstable from the thermocouple, the output voltage of thermocouple 10mv/deg. C, should be reading the input ADC linearly with increasing temperature, but that happens readings are volatile and unstable

nugrozt

  • Newbie
  • Posts: 9
  • I'm a llama!
    • View Profile
Re:Fluctuation in ADC readings
« Reply #7 on: June 16, 2010, 08:03:02 PM »
i had the same problem as yours,dave.,
I had a problem with reading the input ADC, I made the DAQ using a thermocouple to read the temperature in the furnace, the problem I faced was reading the input ADC unstable from the thermocouple, the output voltage of thermocouple 10mv/deg. C, should be reading the input ADC linearly with increasing temperature, but that happens readings are volatile and unstable.
what should i do?using fillter?what fillter?

regard,nugrozt

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Fluctuation in ADC readings
« Reply #8 on: June 17, 2010, 12:40:44 PM »
Due to all kinds of factors (noise from the digital circuit, external coupled noise) the ADC reading can fluctuate about +/-3 LSB, which means for a 10-bit DAC normalized to 12-bit such as that on the T100MD+, the reading could fluctuate about +/- 12.

You usually can eliminate the fluctuation by averaging the readings. E.g. take 10 or 100 readings rapidly and then average the reading and the result will be much more stable.

If the fluctuation is much greater than +/- 3 LSB then please check your wiring to ensure that a stable voltage is presented to the ADC inputs.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

nugrozt

  • Newbie
  • Posts: 9
  • I'm a llama!
    • View Profile
Re:Fluctuation in ADC readings
« Reply #9 on: June 17, 2010, 03:42:11 PM »
thanks for your answer.
i've reading the ADC input every 0.1s and after 10 count divided by 10, the reading using this syntax:
x=ADC(3)
x=x+ADC(3)
but there're still any fluctuation in my system.

i'll try to check up my wiring first. if it doesn't work, can i get the fillter analog (just like dave333 has)?

thanks :)