Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit ENS161 MOX Gas Sensor: Examples, Pinouts, and Specs

Image of Adafruit ENS161 MOX Gas Sensor
Cirkit Designer LogoDesign with Adafruit ENS161 MOX Gas Sensor in Cirkit Designer

Introduction

The Adafruit ENS161 MOX Gas Sensor (Part ID: 6431) is a versatile gas sensor designed to detect a variety of gases, including volatile organic compounds (VOCs) and other air quality indicators. It utilizes a metal oxide (MOX) sensing element to measure gas concentrations and provides both analog and digital outputs for seamless integration into a wide range of applications.

This sensor is ideal for air quality monitoring, environmental sensing, and IoT projects. Its compact design and compatibility with microcontrollers like Arduino make it a popular choice for hobbyists and professionals alike.

Explore Projects Built with Adafruit ENS161 MOX Gas Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP8266 NodeMCU with MQ-4 Gas Sensor for Air Quality Monitoring
Image of Gas leakage detector: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
This circuit features an ESP8266 NodeMCU microcontroller connected to an MQ-4 gas sensor for detecting methane and natural gas in the air. The NodeMCU reads analog data from the MQ-4 sensor to monitor gas levels. Power is supplied to both the NodeMCU and the MQ-4 sensor through a 2.1mm Barrel Jack with Terminal Block, ensuring that both components share a common ground and power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
NodeMCU ESP8266-Based Smart Environmental Monitoring System with OLED Display
Image of Robotics: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
This circuit is a multi-sensor monitoring system using a NodeMCU ESP8266 microcontroller. It reads gas levels from an MQ-2 sensor, temperature from an MLX90614 sensor, and displays the data on an OLED screen. Additionally, it includes a DHT11 sensor for humidity and temperature, a MAX30102 sensor for heart rate and oxygen levels, and a SIM800L GSM module for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Uno R3 Based Gas Leak Detector with SMS Alert and Weight Monitoring
Image of LPG Project Circuit Diagram: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
This circuit is designed to monitor and alert for gas leaks while also tracking the weight of the gas supply. It uses an MQ6 gas sensor to detect gas presence, an HX711 load cell interface to measure weight, and an LCD display to provide visual feedback. The Arduino Uno R3 controls the system, activating a buzzer and LEDs for alerts, and interfaces with an Adafruit FONA 3G module to send SMS messages and make calls during a gas leak event.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Based Multi-Gas Detection System with ADS1115 ADC
Image of 4 Multi-sensor with 1 ADS - V3: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
This circuit is designed for gas detection and monitoring, utilizing an Arduino Mega 2560 microcontroller to interface with multiple MQ-series gas sensors (MQ-2, MQ-3, MQ-7, and MQ-135) through an Adafruit ADS1115 16-bit ADC over I2C. The ADC converts the analog signals from the gas sensors into digital values, which are then read by the Arduino and output to the serial monitor for analysis. The circuit is powered by a 5V supply, ensuring all components receive the necessary operating voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit ENS161 MOX Gas Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Gas leakage detector: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
ESP8266 NodeMCU with MQ-4 Gas Sensor for Air Quality Monitoring
This circuit features an ESP8266 NodeMCU microcontroller connected to an MQ-4 gas sensor for detecting methane and natural gas in the air. The NodeMCU reads analog data from the MQ-4 sensor to monitor gas levels. Power is supplied to both the NodeMCU and the MQ-4 sensor through a 2.1mm Barrel Jack with Terminal Block, ensuring that both components share a common ground and power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Robotics: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
NodeMCU ESP8266-Based Smart Environmental Monitoring System with OLED Display
This circuit is a multi-sensor monitoring system using a NodeMCU ESP8266 microcontroller. It reads gas levels from an MQ-2 sensor, temperature from an MLX90614 sensor, and displays the data on an OLED screen. Additionally, it includes a DHT11 sensor for humidity and temperature, a MAX30102 sensor for heart rate and oxygen levels, and a SIM800L GSM module for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LPG Project Circuit Diagram: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
Arduino Uno R3 Based Gas Leak Detector with SMS Alert and Weight Monitoring
This circuit is designed to monitor and alert for gas leaks while also tracking the weight of the gas supply. It uses an MQ6 gas sensor to detect gas presence, an HX711 load cell interface to measure weight, and an LCD display to provide visual feedback. The Arduino Uno R3 controls the system, activating a buzzer and LEDs for alerts, and interfaces with an Adafruit FONA 3G module to send SMS messages and make calls during a gas leak event.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 4 Multi-sensor with 1 ADS - V3: A project utilizing Adafruit ENS161 MOX Gas Sensor in a practical application
Arduino Mega 2560 Based Multi-Gas Detection System with ADS1115 ADC
This circuit is designed for gas detection and monitoring, utilizing an Arduino Mega 2560 microcontroller to interface with multiple MQ-series gas sensors (MQ-2, MQ-3, MQ-7, and MQ-135) through an Adafruit ADS1115 16-bit ADC over I2C. The ADC converts the analog signals from the gas sensors into digital values, which are then read by the Arduino and output to the serial monitor for analysis. The circuit is powered by a 5V supply, ensuring all components receive the necessary operating voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Indoor air quality monitoring
  • Smart home automation systems
  • Environmental sensing and research
  • Industrial safety and gas detection
  • IoT-based air quality projects

