This project implements a LoRa-based virtual fencing solution for livestock and wildlife management. The system uses LoRa communication, GPS, and edge processing to create a virtual boundary and monitor animal movement. It triggers alerts when animals breach the defined boundary, helping manage grazing areas and prevent unauthorized animal movement.
Components ๐ ๏ธHardware ๐ฅ๏ธLoRa Transmitter Node:
- Heltec LoRa32 V2/V3
- GPS Module (TinyGPS++)
- Buzzer for audio feedback ๐ต
- Vibration motor for haptic feedback (optional) ๐
- LoRa Transmitter Node:Heltec LoRa32 V2/V3GPS Module (TinyGPS++)Buzzer for audio feedback ๐ตVibration motor for haptic feedback (optional) ๐
LoRa Receiver Node:
- Heltec LoRa32 V2/V3
- OLED Display (SSD1306) ๐ฅ๏ธ
- LoRa Receiver Node:Heltec LoRa32 V2/V3OLED Display (SSD1306) ๐ฅ๏ธ
- WiFi Connectivity: ESP32 WiFi for data transmission ๐
- Programming Languages: C++ (Arduino)
Dependencies:
- LoRa.h
- Adafruit_GFX.h
- Adafruit_SSD1306.h
- TinyGPS++.h
- HTTPClient.h
- Dependencies:LoRa.hAdafruit_GFX.hAdafruit_SSD1306.hTinyGPS++.hHTTPClient.h
- Dashboard: Flask-based web application with Leaflet.js for real-time geolocation tracking ๐บ๏ธ.
Virtual Fencing ๐ง:
- Define polygon-based geofence boundaries.
- Alert using buzzer and vibration when animals exit the virtual fence.
- Virtual Fencing ๐ง:Define polygon-based geofence boundaries.Alert using buzzer and vibration when animals exit the virtual fence.
Real-Time Monitoring ๐:
- Receive live location data of animals.
- Display node positions and movement on an interactive map.
- Real-Time Monitoring ๐:Receive live location data of animals.Display node positions and movement on an interactive map.
Data Transmission ๐ก:
- Uses LoRa for long-range, low-power communication.
- HTTP-based data transfer from LoRa receiver to Flask dashboard.
- Data Transmission ๐ก:Uses LoRa for long-range, low-power communication.HTTP-based data transfer from LoRa receiver to Flask dashboard.
WiFi Connectivity ๐:
- Connects to a local WiFi network for sending data to a remote server.
- WiFi Connectivity ๐:Connects to a local WiFi network for sending data to a remote server.
Customizable Dashboard ๐ฅ๏ธ:
- User-friendly interface for viewing current positions and paths.
- Geofence breach alerts with color-coded markers ๐จ.
- Customizable Dashboard ๐ฅ๏ธ:User-friendly interface for viewing current positions and paths.Geofence breach alerts with color-coded markers ๐จ.
Transmitter Node:
- Connect the GPS module and buzzer to the Heltec LoRa32.
- Program using the Arduino code provided (
transmitter.ino
). - Transmitter Node:Connect the GPS module and buzzer to the Heltec LoRa32.Program using the Arduino code provided (
transmitter.ino
).
Receiver Node:
- Connect the OLED display to the Heltec LoRa32.
- Program using the Arduino code provided (
receiver.ino
). - Receiver Node:Connect the OLED display to the Heltec LoRa32.Program using the Arduino code provided (
receiver.ino
).
Arduino:
- Install required libraries (LoRa, Adafruit_GFX, Adafruit_SSD1306, TinyGPS++).
- Upload the corresponding code to the transmitter and receiver.
- Arduino:Install required libraries (LoRa, Adafruit_GFX, Adafruit_SSD1306, TinyGPS++).Upload the corresponding code to the transmitter and receiver.
Flask Dashboard:
- Ensure Python and Flask are installed.
- Run the Flask server script (
app.py
). - Access the dashboard at
http://<server_ip>:5000
. - Flask Dashboard:Ensure Python and Flask are installed.Run the Flask server script (
app.py
).Access the dashboard athttp://<server_ip>:5000
.
Map View ๐บ๏ธ:
- Displays nodes with real-time updates.
- Uses Leaflet.js for map rendering.
- Map View ๐บ๏ธ:Displays nodes with real-time updates.Uses Leaflet.js for map rendering.
Sidebar Navigation ๐:
Home
: Main view.Clear Path
: Clear polyline paths.Export to CSV
: Save tracking data.Settings
: Adjust geofence parameters.- Sidebar Navigation ๐:H
ome:
Main view.Clear Path:
Clear polyline paths.Export to CSV:
Save tracking data.Settings:
Adjust geofence parameters.
- LoRa
- Adafruit GFX
- Adafruit SSD1306
- TinyGPS++
- Flask
- Requests
- Leaflet.js (for frontend)
- Add edge machine learning for animal behavior analysis ๐ค.
- Integrate SMS/notification-based alerts ๐ฒ.
- Extend battery life with optimized power management ๐.
Comments