The Fermion VOC analogue gas sensor by DFRobot is a compact volatile organic compound (VOC) detection module designed for integration with microcontroller platforms like Arduino and ESP32.
It employs microelectromechanical systems (MEMS) technology to provide high sensitivity to a range of VOCs, including ethanol, formaldehyde, and toluene in the approximate 1 – 500 ppm range.
In this tutorial you will learn how to measure VOC concentrations and to sound an alarm or flash an LED if the VOC concentration gets too high.
Required Parts
You will need a Fermion VOC gas sensor by DFRobot. As for the microcontroller, I used an Arduino Uno for this project, but any other Arduino or ESP32 will work as well.
For our gas alarm system we will need an LED or a buzzer, which you can get at Amazon. We also will use an OLED to show the measured VOC values on a display. I listed the small 128×64 SSD1306 OLED I used below.

Fermion MEMS VOC Gas Sensor

Passive Buzzer

Resistor & LED kit

OLED Display

Arduino Uno

USB Cable for Arduino UNO

Dupont Wire Set

Breadboard
Makerguides is a participant in affiliate advertising programs designed to provide a means for sites to earn advertising fees by linking to Amazon, AliExpress, Elecrow, and other sites. As an Affiliate we may earn from qualifying purchases.
Hardware of Fermion VOC Gas Sensor
The Fermion VOC Analog Gas Sensor by DFRobot is a compact gas sensing board designed to detect volatile organic compounds (VOCs), such as Ethanol, formaldehyde, toluene and others.
It is based on the GM-502B chip, which uses microelectromechanical systems (MEMS) technology to achieve a small form factor with low power consumption and rapid response characteristics.
The breakout measures approximately 13 mm by 13 mm with a thickness of about 2.5 mm. The picture below shows the breakout board with the GM-502B sensor at the top and a voltage regulator underneath:

The module is intended for qualitative detection of VOC concentrations rather than precise quantitative analysis. Note that DFRobot also offers calibrated sensors but they are larger and more expensive (link).
Electrical Characteristics and Output
The sensor operates over a supply voltage range from 3.3 V to 5 V, which matches the logic levels of most Arduino and ESP32 development boards. When powered, the device draws less than 20 mA of operating current, and it generates very little self-heating due to its MEMS design.
The gas concentration is represented by an analog voltage output that varies in proportion to the amount of VOC detected in the surrounding air. The output voltage is in the range 0…VCC.
Detection Range and Sensitivity
The sensor can detect common VOCs such as ethanol, formaldehyde, and toluene over a range of 1 ppm to 500 ppm. Sensitivity is quantified by the ratio of resistance in clean air (R0) to resistance in a known VOC concentration (Rs), with a typical specification of R0/Rs ≥ 3 at an ethanol concentration of 50 ppm. As mentioned before the sensors output is not a calibrated concentration value, however.
Environmental and Lifespan Specifications
The sensing element is designed to operate within an ambient temperature range of approximately -10 °C to +50 °C and relative humidity from 15 % to 90 % (non-condensing). The manufacturer specifies a lifespan of at least five years when the sensor is used in normal atmospheric conditions without excessive contamination.
Because VOC sensors respond to a broad class of organic gases, environmental factors such as humidity, temperature, and the presence of other gases can affect the output as well.
Pinout
Physically, the breakout exposes three pins for connection: analog output (A), supply voltage (VCC), and ground (GND). The picture below shows the pinout of the board:

Schematics
The following image shows the schematics of the Fermion VOC Gas Sensor board:

You can see the voltage regulator, and the GM-502B sensor chip with the load resistor of 20K at the output VOUT.
Preparation
The Gas Sensor comes with a protective film you need to remove. If you look at the top of sensor, you will see a yellow foil covering the air inlet holes. Use a pair of tweezers to peel the film of. The photos below show the sensor with the complete protective film, half-way removed and completely removed:

Note that the sensor requires a warm-up period to reach operational stability. This may take several minutes on first use until the readings are stable. If you haven’t use the sensor for a long time it is recommended to let it run for 24 up to 72 hours:

