Measuring Particulate Pollution With The ESP32

Air pollution isn’t just about the unsightly haze in major cities. It can also pose a major health risk, particularly to those with vulnerable respiratory systems. A major part of hazardous pollution is particulate matter, tiny solid particles suspended in the air. Particulate pollution levels are of great interest to health authorities worldwide, and [niriho] decided to build a monitoring rig of their own.

Particulate matter is measured by an SDS011 particulate matter sensor. This device contains a laser, and detects light scattered by airborne particles in order to determine the level of particulate pollution in PM2.5 and PM10 ranges. The build makes use of an ESP32 as the brains of the operation, chosen for its onboard networking hardware. This makes remotely monitoring the system easy. Data is then uploaded to a Cacti instance, which handles logging and graphing of the data.

For those concerned about air quality, or those who are distrustful of official government numbers, this build is a great way to get a clear read on pollution in the local area. You might even consider becoming a part of a wider monitoring network!

Monitor The Pollution On Your Commute

Commuting through the urban sprawl of a 21st century city brings exposure to significant quantities of pollution. For a Medway Makers member that meant the Isle of Dogs, London, and a drive through the Blackwall Tunnel under the Thames. When you can taste the pollution in the air it’s evident that this isn’t the best environment to be in, but just how bad is it? Time to put together an environmental monitoring and recording rig.

Into the build went an ESP32 module, an SPS30 particulate sensor, an MH-Z19 CO₂ sensor, an HTU21D temperature and humidity sensor, and a uBlox NEO 6M GPS module. The eventual plan is to add an SD card for data logging, but in the absence of that it connects to a Raspberry Pi running Grafana over InfluxDB for data analysis. The result provides a surprising insight into the environmental quality of not just a commute but of indoor life. We’re sorry to say that they don’t seem to have posted any of the code involved onto the Medway Makers writeup, though we hope that’s an oversight they’ll rectify by the time this has gone live.

This isn’t the first environmental monitor to grace these pages, indeed we’ve had quite a few as Hackaday Prize entries.

The Electric Imp Sniffs Out California Wildfires

The wildfires in California are now officially the largest the state has ever seen. Over 50,000 people have been displaced from their homes, hundreds are missing, and the cost in property damage will surely be measured in the billions of dollars when all is said and done. With a disaster of this scale just the immediate effects are difficult to conceptualize, to say nothing of the collateral damage.

While not suggesting their situation is comparable to those who’ve lost their homes or families, Electric Imp CEO [Hugo Fiennes] has recently made a post on their blog calling attention to the air quality issues they’re seeing at their offices in Los Altos. To quantify the problem so that employees with respiratory issues would know the conditions before they came into work, they quickly hacked together a method for displaying particulate counts in their Slack server.

The key to the system is one of the laser particle sensors that we’re starting to see more of thanks to a fairly recent price drop on the technology. A small fan pulls air to be tested into the device, where a very sensitive optical sensor detects the light reflected by particles as they pass through the laser beam. The device reports not only how many particles are passing through it, but how large they are. The version of the sensor [Hugo] links to in his blog post includes an adapter board to make it easier to connect to your favorite microcontroller, but we’ve previously seen DIY builds which accomplish the same goal.

[Hugo] then goes on to provide firmware for the Electric Imp board that reads the current particulate counts from the sensor and creates a simple web page that can be viewed from anywhere in the world to see real-time conditions at the office. From there, this data can be plugged into a Slack webhook which will provide an instantaneous air quality reading anytime a user types “air” into the channel.

We’ve covered a number of air quality sensors over the years, and it doesn’t look like they’re going to become any less prevalent as time goes on. If anything, we’re seeing a trend towards networks of distributed pollution sensors so that citizens can collect their own data on their air they’re breathing.

[Thanks to DillonMCU for the tip.]

Hacking The ZH03B Laser Particle Sensor

Laser particle detectors are a high-tech way for quantifying whats floating around in the air. With a fan, a laser, and a sensitive photodetector, they can measure smoke and other particulates in real-time. Surprisingly, they are also fairly cheap, going for less than $20 USD on some import sites. They just need a bit of encouragement to do our bidding.

[Dave Thompson] picked up a ZH03B recently and wanted to get it working with his favorite sensor platform, Mycodo. With a sprinkling of hardware and software, he was able to get these cheap laser particle sensors working on his Raspberry Pi, and his work was ultimately incorporated upstream into Mycodo. Truly living the open source dream.

The ZH03B has PWM and UART output modes, but [Dave] focused his attention on UART. With the addition of a CP2102 USB-UART adapter, he was able to connect it to his Pi and Mac, but still needed to figure out what it was saying. He eventually came up with some Python code that lets you use the sensor both as part of a larger network or service like Mycodo and as a stand-alone device.

