EmbeddedRelated.com

Solar-Powered WiFi Environmental Monitor with PM2.5, CO2, and VOC Sensors

Draadloos, op zonne-energie en accu gevoed luchtkwaliteitsmeetapparaat met WiFi, geluid, fijnstof, CO2, VOC, temperatuur en luchtvochtigheid, met metingen elke 5 minuten.

Advanced Project — This is advanced because it combines WiFi, solar/battery power management, multiple air-quality sensors, acoustic sensing, and enclosure/airflow constraints, all of which need careful integration and power budgeting.
Assumptions:
  • Ik ga ervan uit dat dit een prototype voor binnengebruik is, met WiFi-verbinding naar een lokaal netwerk of cloud.
  • Ik ga ervan uit dat 'geluidsmeting' een eenvoudige geluidsniveau-indicatie betekent en niet een gekalibreerde klasse-1 decibelmeter.
  • Ik ga ervan uit dat de fijnstofsensor PM2.5/PM10 moet meten en dat de CO2-sensor echte NDIR CO2 moet zijn, niet alleen eCO2.
  • Ik ga ervan uit dat zonnecel + accu bedoeld zijn voor autonome werking met laadregeling en niet alleen als back-up voeding.

Bill of Materials

Microcontroller
Top Pick ESP32-DEVKITC-32E Espressif Systems From our database
ESP32-DEVKITC-32E is the best starting point because it gives you WiFi, USB programming, and a very well-supported ESP32 development environment in one easy prototype board.
Digikey $10.00 Mouser $10.00 (612 in stock)
Dev Board 113991254 Seeed Studio
Ready-to-use board for prototyping with this chip
Digikey $5.38 Mouser $5.38 (3,111 in stock)
ESP32-DevKitC-32U Espressif From our database
Also a strong ESP32 prototype board with WiFi and USB programming; good if you want the same software ecosystem with a different board variant. Suitable for sensor polling, WiFi uploads, and low-duty-cycle operation.
ESP-WROOM-32 Espressif From our database
Compact module if you are moving toward a custom PCB and want the ESP32 WiFi MCU in module form. Good for integrating all sensors on one board, but less convenient than a dev board for first prototype bring-up.
Audio / Sound Level Input
Top Pick MP34DT05TR-A STMicroelectronics From our database
MP34DT05TR-A is the best pick here because it is a digital MEMS microphone with a clean interface and lower analog-design risk than ADMP401ACEZ-RL.
Digikey $2.81 (104,371 in stock) Mouser $2.30 (652 in stock)
ADMP401ACEZ-RL Analog Devices From our database
Analog MEMS microphone with low current draw and simple acoustic pickup. Useful if you want a compact microphone element, but it needs an ADC path and more analog care than a digital mic.
INMP441 TDK InvenSense
Common I2S digital MEMS microphone module choice for prototypes; easy to interface to an ESP32 and avoids analog front-end design. Good if you want a ready-made sound sensor module rather than a bare mic element.
Particulate Matter Sensor
Top Pick SPS30 Sensirion From our database
SPS30 is the best overall choice because it is accurate, widely used, and gives you multiple PM channels with a straightforward digital interface.
Digikey $36.21 (6,295 in stock) Mouser $36.21 (1,402 in stock)
HPMA115S0 Honeywell From our database
Laser-based particulate sensor module intended for continuous air-quality monitoring. Good if you want a robust PM module, though it is less compact and less modern than SPS30.
HPMA115S0-XXX Honeywell From our database
Another Honeywell PM module option for PM2.5 and PM10 monitoring. Useful if you find this exact variant easier to source in your region.
CO2 Sensor
Top Pick SCD41-D-R2 Sensirion From our database
SCD41-D-R2 is the best pick because it gives true NDIR CO2 measurement in a compact, modern package that suits a battery-powered prototype.
Digikey $20.54 (9,650 in stock) Mouser $19.75 (3,765 in stock)
SCD40-D-R2 Sensirion From our database
Miniature NDIR CO2 sensor with humidity and temperature outputs. Good if you want a smaller package and can accept the tradeoff versus the SCD41 family.
SCD30 Sensirion From our database
Well-known CO2, humidity, and temperature module with NDIR sensing. Good for prototyping and validation, though it is typically larger and less battery-friendly than the SCD41.
VOC Sensor
Top Pick SGP40 Sensirion From our database
SGP40 is the best choice because it is a low-power, well-supported VOC sensor that pairs cleanly with the ESP32 over I2C.
Digikey $6.95 (4,856 in stock) Mouser
SGP40-D-R4 Sensirion From our database
Same core VOC sensing function in a packaged digital part, suitable for direct integration on a custom PCB. Good choice if you want a straightforward I2C VOC sensor.
SEN-18345 SparkFun From our database
Ready-to-use breakout board for the SGP40, which is convenient for breadboard prototyping and quick firmware bring-up. Useful if you want the sensor on a module instead of a bare IC.
Temperature Sensor
Top Pick SHT30-DIS-B10KS Sensirion AG From our database
SHT30-DIS-B10KS is the best overall pick because it is accurate, easy to use over I2C, and well suited to environmental monitoring.
Digikey $2.80 (2,587 in stock) Mouser $2.70 (10,000 in stock)
HDC1080DMBR Texas Instruments From our database
Very low-power humidity and temperature sensor, useful for battery operation and periodic sampling. Good if you want a simple, accurate I2C sensor.
HDC2010YPAR Texas Instruments From our database
Low-power humidity and temperature sensor with a heater to help with condensation issues. Useful if the device may see humid conditions or occasional condensation.
Humidity Sensor
Top Pick SHT30-DIS-B10KS Sensirion AG From our database
SHT30-DIS-B10KS is the best humidity choice because it is accurate and robust, and it also gives you temperature in the same part.
Digikey $2.80 (2,587 in stock) Mouser $2.70 (10,000 in stock)
HDC1080DMBR Texas Instruments From our database
Low-power humidity sensor with integrated temperature measurement, good for battery-powered nodes. Simple I2C interface and strong fit for environmental sensing.
HDC2010YPAR Texas Instruments From our database
Low-power humidity sensor with a heater to reduce condensation problems. Better than basic sensors if the enclosure may see moisture buildup.
Power Supply
Top Pick BQ24074 Texas Instruments From our database
BQ24074 is the best fit because power-path management is very helpful for a solar + battery node that must keep running while charging.
Digikey $61.25 (3 in stock) Mouser $58.81 (5 in stock)
MCP73871 Microchip From our database
Well-known Li-ion charger with power-path support for portable devices. Good if you want a proven charger/power-manager for a battery-backed node.
CN3065 Consonance
Common solar Li-ion charger IC used in small solar projects. Attractive for low-cost prototypes, but you still need to design the surrounding power circuitry carefully.