Technical Specifications

Key Technical Details

Parameter Value
Manufacturer Adafruit
Part ID 6431
Sensing Element Metal Oxide (MOX)
Detected Gases VOCs, ethanol, hydrogen, and other gases
Operating Voltage 3.3V to 5V
Output Type Analog and I²C digital output
Operating Temperature -40°C to 85°C
Power Consumption Low power mode available
Communication Protocol I²C (7-bit address: 0x53)

Pin Configuration and Descriptions

Pin Name Pin Type Description
VIN Power Input Connect to 3.3V or 5V power supply.
GND Ground Connect to the ground of the circuit.
SDA Data Line I²C data line for communication.
SCL Clock Line I²C clock line for communication.
AOUT Analog Output Provides analog voltage proportional to
gas concentration.

Usage Instructions

How to Use the ENS161 in a Circuit

  1. Power the Sensor: Connect the VIN pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. I²C Communication: Connect the SDA and SCL pins to the corresponding I²C pins on your microcontroller (e.g., Arduino UNO: A4 for SDA, A5 for SCL).
  3. Analog Output: Optionally, connect the AOUT pin to an analog input pin on your microcontroller to read gas concentration as a voltage.
  4. Install Libraries: If using Arduino, install the Adafruit ENS161 library via the Arduino Library Manager.
  5. Write Code: Use the provided library functions to initialize the sensor, read gas concentration, and interpret the data.

Important Considerations

  • Preheating: Allow the sensor to preheat for a few minutes after powering it on for accurate readings.
  • Ventilation: Ensure proper airflow around the sensor for reliable gas detection.
  • Calibration: For precise measurements, calibrate the sensor in a controlled environment.
  • Power Supply: Use a stable power source to avoid fluctuations in readings.

Example Arduino Code

#include <Wire.h>
#include <Adafruit_ENS161.h>

// Create an instance of the ENS161 sensor
Adafruit_ENS161 ens161;

void setup() {
  Serial.begin(9600);
  while (!Serial) {
    delay(10); // Wait for Serial Monitor to open
  }

  Serial.println("Adafruit ENS161 Gas Sensor Test");

  // Initialize the sensor
  if (!ens161.begin()) {
    Serial.println("Failed to find ENS161 sensor! Check wiring.");
    while (1) {
      delay(10); // Stay in loop if sensor initialization fails
    }
  }
  Serial.println("ENS161 sensor initialized successfully!");
}

void loop() {
  // Read gas concentration values
  float tvoc = ens161.getTVOC(); // Total Volatile Organic Compounds
  float eco2 = ens161.geteCO2(); // Equivalent CO2 concentration

  // Print the readings to the Serial Monitor
  Serial.print("TVOC: ");
  Serial.print(tvoc);
  Serial.print(" ppb, eCO2: ");
  Serial.print(eco2);
  Serial.println(" ppm");

  delay(1000); // Wait 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detected

    • Cause: Incorrect wiring or I²C address mismatch.
    • Solution: Verify the connections to the SDA and SCL pins. Ensure the I²C address (0x53) matches the one in your code.
  2. Inaccurate Readings

    • Cause: Insufficient preheating or poor ventilation.
    • Solution: Allow the sensor to preheat for at least 5 minutes. Ensure proper airflow around the sensor.
  3. Fluctuating Output

    • Cause: Unstable power supply.
    • Solution: Use a regulated power source to power the sensor.
  4. Library Not Found

    • Cause: Adafruit ENS161 library not installed.
    • Solution: Install the library via the Arduino Library Manager or download it from the Adafruit GitHub repository.

FAQs

Q: Can the ENS161 detect specific gases like carbon monoxide?
A: The ENS161 is designed to detect a range of gases, including VOCs and equivalent CO2 levels. However, it is not specifically calibrated for carbon monoxide detection.

Q: How long does the sensor last?
A: The sensor has a long operational life when used within its specified conditions. Regular calibration and proper usage can extend its lifespan.

Q: Can I use the sensor with a 3.3V microcontroller?
A: Yes, the ENS161 is compatible with both 3.3V and 5V systems.

Q: Is the analog output accurate enough for precise measurements?
A: The analog output provides a general indication of gas concentration. For precise measurements, use the I²C digital output.


This concludes the documentation for the Adafruit ENS161 MOX Gas Sensor. For further assistance, refer to the Adafruit support resources or community forums.