I keep chickens and Muscovy ducks on a small farm in the Swedish countryside. They roam freely around the yard while we're still building proper fencing. Over the years we've had our share of losses: a fox has taken both chickens and ducks on several occasions, and four years ago a neighbour's dog got in and killed our entire flock while we were away shopping for groceries. I started FenceGuard because I wanted an early warning system, not a camera I'd have to check manually every day.
The full vision is a LoRa mesh of sensor nodes, edge ML running TensorFlow Lite, SMHI weather integration to filter out false alarms from wind and rain, and two product variants — one for smaller predators like foxes and hawks, one for wolves and bears. That's still exactly where this is heading. But good engineering means validating your assumptions before building on top of them, so I'm starting where the real unknowns are: the data itself.So I'm deliberately starting lean and documenting the whole process here.
What I've ordered
The first component just shipped: a PIR motion sensor. That's it. One sensor. I already have a LoPy4 development board on my desk (a leftover from an earlier weather station project), so the plan is to hook those two together and start getting data before I spend anything else.
I'm not buying a new ESP32 right now, the LoPy4 is perfectly capable for early prototyping, and I'd rather validate the concept first and spend money second.
The actual hard problem: signal vs. noise
Here's what I keep coming back to: a PIR sensor doesn't know the difference between a fox and a branch moving in the wind. Before any machine learning, before any LoRa mesh, before any slick mobile app, I need to understand the raw data. What does a real motion event look like in this environment? How does wind noise show up? What happens at different temperatures (PIR sensitivity is temperature-dependent)? What does a dog walking past look like versus a human versus a small animal, like a hen or duck?
That's the focus of the next few weeks. No AI. No complex architecture. Just a sensor, a dev board, and logging, trying to figure out what signal I'm actually working with, before I build anything on top of it.
The question I want to answer first: can I reliably distinguish real motion events from environmental noise, using only a PIR sensor and a timestamp?
What's next
Once the sensor arrives, I'll write up the hardware setup and share the first data. After that, depending on what the data looks like, I'll start working on filtering logic. Probably some combination of timing windows, threshold comparisons, and maybe cross-referencing with a simple wind/temperature sensor down the line.
If you're also working on something similar like livestock monitoring, perimeter detection, or outdoor IoT in general, I'd love to hear how you've tackled the noise problem. Drop a comment below.
FenceGuard is an open development project. I'll be documenting hardware choices, firmware and data analysis. Follow along if that's your kind of thing.
Top comments (0)