|
MQ135 air quality sensor module |
x 1 | |
|
WeMos D1 Mini |
x 1 | |
|
0.96" OLED Display |
x 1 | |
|
18650 battery and holder |
x 1 | |
|
slideswitch |
x 1 |
|
arduino IDEArduino
|
|
|
Soldering Iron Kit |
Air Quality Monitor
Welcome to our DIY tutorial on assembling an Air Quality Monitoring Device. This project is perfect for those interested in environmental technology and DIY electronics. Utilizing a custom PCB, this device offers a compact and effective way to monitor air quality in your immediate surroundings.
Disclaimer
This device is intended for educational and hobbyist purposes. It should not be used for critical health or safety decisions.
Applications:
- Environmental Monitoring: Ideal for tracking air quality in homes, offices, or outdoors.
- Educational Tool: Great for learning about sensors, microcontrollers, and data visualization.
- Personal Health: Useful for those interested in monitoring the air quality around them.
Building Guide - Air Quality Monitoring Device:
Gather Your Tools and Materials
- Custom PCB designed for this project.
- Wemos D1 Mini microcontroller.
- MQ-135 Air Quality Sensor.
- Small OLED Display.
- Slide Switch.
- 18650 Battery and Holder.
- Soldering iron, solder, and flux.
- Tweezers or small pliers.
Assembly
- Prepare Your Workspace: Choose a well-lit, clean area to work in. Safety first!
- Mount the Wemos D1 Mini: Fit the Wemos D1 Mini into its designated slot on the PCB. Solder it into place.
- Attach the MQ-135 Sensor: Place the MQ-135 sensor onto its designated spot on the PCB. Ensure proper alignment and solder it.
- Install the OLED Display: Align the OLED display with its spot on the PCB. Carefully solder the connections.
- Set Up the Slide Switch: This will control the power to your device. Solder it onto the PCB.
- Battery Connection: Place the 18650 battery in its holder and connect it to the PCB. Ensure secure and proper orientation.
- Programming the Wemos D1 Mini
- Install Necessary Libraries: Use the Arduino IDE to install libraries for the OLED display and sensor handling.
- Connect the Wemos D1 Mini: Use a micro USB cable to connect it to your computer.
- Write the Code: Develop code to read data from the MQ-135 sensor, process it, and display the readings on the OLED screen.
- Upload the Code: Transfer the code to the Wemos D1 Mini.
Conclusion
You now have a fully functioning Air Quality Monitoring Device. It's an excellent opportunity to explore environmental sensing, data handling, and electronic design. Enjoy monitoring air quality and remember to calibrate your device for accurate readings. Happy building!
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
#define MQ135_PIN A0
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
Serial.begin(115200);
// Initialize OLED Display
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
delay(2000);
display.clearDisplay();
// Display initial text
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0,0);
display.println(F("MQ-135 Air Quality"));
display.display();
delay(2000);
}
void loop() {
int sensorValue = analogRead(MQ135_PIN);
float airQuality = calculateAirQuality(sensorValue);
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0,0);
display.println(F("Air Quality (ppm):"));
display.print(airQuality);
display.display();
delay(1000);
}
float calculateAirQuality(int sensorValue) {
// Example conversion formula - this is an approximation and should be calibrated
float sensorVoltage = sensorValue * (5.0 / 1023.0);
float airQuality = (sensorVoltage - 0.6) * 100;
return airQuality;
}
Air Quality Monitor
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- wang123 hero1112 Dec 01,2023
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Inaki Iturriaga
- GPS Mobile Beacon Building a GPS Emergency Beacon: A DIY TutorialWelcome to our latest DIY project: creating a GPS Eme...
- Wireless RFID Card Copier. Wireless RFID Card CopierIn today's digital world, security and accessibility are of paramount impor...
- Piezo Alert System. Within the fast-evolving sphere of security tools and home automation, creativity often paves the wa...
- Wifi Weather Station - Sensors board WiFi Weather Station - Sensor unitIn our digital era, many electronics projects integrate diverse se...
- RC Receiver Build Your Own RC ReceiverHarnessing advanced electronics and precise control systems, the RC Receiv...
- Universal RC Controller Build Your Own Universal RC RemoteHarnessing the power of custom PCBs and wireless communication, th...
- Continuous GPS Tracker This compact and efficient tracker provides real-time location updates, making it ideal for surveill...
- Air Quality Monitor Welcome to our DIY tutorial on assembling an Air Quality Monitoring Device. This project is perfect ...
- Automatic Watch Winder Automatic Watch WinderIn the realm of luxury timepieces and watch aficionados, an automatic watch is...
- Handheld GPS Within the swiftly advancing realm of portable technology and travel essentials, innovation often sh...
- Dual Motor Controller for Model Robotics In the thrilling world of robotics and DIY engineering, innovation continues to soar to new heights....
- Altitude Indicator with Beeper for Rocketry Altitude Indicator for Model RocketryIn our ever-advancing technological landscape, countless projec...
- Wifi Weather Station - Display unit WiFi Weather Station - Display UnitIn this technologically advanced age, countless electronics proje...
- Positon Breakout Board Position Sensors Breakout Board In today's era of advanced technology, many electronics projects req...
- Ambient Sensors Breakout Board In today's world, electronics projects often require the integration of multiple sensors to collect ...
- Infrared Launch Controller IntroductionHave you ever wanted to remotely launch a rocket, drone or other device using infrared t...
- Altimeter Datalogger with Display. Building TutorialAltimeter Datalogger with Display.Components needed:BMP280 sensorI2C to 16x2 displa...
- Remote Igniter + 3D printed Case. Remote IR Igniter.Build an Infrared remote ignitor for model rocket testing and launching!This guide...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
110 0 0 -
DIY Laser Power Meter with Arduino
162 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
153 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
554 0 2