Software apps and online services
Hand tools and fabrication machines
Bees have an essential role in ecosystems. We must preserve them from different attacks they undergo (by other species such as hornets and by us, humans and global warming resulting from our way of lives).
To allow beekeeper take care of their hives, we have developed L'abeille Vie. It is an autonomous wirelessbeehive monitoring system.
With this, beekeepers can see their hives' behavior evolutions :
- Indoor & outdoor temperature & humidity
- Air quality based on pollution measures
- 4 bees behavior :
- Hornets attack
- Queen presence
This system is a box put under a beehive. It contains the Microcontroller, the battery and some of the sensors. The others will be Inside the hive.
This system development requires you to have some knowledge in electronics, in computer science and in PCB making.
Here are our accuracies:
- Inside temperature +- 0.2°C
- Outside temperature +- 1°C
- -20°C < Temperatures < 60°C
- Humidities & air quality +- 1%
- Weight +- 100g
All PCB source files are attached to the schematics and circuit diagram part in
On the picture below you can see all the components that will be on this PCB.
Weld all the sensors, resistances, capacitors and the Microcontroller as shown on the picture below.
We took care to place temperature, humidity, air quality and microphone sensors close to the edge of the PCB so that they are easily placed outwards.
We've developed a source code for the system on Mbed. The code :
- Initializes all sensors' registers
- Measures all components
- Do a treatment on them to get understandable values
- Sends all datas to Sigfox backend.
- Continue analyzing sounds while other sensors are not use for a defined time
As we are limited in terms of bytes on Sigfox send datas, let explain how do we send datas via Sigfox.
Inside temperature : (temperature + 20)* 10 to store the data as an unsigned short (2 bytes) instead of a float (4 bytes), respecting the accuracy defined previously
Battery level : as we measure temperatures between -20°C and 60°C, with the process presented above, we will send a value between 0 and 800. As an unsigned short max value is 65, 535, we decided to integrate the battery level value inside temperature value with (battery level / 2)* 1, 000. With this process we fully optimize sended datas. We have a 2% battery level accuracy and in the temperature sended value we have from 0 to 800 the (temperature + 20)* 10 and from 1, 000 to 50, 000 we have the battery (pourcentage / 2)*1, 000.
Outside temperature : temperature + 20. As we measure températures between -20°C and 60°C, we will send a value between 0 and 80 in order to send an unsigned char.
Weight : weight * 10 to send a value as an unsigned short (2 bytes) instead of a float (4 bytes) respecting the accuracy defined previously.
Behaviours, humidities and air quality are send through char (1 byte).
Let explain how do we analyse sounds to deduct bees' behavior.
Bees sounds are at very specific frequencies depending on their behavior. Bees buzzing is around 150Hz and 250 Hz. We analyse amplitude at special frequencies base on determined thresholds.
To announce swarming, the queen sound is at 475Hz.
Hornet's presence help us to deduct attacks : 90Hz and 180Hz.
Queen's presence is indicated by a high frequency amplitude around 316Hz
When bees are stressed, the sound level get louder. Unfortunately our microcontroller doesn't have enoug resources to analyse sound level in addition to the FFT. As a consequence we focused on bees buzzing specific frequencies (between 150Hz and 250Hz).
First we take 1024 sounds samples each 250us (at 4, 000Hz frequency to respect Shannon theorem). With the Microcontroller we have, we can't take more samples. With these parameters we do a 3.9Hz accuracy FFT.
After the FFT, we have a 512 workable frequency datas (1, 024 / 2 = 512 because of Shannon theorem). Then we identify the amplitude at our specific frequencies and compare them to the last amplitude previously measured. If there is a strong amplitude change (based on threshold), we can deduct a behaviour corresponding to the frequency.
For example, before swarming the queen does tooting. If at the 134th case of the amplitude array we observe a 1, 500 relative amplitude change, we can deduct that it surely announce swarming.
Note : our bees behaviour analysis is based on several researchs. But it is developed around our personal observations based on several records
For more details see "Analyse du comportement des abeilles.pdf" (it's in french) in the attached files. We explain more precisely our work to develop bees behaviour analysis.
Source codes are in the code part in
!!! Before putting the code into the mocrocontroller, indicate your empty beehive weight in the #define BEEHIVE_WEIGHT in Ruche/Ruche.cpp file !!!
Put the code into the microcontroller. Then desolder the following Solder Bridge (SB) and LEDs circled on the 2 pictures below.
It is important to do this in order to save Energy.
- SB2 & SB3 : unlink the ST-Link, then it will be impossible to reprogram the microcontroller as long as these SB is desolder
It's time to link your Sigfox module to Sigfox backend and the last to ubidots.
- First, activate your module on Sigfox activate website (the device ID and PAC id are located on the Sigfox module packaging).
- Then create a ubidots account and a device (follow the steps shown on the pictures below).
- Next remember ubidots' token.
- Afterwards sign in to Sigfox backend (id : firstname.lastname@example.org). And follow the steps shown on the pictures below.
The Sigfox callback body content :
As presented in the Microcontroller monitoring part, we modified datas when they are send in order to respect Sigfox send bytes limitation. As a consequence, you have to put datas to their original form on Ubidots.
To do this, you need to create new variables for the indoor temperature, the outdoor temperature, the battery leve and the weight.
Add Variable and on
Then enter the formulas below.
It will allow to have for example.
Then you can create the Dashboard you want on ubidots. Be careful to use good variables !
Last but not least about ubidots. We decided to use an Indicator for bees behavior. With this widget, you can fix different colores depending on datas values. As a consequence we defined difference values for behaviors as we can't define a color per Indicator because it only depend on global values :
- Attack : 0 - no ; 1 - yes
- Queen present : 2 - yes ; 3 - no
- Excited : 4 - no ; 5 - yes
- Swarming : 6 - no ; 7 - yes
Here is our dashboard.
Develop a double level H layer that is able to remain the beehive stable. We recommand using alluminum. However, you can collect wooden pallet as we did in order to reuse already used materials.
Then set the load gauge at the middle of each H frame as shown on the picture below.
We try to develop the smallest box as possible.
Box making source is in the CAD part in
Due to coronavirus confinement, we don't have the opportunity to make the box. As a consequence, we can't warrant the box description validity.