การใช้ Raspberry Pi 4 เพื่อตรวจสอบ PM2.5

Using Raspberry Pi 4 to monitor PM2.5

, by Sukanya Eiampinit, 2 min reading time

PM2.5 is a small particulate matter in the air that can have an impact on human health. In this article, we will build a PM2.5 monitoring system using a Raspberry Pi 4 (4GB), a tiny computer with huge capabilities, as well as learn how to use Python to control the device and create your own air quality monitoring system.

**Equipment required**

1. **Raspberry Pi 4 (4GB RAM)**: This is the mainstay of this project. The 4GB model is recommended to provide you with enough memory space.

2. **PM2.5 Sensor (SDS011 or PMS5003)**: A PM2.5 sensor that comes with UART connection is suitable for this project.

3. **A4 paper page**: Used to display PM2.5 level information and system status.

4. **OLED Display**: (Example: SSD1306) If you want to display PM2.5 level information on the display screen.

5. **Wires**: GPIO data cable to connect Raspberry Pi and PM2.5 sensor and OLED if used.

**System creation steps**

**Step 1: Installing Raspberry Pi OS**

- Start by installing Raspberry Pi OS on your Raspberry Pi 4. Take a MicroSD Card with Raspberry Pi OS installed and insert it into the Raspberry Pi.

- Start Raspberry Pi and connect the devices with keyboard and mouse.

**Step 2: Connecting PM2.5 sensor**

- Connect the PM2.5 sensor to Raspberry Pi using the GPIO data transmission cable following the steps specified in the sensor manual.

- Make sure you have UART enabled on your Raspberry Pi 4.

**Step 3: Writing Python Code**

- Create a Python script to read data from the PM2.5 sensor and display it on the screen or on an A4 paper (if available).

- Use appropriate Python libraries such as `serial` to read data from the sensors and `Adafruit_SSD1306` to control the OLED display (if used).

**Step 4: Display (if using OLED screen)**

- Create A4 paper to display PM2.5 level and system status.

- Display PM2.5 data and other data that you want to display on the page.

**summarize**

With Raspberry Pi 4 (4GB) and PM2.5 sensor, you can build a system.

Easily check your own PM2.5 levels and control them via Python code. This project helps you understand how to use Raspberry Pi and monitor air quality in detail.


Blog posts

© 2025 บริษัท โกลบอลโทรนิค อินเตอร์เทรด จํากัด, Powered by Shopify

  • PayPal

Login

Forgot your password?

Don't have an account yet?
Create account