RakshiQu
saving lives from lines
The problem RakshiQu solves
Electric fences are widely used for perimeter security, delivering controlled high-voltage pulses to deter intruders. However, these systems are vulnerable to tampering and energy theft, where individuals may tap into the fence’s energy, short it to ground, or bypass sections to disable its protective effect. Such interference weakens the fence’s shock output, compromises security, and creates hazardous electrical conditions. Locating these tamper points manually is difficult because fences often span large distances, and traditional inspection methods offer no precise indication of where the interference is occurring.
To solve this, modern systems use Time Domain Reflectometry (TDR), a technique that sends a rapid electrical pulse through the fence wire and analyzes the reflections that return. Any tampering—whether a cut wire, illegal tapping, bypass loop, or short circuit—creates a change in impedance along the line, producing a distinct reflection signature. By measuring the time it takes for the reflected pulse to return, TDR calculates the exact distance to the tamper point, allowing technicians to pinpoint the problem area without physically walking the entire fence. This makes diagnosing issues faster, safer, and far more efficient.
Another key technology used for detecting energy theft and interference is the Residual Current Device (RCD). In a normal, healthy electric fence, the current that leaves the energizer returns along a predictable path. When someone attempts illegal tapping, grounding, or bypassing, the return current becomes unbalanced. The RCD continuously monitors this imbalance and immediately detects abnormal leakage or diversion of current, triggering an alarm or cutting off the supply to prevent dangerous conditions. This not only enhances safety but also offers real-time awareness of tampering events.
Together, TDR and RCD form a highly effective monitoring system for electric fences. While the RCD instantly identifies that tampering or energy theft is taking place, TDR precisely locates the point where the interference occurred. This combination dramatically reduces maintenance time, increases operational safety, and strengthens overall fence reliability. As a result, property owners and security teams gain a robust method to maintain the integrity of electric fencing systems against both accidental faults and deliberate manipulation
Challenges we ran into
One of the first issues we ran into was that our circuit kept detecting a short circuit even when the cable was actually open. After a lot of confusion, we realized the comparator’s output was inverted compared to what our code expected. We fixed this by printing the raw comparator values on the Serial Monitor and adding a small switch in the code to flip the logic. Once we adjusted that, open and short detection started working properly.
We also struggled with capturing the reflection signal. Initially, we tried using the ESP32’s ADC, but it was far too slow to detect the fast voltage changes. The solution was to rely completely on a hardware comparator and use the ESP32 only to read the digital edge through interrupts. This simple change made our TDR timing much more reliable.
Another problem was the comparator output behaving unpredictably. It turned out that the LM393 needs a pull-up resistor; without it, the output floats and gives random readings. Adding a 10 kΩ pull-up fixed the instability immediately. We also rebuilt the threshold voltage divider to get a clean and steady reference point for comparison.
We faced some noise issues too, especially when testing on a breadboard. Adding a small series resistor, cleaning up the wiring, and averaging a few comparator reads helped remove most of the random triggers. After ironing out these small but frustrating issues, the system started working much more consistently.
Tracks Applied (1)
Ethereum Track
ETHIndia
