Close
0%
0%

Automatic Ventilation System with CO2 Monitors

At Akihabara Hackerspace, we have automated the ventilation process with CO2 monitors, a fan, AWS IoT Edukit, and IoT-related AWS services.

Public Chat
Similar projects worth following
I'm running Akihabara Hackerspace in Akihabara, Tokyo. Thanks to its automatic ventilation system, the hackerspace remains open and welcomes up to 5 fully vaccinated guests even under the COVID-19 pandemic. The system monitors CO2 levels at different spots in the hackerspace, automatically turns on/off a powerful ventilation fan depending on the measured CO2 levels, and keeps the air in the space clean therefore lowering COVID-19 risk.


Challenge

Just limiting the number of guests is not enough to prevent COVID-19, so we have mandatory rules of wearing a face mask, practicing social distancing, washing hands, and disinfecting after use.

In addition to these rules, we believe that keeping the air clean is also one of the effective measures to prevent the disease. Researchers say that COVID-19 transmission risk can be reduced if the space is well ventilated [1].

How do you know if the space is well ventilated? One of the indicators is CO2. CDC recommends that indoor CO2 levels be below 800ppm during pandemic conditions[2].

There are several ways to keep indoor CO2 levels low, for example, opening doors/windows regularly or keeping ventilation fans on. But they require human intervention and are not energy efficient.

Solution

This is where the automatic ventilation system comes in. What it does is to monitor CO2 levels at different spots in the hackerspace, automatically turn on/off a powerful ventilation fan depending on the measured CO2 levels, and keep the air in the space clean therefore lowering COVID-19 risk.

Overall architecture

Overall architecture

CO2 monitors

CO2 levels are measured with CO2 monitors at the following 4 locations: the main area, the video studio, the hallway, and the restroom. Each CO2 monitor is made up of the M5Stack Core2 for AWS IoT EduKit reference hardware[3], an NDIR CO2 sensor, 2 orange mini mini breadboards, and a 3D printed enclosure.

CO2 monitors send measured CO2 levels in ppm to AWS IoT Core every 10 sec. The display color changes from green to red once the CO2 level exceeds the threshold, 600ppm.

CO2 monitors

CO2 monitors

CO2 monitor with its CO2 sensor out
CO2 monitor with its CO2 sensor out

There are two mini mini breadboards attached to the sensor. No soldering is necessary.
There are two mini mini breadboards attached to the sensor. No soldering is necessary.

CO2 monitor schematic
CO2 monitor schematic

Ventilation Fan

Since the fan inside the kitchen hood is powerful enough to pull in clean air from every little opening in the space, it alone can ventilate the whole space.

If CO2 levels are above 600ppm for more than 1 min at any of the measurement locations, AWS IoT Events triggers an action and AWS IoT Core publishes an MQTT message to turn on the fan. Once the elevated CO2 levels are back to normal, IoT Events triggers an action again to turn off the fan. This way the whole ventilation process has been fully automated.

The fan is on. (The light is also on.)
The fan is on. (The light is also on.)

The fan is off.
The fan is off.

Fan controller

So how do you control the fan inside the kitchen hood? What's the trick?

The answer is that another M5Stack Core2 for AWS IoT EduKit is inside the kitchen hood and connected to the fan! It looks almost the same as the CO2 monitors but has an SSR unit instead of a CO2 sensor.

The SSR is connected to the fan's mainboard via a connector and the EduKit is powered by an AC 100-240V to DC 5V power supply module that draws current from the AC power lines inside the kitchen hood. Happy hacking!

Fan controller with an AC 100-240V to DC 5V power supply module

Fan controller with an AC 100-240V to DC 5V power supply module

Fan controller in the kitchen food
Fan controller in the kitchen food

Fan controller schematic
Fan controller schematic

Dashboard

Measured CO2 levels can be viewed in real-time with the AWS IoT SiteWise dashboard. Just in case for later analysis, CO2 levels are also stored in DynamoDB.

Since the system's action threshold is set to 600ppm, CO2 levels at any of the 4 measurement spots rarely exceed 800ppm, which is CDC's recommended standard [1].

CO2 monitoring dashboard

CO2 monitoring dashboard

How to build & design considerations

4 CO2 monitors

Avoid super cheap VOC gas sensors because they are not specific to CO2. I used a relatively inexpensive, specific-to-only-CO2 NDIR (Non-Dispersive Infrared) CO2 sensor, MH-Z19C [4]. This sensor requires 5V power and outputs sensor values via UART (3.3V compatible). Don't forget to perform zero-point calibration before use.

An NDIR CO2 Sensor

An NDIR CO2 Sensor

The M5Stack Core2 for AWS IoT EduKit comes with a UART port (PORT C: GND, 5V, Tx, Rx) [5], which makes this sensor a perfect choice. I think you can easily...

Read more »

model.json

AWS IoT SiteWise model definition

JavaScript Object Notation (JSON) - 1.50 kB - 10/25/2021 at 03:31

Download

asset.json

AWS IoT SiteWise asset definition

JavaScript Object Notation (JSON) - 548.00 bytes - 10/25/2021 at 03:31

Download

detector-model.json

AWS IoT Events detector model definition

JavaScript Object Notation (JSON) - 2.57 kB - 10/25/2021 at 03:30

Download

input.json

AWS IoT Events input definition

JavaScript Object Notation (JSON) - 31.00 bytes - 10/25/2021 at 03:30

Download

rule.json

AWS IoT Core Rule definition with 3 actions. You need 4 of these for each CO2 Monitor.

JavaScript Object Notation (JSON) - 1.97 kB - 10/25/2021 at 03:29

Download

View all 10 files

  • 5 × M5Stack Core2 for AWS IoT EduKit
  • 4 × MH-Z19C NDIR CO2 Sensor
  • 1 × Mini mini breadboard (orange)
  • 3 × Seeed Grove - Universal 4 Pin 20cm Unbuckled Cable
  • 5 × USB Cable, USB Type C Plug

View all 10 components

  • 1
    3D Print custom hats x5

    Print 5 custom hats for M5Stack Core2 for AWS IoT EduKit using the provided .stl file.

  • 2
    Make custom jumper cables x5

    Cut Grove universal 4-pin cables into a half and attach male crimp pins and black housings.

  • 3
    Build an SSR kit

    Build Akizuki Electric's SSR kit (K-00203 SSR)

View all 10 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates