You are currently viewing Make your own Arduino Air Purifier and AQI sensor

Make your own Arduino Air Purifier and AQI sensor

In this article, we will learn how to build your own air Arduino purifier and AQI sensor to stay safe and healthy when the Air Quality Index outside is less than acceptable.

For those of you that are not from tropical countries, near the equator there are normally only two seasons (although this varies from region to region).

These seasons are the dry and rainy season. At the peak of the dry season is very hot and never rains, while at the peak of the rainy season it rains almost every day. This two extreme polarities cause either draughts and fires or floods and sad cloudy days.

In the north of Thailand, the dry season is particularly bad. Not because is hotter and it does not rains, but because there is an excessive amount of fires happening all around the region.

The result of forests burning everywhere plus the normal amount of pollution from vehicles and coal power plants is a thick layer of haze that is very unhealthy and even hazardous for any breathing creature.

AQI chiang mai

The cause of these fires are a mixture of man made and natural fires. From one side, as it is very dry, a leaf could ignite at some point causing a fire. However, the biggest culprit of fires in the region are man made fires.

During this time of the year, farmers burn whatever was leftover from the previous crops (dry stems from corn plantations for example) on a massive scale. Apart from this, leaving rubbish around such as glass bottles and aluminium cans, can easily start a fire by reflecting the sun into a dry leaf.

This year (2019) has been particularly bad as pollution levels have reached an all time record high.

So far, the city of Chiang Mai has experienced AQI levels over 200 which is classified as very unhealthy for nearly a month, with some days even peaking to 500.

AQI table

Fortunately, makers, engineers and inventors have come with cheap and readily available solutions to tackle the problem from a bottom up approach.

In this article, I have used knowledge and ideas from the Chiang Mai community. I do not claim to have invented the following devices, I am simply putting together what I have seen other makers have done in Chiang Mai to help people fight the air pollution indoors.

A particular thanks to Chiang Mai Makerclub is very well in order! Those guys are geniuses and have pioneered these kind of devices. I am also using some of their recommendations and designs.

Very well, let’s get to building!

Arduino Air Purifier (DIY)

The purpose of the air purifier is to suck dirty air, filter it, and then expel it cleaner than before.

Components

Air filter

xiaomi air filter

For this project, the cylindrical shaped filter from the Xiaomi air purifiers was selected.

There are quite a few options to select from Amazon, eBay or Lazada with varying prices.

Cost = 930THB

Fan exhaust

fan

We need a fan with similar diameter as the filter and enough power to be able to suck air in and pass it through the filter.

Any AC fan with at least 40W of power and 6x6inch should do the job. If the fan does not says the output power look for voltage and current figures. It might say 220VAC/0.2A which is then 220*0.2 = 44W.

This component can be bought in your local electrical shop or in Amazon

Cost = 420THB

Air direction add-on

air direction

This part is not essential but will make the device work better. By directioning the air to the top and controlling the air dispersion, we help the device to filter other air mass instead of the same.

If you wish to manufacture this part, you can download the CAD file from here. (link pending)

You will also have to buy some acrylic and have access to a CNC machine.

Cost = 160THB

Total cost of air purifer (approx) = 1600THB

Assembly

Fan AC mains connection

Components: Plug header, AC wire, screw terminal (can be all bought at your local electrical shop).

Required tools: cable cutter, screw driver.

  1. Peel wire ends
  2. Screw wires to header
  3. Screw the other end of wires to the screw terminal
  4. Screw fan wires to terminal
plug with cables
screw terminal

Once you have made the AC wiring connection, plug your fan to check if it works and write down the airflow direction.

Main body

Using a hot glue gun, glue the fan to the top of the filter and the air direction add-on to the top of the fan. Make sure the fan is the right way around so the air is coming out at the top.

air purifier assembly 1
Use a hot glue gun or super glue to put together the parts
air purifier assembly 2
Make sure you use a thick layer of glue so there are no air leaks or gaps
air purifier assembly 3
You might have to glue the air direction add-on with special acrylic glue
air purifier assembly 4
Full assembled unit

There you go! An Arduino air purifier (DIY) Ready to clean air!

AQI Sensor

The main function of the AQI sensor is to sense PM2.5 and display it on a screen.

Components

PMS7003 AQI sensor module

The PMS7003 is a kind of digital and universal particle concentration sensor, which can be used to obtain the number of suspended particles in the air, i.e. the concentration of particles, and output them in the form of digital interface.

