-
1Introduction
I am currently residing in Ooty, a beautiful hill station in southern India. The main problem is that elephants frequently enter the village. We can be alerted by their sounds sometimes, but most of the time they are silent, so we cannot be alerted.
So I have planned to make a device which can detect elephants and send an alert.
-
2Get PCBs for Your Projects Manufactured
You must check out PCBWAY for ordering PCBs online for cheap!
You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop.
-
3Project Flow
First thing, we have to train some ML to detect the elephants. This SenseCAP K1100 kit contains Grove AI Vision module and Wio Terminal, so we can train vision module to detect elephants and send data to Wio Terminal then the data will be passed to cloud, and it will make alarm. Like email and SMS.
-
4Step 1
This Grove AI Vision module can be trained to detect a model by using Roboflows ML detection. Here is the guide by Seeedstudio to create and upload a custom model. https://wiki.seeedstudio.com/Grove-Vision-AI-Module/
Here is my model which can detect elephants. It's not so much a good model, but it works fine.
Seeedstudio is working with Edge impulse integration so will update this with Edge Impulse model it will be more confident model.
Now our Wio terminal will get a model detection results, next step is to send the model classification results to cloud and making an alert.
-
5Step 2
My initial plan is to integrate LoRa and TTN, but I don't have a LoRaWAN or Helium gateway, so I just make a plan to use a Wi-Fi or Cellular IoT. Then I moved with cellular to get this work done.
In this project I have used Blues Wireless notecard which is a cellular-based IoT hardware, also it allows integration with multiple cloud platforms.
I have connected Blue's notecard in the UART port (8th and 10th pin) of the Wio Terminal. I have added a light system which can turn on at nighttime and turn off at day times to give some lights for the Vision classification. You have to create a new project on Blues notehub and program that project, I'd into the Wio terminal to send a data to cloud.
First get the project ID from the Blues Notehub and paste it into the following code.
Next compile the code and upload it to the Wio Terminal, now this wio terminal will detect the serial data and forward it to the Blues Notecard. So this will now send model status, model confidence, count.
The code can be found on github repo - https://github.com/akarsh98/Gate-Keeper---An-IoT-Based-Elephant-Detection-System
Here is the received data from Wio terminal on Blues Notehub, now our data reached cloud, next thing we have to add some visualization and alarm system.
For this visualization we are going to use Qubitro Cloud platform, Qubitro allows visualizing the data from multiple data sources like MQTT, TTN, HTTPS, Helium etc. Just check Qubitro.com for more additional details. Go to portal.qubitro.com and create a new project and add a device with MQTT connection. You can see the connection credentials, just note those, because you will need those on the next step.
First go to Route tab on Blues Note hub then select type as MQTT and enter the credentials as below format.
Now we need to do another one procedure, just go to the environment section on the Blues Device and change the content as below.
That's all now we are at the final step.
-
6Step 3
Open the Qubitro Portal and look for the incoming data from the notehub.
Now you see there are so much data we got from notehub also, we need to arrange them. To do that, just go to the Blues Route tab and scroll down and add a JSON rectifier as below.
Let's see the data again, it is now more readable and reasonable.(also, I have added location)
Next step is adding visuals for this navigation to monitoring section and create a new dashboard.
You can add different widget as per your need. Finally, we are going to add an alarm system, for this we are going to use webhooks with make.
Go to eu1.make.com and create a new account,
Then next create a new scenario like this one,
here I have added webhooks with Twilio and email so once the webhook is triggered it will start the SMS and email alerts.
Then go to Qubitro portal and navigate to rule section, add a new rule here I have added rule like model score =100, so whenever the model detected it will trigger the webhook then all the actions will take by make.
Webhook alert flow
Here is the final output of the email alert.
Here is the final output of SMS alert.
-
7Conclusion
In this tutorial, I have shown you how to build a vision-based alert system for elephant detection with Cellular communication with Qubitro Cloud's webhook and Twilio integration.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.