pi-enviro with the Enviro+ hat for Raspberry Pi

A couple of weeks ago I was looking for an interesting Raspberry Pi project and, separately, into air-quality testing - and came across the Pimoroni Enviro+ HAT. Which is great! I'm reasonable with Python and Raspberry Pi, so I wanted to see what I could do with the two of them for fun. Well, my version of fun anyway.

Top-down product photo of the Pimoroni Enviro+ HAT for Raspberry Pi on a dark surface, every sensor labelled on the silkscreen - BME280, light, noise, gas and PM - with a small OLED display switched on showing a temperature reading and graph

Contents: 1. Ordering & unpacking 2. Setup 3. Outdoor enclosure 4. Review: good, bad and ugly (I have the saying in my head at the moment)

1. Ordering & unpacking

Unboxing shot of a hand holding open a cardboard shipping box with crumpled brown packing paper pulled aside to reveal the small green Enviro+ HAT board inside, on a dark tabletop

I put the order in directly from the Pimoroni shop - they're in the United Kingdom - and got the package a week or two later in Brisbane, Queensland. It comes in cute packaging, and all the instructions are online, which I like to see these days since it means they can keep it up to date.

2. Setup

You have to put all the pieces together, which is handy if you already have a Raspberry Pi Zero W. Assuming you have a fresh install of Raspberry Pi OS, the setup should be pretty easy - and I won't repeat what the good people at Pimoroni have in their getting-started guide.

The three parts of the Enviro+ kit laid side by side on a dark grey work surface - a blue external sensor module, a white LCD display board connected by a red ribbon cable, and the green HAT board with its black heat sink and row of pin headers

If you have the Particulate Matter sensor, then I'd urge you to do the extra setup with Luftdaten too - it's a great open-source project for collecting air-quality data from around the world. If you're up to here, we can install some extra software if you like: it runs luftdaten_combined.py as well as some sauce on top, including logging data to a database and auto-updating.

curl -LJO https://raw.githubusercontent.com/LukeKeam/pi-enviro/master/install.sh && sudo sh ./install.sh

When you first start it up, it's going to take 10+ minutes for some of the sensors to find their bearings and get better data.

3. Outdoor enclosure

A DIY outdoor enclosure - a translucent plastic lidded box with blue snap latches holding the Enviro+ sensor board, sitting on a garden table in daylight with green foliage and a wooden fence in the background

I made an outdoor enclosure for it, which is just a plastic food container with a hole in the bottom. It does need a bit more ventilation for outdoor use - a good one is on the Pimoroni site. I had it hooked up to a battery pack which lasted for a couple of days. As this is testing, I didn't want to get carried away and mount it outside yet; I have lots of testing to do inside first.

4. Review: good, bad and ugly

Good - loving: - Great looking hardware - Great LCD displays! - Easy setup guide from the Pimoroni site with a rundown on how things work (the getting-started guide) - Sample code on GitHub - I also made a GitHub page that edits luftdaten_combined.py and sends data to a local SQLite DB. Feel free to contribute - Very low power usage

The Enviro+ HAT resting at an angle on a dark wooden table, powered up with its blue-backlit LCD switched on showing live readings - temperature, pressure, humidity, light, noise and pH

Bad - could work on: - Can be overwhelming for someone with no coding skills to get stored data or know what to do next - The sensors could have some better suggested ranges and better readings. I know this is a very, very hard task! As you'll get different readings for different altitudes, devices, cases, temperatures, etc. - FYI: "tap the button" means tap the light sensor! Found that out by accident - Mic code not integrated yet - looks like they're testing it on GitHub though

Super fun and cool project. Hope we can iron out the little things that aren't working properly yet.


Luke Keam
Spot a bug or want a custom utility built? I'd love to hear from you. Get in touch
Luke Keam | techgeek.biz