- BLE-dat - UWB-dat - network-dat - lorawan-dat - RSSI-dat - geofence-dat - app-dat - wifi-dat
Option 1: Comparison of Geofencing Technologies
This summary compares LoRaWAN RSSI with higher-precision alternatives for a child-safety "electric fence."
| Technology | Typical Precision | Reliability | Best Use Case |
|---|---|---|---|
| LoRaWAN RSSI | 10m – 30m | Low | Long-range "neighborhood" tracking where exact boundaries don't matter. |
| GPS + LoRaWAN | 5m – 10m | High (Outdoor) | Large properties or hiking. GPS handles location; LoRa transmits the alert. |
| Ultra-Wideband (UWB) | 0.1m – 0.5m | Excellent | Precise "invisible fences" for yards. High accuracy, very low latency. |
| Bluetooth (BLE 5.1+) | 1m – 5m | Medium | Short-range (indoor/small garden) using "Direction Finding" (AoA). |
Option 2: Technical Implementation & Hybrid Suggestions
If you are building a custom tracker (e.g., using an ESP32-S3 or similar), consider these three implementation paths for copy-paste planning:
1. The "Filtered RSSI" Path (LoRaWAN Only)
- Method: Use a Kalman Filter to smooth the signal.
-
Logic:
If (Average_RSSI < Threshold) AND (Duration > 5 seconds) -> Trigger Alarm. - Pros: Lowest power consumption; no extra hardware.
2. The "Reliable Outdoor" Path (GPS + LoRa)
- Hardware: LoRa Module + Small GPS Module (e.g., u-blox NEO-6M).
- Logic: The wearable calculates its own coordinates. If the GPS coordinate is outside a pre-defined polygon, it sends an "ALARM" packet via LoRa.
- Pros: Not affected by signal bouncing or body blocking.
3. The "High Precision" Path (UWB)
- Hardware: DW1000 or ESP32-UWB modules.
- Logic: Uses "Time of Flight" instead of signal strength. It measures how long the radio wave takes to travel, providing centimeter-level accuracy.
- Pros: True "Electric Fence" performance. If the kid crosses a specific line, you know instantly.
Technical Blueprint: 10KM LoRaWAN Geofence
1. The Scaling Problem (Distance vs. Signal)
In a 10 km radius, the signal follows the Inverse Square Law.
- 0m to 500m: RSSI drops significantly (e.g., -40dBm to -90dBm). High precision.
- 1km to 10km: RSSI drops very slowly (e.g., -110dBm to -120dBm). Low precision.
- The "Dead Zone": Beyond 5km, environmental noise (weather, buildings) is often stronger than the distance signal.
2. Recommended System Architecture
| Feature | Specification | Reason |
|---|---|---|
| Hardware | ESP32-S3 + SX1262 LoRa | High processing power + best-in-class LoRa sensitivity. |
| Logic | GPS-Triggered LoRa | Use GPS for the "Fence" logic; use LoRa to send the "Warning." |
| Spreading Factor | SF10 or SF12 | Required to maintain a stable link at 10km range. |
| Antenna | 5.8dBi Fiberglass | Increases gain to ensure the 10km boundary is reachable. |
3. Implementation Logic (The "Smart" Fence)
To make a 10km fence reliable, do not use RSSI as the only trigger. Use this hybrid logic:
A. The "Keep-Alive" Pulse (RSSI)
The tracker sends a small packet every 60 seconds.
- Logic: If the Gateway misses 3 consecutive packets, trigger an "Out of Range / Connection Lost" warning. This is your fail-safe if the device is destroyed or enters a dead zone.
B. The GPS Geofence (Precision)
The wearable (child's device) monitors its own GPS coordinates.
-
Logic:
- Define a
Home_Center(Lat/Lon). - Calculate
Distance_to_Homeon the device. -
If (Distance_to_Home > 10,000 meters)-> Send a High-Priority LoRa packet: "FENCE_BREACHED".
- Define a
4. Advanced Filtering for RSSI
If you insist on using RSSI for the 10km boundary, you must use a Kalman Filter or Exponential Moving Average (EMA) to prevent false alarms.
Formula for EMA: $$RSSI_{filtered} = (\alpha \times RSSI_{new}) + ((1 - \alpha) \times RSSI_{old})$$ (Use $\alpha = 0.1$ for heavy smoothing at long distances).
5. Why RSSI alone fails at 10KM:
- The "Jitter": At 10km, a child standing still will have an RSSI that jumps between -115 and -122.
- The "False Trigger": An RSSI of -120 could mean "I am 10km away" OR it could mean "I am 2km away behind a large concrete building."
- Conclusion: For a 10km goal, GPS over LoRa is the professional standard. RSSI is perfect for a 50-meter backyard fence, but dangerous for a 10,000-meter safety zone.