His basic Python script (currently only tested on Linux and OS X), loops continuously and gives a running output of the PM1, PM2.5, and PM10 measurements. These correspond to particles with a diameter of 1, 2.5, and 10 micrometers respectively. If you want to plug the sensor into another service, the Python library is a bit more mature and lets you do things like turn off the ZH03B’s fan to save power.

These sensors are getting cheap enough that you can build distributed networks of them, a big breakthrough for crowd-sourced environmental monitoring; especially with hackers writing open source code to support them.

Air Quality Readings At A Glance

Since the industrial age, air pollution has increasingly become a problem on society’s radar. Outside of concerns about global warming and greenhouse gases, particulate emissions can be highly hazardous to human health. Over time, various organizations have set up measuring systems to check and report the particulate pollution level in cities around the world – but what if you could get an immediate idea on the pollution in your immediate vicinity? Enter less-smog.org.

The prototype under test.

In an integration sense, it’s a straightforward project. An ESP-12F is used as the brains behind the operation. This then talks to a combination of sensors to measure the local air quality. The system is set up to use a variety of temperature or humidity sensors depending on what the builder has to hand. As for particulate concentration measurements, those are achieved with the use of a PMS7003 sensor. This device shines a laser into a cavity containing an air sample from the surrounding environment and measures the scattered light to determine the concentration of particles in the PM2.5 range. This is the range most commonly used to make judgments on air quality regarding human health.

Data is collected and then output to a series of bright RGB LEDs. By turning the numerical PM2.5 reading into a color output, it becomes much simpler to get an instant idea of the pollution conditions in the immediate area. This has the benefit of being readable by even very young children, or those with poor eyesight, at the cost of leaving the colorblind and otherwise vision impaired at a loss.

The project presents a tidy way to create a series of indicators in a modern public environment that can give the average person an at-a-glance reading of whether its advisable to stay out or to head inside until conditions improve. We’d love to see this project deployed in cities to both collect data and help people gain a better understanding of the air quality around them.

Distributed Air Quality Monitoring Via Taxi Fleet

When [James] moved to Lima, Peru, he brought his jogging habit with him. His morning jaunts to the coast involve crossing a few busy streets that are often occupied by old, smoke-belching diesel trucks. [James] noticed that his throat would tickle a bit when he got back home. A recent study linking air pollution to dementia risk made him wonder how cities could monitor air quality on a street-by-street basis, rather than relying on a few scattered stations. Lima has a lot of taxis, so why wire them up with sensors and monitor the air quality in real-time?

This taxi data logger’s chief purpose is collect airborne particulate counts and illustrate the pollution level with a Google Maps overlay. [James] used a light-scattering particle sensor and a Raspi 3 to send the data to the cloud via Android Things. Since the Pi only has one native UART, [James] used it for the particle sensor and connected the data-heavy GPS module through an FTDI serial adapter. There’s also a GPS to locate the cab and a temperature/humidity/pressure sensor to get a fuller environmental picture.

Take a ride past the break to go on the walk through, and stick around for the testing video if you want to drive around Lima for a bit. Interested in monitoring your own personal air quality? Here’s a DIY version that uses a dust sensor.

Continue reading “Distributed Air Quality Monitoring Via Taxi Fleet”

Hackaday Prize Entry: Volturnus ROV Rules The River

Water is kind of like information: both are a vital part of life and are found all around us. But not all water or information is healthy. Much of it may look harmless, but is actually polluted. A staggering number of people in the world have no access to fresh, clean water. ROVs can collect samples and detect pollution, but commercial types are way too expensive for the legions of people who need them.

UV light reveals the presence of optical brightening agents in a sample of lake water.

[allai5] wants to be the catalyst for change. She’s the president of Rogue Robotics, a group of high school students throughout central New Jersey who have pooled their talents to design and build a simple, open-source ROV that’s affordable, repeatable, and environmentally friendly. The team uses Volturnus ROV to collect water samples and UV light to determine the presence of a general type of pollutant known as optical brightening agents (OBAs). This is the stuff they add to laundry detergents and copy paper to whiten the fibers’ appearance. By design, OBAs fluoresce brightly under UV light. After soaking a cotton pad in water sample, it’s easy to see if OBAs are present.

At 12″ x 12″ x 18″, Volturnus ROV is compact enough to explore most of the nooks and crannies of any body of water. It moves under the power of three thrusters—500 GPH bilge pump motors driven by a pair of L298N controllers—and is controlled by an Arduino Mega using a wireless joystick. The driver of the ROV navigates the drink through the eyes of a waterproof car back-up camera whose feed is flipped with a Python script.

Volturnus ROV is not a one-stop solution for dealing with marine pollution. The team would like to add filtration in the future and move the electronics to the bottom so it can go faster. Rogue Robotics’ aim has always been to make an ROV that does a few things well. Right now, it’s an excellent jumping-off point for awareness and blueprint for action. Find your inspiration after the break.

Continue reading “Hackaday Prize Entry: Volturnus ROV Rules The River”