MQ Sensors Series Burn-In with Arduino R4 Wi-Fi

AndroidCrypto
3 min readAug 2, 2024

--

I bought a lot of sensors, and it is very existing to use them for the first time. Nearly all sensors can be used “out of the box”, meaning: get them, connect them to the microcontroller, install the sensor specific library, run an example sketch and display the measured values on the Serial Monitor (e.g. using a DHT11 temperature and humidity sensor). This will work for most sensors, but not for sensors within the MQ-Series.

MQ-3 Sensor

Important Burn-In Period of new MQ-x Sensors

You may think that it is not important to run a “Burn-In-Period”, but this is essential to get good results. An MQ-x Sensor is a sensor containing a heater element with a resistor that resistance depends on the gas concentration in the air. When these sensors are “off” electricity for some days or months (e.g. produced in China, stored for some months, send by ship to Europe) the surface of the resistor isn’t calibrated anymore. You need to run the sensor for about 48 hours (2 days !) with 5 Volt to “burn-in” the resistor (again). Don’t trust the measures of the sensor without the burn-in period.

Setup of the Burn-In Usage

The manufacturers of these sensors are recommending to connect the heater with 5 V and actively use the sensor resistor, meaning making measurements. For that reason, I’m using a sketch that just reads the input voltage on the A0 pin of the Arduino Uno without using a sensor specific library. The Arduino has a default resolution of 10 bits on the Analog Input Pins (0...1023), but I’m using the 14 bits resolution, giving values in the range 0…15383. The sketch is calculating a voltage value in the range of 0…5 volts. The data is displayed in an interval of 3 seconds on the OLED display. Additionally, the data is sent to a ThingSpeak.com channel providing a timeline of the data.

Sample Timeline of the first 15 minutes of a brand-new MQ-2 sensor

This is the result of the burn-in period of a brand-new MQ-2 sensor (left side: the Analog Input Pin reading, right side: calculated voltage):

The very first value measured is: 11209 (maximum would be 16383),

after 15 minutes, the value decreases to 4732 and it is still decreasing.

This is due to the fact that the surface of the sensor is contaminated — those elements need to get “burned away” by the heater. You can clearly see how important it is to get sensor readings that are valuable.

After 5 hours and 30 minutes, the readings seem to become stable, the latest value was 4688:

For this specific sensor, I stopped the burn-in phase as the readings are very stable. As the sensor was placed in my office room, the values are changing due to my presence:

Get the complete source code of this tutorial

The code is available in my GitHub repository https://github.com/AndroidCrypto/Arduino_Uno_R4_WiFi_MQ_Sensors_Series/tree/main/ArdUno4_MQ_Sensors_BurnIn_Oled_ThingSpeak

This tutorial is part of a series of articles; an overview about all articles is available using this link.

--

--