Field Wiring & Pinmap · Leak Detection Node
Standard wiring diagram for connecting the e-con 5C-08 resistive leak sensor to GPIO17 (physical pin 11). Pi-A (sensor_id=1 · Site 1 · Server Room) and Pi-C (sensor_id=3 · Site 3 · New) are common nodes with identical wiring.
| Signal | BCM | Physical Pin | Notes |
|---|---|---|---|
| Signal Sensor signal line | GPIO17 | Pin 11 | Sensor signal input. Connect an external 4.7MΩ pull-down between Pin 11 ↔ GND. |
| Power Sensor power 3.3V | 3V3 | Pin 1 | Sensor VCC supply. (Spare 3V3 = Pin 17) |
| Ground Sensor GND | GND | Pin 6 | Alternatives: any GND among Pin 9 / 14 / 20 / 25 / 30 / 34 / 39. |
| Expansion Additional sensor example | GPIO27 | Pin 13 | Optional. Add by BCM number to SENSORS in config.py. |
| Expansion Additional sensor example | GPIO22 | Pin 15 | Optional. Add the same way as above (each channel needs its own external pull-down). |
If you enable the internal 50kΩ pull-down, the ~1.5MΩ high-impedance sensor cannot pull the GPIO HIGH, so leaks will not be detected (detection failure). Always turn the internal pull off with PUD_OFF and use only the external 4.7MΩ pull-down. (USE_INTERNAL_PULL = False)
ACTIVE_LOW = False → when dry GPIO=LOW(0), on leak GPIO=HIGH(1).
Connect a 4.7MΩ resistor between GPIO17 (Pin 11) ↔ GND. Essential for the high-impedance sensor.
USE_INTERNAL_PULL = False — keep the internal pull at PUD_OFF.
DEBOUNCE_MS = 500 — set generously given the high-impedance behavior.
Electrical parameters live in raspberry_pi4/config.py (SENSORS · ACTIVE_LOW · USE_INTERNAL_PULL · DEBOUNCE_MS). Per-device sensor_id / location is in config_local.py (Pi-A = id 1 · Site 1 · Server Room / Pi-C = id 3 · Site 3 · New).
The Raspberry Pi 4 uses a 15-pin (1.0mm pitch) standard CSI connector. The Zero 2 W uses 22-pin (0.5mm), so its ribbon and camera board are incompatible → you need a 15-pin ribbon for the Pi 4 or a 15↔22 conversion adapter. Capture with rpicam-still (Bookworm) / libcamera-still (Bullseye), 640×480 JPEG.