Skip to content
You Start with one site
Amounts in Start with one site
Simulator · Circuits and sensors

Sensor signal

The temperature is steady, yet the reading wanders. Where does the wobble come from, and what removes it?

Found this useful?
true valueon the cableafter the filterwhat the ADC reads

Reading wobbles by
Hum left after the filter
Follows a step in
Hum shows up as
Predict first

Mains hum at 50 Hz rides on a sensor line. The ADC reads it 49 times a second. What do the readings show?

Design check
Try this
  1. With no filter, read exactly 50 times a second. The hum seems gone. Is the reading right?
  2. Choose a filter that keeps the wobble under 5 mV.
  3. Keep the wobble under 5 mV and still follow a step within half a second.
How the numbers are worked out

The true value steps from 1.2 V to 1.8 V at half a second, as a probe moved into warmer water would. On the cable it carries mains hum, a sine at the mains frequency, and random noise. The filter is one resistor and one capacitor, worked out 20,000 times a second in its exact form: the time constant is τ = R × C, the corner is f = 1 / (2π R C), and a sine above the corner is cut by 1 / √(1 + (f / corner)²).

The ADC takes a reading every 1 / fs seconds and rounds it to its step, the reference voltage (3.3 V) divided by 2 to the power of its bits. A hum faster than half the reading rate cannot be seen as it is: it folds down and shows as a slower wave, at the distance from the hum to the nearest multiple of the reading rate. This is aliasing, and no software can remove it after the reading is taken. The filter must remove it before. The lesson filters and frequency response works through RC filters in full.

Found this useful?

Discussion

    Comments show your name. Be kind, stay on the topic.