Revolutionizing Wildlife Monitoring: TinyML, IoT, and LoRa Technologies with XIAO ESP32S3 Sense and Wio E5 Module

Updated on Feb 28th, 2024

Leverage TinyML, IoT, and LoRa technologies to develop innovative solutions for real-time monitoring of wildlife encroachment into human habitats. This solution aims to promptly issue alerts to prevent potential conflicts between wildlife and humans.

Seeed Hardware: Seeed Studio XIAO ESP32S3 Sense

Software: Arduino IDE, Edge Impulse, Blues Notehub.io

Industry: Agriculture, Urban Wildlife Monitoring, Zoos and Aquariums, Conservation Biology, Tourism and Nature Conservation, Research and Education

The Background

The frequency and intensity of human-wildlife conflicts have surged in recent decades, primarily due to factors such as population growth, urban expansion, habitat fragmentation, climate fluctuations, wildlife poaching, and illicit trade. It has become increasingly vital to discover effective and sustainable solutions to mitigate these conflicts. For example, in January 2023, an elephant called PT 7 caused fatalities in Tamil Nadu and Kerala, emphasizing the need for effective solutions.

The Solution

In response to this challenge, Pradeep Thiruna decided to leverage TinyML, LoRa and IoT technologies to detect wildlife and alert people effectively.

Pradeep employed the XIAO ESP32S3 Sense equipped with a camera to detect wildlife. Additionally, he has harnessed the power of Edge Impulse for precise wildlife classification with TinyML. Subsequently, he transmits this classification data to a Blues base station through LoRa technology. To facilitate this data transfer, Pradeep has ingeniously designed a custom PCB that incorporates both the XIAO ESP32S3 Sense and LoRa Wio E5 modules with the help of Seeed Fusion PCBA Services.

Edge Impulse Model Creation

Pradeep developed an image classification system using Edge Impulse. To achieve this, he utilized 10 GB of data from Kaggle, he then uploaded all required image models to Edge Impulse and labeled the images. The labeling process can be done manually or by generating predefined labels with YOLO V5. Afterward, he prepared the impulse design, incorporating classification, and generated the model features. Once the model output was generated, he deployed it for Arduino IDE.

EL Model Deployment

Next, Pradeep added the El Library to his Arduino IDE. To do this, he went to the Sketch tab, chose Add Zip Library, and picked the downloaded zip file from the Edge Impulse portal. This allowed him to deploy the EI model to the Xiao ESP32S3 Sense. The Arduino sketch works like this: it classifies wild animals and sends alerts via LoRa. When a specific animal is detected, it activates the node_send() function.

Reciever Setup

He then focused on configuring the base station. He set it up to receive LoRa signals and alert users when data was sent to Blues Notehub via Notcard. It also notified remote users through Qubitro. He connected both XIAO + LoRa E5 and Blues Notecard to the XIAO ESP32S3 board. He used an Arduino sketch to collect data from the slave node and transfer it to Blues Notehub, with the need to adjust the product UID. Afterward, he created a new project in Notehub | Create Project, retrieved the project UID, and replaced it in the Arduino Sketch. This allowed Blues Notehub to start receiving data as expected.

Visualizing Data

Once the data reached the Notehub, Pradeep used Qubitro to visualize and create an alert function based on the received data. He navigated to the Qubitro Portal, created a new project, and selected MQTT as the data source. Next, he input all the required details, accessed the created MQTT source, and selected the connection details. The credentials were displayed, necessary for transferring data to Qubitro.

Moving on to the Blues Notehub’s route page, Pradeep created a new MQTT route and adjusted the username and password to match his Qubitro credentials. He specified which data should be sent to Qubitro, choosing to send only the payload. After successfully transferring the payload to Qubitro, he accessed the Qubitro portal to monitor incoming data.

The data could be visualized through the Qubitro dashboard. First, he navigated to the Dashboard section and created a new dashboard. Then, he edited it and added the necessary widgets. These included an image widget for displaying data points, a standard gauge for alert level visualization, and a state widget for slave number visualization. He also used map widgets for GPS mapping. This resulted in the final dashboard, showcasing the base station’s location and the status of the slave nodes.

Rule Engine Setup

In this section, he added a rule function to alert users when an anomaly is detected. To accomplish this, he accessed the Qubitro portal’s function and selected the rule section. Subsequently, he created a new rule and opted for Webhooks. Basic details were provided, and he advanced to the next page. There, he accessed the webhook site, copied the webhook URL, and then pasted it into the Qubitro rule page. He proceeded to define the conditions, specifying that the rule would trigger when the Alert level exceeded 0. Below, you can find the webhook response. At this stage, he had the option to use Twilio or Mailgun to send customized SMS or email alerts.

The Conclusion

In conclusion, human-wildlife conflict poses a serious threat to biodiversity, human development, and social harmony, with the potential for retaliatory actions against wildlife. Yet, by leveraging IoT and Machine Learning, we can create innovative solutions to mitigate conflict, protect both human and wildlife interests, and promote harmonious coexistence.

More Information

Learn More Project Details on Hackster: Digitalizing the Wild with Blues

Explore more TinyML stories:


Choose the best tool for your TinyML projects:

Grove – Vision AI Module V2

It’s an MCU-based vision AI module powered by Himax WiseEye2 HX6538 processor, featuring rm Cortex-M55 and Ethos-U55. It integrates Arm Helium technology, which is finely optimized for vector data processing, enables:

  • Award-winning low power consumption
  • Significant uplift in DSP and ML capabilities
  • Designed for battery-powered endpoint AI applications

With support for Tensorflow and Pytorch frameworks, it allows users to deploy both off-the-shelf and custom AI models from Seeed Studio SenseCraft AI. Additionally, the module features a range of interfaces, including IIC, UART, SPI, and Type-C, allowing easy integration with popular products like Seeed Studio XIAO, Grove, Raspberry Pi, BeagleBoard, and ESP-based products for further development.

Seeed Studio XIAO ESP32S3 Sense & Seeed Studio XIAO nRF52840 Sense

Seeed Studio XIAO Series are diminutive development boards, sharing a similar hardware structure, where the size is literally thumb-sized. The code name “XIAO” here represents its half feature “Tiny”, and the other half will be “Puissant”.

Seeed Studio XIAO ESP32S3 Sense integrates an OV2640 camera sensor, digital microphone, and SD card support. Combining embedded ML computing power and photography capability, this development board can be your great tool to get started with intelligent voice and vision AI.

Seeed Studio XIAO nRF52840 Sense is carrying Bluetooth 5.0 wireless capability and is able to operate with low power consumption. Featuring onboard IMU and PDM, it can be your best tool for embedded Machine Learning projects.

Click here to learn more about the XIAO family!

SenseCraft AI

SenseCraft AI is a platform that enables easy AI model training and deployment with no-code/low-code. It supports Seeed products natively, ensuring complete adaptability of the trained models to Seeed products. Moreover, deploying models through this platform offers immediate visualization of identification results on the website, enabling prompt assessment of model performance.

Ideal for tinyML applications, it allows you to effortlessly deploy off-the-shelf or custom AI models by connecting the device, selecting a model, and viewing identification results.


Please feel free to reach out to [email protected] for any inquiries or if you’d like to engage in further project discussions. Your questions and interest are welcomed.

About Author

Calendar

September 2023
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930