Component guide · Intermediate · 3 min read
ENS160 Air Quality Sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The ENS160 from ScioSense is a multi-gas metal-oxide sensor that outputs an air quality index (AQI 1 to 5), TVOC in ppb and eCO2 in ppm over I2C (address 0x53 or 0x52) or SPI. It does the processing on the chip, needs only a few minutes to start up, and pairs with an AHT21 humidity sensor on combo boards for compensation.
Key specs at a glance
- Outputs
- AQI-UBA 1 to 5, TVOC 0 to 65,000 ppb, eCO2 400 to 65,000 ppm
- Method
- 4 heated MOX elements with on-chip algorithms
- Interface
- I2C (0x53 default, 0x52) or SPI
- Supply
- Chip 1.8 V core with 3.3 V I/O; modules accept 3.3 or 5 V
- Start-up
- About 3 minutes warm-up; 24 hours for best accuracy when new
- Compensation
- Accepts temperature and humidity from another sensor
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1ENS160 Air Quality Sensor Module – I2C & SPI Interface₹789
Option 2DFRobot ENS160 Indoor Air Quality Sensor Module – I2C Interface₹2,459
Option 3DFRobot Fermion ENS160 Air Quality Sensor Breakout – I2C/SPI Interface₹1,589
Option 4DFRobot Gravity ENS160 Air Quality Sensor – I2C Interface₹2,069
Option 5ENS160+AHT21 Air Quality, Temperature & Humidity Sensor Module – I2C Interface₹779
What the ENS160 is
The ENS160 heats four sensing elements to different temperatures and combines their signals to estimate overall air quality. Its AQI follows the German UBA scale: 1 excellent, 2 good, 3 moderate, 4 poor, 5 unhealthy.
Like all VOC sensors, its eCO2 is an estimate. The ENS160+AHT21 combo board adds a humidity and temperature sensor so you can feed compensation values without a second module.
ENS160 pinout
The pins on the ENS160 and what each one does.
| Pin | Function |
|---|---|
| VIN / VCC | Supply, 3.3 or 5 V on modules |
| GND | Ground |
| SDA | I2C data (SPI MOSI) |
| SCL | I2C clock (SPI clock) |
| ADD / SDO | Address select: high 0x53, low 0x52 |
| CS | SPI chip select; high for I2C |
| INT | Interrupt output |
- VIN / VCC
- Supply, 3.3 or 5 V on modules
- GND
- Ground
- SDA
- I2C data (SPI MOSI)
- SCL
- I2C clock (SPI clock)
- ADD / SDO
- Address select: high 0x53, low 0x52
- CS
- SPI chip select; high for I2C
- INT
- Interrupt output
Wiring the ENS160
On the ENS160+AHT21 combo board the AHT21 answers at 0x38 on the same bus.
| ENS160 pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V (or 3.3V) | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
| ADD | Leave as set (0x53) | Leave as set (0x53) |
- VCC
- Arduino Uno:
- 5V (or 3.3V)
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
- ADD
- Arduino Uno:
- Leave as set (0x53)
- ESP32:
- Leave as set (0x53)
Example code
Install "SparkFun Indoor Air Quality Sensor - ENS160" from the Library Manager. Use begin(0x52) if your board's address pin is low.
#include <Wire.h>
#include "SparkFun_ENS160.h"
SparkFun_ENS160 ens;
void setup() {
Serial.begin(115200);
Wire.begin();
if (!ens.begin(0x53)) { Serial.println("No ENS160 at 0x53"); while (1); }
ens.setOperatingMode(SFE_ENS160_STANDARD);
}
void loop() {
if (ens.checkDataStatus()) {
Serial.print("AQI "); Serial.print(ens.getAQI());
Serial.print(" TVOC "); Serial.print(ens.getTVOC());
Serial.print(" ppb eCO2 "); Serial.print(ens.getECO2()); Serial.println(" ppm");
}
delay(1000);
}Setup and tuning
about 3 minutes after power-up; a new sensor improves over its first 24 hours.
read temperature and humidity (for example from the AHT21 on combo boards) and pass them with setTempCompensationCelsius() and setRHCompensationFloat().
getFlags() shows whether it is warming up, in initial start-up or running normally.
What you need
Shop this list8 of 9 found in our store · ₹8,262
ENS160 Air Quality Sensor Module – I2C & SPI Interface: the part this guide coversENS160 Air Quality Sensor Module – I2C & SPI Interface₹789
DFRobot ENS160 Indoor Air Quality Sensor Module – I2C Interface: another version this guide coversDFRobot ENS160 Indoor Air Quality Sensor Module – I2C Interface₹2,459
DFRobot Fermion ENS160 Air Quality Sensor Breakout – I2C/SPI Interface: another version this guide coversDFRobot Fermion ENS160 Air Quality Sensor Breakout – I2C/SPI Interface₹1,589
DFRobot Gravity ENS160 Air Quality Sensor – I2C Interface: another version this guide coversDFRobot Gravity ENS160 Air Quality Sensor – I2C Interface₹2,069
ENS160+AHT21 air quality, temperature and humidity module: a combo board with compensation built inENS160+AHT21 Air Quality, Temperature & Humidity Sensor Module – I2C Interface₹779Closest match, check the specs
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- SGP30: Sensirion VOC sensor, needs a 1 s loop.
- BME688: VOC plus pressure, with AI gas scanning.
- SCD40 and SCD41: real CO2 when you need it.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Using the wrong I2C address for the board's ADD setting.
- Reading values during the warm-up phase.
- Treating eCO2 as a real CO2 measurement.
- Skipping temperature and humidity compensation.
Frequently asked questions
What is the ENS160's I2C address?
0x53 by default on most modules, 0x52 with the address pin low.
What does AQI 1 to 5 mean?
1 excellent, 2 good, 3 moderate, 4 poor, 5 unhealthy (UBA scale).
Does it measure CO2?
It estimates eCO2 from VOCs; it is not an NDIR sensor.
What is the AHT21 on combo boards?
A temperature and humidity sensor for compensation, at address 0x38.
Does it work at 5 V?
Modules with a regulator do; the chip core is 1.8 V.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 1 step-by-step build in our project library uses parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

