Many sensor field problems look like unstable algorithms, ADC jitter, or poor modules. They often end up being ground and power problems.
The reading is stable when the device is idle, but jumps when a motor starts. Temperature moves during radio transmission. Pressure shifts after a relay turns on. USB power and battery power give different values. Short lab wiring works, while the field installation is noisy.
The physical quantity may not have changed. The measurement reference changed.
sensor output
-> analog front end
-> ADC input
-> reference voltage
-> ground reference
An ADC does not read an isolated voltage. It reads the relationship between input, reference voltage, and local ground. If power or ground moves, the number seen by firmware moves too.
Ground Is Not An Ideal Zero
The schematic shows GND as one symbol. Real PCB traces and cables have resistance, inductance, and current.
Whenever current flows through ground, it creates voltage drop. If current changes quickly, ground inductance creates transients too.
Ground is not mathematical 0 V
Ground is a conductor with impedance, current, and voltage drop
If a sensor, op-amp, ADC, and high-current load share part of the ground path, load current changes move that ground potential. The sensor may reference one ground point, while the ADC references another. The reading changes.
Common symptoms include:
- Several analog channels jump when a motor starts
- ADC spikes appear when a relay switches
- Sensor values move when LEDs, backlights, or buzzers turn on
- Battery voltage or temperature readings shift with charging current
- Touching the enclosure, plugging USB, or connecting a scope changes behavior
This is not simply an inaccurate sensor. The measurement reference is moving.
Return Paths Decide Who Pollutes Whom
Current always returns to the source. The problem is not only where current goes out, but also where it comes back.
If the return path of motors, solenoids, relays, radios, or backlights runs near the analog front end, it brings ground disturbance into the measurement area.
A better model is to keep high-current loops and small-signal measurement loops from sharing sensitive paths:
high-current load: supply -> load -> high-current return
analog measurement: sensor -> front end -> ADC -> quiet reference ground
They may eventually meet at a controlled point, but load return current should not pass through sensitive measurement ground first.
That is why two boards with the same schematic can have very different sensor readings. The component values may be right, while the current path is wrong.
Supply Ripple Enters Sensors And Front Ends
Sensors and op-amps need power. Power is not only there to make chips turn on. It can enter the measurement result through many paths.
Common paths include:
- Sensor output changes proportionally with supply
- Op-amp power-supply rejection is finite, so ripple reaches the output
- ADC reference voltage comes from the same supply
- Digital switching noise couples through power into the analog front end
- Load transients create brief supply dips or rebounds
Some sensors are ratiometric. If supply changes, output changes. If the ADC reference and sensor supply do not share the same ratio, the reading drifts.
Some front ends are sensitive to supply ripple. Op-amps have PSRR, but it is not infinite. Higher frequency, poor layout, and weak decoupling make supply disturbance more likely to appear at the output.
When readings jump together with radio transmission, motor PWM, or relay switching, put the supply waveform and raw ADC values on the same timeline.
Reference Voltage Is Even More Direct
The ADC result is fundamentally a ratio:
ADC code ≈ Vin / Vref * full scale
If reference voltage Vref changes, the code changes even when input Vin does not.
Many MCU projects use VDDA or system power directly as the ADC reference. That is simple, but it also means supply ripple, load transients, and voltage drop enter the ADC result directly.
Typical signs include:
- All ADC channels shift during radio transmission
- Sampling values move with motor PWM duty cycle
- USB power is more stable or noisier than battery power
- The same sensor has different offset on another board
- ADC readings move together with the monitored supply voltage
If the system needs stable measurement, the reference source, analog supply decoupling, reference-pin layout, and sampling time must be treated seriously. Firmware calibration can correct stable offset, not a reference that moves with load.
Decoupling Is About Current Loops
Power decoupling provides local transient current near a chip and gives high-frequency noise a short return path.
It is not enough to have “a capacitor somewhere on the power rail.”
If the decoupling capacitor is far from the chip, the loop is large, or the return path is poor, high-frequency current still runs through sensitive regions. The analog front end, reference, and ADC input can be polluted.
Common practices include:
- Place small capacitors near each important power pin
- Use clean local decoupling around analog front ends and ADC reference pins
- Use larger capacitors for low-frequency load changes and smaller ones for fast transients
- Keep decoupling loops short and away from sensitive inputs
- Isolate analog supply from digital power with a ferrite bead, RC filter, or LDO when needed
Decoupling is not only about making the supply look stable. It controls where transient current flows.
Long Sensor Wires Bring The Field In
If a sensor connects through a long cable, the problem becomes harder.
Long wires have resistance, capacitance, and inductance. They can also behave like antennas. Motors, relays, inverters, ESD, and surge events in the field can enter the device through the cable.
Common long-wire issues include:
- Wire resistance creates voltage drop
- Ground potential difference changes the signal reference
- Cable capacitance slows edges or affects sampling
- Common-mode interference enters single-ended inputs
- Shield connection creates a new return path
- ESD or surge damages the input or causes latch-up
Analog voltage sensors are especially sensitive over long wires. A single-ended voltage signal ties signal and reference ground together, so field ground differences directly become measurement error.
In harsher environments, differential input, current loop, isolation, shielding, surge protection, or local digitization may be better than pulling one analog voltage wire far away.
Firmware Filtering Cannot Fix A Moving Reference
Firmware can average, low-pass filter, and reject spikes. But it only processes data after the measurement has already been corrupted.
If the cause is ground movement, supply dip, reference jitter, or front-end saturation, firmware filtering can make the curve smoother, but it cannot restore the true measurement.
These cases should not be handled only by software:
- All channels shift in the same direction when a load turns on
- ADC reference jitters periodically with the supply
- Input disturbance drives protection diodes
- Ground potential difference changes with field equipment state
- Op-amp or sensor supply leaves its valid range
In these cases, correlate logs with hardware waveforms instead of only tuning filter parameters.
Debug By Correlating Time
The most useful clue in ground and power problems is often timing.
Do not look only at the sensor curve. Put these events on the same timeline:
- Motor start, stop, and PWM duty changes
- Relay turn-on and release
- Radio transmission and reception
- Charging, power switching, backlight, or buzzer activity
- Raw ADC value, filtered value, and device state
- Supply voltage, reference voltage, and voltage difference between key grounds
If the reading jump always lines up with a load event, the sensor itself is probably not the first suspect.
Simple experiments can narrow the cause:
- Temporarily disable high-current loads
- Compare a stable external supply with battery or USB power
- Measure the ADC reference separately
- Short the ADC input to analog ground and observe baseline noise
- Compare short sensor wiring near the board with the long field cable
- Use an oscilloscope to watch supply, ground difference, and sensor output together
The goal is not to fix everything at once. It is to decide whether the problem comes from the sensor, supply, ground, reference, cable, or firmware.
Protect The Measurement Reference
Stable sensor readings require more than sensor accuracy.
A practical design checklist is:
- Does high-current return pass through analog measurement ground?
- Is the ADC reference stable, and is its relationship to sensor supply clear?
- Is the analog front-end supply polluted by digital loads, radio, motors, or relays?
- Are decoupling capacitors close to key chips, with short loops?
- Does long-wire input need differential sensing, shielding, protection, or isolation?
- Can sampling avoid known disturbance windows?
- Do logs keep raw value, filtered value, power state, and load activity timestamps?
Ground and power are not background conditions outside measurement. They are part of the measurement chain.
The sensor may be unchanged while the reading changes. If the reference point, supply, or return path moves, the ADC is already seeing a different world.