This repository provides an implementation and resources for interfacing the MQ138 gas sensor with Arduino to detect volatile organic compounds (VOCs). The project is focused on simplifying the setup and usage of the sensor for gas detection applications.
- ✅ Support for the MQ138 gas sensor.
- 🔌 Arduino-compatible code for sensor data acquisition.
- 📚 Easy-to-follow instructions for hardware setup.
- ⚙️ Configurable parameters for calibration and gas concentration detection.
- 📊 Real-time data visualization through the Arduino Serial Monitor.
The MQ138 is a gas sensor capable of detecting VOCs such as benzene, alcohol, and acetone. This project demonstrates how to connect the sensor to an Arduino, read its output, and interpret the data for environmental monitoring or other gas detection applications.
To replicate this project, you will need:
- 🖥️ Arduino board (e.g., Uno, Mega, or Nano)
- 🛡️ MQ138 gas sensor
- 🔗 Breadboard and jumper wires
- 🔋 Power source (USB or external power supply)
- 📏 Resistors and capacitors (for additional stabilization if needed)
- Arduino IDE (version 1.8 or later)
- Clone this repository:
git clone https://github.com/Marta-Barea/arduino-MQ138-gas-sensor.git
cd arduino-MQ138-gas-sensor
- Open the Arduino Serial Monitor and set the baud rate to
9600
. - Observe the sensor readings in real-time. The output includes raw analog values, which can be processed to estimate gas concentrations.
This project is licensed under the GNU GENERAL PUBLIC License. See LICENSE
for details.