Inspiration

The world is filled with air pollution, but many people do not notice because it has become part of their daily life. The amount of pollution is increasing rapidly and I want to raise this awareness because breathing in those air will be harmful to your body and some people are sensitive or is allergic to those dust and pollution in the air. I want to create a day where I can open my window to let fresh air in, not have to close it to prevent pollution from coming in.

What it does

This system will detect the amount of dust and pollution in the surrounding air and display its value as well as the specified threshold on the LCD. The threshold is adjustable through the potentiometer to suit each person's sensitivity to that pollution. If the measured level is above the threshold, then the buzzer alarm will go off to notify the user to either wear a mask or get out of that area and enter a cleaner place. The device can also send its air pollution data to the phone or laptop through Bluetooth to keep track of daily air quality intake which can be useful for data analytic and diagnosing your health when you see a doctor. Additionally, if there are home automation devices nearby that would help improve the air quality (such as an air purifier, or closing the window), those devices will receive the Bluetooth signal and turn them on automatically.

How we built it

There are two subsystems in this project: the pollution detector and the automated air purifier. There is also a laptop that acts as a mobile device to connect to both of them. I build the pollution detector using Arduino Uno, a dust sensor, LCD, potentiometer, buzzer, and HC05 Bluetooth module. The dust sensor will read the value of air pollution through the analog pin and display it through the LCD. The reading from the potentiometer will also be shown in LCD to show what's is the air pollution reference threshold that we want. The buzzer will go off if the air pollution level is above the set reference threshold. The Bluetooth module is connected to Rx and Tx pin through voltage divider. It will keep sending the signal to tell whether the automated air purifier should be on or off.

For the automated air purifier system, I imitate the air purifier with the dc motor fan. The system is composed of a 5V relay, dc motor fan, ESP32 dev board, and breadboard power supply module(to make it easier to turn on/off). The ESP32 will be connected to a master such as a phone or a laptop. Once it receives the signal to turn on the air purifier, the board will send a signal to turn on the relay, which will turn on the fan. I use the relay because, in the real application, the relay would be required to power the air purifier or other home automation device which uses a high voltage that the development board cannot supply.

Lastly, instead of a phone, I use my laptop as a master to connect between the pollution detector and the automated air purifier because my phone is iOS which only supports Bluetooth low energy. I have programmed a python script that will connect to both subsystems to provide communication between the two.

Challenges we ran into

There are a few challenges regarding Bluetooth communication. Even though ESP32 can connect to Bluetooth, pairing it directly to HC05 is difficult because they have different systems. It requires going into AT mode to read the address of the Bluetooth device and configure them accordingly. Even after I did those, they are not able to pair together. However, after thinking about it, usually, all those devices should be slaves because you may want to connect to multiple air purifiers or automated windows, and you will want to connect to a phone to keep track of data. This is why I add in the laptop to connect between the two.

The second challenge is platform dependency. HC05 can only use Bluetooth classic, which is not supported in the iPhone or iPad that I have. If I want to program an iOS application, I would need an iOS laptop which I do not have. This is also why a lot of tutorials use android phones. However, my Windows laptop is sufficient to demonstrate the connection to both devices.

Accomplishments that we're proud of

Overall, I am able to create a prototype that demonstrates my concept of detecting surrounding dust and use it to get data and automate the household systems. I am really proud of the communication between the HC05, laptop, and the ESP32.

What we learned

I learn about the ESP32. It is a pretty amazing board at a very cheap price with lots of IoT capabilities that can be programmed with Arduino IDE. I also learn about the analog input of Arduino, HC05 Bluetooth module and how to set its config, LCD, 5V relay, and the breadboard power supply module.

What's next for Air Pollution Alarm and Removal System

The next step could be to optimize the design to make it smaller. I want it to be able to fit or attach to a cloth or backpack so it can always detect the air around the user. Also, originally I got HC05 and ESP32 instead of getting 2 of one of them just to try learning more. Now I realize it will be much easier and more stable to get either 2 of HC05 or 2 of ESP32. I will go with ESP32 because it can do more at a cheaper price, and is smaller than Arduino Uno. It can also connect to iOS because it has BLE and could also connect to Wifi which can provide more connection to home automation.

Built With

Share this project:

Updates