Analog Signal Conditioning: Circuit and Firmware Concerns
Embedded designers should pay attention to the following circuit and firmware concerns with regard to analog sensor signal conditioning.
Input Protection
Sensor inputs need to be protected against Electrostatic Discharge (ESD), overvoltage, and overcurrent events.
- Sensor Overview
- AN1785 ESD and EOS Causes, Differences, and Prevention
AN929 Temperature Measurement Circuits for Embedded Applications
This app note shows how to select a temperature sensor and conditioning circuit to maximize the measurement accuracy and simplify the interface to the microcontroller. Practical circuits and interface techniques will be provided for embedded applications with thermocouples, Resistive Temperature Detectors (RTDs), thermistors, and silicon Integrated Circuit (IC) temperature sensors. The attributes of each temperature sensor and the advantages of analog, frequency, ramp rate, duty cycle, serial, and logic output solutions will be discussed. An analog output thermocouple circuit will be compared with a frequency output RTD oscillator circuit, along with design examples using serial and analog output silicon IC sensors. In addition, a Programmable Gain Amplifier (PGA) circuit will be shown that can increase the effectiveness of the Analog-to-Digital Converter (ADC) bit resolution of a non-linear thermistor sensor.
Filtering
Analog filters are recommended to improve ADC performance. When properly designed, they help prevent interference from ADC aliasing and can reduce sample frequency requirements. In many cases, single-pole Resistor Capacitor (RC) passive filter is sufficient although active filters can be implemented for higher filtering performance.
Microchip FilterLab® is an innovative software tool that simplifies active filter design, which consists of resistors, capacitors, and op amps. It generates the frequency response and the circuit as well as the SPICE model of the designed filter. It is available at no cost at Microchip's FilterLab website.
Features
- Designs low-pass filters up to an eight order filter with Chebychev, Bessel, or Butterworth responses from frequencies of 0.1 Hz to 1 MHz.
- Designs band-pass and high-pass filters with Chebychev and Butterworth responses
- Low-pass filters use either the Sallen Key or Multiple Feedback topologies
- Band-pass filters use the Multiple Feedback topology
- High-pass filters use the Sallen Key topology
- Capacitor values can be manually selected
- Generates a SPICE model of the designed filter
- Design Wizards to simplify user inputs
- Design Filter Wizard
- Design Circuit Wizard
- Filter Selection Wizard
- Anti-aliasing Wizard
ADC Conversion
In most sensor conditioning circuits, the conditioned sensor outputs are converted to the digital format by an ADC. Most sensor outputs are ratiometric so that variations in the power supply are corrected by the ADC, e.g., Wheatstone bridge.
Results Correction
Sensor errors can be corrected by calibrating each system. The can be accomplished in hardware, e.g., digital potentiometer or firmware calibration in non-volatile memory.
Correction for other environmental parameters may be needed. For example, a capacitive humidity sensor may need correction for temperature. Non-linear sensors need additional corrections. Polynomials or other mathematical functions in the MCU can be used to produce the best estimate of the correction parameter. The Linear Interpolation Table in firmware can also be used to correct sensor error.
Piecewise Linear Interpolation on PIC12/14/16 Series Microcontrollers