Hardware
Supported Sensors
Raspi-Sump works with the HC-SR04 ultrasonic distance sensor and compatible variants. For sump pit use, the JSN-SR04T v2.0 waterproof version is strongly recommended.
| Sensor | Notes |
|---|---|
| HC-SR04 | Standard sensor, not waterproof |
| JSN-SR04T v2.0 | Waterproof, recommended for sump pit use |
| JSN-SR04T v3.0 | Not compatible — different protocol |
JSN-SR04T v3.0 — Do not use
Version 3.0 uses a different communication protocol and is not compatible with Raspi-Sump. Verify the version before purchasing.
Voltage Divider Requirement
The HC-SR04 and JSN-SR04T sensors operate at 5V and return a 5V signal on the echo pin. The Raspberry Pi GPIO pins are 3.3V tolerant only — a 5V echo signal connected directly will damage your Pi.
A voltage divider on the echo pin is required to reduce the signal to 3.3V.
Simple Two-Resistor Divider

A 470 Ohm and 1K Ohn resitor divides the 5V echo signal to approximately 3.3V.
A 1K Ohm and 2K Ohm would accomplish the same things. There are many online voltage divider calculators you can use to test various settings.
Real world example

The 470 Ohm resister is on top and the 1K resistor is on the bot tom. The wires to the right go to the Pi and the ones to the left go to the sensor. The orange wire is the Echo wire and you can see it is connected right at the center of the two connected resistors. The yellow wire goes to Ground on the Pi.
There are plenty of diagrams online explaining voltage dividers, but this picture provided by github user @rhiller was very helpful to see in practice.
GPIO Wiring
Any available GPIO pins can be used for trig and echo. The defaults are:
| Signal | Default GPIO | Pi Header Pin |
|---|---|---|
| Trig | 17 | Pin 11 |
| Echo | 27 | Pin 13 |
| VCC (5V) | — | Pin 2 or 4 |
| GND | — | Pin 6 |
BCM numbering
Raspi-Sump uses BCM GPIO numbering, not the physical pin numbers printed
on the Pi header. Set your chosen pins in raspisump.conf under
[gpio_pins].
Tip - Use pinsource to test your sensor
Test your sensor with the pinsource utility;
pinsource -t 17 -e 27
Sensor Placement
- Mount the sensor at the top of the sump pit, facing downward
- Set
pit_depthinraspisump.confto the distance from the sensor face to the bottom of the pit - Ensure the sensor has a clear line of sight to the water surface — avoid mounting near pipes or walls that could cause false reflections
- The JSN-SR04T v2.0 has a minimum sensing distance of approximately 20cm — do not mount closer than this to the maximum expected water level
Recommended Raspberry Pi Models
Raspi-Sump runs on any Raspberry Pi 2 or greater with Raspberry Pi OS Bookworm (v12) or Trixie (v13).