Build a Raspberry Pi Air Quality & Weather Station with InfluxDB & Grafana
Ever wondered how clean the air in your home or office really is? With balenaSense, you can set up a Raspberry Pi to capture temperature, humidity, barometric pressure, and air‑quality metrics, then view real‑time trends on a cloud‑based Grafana dashboard.
Building an air‑quality & weather station used to involve a lot of wiring and separate sensors, but with modern breakout boards that combine all readings into one compact module, the process is now simple and reliable.
In this guide we’ll walk you through using an all‑in‑one BME680 sensor that plugs directly into a Raspberry Pi without extra components. No electronics experience is required, though a soldering iron can help if you choose the solder‑required version.
Hardware required
Below is the essential shopping list. Your choice between solder‑free and solder‑required options determines which sensor board you’ll buy.
I don’t want to solder
For a plug‑and‑play setup you’ll need:
- Raspberry Pi Zero WH (also compatible with 2Bv1.2, 3B, 3B+, and 3A+)
- 8GB (or larger) Micro‑SD card – we recommend Sandisk Extreme Pro
- Power supply & cable
- Pimoroni BME680 sensor with breakout board
- Pimoroni breakout garden pHAT
I want to solder – let me at it!
If you’re comfortable with a bit of soldering, you’ll need:
- Raspberry Pi Zero W (also compatible with 2Bv1.2, 3B, 3B+, and 3A+)
- 8GB (or larger) Micro‑SD card – we recommend Sandisk Extreme Pro
- Power supply & cable
- Bosch BME680 sensor with breakout board (see alternatives below)
- Connection wire
Other sensors
If you already own a Sense HAT, this project also supports it – the LED matrix can display a smiley face that reflects the air‑quality status. Note: the Sense HAT lacks a gas sensor and its readings can be inaccurate due to proximity to the Raspberry Pi CPU, so we recommend the BME680 for a new build.
Here are a few BME680 breakout options:
- Pimoroni BME680 breakout – £18.50 (solder‑free with pHAT)
- Adafruit BME680 breakout – US$22.50
- Sparkfun SparkX BME680 – US$19.95 (solder‑free with HAT)
- Unbranded BME680 breakout – US$9.92
Tip: The Pimoroni board is used in this guide; it pins out the I²C bus (SDA, SCL), 3V3, and GND in the correct order for direct Raspberry Pi GPIO connection. If you use another board, double‑check pin mapping before soldering.
Software required
All software, configuration, and code are bundled in the balena‑sense project on GitHub. We deploy it via balenaCloud using a free account, which pushes the image to your Pi and gives you secure remote access.
You’ll need:
- balenaEtcher to flash the SD card
- A free balenaCloud account
- Clone or download the balena‑sense repository
1. Putting the hardware together
The hardware assembly is straightforward. Your goal is to connect the BME680 board to the Raspberry Pi’s GPIO header.
The BME680 communicates over I²C, which requires two data lines: SDA (serial data) and SCL (serial clock). It also needs power (3.3 V) and ground. If you chose a solder‑free breakout or the Sense HAT, the connectors are pre‑wired, so just plug everything together and move on.
For a solder‑required board, ensure the pins for SDA, SCL, 3V3, and GND match the Raspberry Pi’s GPIO layout. Refer to the board’s datasheet for pin assignment, and double‑check before making any solder connections.
Source: DIY Environment and Air Quality Monitor
Manufacturing process
- Build a Windows IoT Core Rover with Raspberry Pi 2 – Beginner to Advanced Guide
- Smart Indoor Air Quality & Waste Monitoring System
- Build a DIY Voltmeter with Arduino and Nokia 5110 Display – Step‑by‑Step Guide
- Build a Precise Air Quality Monitor with the Sharp GP2Y1010AU0F Sensor
- DIY Sump Level Monitor with Arduino Nano, MPXV5010DP & OLED Display
- Build an Arduino‑Based Air Quality Monitor Using the DSM501A Dust Sensor
- Build a Raspberry Pi 3 & Arduino Laptop: Step‑by‑Step Guide
- Arduino-Based Indoor Air Quality & Comfort Sensor Kit
- Build Your Own DIY Air Quality Monitor: PM2.5, CO2, VOC, Ozone, Temp & Humidity with Arduino
- 10 RoboDK & Raspberry Pi Projects for Innovative Robotics