Here it is our story of how we made our connected dog shelter. We had 50 hours to do it during our third year at Unilasalle Amiens.
Being in the Computer Networks and Smart Objects branchof study (RIOC), we studied LoRa networks. This project has been the occasion to bring together all of the skills that we had learned during our cursus.
This idea of making a connected dog shelter came when we decided to think aout people who cares about their pet and want them to have a good life. This project will help people to oversee the dog's and shelter's state and check the data read from the shelter as the connected feeder or the temperature sensor.
Objectives of the projectWe wanted to make a dog shelter who can manage the feeder and the different sensors. We want that the shelter respects these conditions :
- Communicating in LoRa
- Data collected by the system and save into a file
- Bowl for the food
- Data displayed on a dashboard
We started the project by finding how to use the different sensors as it was the first time we had to use them.
Here is a list about the sensors used in this project :
- Temperature and humidity
- RFID Sensor
- Weight sensor
We managed to use each sensor alone but we needed to put them all on a Sodaq Explorer Card in an Arduino Code.
This card provides an asset for LoRa communication which will be useful for us in our project.
We chose to use a servo motor to simulate the opening or the closing of the feeder if the bowl is empty or not.
The communicationThe communication in our project is very important. We chose to use the LoRaWAN protocol to ensure the communication between the sensors and the dashboard
The Sodaq board gets data from the sensors and sends them to the The Things Network (TTN) Gateway in a payload. It redirects the data to the python application and then displays it on the dashboard. There is also a CSV file which contains all the data obtained by the sensors.
Why use the LoRaWAN protocol ?
- LoRa allows low bandwidth communication, which makes it energy efficient and a perfect candidate for a connected object
- This protocol offers uplink and downlink communication, which was important in our project to collect the data and put it in the dashboard
- LoRa is not like WiFi, so the dog shelter can be used without it.
Below is a scheme representing the architecture of the communication :
Through the TTN console, we create an uplink payload formater in order to isolate the differents items read by the sensors as the temperatrure or the humidity.
We also add a webhook which allows us to get the data from the TTN through the webhook url.
The Sodaq board gets data from the sensors and sends them to the TTn Gateway in a payload. The TTN Gateway redirects the data to the python application and then displays it on the dashboard. There is also a CSV file which contains all the data obtained by the sensor.
The Arduino ProgramOur program is quite simple : it takes one by one the data of the sensors (Temperature, Humidity, RFID and Weight) to put them in a 14 bytes payload, which is sent to The Thing Network.
For the temperature and humidity, nothing more simple:
For the RFID sensor, it’s quite harder, you have to check if there are a new card, and then read each of the 4 bytes to put them in the payload
For the weight sensor, which controls a servo motor for opening or closing the feeder. It means that we want to be precise with the servo, so if the feeder is empty, the servo gets open, and stays open until the weight sensor detects a weight more than a threshold (here the threshold is 100 grammes).
When all the data are read, they are put in the payload, which is sent to TTN.
We also make a dashboard for following the evolution of the connected shelter.
This project was very interesting by the amount of things learned in electronics and programming. We also made an original video for our project, you can find it below by clicking on the link :
Comments
Please log in or sign up to comment.