Introduction: AEROBOT Air Quality Sensor V1.0

This instructable is about making an inexpensive and a highly accurate air quality sensor named AEROBOT. This project shows temperature,relative humidity, PM 2.5 dust density and alerts about the air quality of the surroundings. It uses a DHT11 sensor for temperature and relative humidity, a sharp optical dust sensor for dust density and an ultrasonic sensor to inform users about inaccurate readings due to blocking of the sensor. This project can be made easily and doesn't need any expertise in arduino. The dust sensor is very quick and can read even the slightest contamination in the surroundings. its maximum range is unknown but it usually is ineffective after the dust density goes over 600. But this is far more than the average contamination of 150. The measuring range of temperature is from -10 to 80 degree celsius and that of relative humidity is from 10% to 90%. Therefore this project is highly effective and efficient as a air quality sensor for homes and offices not in the radius of high pollution.

Things you would need:

• 1 Arduino uno/mega
• DHT11 sensor
• Sharp optical dust sensor
• Ultrasonic sensor
• 1 Button
• 3 LEDs (optional)
• 1 buzzer (optional)
• 220 µf capacitor
• 2*220 ohm resistors
• breadboard

you can watch the project in working here

Step 1: Connecting the LCD

The first thing you need to do before working on the LCD is to check it. For this, do the connections as shown in the 1st diagram. Connect pin 15 on the LCD to Arduino’s 5V pin. Next, connect pin 16 on the LCD to the Arduino’s GND pin. These pins are used to power the LCD’s backlight.

Next, you need to set up the logic for the LCD. To do this, connect pin 1 on the LCD to the Arduino’s GND pin. Then, connect pin 2 on the LCD to the Arduino’s 5V pin. Next, you need to set up the contrast adjusting potentiometer. Take the 10K potentiometer and connect the first terminal to the Arduino’s 5V pin and the second terminal (middle pin) to the LCD’s pin 3 and the third terminal to the Arduino’s GND pin. Next, power up the Arduino. You will notice that the backlight on the LCD turns ON. Also, when you turn the knob on the potentiometer, the character blocks on the LCD turn bright/dim. Check out the picture on below to see what I’m talking about. If your LCD displayed what is shown in the photo below, it means that your LCD is correctly set up! If you were not able to achieve this, double check your connections and your potentiometer. Adjusting the contrast on the LCD

Completing the Connections Now, we need to connect the data lines and other pins that work with the LCD. Check out the connection in the 2nd diagram. Final connections between the Arduino, potentiometer, and LCD

Let’s start with connecting the control wires for the LCD. Connect the LCD’s pin 5 (RW) to the Arduino’s GND pin. This pin is not used, and serves as the Read/Write pin. Next, connect the LCD’s pin 4 (RS) to the Arduino’s digital pin 7. The RS pin is used to tell the LCD whether we are sending it data or commands (to change the position of the cursor). Next, connect the LCD’s pin 6 (EN) to the Arduino’s digital pin 8. EN is the enable pin on the LCD, this is used to tell the LCD that data is ready for reading. Next, we have to connect the four data pins on the LCD. Connect the LCD’s pin 14 (DB7) to the Arduino’s digital pin 12. Then, connect the LCD’s pin 13 (DB6) to the Arduino’s digital pin 11. Next, the LCD’s pin 12 (DB5) to the Arduino’s digital pin 10, then the LCD’s pin no 11 (DB4) to the Arduino’s digital pin 9.

Step 2: Connecting the DHT11 Sensor

Now connect the DHT11 sensor's input pin to arduino pin 7 and connect the Vcc and the ground wires respectively. Be sure to secure it and place it fare from the bunch of wires connected to the lcd.

Step 3: Connecting the Ultrasonic Sensor

The ultrasonic sensor i added in here is for a precaution so that whenever something is blocking the dust sensor(i would come to that later) the ultrasonic sensor senses it and gives a warning so that the dust sensor does not give improper readings.

Connect the trig pin of the sensor to arduino pin 6 an the echo pin of the sensor to arduino pin 5 and also place this sensor away from all the wires because the sensor is so sensitive that if there's a wire in front of it then it will show you the warning.

Step 4: Setting Up the Dust Sensor

Now comes the most difficult part and the most amazing sensor of this project-the dust sensor. Just set up the dust sensor as shown in diagram 2. and connect the dust pin to arduino pin 2 and the led pin to arduino pin 3 and dont forget to include the capacitor. After setting it up just check the dust values it gives with a real air quality sensor just to be sure.

Step 5: Finishing Up

I have added a buzzer so that it beeps when the air quality gets critical. Its just an extra setup, you can also add LEDs if you want to.

Step 6: The Code

So here's the code:

Sensors Contest 2017

Participated in the
Sensors Contest 2017

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017