FieldWarden
Work · Designed & built ·
FieldWarden watches the electric fence energisers on a site from one Windows PC. It shows the voltage and state of every energiser, draws the fence lines on a map of the site, and switches a siren the moment a fence goes into alarm. I designed and built the whole system: the Arduino firmware, the desktop app, the installer, the test suite, and a technical manual and user manual.
How it works
- Arduino firmware (C++) listens to the energisers’ data buses, decodes their frames with interrupt-driven sampling and checksum checks, and publishes the results over Ethernet as a simple text protocol I designed.
- Desktop app (Python and PySide6) connects to the controller, keeps the state of every energiser and shows it in a live monitor table with voltage bars, alarm flashing and offline detection.
- Siren control drives a driverless USB HID relay board directly. The app only writes to the board when the siren has to change, reads the state back after every write, and reconnects to the board by itself if it is unplugged.
Built to be trusted
A fence alarm has to work when nobody is watching, so the design follows a few strict rules:
- Read-only monitoring. Neither the firmware nor the app ever sends anything to the energisers, so the monitor cannot change how a fence behaves.
- Faults stay visible. An alarm holds until live data clears it. Losing the connection or an energiser going offline never silences the siren.
- Self-recovery. The network link and the relay board reconnect on their own, with a heartbeat watchdog, and every fault is logged with an error code that the troubleshooting guide explains.
- Safe by default. The siren is wired so it stays silent if the relay board loses power, admin actions sit behind a hashed PIN with a lockout, and only one copy of the app can run at a time.
Features
- Fence map. Import a photo or plan of the site and draw each fence line on it. Lines take the state of their energiser: flashing red in alarm, dotted grey when offline, faded when disarmed. The editor has draw, reshape and erase tools, snapping, and undo and redo, and a map can be exported as a single file and imported on another PC.
- Alarm handling. Mute the siren per energiser, unmute automatically when a fence is rearmed or at a set time each day, and log a warning when a siren has been sounding for too long.
- Logs and diagnostics. Monthly event and error logs, optional telemetry recording, and a one-click diagnostic bundle for support.
- Touch-friendly. Light and dark themes, a numeric keypad and an on-screen keyboard for touch-screen PCs.
Testing and delivery
The app has a pytest suite of more than 450 tests that run on an off-screen Qt platform, covering the monitor logic, the map editor, the settings and the relay control. It ships as a per-user Windows installer built with PyInstaller and Inno Setup, and I wrote both the technical documentation and the user manual.
Outcome
TBA