Technical Specification
The following table summarizes the technical specification of the Fermion VOC Gas Sensor:
| Parameter | Specification |
|---|---|
| Sensor Type | MEMS-based VOC gas sensor |
| Target Gases | Volatile organic compounds (e.g., ethanol, formaldehyde, toluene) |
| Detection Range | Approximately 1 ppm to 500 ppm |
| Output Type | Analog voltage output |
| Operating Voltage | 3.3 V to 5 V DC |
| Operating Current | < 20 mA |
| Load Resistance (RL) | 20 kΩ (onboard) |
| Operating Temperature | -10 °C to +50 °C |
| Operating Humidity | 15 % to 90 % RH (non-condensing) |
| Response Characteristic | Output voltage increases with increasing VOC concentration |
| Warm-Up Time | Several minutes (initial stabilization required) |
| Expected Lifespan | ≥ 5 years (under normal conditions) |
| Dimensions | Approx. 13 mm × 13 mm × 2.5 mm (sensor element) |
| Interface Pins | VCC, GND, Analog Output |
And here is a link to the Datasheet for the GM-502B with more technical data:
Fermion VOC Gas Sensor versus MQ-135 Gas Sensor
A common alternative to the Fermion VOC Gas Sensor is the older MQ-135 Gas Sensor. In the following a short comparison of the two sensors.
Sensing Technology and Principle
The Fermion VOC sensor uses MEMS (microelectromechanical systems) technology that responds to volatile organic compounds by changing internal resistance and producing a proportional analog voltage. Its design is optimized for low power, compact size, and qualitative VOC detection in the 1–500 ppm range, with minimal self-heating and fast recovery characteristics.
In contrast, the MQ-135 is a metal oxide semiconductor (MOS) sensor that incorporates a heated tin dioxide (SnO₂) sensing layer. The sensor exhibits broad cross-sensitivity to gases like ammonia, benzene, CO₂-related compounds, and smoke. MOS sensors like the MQ-135 have a much higher power draw and require a longer warm-up period before readings stabilize.
Operating Conditions and Power
The Fermion VOC sensor operates from 3.3 V to 5 V with very low current (< 20 mA), making it suitable for low-power embedded systems and continuous monitoring without a separate heater.
The MQ-135, however, normally runs at around 5 V and uses a significant heater current (often ~100–200 mA or more), which increases overall consumption.
Target Gases and Sensitivity
Both sensors respond to VOCs, but the Fermion is specifically tuned to detect typical indoor VOCs such as ethanol, formaldehyde, and toluene, and it can provide a relatively consistent analog response within its specified range.
The MQ-135, by contrast, has broad sensitivity across many gases including ammonia, smoke, and various air pollutants; this can be an advantage for general air quality indication, but the lack of selectivity means distinguishing one gas from another or calibrating for precise concentrations is challenging.
Calibration and Stability
MEMS-based sensors like the Fermion tend to stabilise faster, with minimal “burn-in” time, and they are less affected by ambient temperature because they don’t rely on a heated chamber.
MQ-135 sensors usually require pre-burn-in (often 24–48 hours) and regular recalibration for stable results, and their readings are heavily influenced by temperature and humidity.
Connecting the VOC Gas Sensor to Arduino UNO
Connecting the sensor to an Arduino UNO is simple. Connect VCC to 5V (or 3.3V), GND to ground and A to the analog input A0 as shown below:

Code Examples
Reading Gas concentration
In this first example we simply read the values measured by the gas sensor and print them to the Serial Monitor:
void setup() {
Serial.begin(9600);
}
void loop() {
int val = analogRead(A0);
Serial.println(val);
delay(100);
}
You will see values between 0 and 1023, depending on the amount of VOC gases in the environment.
If the sensor has not completely warmed up, you will see a continuously decreasing sequence of values on the Serial Monitor:

After several minutes the measurements will stabilize. In my case at a value around 643:

If you then expose the sensor to perfume or another VOC gas, you will see a sudden increase in the measurement value:

Since the sensor is not calibrated, you cannot use it to measure actual ppm (parts-per-million) or mg/m3 concentrations of VOC gases. However, you can use it to build a gas alarm, which we will do in the next section.
Gas Alarm with LED
The following code implements a simple gas alarm. It switches an LED on if the measured VOC value exceeds a predefined threshold of 700:
byte sensorPin = A0;
byte ledPin = 13;
int threshold = 700;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
int val = analogRead(sensorPin);
digitalWrite(ledPin, val > threshold ? HIGH: LOW);
delay(100);
}
I connected the LED with a 220 Ohm resistor to GPIO 13 as an alarm LED as shown below:

