Uploaded September 2019 | Updated September 2026, 51 minutes ago
I built a DIY air pollution sensor from a Raspberry Pi. Here's how you can, too!
Also, check out our video on how air sensor tech is changing how we see pollution in cities here:
youtube.com/watch?v=s_Rf7PHjdxI
Shopping list:
Raspberry Pi Zero WH (cuts out the hammering step)
adafruit.com/product/3708
Pimoroni Enviro+ pHat
shop.pimoroni.com/products/enviro-plus
PMS5003 Particulate Matter Sensor
shop.pimoroni.com/products/pms5003-particulate-matter-sensor-with-cable
Accessories:
pHat standoff screws are helpful for supporting your pHat, so it doesn't bend the pins:
adafruit.com/product/2337?gclid=EAIaIQobChMIjrnYofC35AIVmMVkCh33kQgEEAQYAiABEgJcFvD_BwE
If you're not buying the pre-soldered pin connector, a solderless pin connector and hammer jig is an easy alternative. This is what was used in the video:
adafruit.com/product/3413?gclid=EAIaIQobChMIhsaQhfC35AIVicpkCh0DnQjjEAQYAiABEgLwhfD_BwE
And if you're just getting started with Raspberry Pi, you'll need some basic accessories to get set up. This can vary, based on how much you want to spend and personal preferences. Here's a helpful guide on things you'll need to get started:
projects.raspberrypi.org/en/projects/raspberry-pi-setting-up
Instructions:
I used Pimoroni's instruction manual for this build. You can find that here:
learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-plus
And if you have any questions, you could check out Pimoroni's help forum:
forums.pimoroni.com/c/support
And, as promised, here's what I typed in the terminal:
Installing the Python library from Pimoroni:
Once you've got your sensor put together, boot it up and type this into the terminal:
"git clone github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh"
Running the Python script:
Once everything's downloaded, you'll want to run the "All in One" example in the Python library. You'll do that by typing the address of that file into the terminal. For me, that was:
"/home/pi/enviroplus-python/examples/all-in-one.py"
But this might vary based on where you store your python library file.
Once the program is running, the sensor data should display on the tiny LCD screen on the pHat. You can tap the little light sensor and it will toggle through all the different sensor outputs until you get to particulate matter.
Thanks for watching!
-Jesse
#diy #airsensor #howto #airpollution #raspberrypi #airquality #smoke #airquality #AQI
I built a DIY air pollution sensor from a Raspberry Pi. Here's how you can, too!
Also, check out our video on how air sensor tech is changing how we see pollution in cities here:
youtube.com/watch?v=s_Rf7PHjdxI
Shopping list:
Raspberry Pi Zero WH (cuts out the hammering step)
adafruit.com/product/3708
Pimoroni Enviro+ pHat
shop.pimoroni.com/products/enviro-plus
PMS5003 Particulate Matter Sensor
shop.pimoroni.com/products/pms5003-particulate-matter-sensor-with-cable
Accessories:
pHat standoff screws are helpful for supporting your pHat, so it doesn't bend the pins:
adafruit.com/product/2337?gclid=EAIaIQobChMIjrnYofC35AIVmMVkCh33kQgEEAQYAiABEgJcFvD_BwE
If you're not buying the pre-soldered pin connector, a solderless pin connector and hammer jig is an easy alternative. This is what was used in the video:
adafruit.com/product/3413?gclid=EAIaIQobChMIhsaQhfC35AIVicpkCh0DnQjjEAQYAiABEgLwhfD_BwE
And if you're just getting started with Raspberry Pi, you'll need some basic accessories to get set up. This can vary, based on how much you want to spend and personal preferences. Here's a helpful guide on things you'll need to get started:
projects.raspberrypi.org/en/projects/raspberry-pi-setting-up
Instructions:
I used Pimoroni's instruction manual for this build. You can find that here:
learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-plus
And if you have any questions, you could check out Pimoroni's help forum:
forums.pimoroni.com/c/support
And, as promised, here's what I typed in the terminal:
Installing the Python library from Pimoroni:
Once you've got your sensor put together, boot it up and type this into the terminal:
"git clone github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh"
Running the Python script:
Once everything's downloaded, you'll want to run the "All in One" example in the Python library. You'll do that by typing the address of that file into the terminal. For me, that was:
"/home/pi/enviroplus-python/examples/all-in-one.py"
But this might vary based on where you store your python library file.
Once the program is running, the sensor data should display on the tiny LCD screen on the pHat. You can tap the little light sensor and it will toggle through all the different sensor outputs until you get to particulate matter.
Thanks for watching!
-Jesse
#diy #airsensor #howto #airpollution #raspberrypi #airquality #smoke #airquality #AQI


![What happens to traffic when you tear down a freeway?
The compelling case for removing urban freeways.
Further Reading:
CityLab University: Induced Demand:
https://www.citylab.com/transportation/2018/09/citylab-university-induced-demand/569455/
Norman Garrick in Citylab:
https://www.citylab.com/transportation/2016/11/reimagining-the-urban-freeway-holding-back-providence/508373/
Vox: How Highways Wrecked Urban American Cities
https://www.youtube.com/watch?v=odF4GSX1y3c
Congress for New Urbanism – Highways to Boulevards
https://www.cnu.org/resources/project-database?tags[182]=182
Harbor Drive
https://www.cnu.org/highways-boulevards/model-cities/portland
Embarcadero Freeway
https://www.cnu.org/what-we-do/build-great-places/embarcadero-freeway
Governor Tom McCall – Oregon Historical Society:
https://www.ohs.org/education/tom-mccall-better-oregon/resources.cfm
Law of Peak Hour Expressway Congestion
https://babel.hathitrust.org/cgi/pt?id=uc1.$b3477;view=1up;seq=467
“From elevated freeways to surface boulevards: neighborhood and housing price impacts in San Francisco” by Robert Cervero , et al.
https://rsa.tandfonline.com/doi/full/10.1080/17549170902833899?scroll=top&needAccess=true What happens to traffic when you tear down a freeway?](https://i.ytimg.com/vi/O6WtYTThkdU/mqdefault.jpg)