You can buy the PMS7003 on Amazon , eBay or in Lazada.

Cost = 670 THB

Arduino UNO rev3

arduino uno

The Arduino is a microcontroller development board that acts as the “brain of the device”. It takes the information from the sensor, processes it and then sends it to the display.

The Arduino UNO rev3 can be purchased from many shops. Here is the Amazon and eBay link.

Cost = 220THB

1602A LCD display

1602A screen

This small screen has just enough space to display the required information.

Here is the link for Amazon and eBay. You can get it from many more shops, make sure it comes with the I2C interface board attached to it.

Cost = 120THB

Total cost of AQI sensor (no delivery fees added) = 1010THB

Assembly

Hooking up the electronics

Connect the PMS7003 to the Arduino

Insert the expansion board that came with the PMS7003 in the module’s connector

Using a female to male mod wire make the following connections (this can be bought in the shops mentioned before or you can find some laying around at Makerclub) :

Vcc(PMS)——-5V(Arduino)

GND(PMS)—–GND(Arduino)

RX(PMS)——–TX(Arduino)

TX(PMS)——–RX(Arduino)

sensor assembly 1

Connect the display to the Arduino

Using a female to male mod wire make the following connections from the display adapter board to the Arduino (this can be bought in the shops mentioned before or you can find some laying around at Makerclub) :

GND(display)——–GND(Arduino)

VCC (display)——–5V(Arduino)

SDA(display)———SDA(Arduino)

SCL(display)———SCL(Arduino)

arduino to display connections
sensor assembly 2

Power the Arduino

Using the USB cable that came with the Arduino, connect it to either your computer, phone charger or powerbank(5V) such as the Mobile Solar Charger and Powerbank.

After connecting the Arduino to the power source you should see some LEDs light up in the Arduino, the screen on and the mini fan on the PMS7003 spinning.

Programming the Arduino

  1. Download and install Arduino IDE.
  2. Download the source code.
  3. Open the file (source code) with Arduino IDE.
  4. Install the PMS Library
    1. Go into Tools>Manage Libraries> type “PMS” on the search and install PMS Library.
  5. Install the display library
    1. Go into Tools>Manage Libraries> type “LiquidCrystal_I2C” on the search and install the LiquidCrystal I2C by Frank de Brabander.
  6. Connect the Arduino to your computer using the USB cable.
  7. Disconnect the TX/RX cables from the Arduino.
  8. Click the Upload button (arrow below Edit). You should see the black window below saying that the Arduino was successfully programmed after a few seconds.
  9. Reconnect the TX/RX cables and press the reset button on the Arduino (only button next to the USB connector).
  10. The device should start displaying the PM2.5 concentration straight away.
  11. If the screen is blue and not displaying anything, try turning the potentiometer
    (small blue box) either clockwise or counterclockwise on the display expansion board.

Testing and Validation of the AQI combo

AQI Sensor

The quickest way to test the accuracy of the measurements of the AQI sensor is by comparing its results to a commercial model.

Ideally, this comparison would be done for at least the 5 different AQI level categories.

This first comparison has been made is against another DIY sensor from the Makerclub:

AQI sensor testing

As you can see from the photo, both sensors display the same value.

The second comparison was against the average PM2.5 concentration level in Chiang Mai displayed by AirVisual. These network of sensors is assumed to be made of commercial models. My sensor was placed outside in the balcony.

AQI outside
AQI air visual

Note: this post will be updated once I have access to a commercial AQI sensor and have tried it in different pollution levels.

Arduino Air purifier (DIY)

The initial test consisted in running the Arduino air purifier for an hour a measuring how much the PM2.5 concentration changed.

The PM2.5 concentration dropped from 40 to 5 from running the purifier for one hour. This was done indoors in a 30m2 room and with an outdoors AQI of 89.

aqi combo

Roberto Weiser

Roberto has experience in electronic embedded systems design and programming from concept to production, including: power electronics, audio electronics, automotive, battery management systems and renewable energies control systems. Roberto is interested in technology and sustainability of which he has practical experience acquired in his University degree, Master's, external courses, placement and also from volunteering in Peru. Furthermore Roberto has skills for business, leadership and teamwork from his time as Chairman of the Latinos and Spanish Society and Resident DJ in Plymouth

Leave a Reply