Build a DIY Air Quality Sensor With ENS160 & ESP32-C3 Super Mini
by aggourodolmas in Circuits > Microcontrollers
3 Views, 0 Favorites, 0 Comments
Build a DIY Air Quality Sensor With ENS160 & ESP32-C3 Super Mini

Why Build an Air Quality Sensor?
As a parent, ensuring a healthy environment for my baby is a top priority. Indoor air quality (IAQ) can significantly impact health, especially for infants who are more sensitive to pollutants like volatile organic compounds (VOCs), carbon dioxide (CO₂), and particulate matter. Commercial air quality monitors can be expensive, so I decided to build my own using affordable yet reliable components.
Requirements of this project are a working Home Assistant intance and a temperature/ humidity sensor that publishes records to Home Assistant, ideally in the same room where the air quality sensor is going to be placed.
This DIY air quality sensor monitors:
- Total VOCs (TVOC) – Harmful gases emitted from cleaning products, paints, and furniture.
- eCO₂ (equivalent CO₂) – Indicates ventilation quality.
- Air Quality Index (AQI) – A simplified metric for overall air health.
Since the ENS160 sensor doesn’t measure temperature and humidity—critical factors for comfort—I integrated external sensor data from Home Assistant to enhance accuracy.
Supplies


Hardware Overview
ENS160 Sensor
ENS160 Digital Metal Oxide Multi-Gas Sensors are based on metal oxide (MOX) technology with four MOX sensor elements, and each sensor element has independent hotplate control to detect a wide range of gases. The ENS160 series features TrueVOC™ air quality detection and supports intelligent algorithms, which calculate CO2 equivalents, TVOC, and air quality indices (AQIs). Those sensors are ideal for home appliances, IoT devices, building automation, and HVAC applications.
ESP32-C3 Super Mini
The ESP32-C3 SuperMini is a tiny yet powerful development board built around the Espressif ESP32-C3 chip. With WiFi 802.11b/g/n and Bluetooth 5 (LE), it’s perfect for IoT projects that need reliable wireless connectivity. Designed with a compact form factor, this board is easy to integrate into space-constrained projects. With its versatile interfaces (UART, I2C, SPI) and plenty of GPIOs, the ESP32-C3 SuperMini is a great choice for this project!
Wiring the Components


The ENS160 communicates via I²C. Here’s how to connect it to the ESP32-C3 Super Mini:
ENS160 Pin | ESP32-C3 Pin |
---|---|
VCC | 3.3V |
GND | GND |
SDA | GPIO8 |
SCL | GPIO9 |
Software Setup
Although there are reliable micropython libraries for this type of sensor I prefered the espHome framework solution. Main reasons for this approach were the need to connect the sensor to my Home Asssistant instance without much of a hassle and the ability to obtain temperature and humidity values -critical factors for reliable outputs- from another sensor connected to Home Assistant in the same room.
In the following yaml file replace sensor.your-room-sensor-temperature and sensor.your-room-sensor-humidity with those that match your set up in Home Assistant.
ens160.yaml file
Enclosure & Final Assembly






To keep the project neat and safe, I designed a 3D-printed case to house the ESP32-C3 and ENS160 sensor.
You can find those files in the following link. Be sure to read print instructions for further details.