Note that for a reliable alarm system you may want to add a temperature and a humidity sensor as well, since the readings of the gas sensor are affected by temperature and a humidity. The figure below shows the dependency of the sensor resistance, which is proportional to the voltage the Arduino reads and the relative humidity:

Gas Alarm with passive Buzzer
Instead of an LED you can also sound a buzzer as an alarm signal. In the following code a passive buzzer is activated if the measured VOC value exceeds the threshold:
byte sensorPin = A0;
byte buzzerPin = 11;
int threshold = 700;
void setup() {
pinMode(buzzerPin, OUTPUT);
}
void loop() {
int val = analogRead(sensorPin);
if (val > threshold) {
tone(buzzerPin, 500);
} else {
noTone(buzzerPin);
}
delay(100);
}
The following picture shows you how to add the buzzer to the circuit. Start by connecting the negative terminal of the buzzer with GND of the Arduino (black wire). Then connect the positive terminal via a 100Ω resistor to GPIO 11 (red wire):

Make sure that the polarity of the buzzer is correct and that it is a passive buzzer that is connected to a PWM-able GPIO port. For more information see the Active and Passive Piezo Buzzers with Arduino tutorial.
If you have an active buzzer, you must use the previous LED alarm code, since it will not properly work with the tone() command.
Display VOC Concentration on OLED
In this last example we display the measured VOC values on a small OLED. The code prints “VOC” and the value to the center of the display and updates the displayed value every 100ms:
#include "Adafruit_SSD1306.h" // Version 2.5.16
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void setup() {
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
oled.setTextColor(WHITE, BLACK);
oled.clearDisplay();
}
void loop() {
static char text[30];
int val = analogRead(A0);
oled.setTextSize(2);
oled.setCursor(45, 10);
oled.print("VOC");
sprintf(text, " %d ", val);
oled.setTextSize(2);
oled.setCursor(35, 40);
oled.print(text);
oled.display();
delay(100);
}
Note that you will have to install the Adafruit_SSD1306 library to control the OLED. You can install it via the Library Manager as usual:

Connecting the OLED to the Arduino is easy. Connect SDA and SCL of the OLED to the A4 and A5 pins of the Arduino. As for the power supply: since the OLED can run on 5V, we can share the power supply lines. Connect VCC to 5V and GND to GND. The picture below shows the complete wiring:

If you need help with the OLED, have a look at the Use SSD1306 I2C OLED Display With Arduino tutorial.
Conclusion
In this tutorial you learned how to use the Fermion VOC gas sensor with an Arduino UNO to measure volatile organic compound (VOC) gases. The sensor can be easily used with other microcontrollers such as an ESP32 as well.
MEMS gas sensors have the advantage of being small, consuming very little power (< 20mA), and having a short warm-up time. However, they are still affected by ambient temperature and humidity.
Furthermore, the Fermion VOC gas sensor used here is not calibrated and therefore cannot directly be used to measure actual VOC concentrations in ppm units, for instance. In theory, you could calibrate the sensor yourself but in practice this would be difficult. DFRobot also offers calibrated sensors but they are larger and more expensive (link).
Note that there is an entire series of different MEMS sensors available. For an overview see the Review of the DFRobot Fermion MEMS Gas Sensor Series article and for specifics our dedicated posts:
- Fermion MEMS Smoke Sensor GM-202B with Arduino
- Fermion MEMS Odor Sensor GM-512B with Arduino
- Fermion MEMS Carbon Monoxide CO Gas Sensor GM-702B with Arduino
- Fermion MEMS Multi-Gas Sensor MiCS-5524 with Arduino
If you have any questions feel free to leave them in the comment section.
Happy Tinkering 😉
Stefan is a professional software developer and researcher. He has worked in robotics, bioinformatics, image/audio processing and education at Siemens, IBM and Google. He specializes in AI and machine learning and has a keen interest in DIY projects involving Arduino and 3D printing.

