MiCS-4514 Dual Gas Sensor
The MiCS-4514 is a dual gas sensor capable of detecting oxidizing gases (e.g., NO₂) and reducing gases (e.g., CO, NH₃). It provides analog outputs for gas concentration, making it ideal for air quality monitoring, HVAC systems, and industrial safety applications.

On this page
MiCS-4514 pinout
The MiCS-4514 features 6 pins for power, dual analog outputs (reducing/oxidizing gases), and heater control.
| Pin | Type | Description | Notes |
|---|---|---|---|
| Pin 1 (Vcc) | Power | Power supply input (5V). Powers the sensor circuitry. | Requires stable 5V supply. |
| Pin 2 (GND) | Power | Ground connection. Connect to system ground. | |
| Pin 3 (Reducing Gas Output) | Analog | Analog voltage output for reducing gases (CO, NH₃, CH₄, ethanol, H₂). | Read via ADC - voltage proportional to gas concentration. |
| Pin 4 (Oxidizing Gas Output) | Analog | Analog voltage output for oxidizing gases (NO₂). | Read via ADC - voltage proportional to gas concentration. |
| Pin 5 (Heater Control) | PWM | Heater control input (PWM). Controls heating element temperature. | Proper heating essential for accurate readings. |
| Pin 6 (Heater Ground) | Power | Heater ground connection. Separate from signal ground. | Use current-limiting resistor if needed. |
Dual-sensor design: oxidizing (NO₂) and reducing (CO, NH₃, etc.) gases
Independent sensing elements with separate heaters
Requires warm-up time: 24-48 hours for optimal accuracy
Analog outputs require ADC for reading
Heater power: typically 80mW per element
Wiring the MiCS-4514 to ESP32
To interface the MiCS-4514 with an ESP32, connect Vcc to 5V, GND to ground, both gas outputs to ADC pins, and heater control to a PWM GPIO pin.
| MiCS-4514 pin | ESP32 pin | Purpose |
|---|---|---|
| Pin 1 (Vcc) | 5V | Power supply (5V). Ensure supply can provide sufficient current. |
| Pin 2 (GND) | GND | Signal ground connection. |
| Pin 3 (Reducing Gas) | GPIO 34 (ADC1_CH6) | Analog output for CO, NH₃, CH₄, ethanol, H₂. Read via ADC. |
| Pin 4 (Oxidizing Gas) | GPIO 35 (ADC1_CH7) | Analog output for NO₂. Read via ADC. |
| Pin 5 (Heater Control) | GPIO 25 | PWM signal to control heater temperature. |
| Pin 6 (Heater GND) | GND | Heater ground connection. |
IMPORTANT: Allow 24-48 hours warm-up time for accurate readings
Use ESP32 ADC1 pins (GPIO 32-39) - avoid ADC2 if using WiFi
ADC resolution: 12-bit (0-4095) representing 0-3.3V
Heater requires proper current limiting - check datasheet
Calibration required for absolute gas concentration values
Sensor readings are relative - use for gas presence detection
Place sensor in well-ventilated area during warm-up
MiCS-4514 code examples
MiCS-4514 Arduino example
Copyconst int reducingGasPin = 34; // Reducing gas output (GPIO34 / ADC1_CH6, matches the wiring above)
const int oxidizingGasPin = 35; // Oxidizing gas output (GPIO35 / ADC1_CH7)
const int heaterPin = 25; // Heater control (GPIO25)
void setup() {
Serial.begin(115200);
// Configure heater pin
pinMode(heaterPin, OUTPUT);
digitalWrite(heaterPin, HIGH); // Turn on the heater
}
void loop() {
int reducingGasValue = analogRead(reducingGasPin);
int oxidizingGasValue = analogRead(oxidizingGasPin);
// Convert analog values to voltage (ESP32: 12-bit ADC, 3.3V)
float reducingGasVoltage = reducingGasValue * (3.3 / 4095.0);
float oxidizingGasVoltage = oxidizingGasValue * (3.3 / 4095.0);
Serial.print("Reducing Gas Voltage: ");
Serial.print(reducingGasVoltage);
Serial.println(" V");
Serial.print("Oxidizing Gas Voltage: ");
Serial.print(oxidizingGasVoltage);
Serial.println(" V");
delay(1000);
}The two analog outputs are read on GPIO34 and GPIO35 (ADC1 channels, matching the wiring above) and converted with the ESP32's 12-bit, 3.3V scale. GPIO25 drives the heater control - the MICS-4514's readings are only meaningful after the heater has run for its warm-up period (about 3 minutes for the oxidizing side, longer for full stabilisation). Converting voltages to actual gas concentrations requires the calibration curves from the datasheet.
MiCS-4514 ESP-IDF example
Copy#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/adc.h"
#include "esp_adc_cal.h"
#include "driver/gpio.h"
#define REDUCING_GAS_CHANNEL ADC1_CHANNEL_7 // GPIO19
#define OXIDIZING_GAS_CHANNEL ADC1_CHANNEL_6 // GPIO18
#define HEATER_PIN GPIO_NUM_25 // matches the wiring above
#define DEFAULT_VREF 1100
void app_main(void) {
// Configure heater pin
gpio_reset_pin(HEATER_PIN);
gpio_set_direction(HEATER_PIN, GPIO_MODE_OUTPUT);
gpio_set_level(HEATER_PIN, 1); // Turn on the heater
// Configure ADC
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(REDUCING_GAS_CHANNEL, ADC_ATTEN_DB_11);
adc1_config_channel_atten(OXIDIZING_GAS_CHANNEL, ADC_ATTEN_DB_11);
esp_adc_cal_characteristics_t *adc_chars = calloc(1, sizeof(esp_adc_cal_characteristics_t));
esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, DEFAULT_VREF, adc_chars);
while (1) {
uint32_t reducing_raw = adc1_get_raw(REDUCING_GAS_CHANNEL);
uint32_t oxidizing_raw = adc1_get_raw(OXIDIZING_GAS_CHANNEL);
uint32_t reducing_voltage = esp_adc_cal_raw_to_voltage(reducing_raw, adc_chars);
uint32_t oxidizing_voltage = esp_adc_cal_raw_to_voltage(oxidizing_raw, adc_chars);
printf("Reducing Gas Voltage: %lu mV\n", (unsigned long)reducing_voltage);
printf("Oxidizing Gas Voltage: %lu mV\n", (unsigned long)oxidizing_voltage);
vTaskDelay(pdMS_TO_TICKS(1000));
}
}This ESP-IDF example reads analog voltages from the MiCS-4514 sensor using GPIO19 and GPIO18 for reducing and oxidizing gases. GPIO5 is used to control the heater. The ADC values are converted to millivolts and printed to the console every second.
MiCS-4514 ESPHome example
Copysensor:
- platform: adc
pin: GPIO34 # reducing gas output (ADC1), matches the wiring above
name: "Reducing Gas Voltage"
attenuation: 12db
update_interval: 1s
- platform: adc
pin: GPIO35 # oxidizing gas output (ADC1)
name: "Oxidizing Gas Voltage"
attenuation: 12db
update_interval: 1s
output:
- platform: gpio
pin: GPIO25 # heater control, matches the wiring above
id: heater_control
esphome:
on_boot:
- output.turn_on: heater_controlThe two analog outputs are read with adc sensors on GPIO34/GPIO35 (ADC1 pins, per the wiring above) with 12 dB attenuation for the full 3.3V range, and the heater on GPIO25 is switched on at boot via on_boot. Raw voltages still need the datasheet's calibration curves to become gas concentrations - and give the heater its warm-up time before trusting readings.
MiCS-4514 PlatformIO example
Copy[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200#include <Arduino.h>
const int reducingGasPin = 34; // Reducing gas output (GPIO34 / ADC1_CH6, matches the wiring above)
const int oxidizingGasPin = 35; // Oxidizing gas output (GPIO35 / ADC1_CH7)
const int heaterPin = 25; // Heater control (GPIO25)
void setup() {
Serial.begin(115200);
// Configure heater pin
pinMode(heaterPin, OUTPUT);
digitalWrite(heaterPin, HIGH); // Turn on the heater
}
void loop() {
int reducingGasValue = analogRead(reducingGasPin);
int oxidizingGasValue = analogRead(oxidizingGasPin);
// Convert analog values to voltage (ESP32: 12-bit ADC, 3.3V)
float reducingGasVoltage = reducingGasValue * (3.3 / 4095.0);
float oxidizingGasVoltage = oxidizingGasValue * (3.3 / 4095.0);
Serial.print("Reducing Gas Voltage: ");
Serial.print(reducingGasVoltage);
Serial.println(" V");
Serial.print("Oxidizing Gas Voltage: ");
Serial.print(oxidizingGasVoltage);
Serial.println(" V");
delay(1000);
}This PlatformIO example reads analog voltages from GPIO19 and GPIO18 for the reducing and oxidizing gas outputs of the MiCS-4514 sensor. GPIO5 is used to control the heater. The values are converted to voltage and printed to the Serial Monitor every second.
MiCS-4514 MicroPython example
Copyfrom machine import ADC, Pin
import time
# Pin definitions
reducing_adc = ADC(Pin(34)) # ADC1, matches the wiring above # Analog input for reducing gas
oxidizing_adc = ADC(Pin(35)) # ADC1 # Analog input for oxidizing gas
heater_pin = Pin(25, Pin.OUT) # Digital output for heater control
# Configure ADC
reducing_adc.atten(ADC.ATTN_11DB)
oxidizing_adc.atten(ADC.ATTN_11DB)
# Turn on the heater
heater_pin.on()
while True:
reducing_voltage = reducing_adc.read() * (3.3 / 4095)
oxidizing_voltage = oxidizing_adc.read() * (3.3 / 4095)
print(f"Reducing Gas Voltage: {reducing_voltage:.2f} V")
print(f"Oxidizing Gas Voltage: {oxidizing_voltage:.2f} V")
time.sleep(1)This MicroPython script uses GPIO19 and GPIO18 for reading reducing and oxidizing gas voltages from the MiCS-4514 sensor. GPIO5 controls the heater. The ADC values are scaled to voltage and printed every second.
MiCS-4514 specifications
About the MiCS-4514
The MiCS-4514 packs two independent metal-oxide sensing elements into one package, each with its own heater: a RED element that responds to reducing gases like CO, hydrogen, ammonia, ethanol and methane, and an OX element that responds to the oxidizing gas NO2. SGX Sensortech’s datasheet runs both heaters continuously rather than pulsed, with the RED heater biased around 2.4 V and 32 mA (about 76 mW, near 340 degC) and the OX heater around 1.7 V and 26 mA (about 43 mW, near 220 degC) - close to 120 mW combined, enough to matter on a battery-powered design.
Both outputs are relative resistance-ratio signals, not calibrated ppm values out of the box. SGX’s own application notes recommend multi-point calibration across temperature, humidity and gas concentration for anything that needs an absolute reading, while noting that some applications, automotive air-quality sensing among them, get by on the raw relative signal alone. The detection ranges quoted for this sensor - CO from 1 to 1000 ppm, NO2 from 0.05 to 10 ppm, ammonia from 1 to 500 ppm, and so on - describe the sensing elements’ response window, not out-of-the-box accuracy without that calibration step.
One wiring detail matters more than it looks: the heaters must be driven with a steady DC voltage, never PWM. SGX’s documentation is explicit that PWM heating, even at frequencies up to 100 kHz, destroys the sensor, so a plain digital HIGH is the correct way to switch the heater on, not a PWM-based power-saving scheme. For air-quality output already computed on-chip instead of a pair of raw voltages to interpret, ENS160 or CCS811 trade CO/NO2 specificity for a ready-made eCO2/TVOC number, and MH-Z19 is the better choice if what is actually needed is CO2 rather than CO.
MiCS-4514 troubleshooting
Sensor Not Detected on I2C Bus
›
Issue: The MiCS-4514 sensor is not recognized on the I2C bus, leading to initialization failures.
Possible causes include incorrect I2C address configuration, improper wiring connections, or faulty sensor hardware.
Solution: Verify the sensor's I2C address using an I2C scanner and ensure it matches the address defined in your code. The default I2C address is 0x75. Check all wiring connections to ensure they are secure and correctly aligned with the microcontroller's I2C pins. If the sensor is still not detected, consider testing with a different sensor to rule out hardware defects.
Zero PPM Readings for All Gases
›
Issue: The sensor outputs 0.00 ppm for all gas parameters (e.g., CO, NO2, NH3, C2H5OH) despite proper connections.
Possible causes include insufficient warm-up time, incorrect sensor initialization, or faulty sensor hardware.
Solution: Allow the sensor to warm up for at least 3 minutes after powering on, as it requires this time to stabilize. Ensure that the sensor is properly initialized in your code and that the correct I2C address is specified. If the issue persists, the sensor may be defective and require replacement.
Inaccurate Gas Concentration Readings
›
Issue: The sensor provides gas concentration readings that are significantly off from expected values.
Possible causes include improper calibration, environmental factors affecting sensor performance, or incorrect data interpretation in the code.
Solution: Calibrate the sensor in a controlled environment to establish accurate baseline readings. Ensure the sensor is placed in an environment free from contaminants that could affect its performance. Review your code to confirm that the data from the sensor is being interpreted correctly, considering any necessary conversion factors.
Sensor Readings Fluctuate Significantly
›
Issue: The sensor outputs gas concentration readings that fluctuate wildly, making it difficult to obtain stable measurements.
Possible causes include an unstable power supply, external electromagnetic interference, or faulty sensor hardware.
Solution: Use a stable and regulated power supply to power the sensor. Ensure that the sensor and its connections are shielded from sources of electromagnetic interference. If the problem persists, consider replacing the sensor, as it may be defective.
Where to buy the MiCS-4514

Resources
Similar sensors





