NO2 sensor MiCS 2710
Today I connected the NO2 sensor MiCS 2710 to the MSP430 Launchpad.
This sensor features low heather current (26 mA), fast response, miniature dimensions and high resistance to shocks and vibrations
Hardware considerations
MiCS 2710 has four connections:
A heather power of 43 mW is applied between pins 3 and 1. This the temperature of the sensing resistor to reach up to 220 °C. Detection of pollution gases is achieved by measuring the voltage drop on the sensing resistor Rs.
The wiring diagram is shown below
The sensor is powered with 5 V.
Datasheet states that the maximum power the sensor can dissipate is 1 mW.
Because in the worst case Rs is 0.8 kΩ, the maximum allowed current is
To limit the current that goes through Rs, another resistor is required. The value of this resistor can be determined by imposing
Let's take some safety margin and let's use a 4.7 kΩ resistor.
To determine the resistor to connect to the heather terminal, we have to impose that the current through the heather is 26 mA. So
With a 100 Ω resistor and a 33 Ω resistor in series, we also meet the maximum power dissipation requirement, because
I have now to limit the maximum voltage not to exceed to analog Vref (2.0 V). The voltage limits are
The Vmax exceeds the ADC limit, so a voltage divider is required. The ratio of the voltage divider is
I can choose R1 = 10 kΩ and R2 = 0,73 R1 = 7,3 kΩ. The voltage divider are going to be connected in parallel with the Rs, so it would affect the Equivalent Resistance. An operation amplifier in buffer configuration is required.
Software implementation
Using the same functions I already talked about in my previous post, I can write a the function to read out the output value provided by the MiCS 2710 sensor
float val = SENSORS_AnalogRead(ADC12_B_MEMORY_2);
According to calculation, the minimum ADC value corresponds to the maximum N02 concentration. I have taken a general approach and I created a function that linearly maps a given range of input values to a given range of output values
float SENSORS_Map(float x,
float in_min, float in_max,
float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
The input and output ranges for the MiCS 2710 are as follow
ADC Value | NO2 ppm |
0 | 5 |
1023 | 0.01 |
Now I'm ready to write the final function to read N02 concentration
void SENSORS_ReadNO2()
{
float val = SENSORS_AnalogRead(ADC12_B_MEMORY_2);
SENSORS_Data.NO2 = SENSORS_Map(val, 1023, 0, 0.01, 5);
}