Hardware schematics
Wire-by-wire build reference for the door units. Raspberry Pi 4 — 40-pin header, BCM numbering. Pin 1 is the corner nearest the microSD.
Every new Sentry is wired to the Grounds pinout: strike on GPIO 18, exit button on GPIO 20, and GPIO 14/15 left free as the UART for the PN532 fob reader — so a reader can be fitted on day one or added later without moving a single wire. The fleet blueprint defaults to these pins.
- Camera rotation — Depends on how the camera is physically mounted. The Grounds is 270° (sideways) and that is unique to it; set it per device.
- Relay polarity — Depends on the relay board fitted. Check the board, then set relay_active_low per device.
- door_id / name / room — Identity, set per device.
fleet/blueprints/door.yamlThe Grounds
Door Sentry · door_id 1Fleet standard — new units copy thisThe reference build. Strike on GPIO 18 so the UART (GPIO 14/15) stays free for the PN532 fob reader, button on GPIO 20, three spare relay channels wired, and a USB QR scanner. If you are building a new door, build this one.
fleet/devices/grounds-door.yamlThe printed enclosure
Drag to orbit, scroll to zoom, click a part name to isolate it. Printed envelope 151.5 × 300 × 77 mm.
- The three printed parts and how they stack (they share one coordinate space).
- Lens centre (0, 117.78); Ø8.6 lens hole through the pod face.
- Print orientation - bezel-UP, forced. A pull-out barb's catch face is an undercut bezel-down, and chamfering it to print destroys the catch.
- Where the Pi, relay and exit button mount inside the housing. The internal bosses exist in the print but their component assignments are not recorded anywhere — do not infer them from the geometry.
- The wall-mount hole pattern and fixings.
units.yaml).The 40-pin header
Connections
Strike output — the 12V side
Wire Relay 1's screw terminals. Most gym strikes are fail-secure (locked until powered), which is COM + NO. A fail-safe strike energises to LOCK, which is COM + NC instead.
12V PSU (+) ─────────► [ COM ] Relay 1
[ NO ] ──────► Door strike (+)
12V PSU (−) ◄────────────────────────── Door strike (−)
The Pi only powers the relay coils via 5V, about 80 mA per energised channel. The strike's 12V never touches the Pi.
Exit button
A plain momentary push-switch, two wires, no polarity. Active-LOW.
GPIO 20 (pin 38) ──────[ BUTTON ]────── GND (pin 39)
The Pi enables an internal pull-up, so the pin idles HIGH and a press pulls it LOW.
The things that cost hours
Bring-up
- Power off first — Pi off and the 12V strike supply unplugged before any wire moves.
- Reader (any unit with one fitted) — DIP both OFF, free the serial port (raspi-config → Serial Port → login shell NO, hardware YES; `enable_uart=1` + `dtoverlay=disable-bt`; disable hciuart), reboot, then `nfc-poll` should read a tag. That proves VCC, GND, the TX↔RX crossover, the DIP switch and the freed serial port all at once.
- Strike — `pinctrl set <strike-pin> op dh` lights Relay 1's LED and clicks the strike; `op dl` releases. Repeat on the spare channels to prove them.
- Button — Press it. The strike fires, once the service is running on the right pin.
Generated from docs/hardware/units.yaml. Two components claiming the same pin fails the build.