Sensor Interfacing and Signal Conditioning
Sensor interfacing and signal conditioning turn a physical measurand into a digital value a microcontroller can use. The work is matching the sensor's electrical range and noise to the ADC's allowed input, then converting raw counts into engineering units.
itComputer architecture and hardware | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Sensor Interfacing and Signal Conditioning
The physical world does not emit uint16_t values. It emits awkward voltages, currents, and resistance changes. Sensor interfacing is how those signals become numbers a processor can store. Signal conditioning is the analog honesty layer that keeps the converter from digitizing nonsense.
Before neat silicon, people judged temperatures with bimetal strips and pressures with mechanical gauges. Digitization won because software is cheap to change. It did not abolish the need to present the converter with a legal input.
Three ideas carry the rest.
First, every useful chain looks like measurand → sensor → conditioning → ADC → raw → scale/offset → units. Skip the match between sensor and ADC and the later math launders a clipped or noisy voltage into a confident dashboard.
Second, the converter has an allowed input shape. Single-ended, differential, and pseudo-differential inputs are different contracts. Differential pairs exist to reject common-mode interference shared by both wires. If you single-end a noisy pair, that interference becomes your data.
Third, raw codes are not volts. MCU formulas divide by full-scale counts and multiply by Vref, then adjust for attenuation. Linux IIO adds offset to raw and then applies scale. Same physics, different paperwork.
The surprise is how often "more bits" fails to help. If a quiet input already jumps by many counts, you are measuring noise, supply bounce, or a missing bypass. Espressif's own ADC notes suggest capacitance on the input pad and multisampling for a reason. A wider converter will cheerfully resolve that mess in finer detail.
Read the Intro for the full chain and glossary. Use the Cheatsheet when you need the attenuation table or the IIO conversion order. The Practice formulas turn those rules into checks you can run on a bench. Field Notes names the failure patterns teams repeat. Quiz confirms you can tell a range problem from a scale problem.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.kernel.org/iio/index.html
Supports
- IIO as the Linux framework for sensors and converters
- Orientation for ADC, buffer, and tooling pages linked from the index
- https://docs.kernel.org/iio/iio_adc.html
Supports
- Single-ended, differential, and pseudo-differential input types
- Unipolar versus bipolar polarity as independent from input type
- Role of references in setting allowed input span and scale/offset needs
- Note that amplifiers and reference buffers affect effective input range
- Quiz answers on differential and pseudo-differential behavior
- https://docs.kernel.org/driver-api/iio/core.html
Supports
- IIO device model and channel specifications
- Userspace paths under /sys/bus/iio and /dev/iio:deviceX
- Buffered capture overview used in sampling discussion
- https://docs.kernel.org/iio/iio_devbuf.html
Supports
- Continuous capture via buffers and scan elements
- Watermark and enable attributes for triggered capture
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-iio
Supports
- Offset added to raw prior to scaling
- Scale applied after offset to obtain channel units
- Voltage channel units in millivolts after conversion
- sampling_frequency and oversampling_ratio meanings
- Quiz answers on IIO conversion order
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc/index.html
Supports
- Default 12-bit raw width and Vdata formula with Vref
- Design Vref 1100 mV with real variation about 1000-1200 mV
- Attenuation levels 0, 2.5, 6, and 12 dB with approximate ratios
- Oneshot versus continuous driver modes
- Quiz answers on attenuation and Vref variation
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc/adc_oneshot.html
Supports
- Oneshot conversion workflow and channel configuration
- Raw-to-voltage formula Vout = Dout * Vmax / Dmax
- Shared-ADC hardware limitation notes relevant to mux settling discussion
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc/adc_calibration.html
Supports
- Line-fitting and curve-fitting calibration to millivolts
- Noise minimization via bypass capacitor and multisampling
- Field note and quiz answers on noise-dominated readings
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc/adc_continuous.html
Supports
- DMA continuous sampling and conversion frames
- Optional IIR filter support in continuous mode
- https://docs.zephyrproject.org/latest/hardware/peripherals/sensor/index.html
Supports
- Sensor channels as meaningful-unit quantities
- Attributes for scale and sampling rate
- Fetch/get and read/decode usage models
- https://github.com/analogdevicesinc/libiio
Supports
- Userspace access to Linux IIO devices locally or remotely
- Scope covering ADCs, sensors, and related converters
- https://github.com/adafruit/Adafruit_ADS1X15
Supports
- ADS1015/ADS1115 single-ended or differential channels
- Programmable gains from 2/3x to 16x and gain-versus-range trade
- Field note and quiz answers on PGA full-scale shrinkage
- https://github.com/kitspace/awesome-electronics
Supports
- Discovery of LTspice, KiCad, SparkFun, Adafruit, and learning resources
- Awesome Links curation basis for ecosystem tooling
