Published Build3 min read
Edge vision's hard part is the control loop: a 12% dead zone beat model tuning
A hobby ESP32-CAM tracker documented on dev.to lands on an old lesson: proportional response and a dead band did more for tracking quality than anything done to the detector.
Written for builders.See today for builders
What happened
- Netra is described as a closed-loop system: an ESP32-CAM streams frames, a YOLOv8 model finds the person in them, and the result drives two servos that physically turn the camera to keep that person centered, all coordinated over MQTT.
- The author lists as a lesson: 'Control theory beats brute force. Proportional response plus a dead zone did more for tracking quality than any model tuning did.'
- The ESP32-CAM firmware captures video and exposes an MJPEG stream at 640x480, roughly 15 FPS.
- A stream running at roughly 15 frames per second allows about 67 milliseconds per frame.
- PSRAM-backed dual buffering keeps the stream smooth instead of stuttering every time a frame is being read.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
A developer writing on dev.to has published the architecture of Netra, a closed-loop pan-tilt camera in which an ESP32-CAM streams frames, a YOLOv8 model finds the person in them, and the detection drives two servos that turn the camera to keep that person centered, with every component coordinated over MQTT [1]. The useful part of the write-up is not the detector. According to the author, proportional response plus a dead zone did more for tracking quality than any model tuning did [2].
Start with the buffering, because that is where naive builds fall over first. The firmware exposes an MJPEG stream at 640x480 and roughly 15 FPS [3], which leaves about 67 ms of budget per frame [4]. The author credits PSRAM-backed dual buffering with keeping that stream smooth instead of stuttering every time a frame is being read [5]. That is the whole lesson in one line: a single buffer means the reader and the writer contend for the same memory, and the visible symptom is a hitch on every capture, not an error message.
Above the camera, a FastAPI server pulls frames, runs YOLOv8 Nano, computes where the target sits relative to the frame center, and publishes servo commands [6]. A second ESP32 consumes those commands and drives the pan-tilt servos [7]. A React dashboard carries the live feed, a manual joystick, mode switches, alerts and health monitoring [8]. MQTT carries the traffic between them, with WebSocket pushing updates into the dashboard, which the author values for decoupling: the detector does not need to know how many consumers are listening [9].
The control loop is where the design earns its keep. Move the servo whenever the target is not perfectly centered and the camera jitters constantly, chasing sub-pixel noise and never settling [10]. Two rules fix it. Servo speed scales with the distance of the target from frame center, so an edge detection gets a fast correction and a near-centered one gets a nudge [11]. And a 12% tolerance band around center produces no movement at all [12]. On a 640-pixel-wide frame, 12% is roughly 77 pixels of permitted wander [13], which is a large error to accept deliberately and exactly why the jitter stops. The mechanics are MG90S metal-gear servos with roughly 0 to 180 degrees of pan and 30 to 150 of tilt [14], so the tilt axis has two-thirds the travel of pan [15].
The rest is scope. Three modes: manual, auto, and patrol across predefined waypoints [16]. A layer the author calls BASE, the Behavioral Anomaly Signature Engine, does multi-factor threat scoring against configurable thresholds and builds time-weighted patrol heat-maps [17]. The system is designed for ESP-NOW mesh handoff across up to eight camera nodes [18]. The dashboard uses stream-isolated rendering so React re-rendering sibling UI never tears down the video element [19], plus a 4-second auto-reconnect [20].
What to watch is what the post does not publish. There is no end-to-end latency figure, no detection accuracy, and no false-alarm rate for BASE, which is described by intent rather than measurement [17]. Eight nodes is stated as a design target, not a tested configuration [18]. And the 12% dead band is tuned against roughly 15 FPS [3][12]; the same tolerance on a slower loop, or a faster-moving target, is the first thing that would need retuning. The architecture is the deliverable here. The benchmarks are still owed.
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Netra is described as a closed-loop system: an ESP32-CAM streams frames, a YOLOv8 model finds the person in them, and the result drives two servos that physically turn the camera to keep that person centered, all coordinated over MQTT.
- [2]
The author lists as a lesson: 'Control theory beats brute force. Proportional response plus a dead zone did more for tracking quality than any model tuning did.'
- [3]
The ESP32-CAM firmware captures video and exposes an MJPEG stream at 640x480, roughly 15 FPS.
- [5]
PSRAM-backed dual buffering keeps the stream smooth instead of stuttering every time a frame is being read.
- [6]
A FastAPI inference server written in Python pulls frames, runs YOLOv8 Nano for detection, computes where the target is relative to the frame center, and publishes servo commands.
- [7]
A second ESP32 drives the pan-tilt servos from the published commands.
Sources & coverage · 1 publisher
The reporting this story was synthesized from, earliest first. Every link goes to the original.
- dev.toPartidarAug 13Building Netra: an edge-AI camera that tracks you on its own
Cited in this coverage: Author's write-up on dev.to

