What you'll build
A small weather and indoor-air monitor: temperature, humidity, pressure and air quality indoors from a BME680, plus the temperature outside from a waterproof probe if you want it, logged over Wi-Fi to a dashboard such as Home Assistant or Grafana.
- Difficulty
- Intermediate
- Build time
- 2–3 hours, including a little soldering
- Parts
- 9 parts to choose
Build total
$121.47
Shopping list
One recommended part for each job, checked against the others. Swap any of them, or skip what you already own.
We changed the build to keep it working
- Storage: not needed, because the Raspberry Pi Pico 2WH provides somewhere to keep the program.
-
See all Raspberry Pi Boards
Board Required
A Raspberry Pi Zero with headers fitted runs Linux and Python. A Pico 2 WH runs MicroPython and uses far less power. Both have Wi-Fi.
- Note: The Raspberry Pi Zero 2 WH - with soldered headers we recommend is out of stock, so the build uses the Raspberry Pi Pico 2WH ($19.41 less).
-
See all Power Supplies
Power Required
Both the Zero and the Pico take micro-USB power; this 2.5A supply has plenty in hand.
-
See all Storage
Storage Required
A Raspberry Pi Zero runs from a microSD card; this one has Raspberry Pi OS on it already. A Pico keeps its program in its own flash, so it needs no card.
-
Indoor sensor Required
The BME680 measures temperature, humidity, pressure and air quality (from volatile organic compounds) over I²C. Its header comes loose, so this is the step that needs a soldering iron.
-
Outdoor probe Optional
A waterproof DS18B20 temperature probe on a 90cm lead, to put outside in the shade. It needs a 4.7kΩ resistor, below.
-
Probe resistor Optional
The probe's data wire needs a 4.7kΩ pull-up to 3.3V. This assortment has twenty.
-
Breadboard Optional
Holds the probe's wires and the resistor, and for the Pico build the Pico and the BME680 as well.
-
See all Prototyping & components
Jumper wires Optional
Male-to-female wires run from the Pi's header to the breadboard; male-to-male link points on the breadboard.
-
See all Cases
Case Optional
A clear Zero case that leaves the GPIO header open, so the BME680 still plugs on.
- Check: Not checked: the Clear Raspberry Pi Zero case with GPIO space isn't listed for Raspberry Pi Pico.
Your build
Pi Zero: indoors and outside · Raspberry Pi Pico 2WH
- Raspberry Pi Pico 2WH $15.44
- Raspberry Pi Power Supply (5V 2.5 Amp) $20.18
- Storagein the Raspberry Pi Pico 2WH
- BME680 Breakout - Air Quality, Temperature, Pressure, Humidity Sensor $48.55
- Waterproof DS18B20 Sensor Kit $10.65
- 600 pack of Resistors! $11.70
- 840-Point Breadboard $6.20
- 40 Pin Jumper Wire 15cm / M/F $5.10
- Clear Raspberry Pi Zero case with GPIO space $3.65
Worth checking
- Not checked: the Clear Raspberry Pi Zero case with GPIO space isn't listed for Raspberry Pi Pico.
Fits are checked against the makers' documentation and our own case records. Anything we haven't confirmed says “Not checked”.
Link to this build: bookmark or share it to come back to these choices.
8 parts
$121.47
How the build goes
For the parts in your shopping list. Change a part and these change with it.
-
Put MicroPython on the Pico
Hold BOOTSEL while you plug the Pico into your computer, then copy the MicroPython firmware for your board (Pico 2 W or Pico W) onto the drive that appears. Our MicroPython guide walks through it with Thonny.
It worked if Thonny's shell shows the MicroPython prompt (>>>).
-
Wire it on the breadboard
Push the Pico and the BME680 (with its straight header soldered on) into the breadboard. Join the BME680's power to the Pico's 3V3(OUT) (pin 36), ground to pin 38, SDA to GP4 (pin 6) and SCL to GP5 (pin 7).
It worked if In Thonny, machine.I2C(0).scan() returns [118] (0x76).
-
Wire the probe
Join the probe's red wire to 3V3(OUT) (pin 36), black to ground and yellow to GP22 (pin 29), with the 4.7kΩ resistor between yellow and red.
It worked if ds18x20.DS18X20(onewire.OneWire(machine.Pin(22))).scan() lists one sensor.
-
Read and send the readings
Save a main.py that reads the BME680 (Pimoroni lists Pico libraries for it) and the probe with the built-in onewire and ds18x20 modules, joins your Wi-Fi and sends the readings every minute, for example over MQTT with umqtt.simple. It runs every time the Pico powers up.
-
Chart the readings
Send them to Home Assistant over MQTT, or to InfluxDB and chart them in Grafana. Leave the indoor sensor away from the board's own warmth for the truest temperature.
Guides for this build
Questions
Can the board go outside?
Keep the board indoors or in a sealed enclosure, and run only the waterproof probe outside. Direct sun on any sensor gives readings that are far too high.
Zero or Pico?
The Zero runs Linux, so it can keep its own history, run a database or serve a dashboard itself. The Pico uses far less power and has nothing to update, but sends its readings to something else to store and chart.
More for this build
Fits Raspberry Pi PicoBME680 Breakout - Air Quality, Temperature, Pressure, Humidity Sensor
SKU: PR-PIM357 | Brand: Pimoroni
The state-of-the-art BME680 breakout measures temperature, pressure, humidity, and indoor air quality. Its gas resistance readings react to changes in volatile organic compounds (VOCs) and can be combined with humidit...
Delivered by Wed 9 Dec
Waterproof DS18B20 Sensor Kit
SKU: DF-DFR0198 | Brand: Adafruit
A waterproof digital temperature sensor based on the popular DS18B20 chip. The stainless steel probe can be submerged in liquids or placed in harsh environments, making it ideal for monitoring aquariums, brewing, weat...
Delivered by Wed 9 Dec
Inky Frame 4.0" (Pico W Aboard) – Inky Frame + Accessory Kit
SKU: PR-PIM661 | Brand: Pimoroni
A compact 4" seven-colour E Ink photo frame and dashboard powered by Raspberry Pi Pico W. Features a vibrant 640×400 pixel ACeP display showing black, white, red, green, blue, yellow, and orange with ultra-wide viewin...
Delivered by Wed 9 Dec
Raspberry Pi Pico 2W
SKU: RP-SC1633 | Brand: Raspberry Pi
The Raspberry Pi Pico 2W brings wireless connectivity to the RP2350 platform, combining the power of a dual-core processor with built-in Wi-Fi and Bluetooth 5.2. Build connected IoT devices, wireless sensors, and smar...
Delivered by Wed 9 Dec
Raspberry Pi Pico 2WH
SKU: RP-SC1633-2WH | Brand: Raspberry Pi
The Raspberry Pi Pico 2 WH combines the powerful RP2350 microcontroller with built-in Wi-Fi and Bluetooth connectivity, plus pre-soldered headers for immediate breadboard use. It's the most capable Pico yet, ready for...
Delivered by Wed 9 Dec