DIY Air Quality Monitor - PM2.5, CO2, VOC, Ozone, Temp & Hum Arduino Meter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] have you ever wondered about the quality of the air you are breeding or maybe why you sometimes feel sleepy in the office or tired in the morning even after sleeping all night well poor air quality can lead to many negative health effects as well as cause tiredness headaches loss of concentration increased heart rate and so on monitoring the quality of the air may actually be more important than you realize so in this video we will make our own air quality monitor which is capable of measuring pm 2.5 co2 voc ozone as well as temperature and humidity i will explain how each of these air quality parameters affect us and how the sensors work the brain of this project is an arduino pro mini board which in combination with a 2.8 inches nextion touch display provides a decent user interface we can see the measurements from all the sensors in real time and if we click on a particular sensor we will get the values from the last 24 hours from that sensor there's also a dimming function through which we can lower the brightness of the display or even turn it off completely this is convenient for example if we want to track the air quality in our bedroom during the night we can turn off the screen for the night and the next day we can check the values from each sensor individually nevertheless now i will walk you through the entire process of building it and explain how everything works at the end of this video you will be able to build one on your own so let's get started this air quality monitor has four main components or air quality sensors we are using the pm s-503 sensor for measuring pm 2.5 or particulate matter in the air with diameter of around 2.5 microns particulates are the most harmful form of air pollution because they can penetrate deep into the lungs bloodstreams and brain causing many health problems this sensor works on the principle of laser scattering the sensor has a fan which creates a controlled airflow so the environmental particulates pass through a focused laser beam the particulates cause light scattering which is detected by a photodiode and then convert it into pm concentration with the help of its microprocessor i found the results from this sensor to be quite reliable and along with the pm 2.5 it can also output pm1 and pm10 values next we are using the mh z19 sensor for measuring co2 or carbon dioxide as people emit carbon dioxide while respiration the inner concentration of co2 can easily get very high co2 is not only dangerous in high concentrations but it can also cause drowsiness tiredness decrease our productivity level and so on the sensor is using non-dispersive infrared principle for measuring co2 in the air an infrared source directs light through a tube which is filled with the air that we are measuring on the other side of the infrared source there is an optical filter and an iron detector which measures the amount of iron light that passes through the co2 gas molecules which are present in the air that we are measuring absorb a specific band of iron light while leading some wavelengths to pass through so the co2 level is calculated according to the difference between the amount of light emitted and the amount of iron light received by the detector the results from this sensor are also quite accurate for measuring voc and ozone we are using the mp-503 and the mq-131 gas sensors these are heated metal oxide sensors and their principle of work is based on detecting change in resistance at the presence of a target gases a specific electrical current passed through a metal substrate and the resistance changes according to the amount of gas present the target gas of the mq-103 sensor is just ozone which in a normal household can be generated by products like certain air purifiers facial steamers germicidal lamps that produce ultraviolet light and so on on the other hand the mp503 sensor has multiple target gases including alcohol smoke isobutane methanol and others voc stands for volatile organic compounds and these are organic emissions from products that we use on a daily basis like laundry detergents cleaners air fresheners paint makeup and so on rocks can cause many negative health effects including headaches irritation twice skin reactions dizziness and so on nevertheless let's take a look at the circuit diagram now and explain how everything needs to be connected the pm 2.5 sensor communicates with the arduino through a serial interface it works at 5 volts but the receive rx pin works at 3.3 volts so therefore we need a voltage divider for it the co2 sensor and the nextion display also use the serial communication for reading the voc and the ozone sensor we are using the analog inputs of the arduino while the dht22 temperature and humidity sensor uses a digital pin for that purpose the two transistors are used for activating the sensor's heaters we are also using a real-time clock module for keeping track of the time when storing the sensor values and it uses the i square c communication the whole device is powered with 5 volts through a mini usb connector now if we try to connect everything together we will get quite a mess because of the many connections so we definitely need a pcb for this project and for making one i'm going to use altium designer which are actually the sponsor of this video altium designer represents decades of innovation and development dedicated to creating a truly unified design environment striking the perfect balance between power and easy of use altune designer has secured its position as the most widely used pcb design solution on the market now i will show you how i designed the pcb for this project using autumn designer i started with making the schematic for the project altum designer has built-in libraries with basic electronics components but even better you can search for components directly from manufacturers which makes sourcing components for your project very convenient as an example i found the mini usb connector using this manufacturer part search feature from here you can also easily get access to data related to the components like 3d models footprints dimensions and so on you can also create your own components libraries i created most of the components for this project on my own as i wanted to create my own 3d footprints for each part so that at the end i would get the whole pcb in 3d for creating 3d models for the pcb footprints you can use any cut software save the files as dot step files and then import them in altium designer once i finish the schematic i generated the pcb i arranged the components as i wanted and then with just a simple click using the auto route feature the software generated all traces automatically if needed we can also manually create them or adjust them also we can set design rules how the auto routing will make traces set different widths for each net and so on at this point we can also see the pcb in 3d and export a 3d file of the entire pcb assembly which will be used for designing a case for it later on nevertheless i would like to thank saltium for sponsoring educational content like this if you would like to find out more about this software and also try it out there is a special link in the video description which offers free trial of the software you can also try the web-based altium 365 viewer for project previews and files you can find and download all of the files that i made for this project including the altium designer project files the gerber files the components libraries and the 3d models on my website article the link is in the description ok so once i finished the pcb i generated the gerber and nc drill files put them into a single zip file and so i was ready to order the pcb to be manufactured i ordered the pcb from jlc pcb here we can simply drag and drop the zip file and once uploaded we will get all visual information about our pcb then we can select the properties that we want and order our pcb at a reasonable price after several days the pcbs have arrived the quality of the pcb is great and everything is exactly the same as in the design so now we are ready to start assembling the pcb you can find the complete list of components needed for this project on the website article i started by inserting and soldering the smaller components first the resistors and the two transistors then we can solder the arduino pro mini board in place however first we need to solder the pin headers to it please note that we don't need all its pins but also make sure that you don't miss the one that we need like the a4 the a5 and the dtr pin also make sure that you have the exact same arduino pro mini board with this layout of pins because they can sometimes be different next we can insert the dht22 sensor in place for that purpose first we need to bend its pins 90 degrees sometimes i use bluetack adhesive for keeping the components in place when soldering the two capacitors used in this project are for stabilizing the power supply the power to the board will come from a mini usb connector to which we can connect five volts right above the power supply connector we need to solder two switches one is for turning on and off the device and the other is used when we want to upload a sketch to the arduino board then we can insert the pin headers for the usb to uart interface the display and the pm 2.5 sensor as well as the voc the ozone and the co2 sensors in place next for soldering the ds-3231 real-time clock module again first we need to bend its pins 90 degrees once soldered we can insert the battery which keeps track of the time even when the main pcb loses power with this the pcb is actually done and what's left to do now is to prepare the cables that we will use for connecting the pm 2.5 sensor and the display to the pcb i soldered male pin headers to the cable that come with the sensor and so i was able to easily connect it to the pcb for connecting the display to the pcb i soldered four wires to the back side of the display connector and then connected them to the pcb and that's it our air quality monitor is actually done of course what we need to do now is to make some kind of box or case for it as we have the 3d model of the entire pcb assembly from altium designer we can import it into a cad software and design a case for it i used solidworks for that purpose and made the simplest case possible consisting of just two parts and few bolts and nuts i decided to make this case using a transparent acrylic because i like how the pcb and the components look exposed and it's also a great way to show off your diy project to your friends the acrylic that i will use is four millimeter stick which perfectly fits with the display as i currently don't have a cnc machine i cut the shapes manually using a simple metal hacksaw for making the opening for the display first i made two holes with a drill then i passed through a blade from a mini hacksaw and carefully cut the shape using a simple rasp i smoothed out the shape then using a three millimeter drill i made all the holes for attaching the pcbs and connecting the two acrylic plates together at this point i removed the protective foil from the acrylic for attaching the pcb to the base plate i used some m3 bolts and nuts for attaching the pm 2.5 sensor to the plate we need m2 bolts next using some distance nuts we can join the two plates together by using one male and one female distant nut i was able to easily get the desired distance between the two plates i personally really like how this case turned out plus it's functional as air can easily circulate around the sensors now we can power up the device and upload the program we can power the air quality monitor through the mini usb connector and we can get the 5 volts from a 5 volts usb adapter a 5 volts phone charger or a power bank for uploading the program to the arduino pro mini board we need an usb2 serial urt interface which can be connected to the programming header before connecting it to the computer usb first we must turn on the main power of the device because otherwise the power coming from the computer usb which is only 500 milliamps might not be enough to work properly when uploading the arduino sketch we also need to switch the upload switch on the pcb for uploading a sketch to the arduino pro mini board in the arduino ide first we need to select this board select the proper version of the processor select the port and select the programming method to usbs once we upload the code to the arduino we also need to upload a code to the nextion display next on this place have a built-in arm controller which actually controls the display on its own all graphics like the buttons text images variables and so on are generated and controlled by the display itself the nextion display has a dedicated nextion editor where we can create all this stuff the display and the arduino communicate with just two wires using the serial communication the arduino simply just sends the values from the sensor to the display and vice versa the display sends data to the arduino when needed for uploading the display program we need a micro sd card where we can save the output.tft file from the next donator the display has a card reader where we can insert the microsd card while the power is off then we can power up the device and the program will be uploaded to the display now we just have to remove the cart switch on the power again and our air quality monitor will start working for this video i decided not to go into details how the program works as i didn't want to overload it and also because some people find the code explanation boring so for all details about how the program works as well as download files you can check the website article i hope you enjoyed this video and learned something new if you did please consider supporting me on patreon and subscribe to the channel for more tutorials and projects you can always check the website article howtomechatronics.com
Info
Channel: How To Mechatronics
Views: 137,366
Rating: 4.9533815 out of 5
Keywords: Arduino, Air Quality, PM 2.5, Particulate Matters, Sensor, CO2 Sensor, VOC, Volatile Organic Compounds, Temperature, Humidity, Arduino Project
Id: esY_OtDLv7g
Channel Id: undefined
Length: 16min 15sec (975 seconds)
Published: Mon Dec 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.