ESP32 Air Monitor PCB: Reliable Custom Board for Clean Sensor Data
Key Moment
- 0:00 Introduction & Project Overview
- 1:57 AIVON PCB Sponsorship
- 2:30 Components Required
- 2:53 PMS7003 Sensor Explained
- 3:23 BME680 Sensor Explained
- 3:44 Schematic Design
- 4:07 PCB Layout & 3D View
- 4:23 Ordering the Custom PCB
- 4:47 Assembling the Hardware
- 5:35 Coding & Libraries
- 6:56 Uploading the Code
- 7:25 OLED Display Pages
- 8:19 Web Dashboard Overview
- 9:43 History, Data Logger & Alerts
- 10:30 Outro & Resources
Project Background
Indoor air quality monitoring has moved from niche curiosity to everyday necessity. Engineers, makers, and product teams increasingly need practical devices that measure particulate matter (PM1.0, PM2.5, PM10), temperature, humidity, IAQ, VOC equivalent, and CO2 equivalent in real time. Commercial black-box gadgets often lack transparency, customization, or data ownership. This project set out to solve that gap with an open, reliable IoT solution built around the ESP32, Plantower PMS7003 laser particle sensor, and Bosch BME680 environmental sensor.
The creator's goal was clear: deliver live readings on a compact 0.96-inch OLED, host a polished web dashboard directly from the ESP32, support historical graphs, Excel data export, and configurable alerts—all without the fragility of breadboard wiring. Breadboards prove concepts, but they cannot provide the electrical stability, compact form factor, or mechanical reliability that sensitive sensors demand. Power noise, loose connections, thermal interference, and restricted airflow quickly degrade accuracy. A purpose-built custom PCB becomes the essential bridge between a working prototype and a device that can run continuously and be trusted.
This video documents that transition—from messy jumper-wire nests to a clean, professional 2-layer board—and shows how thoughtful layout, local decoupling, modular headers, and precise manufacturing turn an ambitious sensor project into a finished tool suitable for desks, walls, or continuous monitoring.
What This Video Covers
The video walks through the complete journey of the ESP32-based particulate matter and air quality monitoring system. Viewers see the finished device in action: real-time OLED updates and a modern browser dashboard featuring an IAQ circular gauge that changes color with air quality level, live parameter cards, multi-time-scale PM trend graphs (15 minutes to 24 hours), a data-logger page with start/stop recording and Excel export, and an alerts page with user-settable thresholds.
Hardware integration is explained in detail—the PMS7003 reporting particle concentrations over UART at 9600 baud, the BME680 delivering temperature, humidity, and calculated IAQ/VOC/CO2 values over I2C via the BSEC library, both sensors sharing the ESP32 that also drives the OLED and serves the entire web interface. The narrative then focuses on the custom PCB that made reliable operation possible: component placement, power integrity measures, airflow considerations for the laser sensor, and the manufacturing process that delivered clean boards in just three days. Design decisions, common pitfalls on 2-layer sensor boards, and practical DFM lessons are covered so engineers can apply the same principles to their own IoT projects.
Project Highlights and Key Features
- Compact 2-layer FR-4 board optimized for hand assembly and sensor performance
- Female headers for ESP32, OLED, and BME680 enabling easy module swaps and upgrades
- Off-board PMS7003 connection via short jumpers ensuring free airflow for accurate laser scattering
- Local decoupling (10 µF electrolytic + 0.1 µF ceramic) placed directly at power pins of sensitive modules
- Short, clean I2C routing between ESP32, BME680, and OLED to maintain signal integrity
- Standard 1.6 mm thickness and 1 oz copper providing mechanical rigidity and adequate current capacity
- Clean surface finish supporting reliable through-hole soldering
- Integrated web dashboard with color-changing IAQ gauge, multi-range trend graphs, data logging, Excel export, and threshold alerts
- Professional appearance and stable long-term operation free from intermittent breadboard faults
Challenges Encountered During Development
Even a seemingly straightforward 2-layer mixed-signal IoT board presents real technical and manufacturing hurdles. The BME680 gas sensor is highly sensitive to both electrical noise and local heat sources; placing it too close to the ESP32 or a regulator skews temperature and IAQ readings. The PMS7003 requires unobstructed airflow and a stable 5 V rail—any restriction or voltage dip degrades particle measurement accuracy. ESP32 Wi-Fi transmissions can inject noise into poorly designed power distribution, causing wandering IAQ values or UART glitches.
On the breadboard these problems appear intermittent and hard to diagnose. Once the design moves to a finished board they become permanent defects. Power integrity proved the first practical obstacle: without local decoupling the 3.3 V and 5 V rails dip or ring when the ESP32 transmits or the PMS7003 fan spins up. Physical placement was equally critical—thermal isolation for the BME680 and free-air positioning for the PMS7003 could not be compromised.
Manufacturing introduced classic 2-layer risks. Mismatched outline layers, silkscreen overlapping pads or vias, insufficient annular rings around through-holes, and missing solder-mask openings on PTH holes are common 2-layer FR4 PCB CAM flags that lead to production delays, scrap, or field failures. Early clarification of dimensions, clearances, and layer data is essential to avoid these issues.
How AIVON PCB Helps
Once the schematic and layout were finalized in EasyEDA, Gerber files were submitted for manufacturing. AIVON FR4 PCB delivered clean, professional boards in three days—crisp silkscreen, reliable through-hole plating, and consistent copper. That rapid turnaround keeps creative momentum alive: a designer can complete layout over a weekend, order, and begin assembly the following week instead of waiting through long revision cycles.
Beyond speed, manufacturing precision directly solved the electrical and mechanical challenges. Consistent copper thickness, accurate hole registration, and proper plating ensure clean UART and I2C signal integrity. Correctly placed local decoupling footprints perform as intended. Expert CAM review caught and resolved the typical 2-layer pitfalls—outline mismatches, silkscreen conflicts, annular-ring issues—before production, so the boards required no rework.
The finished PCB elevated the entire project. Rigid substrate eliminated intermittent connections. Modular female headers turned key components into serviceable modules. Off-board PMS7003 placement guaranteed the airflow the laser sensor needs. The result is a device that looks and behaves like a finished product rather than a temporary experiment. Engineers can focus on firmware polish—the dashboard graphs, Excel export, and color-changing IAQ gauge—instead of chasing hardware bugs.
AIVON's combination of fast-turn PCB manufacturing, attentive DFM support, and high-quality 2-layer FR-4 production provided the reliable foundation this sensor system required. The same disciplined process that catches outline and silkscreen problems on other projects ensured these air-quality boards performed correctly on the first run.
Conclusion
This project demonstrates the decisive difference a well-executed custom PCB makes. Moving from breadboard chaos to a compact 2-layer board with thoughtful placement, proper decoupling, modular connections, and precise manufacturing transformed an ambitious idea into a reliable air-quality monitor that delivers clean readings day after day. The short manufacturing cycle and CAM attention simply accelerated that transformation.
If your IoT sensor concept is still living on jumper wires, the path is clear: lock the electrical design, respect the sensors' physical and noise requirements, perform a quick DFM check, and move to a purpose-built board.
FAQ
Q1: Is a 2-layer board sufficient for an ESP32 air-quality monitor with PMS7003 and BME680?
A1: Yes. With solid ground pour, short sensor runs, and local decoupling, a 2-layer FR-4 layout reliably handles UART, I2C, and moderate currents. Four layers are useful for denser RF designs but are not required here.
Q2: How close should decoupling capacitors be placed on sensor boards?
A2: Within a few millimeters of each module's power pins. Distant capacitors cannot filter the noise frequencies that affect BME680 gas readings and PMS7003 UART stability.
Q3: Should the PMS7003 particle sensor be soldered directly to the PCB?
A3: Usually not. Short jumpers or a header keep its intake in free air. Mounting it flat against the board often reduces measurement accuracy.
Q4: What CAM issues most commonly appear on 2-layer ESP32 sensor boards?
A4: Mismatched outline layers, silkscreen overlapping pads or vias, insufficient annular rings, and missing solder-mask openings on PTH holes. Early detection prevents delays and defects.
Q5: Are female headers worth the extra height on prototype sensor boards?
A5: For early units and development, yes. They allow swapping the ESP32, OLED, or BME680 without desoldering—valuable while firmware is evolving or if a module fails.
Hi everyone, it's me Ha from How to Electronics. Today I am going to show you how I designed an IoT-based particulate matter and air quality monitoring device.
This device can measure particulate matter concentration in the air along with the index of air quality, volatile organic compounds and carbon dioxide concentration. I use PMS7003 PM sensor that can easily measure PM1.0, PM2.5 and PM10 numbers in air. Similarly, I use the BME680 environmental sensor to measure temperature, pressure, IAQ, VOC, and CO2 values. I use these sensors to interface with the ESP32. All the air quality parameters are displayed on this tiny 0.96 inch OLED display.
We have also a beautifully designed web dashboard. The dashboard page displays the complete air quality data in a clean and professional layout. The main dashboard shows the IAQ value in a circular gauge which changes color according to the air quality level. Apart from these, we can observe past history and graphs for the change in particulate matter concentration values. The history and data logger page is used to record sensor readings. The data logger can be started or stopped from the dashboard and the log data can also be exported as an Excel file for later analysis. The alerts and settings page show air quality warnings based on the sensor readings.
This project is so cool and excellent for monitoring your indoor air quality or outdoor air quality. So, let's find out how we can build this device. Let's get started.
The PCB used in this project is sponsored by Aivon, a global leader in PCB manufacturing and assembly. Aivon provides high-quality PCBs with fast production and delivery times. For new users, there is currently a special campaign that includes free shipping and generous discounts, making PCB prototyping far more affordable. You can get a PCB at $1 and PCBA service as low as $35 only and with free shipping.
Let's take a look at the components required to build this project. First, we need an ESP32 microcontroller board. Then a PMS7003 particulate matter measuring sensor, BME680 environmental sensor, a 0.96 inch OLED display, some capacitors of 10 microfarads and 100 nanofarads. You can buy all of these components easily from anywhere.
Let's have an overview of the PMS7003. First, the PMS7003 is a digital particulate matter sensor used to measure dust particles present in the air. This sensor works on the principle of laser scattering. A small fan pulls air into the sensor and a laser detects the particles passing through the air chamber. Based on the detected particles, the sensor calculates the particle concentration and sends the data through UART serial communication.
The BME680 is an environmental sensor that can measure temperature, humidity, pressure, and gas resistance. This sensor includes a gas sensor that can detect the presence of different volatile organic compounds, also known as VOCs.
Here is the circuit diagram for this project. The ESP32 is the main controller of the system. It reads air quality data from the PMS7003 sensor and reads environmental data from the BME680 sensor. The OLED display is used to show the sensor readings locally. Capacitors are also added near the power supply lines for stable operation.
After designing the schematic, I converted it into a compact PCB layout. All the components are placed on the front side for easier assembly. Here is the 2D view of the board from the front side and also from the back side. Similarly, here is the 3D view of the board.
So, the next step is to order the PCB. The Gerber files were generated and uploaded to Aivon. Uploading the Gerber file is simple. You just select the board parameters like material, thickness, solder mask, color, and quantity. And here you can see the total quote of just $1. And shipping is also free. If you want to order a PCB for just $1, check the first link in the description.
I placed the order and within a few days I received these high quality PCBs. The finish, silk screen, and through-hole plating were excellent.
Next, I soldered all of the components for 15 minutes. The assembly was smooth and the board looks professional once completed. For ESP32, BME680, and OLED display, I am using a female header. I could insert all of the components easily here. For PMS7003, I used jumper wires as this sensor needed to be placed in a particular position.
To test the entire board, I plugged in a USB-C cable and the red LED turned on and the ESP32 turned on. Showing everything is good.
Now, let's move on to the coding part. We will develop a C++ code to interface BME680, PMS7003 and OLED display with an ESP32 and visualize the air quality data on a web page.
The code starts by including the required libraries for the project. The Wi-Fi and web server libraries are used to connect the ESP32 to a Wi-Fi network and create a local web dashboard. The BSEC library is used with the BME680 sensor to get final air quality values such as IAQ, CO2 equivalent, and VOC equivalent. The Adafruit GFX and Adafruit SSD1306 libraries are used to control the OLED display.
In the Wi-Fi section, the SSID and password are added so that the ESP32 can connect to the local network.
The main loop continuously reads data from the PMS7003 and BME680 sensors. These readings are then displayed on the OLED screen, printed on the serial monitor, and sent to the web dashboard as JSON data through the API readings route.
Here is the header file for the project. The webpage.h file contains all of the HTML, CSS, and JavaScript code used to create the live web view.
Once the hardware assembly is complete, it's time to upload the code. To upload the code in the Arduino IDE, go to tools, board, and select ESP32 dev module. Then choose the correct COM port. Finally, click the upload button.
After uploading the code, the device starts measuring air quality data and displays the values on the OLED. At the same time, the ESP32 hosts a web server. Connect your phone or computer to the same Wi-Fi network and open the IP address shown on the serial monitor or OLED.
The web dashboard will show live IAQ gauge, PM values, temperature, humidity, CO2 equivalent, VOC equivalent, history graphs, data logger, and alert settings.
That's all for the video part today. All of the detailed written guides related to this project can be found on the website article of how to electronics. You can find the bill of materials, schematic, PCB, Gerber file, source code, program and other instructions here.
I hoped you like this video. So, why not drop a like and hit the subscribe button? Finally, thank you so much for watching. See you in the next video.