Easily Solve CO2 Sensor Linearization Problems Using Anti-Log Converters

Although most carbon dioxide sensors use infrared (IR) technology, electrochemical sensors are one of the competitors to be reckoned with due to their high sensitivity, wide measurement range, and low price. Typically, the electrochemical sensor is connected to the microcontroller through a buffer amplifier with very low bias current (<1pA). This requires a microcontroller to linearize the logarithmic response of the sensor. A good example of this solution is the SEN-000007 module from SandboxElectronics, which uses the MG-811 carbon dioxide sensor produced by Hanwei Electronics.The circuit and code are given in reference 1, but not

Although most carbon dioxide sensors use infrared (IR) technology, electrochemical sensors are one of the competitors to be reckoned with due to their high sensitivity, wide measurement range, and low price. Typically, the electrochemical sensor is connected to the microcontroller through a buffer amplifier with very low bias current (<1pA). This requires a microcontroller to linearize the logarithmic response of the sensor. A good example of this solution is the SEN-000007 module from SandboxElectronics, which uses the MG-811 carbon dioxide sensor produced by Hanwei Electronics. The circuit and code are given in Reference 1, but not specific.

This Design Idea presents a hardware-only solution to this linearization problem, which is simple in circuit, low in cost, and easy to adjust. The output signal can go directly to the Panel meter or microcontroller without complex data manipulation such as logarithmic or antilogarithmic calculations.

The MG-811 sensor can measure carbon dioxide concentrations in the range of 400 to 10,000 ppm (0.04% to 1%). Figure 1 shows the transfer function of the sensor. The data points in the figure are from the MG-811 data sheet, and the lines and equations are generated by Microsoft Excel’s curve fitting tool.

Easily Solve CO2 Sensor Linearization Problems Using Anti-Log Converters

Figure 1: The sensor has a logarithmic response and is biased at 265mV.

Figure 2 shows the designed circuit, which uses a quad op amp and a pair of matched transistors. IC2A and IC2B form a conditioning circuit that provides the sensor with high input resistance, removes the 265mV offset from the sensor response, and amplifies the resulting signal. The goal is to adjust the sensor response to the form VS = lnC (C is the carbon dioxide concentration), so that the anti-log converter (built from IC2C, IC2D and matched transistors, see Reference 2) can achieve the identity of elnC = C, given by This results in a linear relationship between VOUT and carbon dioxide concentration. The IC1 voltage reference is 2.5V, so the circuit can be used with other gas sensors that require a 5V supply instead of 6V, such as Figaro’s TGS4161. Note that the sensor draws a lot of current.

Easily Solve CO2 Sensor Linearization Problems Using Anti-Log Converters

Figure 2: Linearization is straightforward and straightforward with a quad op amp and a pair of matched transistors. R7 is a standard compensation resistor, as provided by PRC.

This circuit requires only a full-scale regulator (R11) to complete the calibration. is ±0.3% (see Figure 3), a good match for a 3.5-digit panel meter, and much better than expected for this sensor.

Easily Solve CO2 Sensor Linearization Problems Using Anti-Log Converters

Figure 3: Enough to support 3.5-bit panel table.

The Links:   6DI15S-050 G121S1-L02 LCD-PANEL