Documentation
Guides, build steps and firmware notes.
Guides
HerdTag documentation
HerdTag is an early-stage virtual-fencing ear tag for cattle.
Architecture
Backend
A FastAPI app (src/herdtag/server/) with SQLite storage.
Fence controller
The controller is the logic that runs on the tag. The reference implementation is src/herdtag/controller.py, and the C port is firmware/core/ht_core.c.
Firmware
The full guide is in firmware/README.md. This page summarises it.
Glossary
Cycle grazing
Move the herd through paddocks on a schedule. You draw each paddock once, then set the order and how long the herd stays in each. The server runs the moves.
Operations runbook
How to run HerdTag tags on a real farm. This is for prototype trials. The virtual fence isn't a safety barrier.
Over-the-air protocol
Two message types travel over LoRaWAN. Both are defined in src/herdtag/protocol.py, and byte-identical in firmware/core/ht_core.c.
Simulation and demo
Build
HerdTag v1: hardware build plan
Every price below is an estimate from listings checked on 2026-11-07. Prices move, and RAK's own store doesn't always include US tariffs.
Enclosure (v1 prototype)
tag_case.scad is a parametric two-part case: base + lid. Every key dimension is a parameter at the top of the file.
herdtag firmware
The test replays 11 scenarios (about 550 controller steps, 3,630 checks) generated by scripts/gen_vectors.py from the Python reference.