---
title: "Monitor CO gas levels with Beebotte"
url: "https://maker.wiznet.io/gemma/projects/monitor-co-gas-levels-with-beebotte/"
markdown_url: "https://maker.wiznet.io/gemma/projects/monitor-co-gas-levels-with-beebotte/md"
type: "UCC: User Created Content"
author: "Beebotte"
author_url: "https://beebotte.com/tutorials/co_monitoring"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Beebotte"
original_url: "https://beebotte.com/tutorials/co_monitoring"
published: "2023-03-07"
language: "en"
hardware: ["Arduino UNO", "Arduino Ethernet Shield", "DFRobot Carbon Monoxide Sensor (MQ7)"]
likes: 5
views: 179
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Monitor CO gas levels with Beebotte

> This tutorial presents how Beebotte can be used to monitor Carbon-monoxide levels in the air.

Original author: Beebotte (source: https://beebotte.com/tutorials/co_monitoring)

## Components

- **Arduino UNO** x 1 ([docs](https://www.farnell.com/datasheets/1682209.pdf))
- **Arduino Ethernet Shield** x 1 ([docs](https://docs.arduino.cc/retired/shields/arduino-ethernet-shield-without-poe-module))
- **DFRobot Carbon Monoxide Sensor (MQ7)** x 1 ([docs](https://image.dfrobot.com/image/data/FIT0227/MQ-7.pdf))
- Software: **Arduino IDE** ([docs](https://www.arduino.cc/en/software))

## Article

### **Wiring**

In this tutorial, we will use a ready made `MQ-7` sensor module. If you wish to build your own module, you can buy the required parts and solder them to a PCB (this is beyond the scope of this tutorial).

The `MQ-7` module has 4 pins:

- Analog Output AOUT: Gives an analog voltage output in proportion to the amount of CO level the sensor detects.

- Digital Output DOUT: If the analog voltage reaches a certain threshold, it will set the digital pin DOUT to high. Once DOUT pin is high, the arduino will trigger the LED to turn on.

- Ground GND

- 5V VCC

In this example, we will send AOUT and DOUT values to Beebotte to be able to monitor CO levels from anywhere using a Dashboard.

Follow the wiring diagram below to setup your hardware:

![](https://d2imkaiqu95sh.cloudfront.net/landing/img/CoMonitoringCircuit.png)

### **Sending data to Beebotte**

will use Beebotte `MQTT` endpoint to send sensor data to the created channel. We need to specify the channel token, and to indicate the names of the channel and resources.

Include dependencies:

```
#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
```

---

Source: https://maker.wiznet.io/gemma/projects/monitor-co-gas-levels-with-beebotte/
