Raspberry Pi Setup · Lesson 2 of 17
Raspberry Pi hardware for a soil moisture monitor
The GreenWise monitor reads a probe in the growing tray and shows the reading on a small screen. To build it, you need one Raspberry Pi, a Pimoroni Automation HAT Mini and a capacitive soil moisture sensor.
Match the power supply to your Pi
The HAT Mini fits a Pi with a populated 40-pin GPIO header. Check the connector on your board before choosing a power supply or display cable.
Raspberry Pi Zero 2 W
- Use a 5 V, 2.5 A micro USB supply in the port marked PWR IN.
- Choose a board with headers fitted or fit a 2 × 20 pin header before attaching the HAT. The standard Zero 2 W has empty header holes.
- Use 2.4 GHz Wi-Fi. For a local console, use mini HDMI and a micro USB OTG adapter for the keyboard.
Raspberry Pi 4 Model B
- Use a 5 V, 3 A USB-C supply.
- The board has a fitted 40-pin header and supports Wi-Fi or Ethernet.
- For a local console, use micro HDMI and a USB keyboard.
Already have a Raspberry Pi 5? It also has a 40-pin header and micro HDMI. Raspberry Pi recommends its 27 W USB-C supply, which delivers 5 V at 5 A. Use the current Pimoroni software for the HAT.
Parts for the moisture monitor
- microSD card and reader. Allow at least 8 GB for Raspberry Pi OS Lite or 32 GB for the desktop version. Use a computer with a built-in reader or a USB reader to write the card.
- Pimoroni Automation HAT Mini. This board converts the probe's analogue voltage into a reading the Pi can use. Its built-in screen displays the result.
- Capacitive soil moisture sensor and three leads. Choose a probe rated to run at 3.3 V with an analogue output (often marked AOUT). The moisture sensor lesson uses power, ground and the first analogue input on the HAT. Check the pin labels on your probe before wiring it with the Pi powered off.
When you need extra equipment
- Remote setup or uploads. Use a Wi-Fi network or wired Ethernet to reach the Pi from another computer. Internet access is needed to download software and send readings to Leftover Labs. For setup without a monitor, configure Wi-Fi and SSH in Raspberry Pi Imager.
- Setup at the Pi. Use a monitor, the HDMI cable for your Pi model and a keyboard. A mouse is optional on the desktop.
- LED exercise. Add an LED, a suitable series resistor and jumper wires only if you are following the optional LED lesson.
With the parts ready, install Raspberry Pi OS.