Problems reading a voltage, with DSO trace

I am using a ADS1110 via I2C to read a voltage. This works fine and I can read the voltage. However, the voltage I am reading is doing something very, very strange. I am reading it direct the the V+ and V- pins on the ADS1110 board.

The voltage is the Sika flow meter on an Mitsubishi Ecodan ASHP.

There are spikes and troughs on the voltage. It looks like a stable voltage, but when it is traced it is not stable enough to give a nice flat reading.

Am I missing a capacitor or something?

Yes you've got noise spikes, probably from a switch-mode power supply. Very common to see.
This is why for high precision analog work you use linear voltage regulators, not switch mode.
The ringing of the spikes is due to stray inductances and capacitances in the wiring of the circuit,
and may also be partly from your 'scope probe, especially from the grounding lead forming a loop.

What do you think I could do about it?

Would a capactor fitted to my arduino circuit act as an effective noise suppressor?

I certainly cannot change the power supply in the device that is supplying the voltage.

Do you actually have a problem? Is this causing an issue with the values read by the ADC?

Yes, it is causing a problem. I read the voltage every few seconds and I am not getting an accurate reading. It varies over a range of about 10%, or so.

A capacitor or RC filter should help, since you are interested in the average voltage.

When reading an analog voltage, I always use the average of a number of samples. Even with 5 samples, the result is a lot better.

Do you have 16-bits unsigned values ? Then use unsigned long for the total.

unsigned long total = 0;
const int n = 5;
for( int i=0; i<n; i++)
{
  total += ADS1110read();
}
uint16_t result = (uint16_t) (total / n);

If 5 samples is an improvement, then try 1000 :wink:

Nice pictures :stuck_out_tongue:

Yes, decouple the device supply with several 100nF ceramic caps to try and clean it up and
the low-pass filtering of the analog signal is a good idea too.

However those transients are very fast and would not normally be seen by a normal ADC,
which have kHz to 100kHz kinds of bandwidth, not 10MHz+ which is where those transients live.

Have you graphed the ADC readings to see what kind of fluctuation is present?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.