For the individual assignment, I designed and fabricated a custom PCB sensor shield for the Raspberry Pi Pico 2W. The Pico plugs directly onto the board, and the shield breaks out connections to multiple sensors. This is a dual-sided board.
Pico Sensor Shield Design
I designed the shield in KiCad. The Pico 2W sits on top via pin headers, and the shield routes power and data lines to sensor breakout connectors around the board. The shield features:
- 2× I2C ports — for sensors like the SHT45 and displays
- 3× Analog ports — for analog sensors
- 3× Digital ports — for digital I/O
- 2× UART ports — for serial communication
- SPI support
- 3.3V / 5V selectable power — switch between voltage levels depending on the sensor
- Battery input — for portable/field deployment
Pico sensor shield PCB layout in KiCad
Pico sensor shield — KiCad 3D board viewer
Sensor — Adafruit SHT45 with PTFE Membrane
For the input device, I'm using the Adafruit Sensirion SHT45 precision temperature and humidity sensor with a PTFE filter membrane. I bought 4 of these sensors for use across the Smart Beehive project. The PTFE membrane makes them suitable for high-humidity environments like the inside of a beehive — it protects the sensor element from water and contaminants while still allowing accurate readings.
Adafruit Sensirion SHT45 precision temperature & humidity sensor with PTFE membrane
SHT45 Specifications
- Interface: I2C
- Temperature accuracy: ±0.1°C
- Humidity accuracy: ±1% RH
- PTFE membrane: Protects against water, dust, and contaminants
- Voltage: 3.3V
- Quantity purchased: 4 (for multi-sensor hive monitoring)
Scaling — Multiple SHT45 Sensors
The SHT45 has a fixed I2C address of 0x44, which means you can only connect one per I2C bus. My shield has 2 I2C ports — if they're on separate I2C buses (the Pico 2W has two hardware I2C peripherals, I2C0 and I2C1), that gives me 2 SHT45 sensors max without additional hardware.
Since I bought 4 sensors for the Smart Beehive project, I'll need an I2C multiplexer in the future to connect all of them. A TCA9548A multiplexer sits on one I2C bus and provides 8 switchable channels — each channel is its own isolated I2C bus, so multiple sensors with the same address can coexist without conflicting. For now, I'm working with 1–2 sensors directly on the shield's I2C headers, and I'll add the multiplexer later when I integrate all 4 sensors into the hive.
Final Project Integration
These sensors are a key part of the Smart Beehive project. The plan is to place multiple SHT45 sensors at different locations inside and outside the hive to monitor temperature and humidity gradients. The Pico 2W on the sensor shield will read all the sensors over I2C and relay the data to the Raspberry Pi 5 for logging and display. See the Final Project page for more details.
Code — Reading the SHT45 Sensor
This CircuitPython script reads temperature and humidity from the SHT45 over I2C and prints the values to the serial console every 2 seconds. The SHT45 uses I2C address 0x44 by default. You'll need the adafruit_sht4x library installed on the Pico.
Required libraries: Copy these to the lib/ folder on the Pico's CIRCUITPY drive:
adafruit_sht4x.mpyadafruit_bus_device/(folder)
Download them from the CircuitPython Library Bundle.
# code.py — SHT45 Sensor Reading (Week 9: Input Devices)
# Reads temperature (°C) and humidity (% RH) from the SHT45
# sensor over I2C and prints to serial console every 2 seconds.
import time
import board
import busio
import adafruit_sht4x
# Set up I2C on the Pico's default I2C pins
# GP4 = SDA, GP5 = SCL (adjust if your shield uses different pins)
i2c = busio.I2C(scl=board.GP5, sda=board.GP4)
# Initialize the SHT45 sensor
sht = adafruit_sht4x.SHT4x(i2c)
# Use high precision mode for best accuracy
sht.mode = adafruit_sht4x.Mode.NOHEAT_HIGHPRECISION
print("SHT45 Sensor — Reading temperature and humidity")
print("-" * 40)
while True:
temperature, humidity = sht.measurements
print(f"Temp: {temperature:.1f} °C | Humidity: {humidity:.1f} % RH")
time.sleep(2)
How the Code Works
- I2C setup: Initializes the I2C bus on GP4 (SDA) and GP5 (SCL) — these are the default I2C pins on the Pico and should match the header on the sensor shield.
- Sensor init: Creates an SHT4x object which communicates with the SHT45 at its default I2C address (0x44).
- Precision mode: Sets the sensor to high-precision mode with no heater — this gives ±0.1°C temperature and ±1% RH humidity accuracy.
- Read loop: Every 2 seconds, calls
sht.measurementswhich returns a tuple of (temperature, humidity) and prints both values to the serial console.