Compatibility Notes

  • All listed sensors are I2C or digital-interface friendly and are compatible with the ESP32's 3.3 V logic domain.
  • SPS30 and the Sensirion ESP32-DEVKITC-32E parts are typically 3.3 V-friendly, but you should verify each breakout/module's supply and pull-up arrangement before wiring them together.
  • The ESP32 can handle the sensor polling load easily at a 5-minute interval, but the particulate sensor and CO2 sensor may need warm-up time and periodic continuous operation for stable readings.
  • For a solar/battery design, the power system must support peak current from WiFi transmit bursts plus the PM sensor and CO2 sensor; do not size the battery only from average current.
  • If you use a microphone module, keep the analog or PDM routing away from the PM sensor and WiFi antenna area to reduce noise pickup.

You'll Also Need

  • Solar panel / solar cell
  • Single-cell Li-ion or LiPo battery
  • Battery protection circuit if not built into the cell
  • Charge controller / power-path IC implementation
  • Voltage regulation for any 5 V-only modules, if used
  • Enclosure with airflow path for PM and gas sensors
  • Dust inlet, mesh, or acoustic porting for the microphone
  • Connectors, headers, wiring, and mounting hardware
  • PCB or prototyping baseboard
  • Calibration and firmware for sound-level conversion and air-quality compensation
Estimated BOM Cost: $165-185 (based on live distributor pricing)
Add to Digi-Key Cart

Design Considerations

Power Budget
This is the hardest part of a solar node. The ESP32 can sleep very well, but WiFi bursts, the SPS30, and the SCD41 can dominate the energy budget; a realistic design should assume tens to hundreds of mA during active windows and only a few mA or less in sleep. If you truly sample every 5 minutes, wake the system, power sensors only when needed, take readings, upload, then return to deep sleep; otherwise the battery will be much larger than expected.
Sensor Warm-Up and Duty Cycling
The SPS30 and CO2 sensor are not instant-on parts in the same way a temperature sensor is. CO2 and VOC readings are much more useful if you allow the sensors to stabilize and follow the vendor's recommended measurement cadence. For a 5-minute interval, consider keeping the air-quality sensors in a low-duty standby mode rather than fully power-cycling them every time, especially if you care about repeatability.
Sound Measurement Reality
A MEMS microphone gives you sound level trends, not a calibrated decibel meter by default. If the goal is relative noise monitoring, the MP34DT05TR-A is fine; if you need actual dBA accuracy, you will need calibration, frequency weighting, and likely a better acoustic/mechanical design. The enclosure opening and microphone placement matter a lot because wind, vibration, and airflow from the PM sensor can corrupt readings.
Airflow and Mechanical Layout
PM and gas sensors need real airflow and a sensible enclosure path, but they should not be exposed to direct sunlight, water ingress, or stagnant dead zones. Keep the PM inlet away from the microphone port and away from the WiFi antenna region to reduce acoustic and RF interference. In practice, enclosure geometry often changes measured PM more than the electronics do.
Firmware Architecture
Use a state machine with separate phases for wake, sensor stabilization, measurement, WiFi connect, upload, and sleep. Add a watchdog and a timeout for each sensor so one failed peripheral does not block the whole 5-minute cycle. Also store the last good reading locally in RAM or flash so you can detect sensor dropouts and recover gracefully after resets.
Validation and Calibration
Validate each sensor independently before integrating the full system. Compare the SCD41 against a known-good reference in a stable indoor environment, and check the SPS30 against a known dust source or a reference monitor if possible. For the microphone, verify that your firmware's level metric tracks expected changes in a quiet room versus a known noise source, because enclosure and gain settings can dominate the result.

Want to customize this project or build something different?

Try the Project Advisor