I. Context
Bees, in their crucial role as pollinators, are intricately linked to the survival of our ecosystem and food production. However, these tireless foragers are facing a growing threat with concerning decline in their population numbers. Factors such as loss of natural habitats, exposure to pesticides, and the introduction of predators like Asian hornets contribute to the fragility of their populations. The significance of bees extends beyond their mere contribution to agriculture, encompassing profound implications for our ecosystem.
We are three fourth-year students at an engineering school specializing in electronics and computer systems for embedded systems. As part of our curriculum, we are tasked with creating a connected hive to assist beekeepers on a small scale. This hive will function to collect data from a beehive and transmit it over the LoRaWAN protocol based on the LPWAN network for visualization by the hive owner. Additionally, like any embedded system, it should ensure low power consumption.
In this article, we will first explore the hardware used. Subsequently, we will delve into the various steps that led to the project's fruition, and finally, we will analyze the results of our system.
II. Project Progression
A. Specifications and Expectations
This project was initiated as a school project, with our professors outlining the specifications to be adhered to.
B. System Specification
For this project, we had a set of components imposed on us, while others were left to our choice. The central component of this project is the microcontroller, and we chose a board that integrates LoRa interface with very low power consumption, making it ideal for IoT projects.
The system's power is provided by a LiPo battery (1S1P - 3.7V) with a capacity of 1000 mAh. Given that the hives are located outdoors, a solar panel is also included in the system to recharge the battery. We used a battery management module (LiPo Rider Pro) to interface the board, the battery management module, and the solar panel. It's worth noting that the Arduino MKR 1310 board has a JST connector to accommodate a LiPo battery, so using a single-cell LiPo would be advisable if you intend to replicate the project.
The system incorporates multiple temperature sensors. We used a DS18B20 temperature sensor, a digital thermometer that is waterproof and functional in a range of -55°C to +125°C. It uses the OneWire interface, allowing all sensors with this protocol to communicate on the same wire. Our system also measures humidity using the DHT22 sensor, known for its precision in humidity (5%) and temperature (0.5°C) measurement.
A key feature of the system is weighing the hive. To achieve this, we utilized a strain gauge coupled with an amplifier (HX711) for extremely precise measurements over a wide range. A metal frame, attached to the strain gauge, is placed under the hive to monitor its weight in real-time.
To better understand the hive's environment, we added a luxmeter measuring brightness around the hive. This information is valuable in determining if the solar panel is capable of recharging the battery.
Lastly, a microphone is incorporated to analyze ambient sound, detecting the potential presence of Asian hornets hovering in front of the hive. For this, we used a lapel microphone connected to an amplifier, the MAX9814, to obtain actionable results.
C. Project Progression
Once we had all the necessary hardware for the project, we decided to activate each sensor individually. We started with the DHT22, followed by the DS18B20 temperature sensors. The third sensor to be activated was the strain gauge for weight measurement, requiring calibration and zeroing the weight of the frame. Next, we worked on the luxmeter and finally the microphone with the amplifier.
After successfully operating each component individually, the next step was to assemble them and make them work simultaneously on the test board. This phase also provided an opportunity to verify the card's connection to The Things Network (TTN). To do this, we used the appEui and appKey corresponding to our card. Once the card was configured on the TTN platform, which allows visualization of data sent over the LoRaWAN protocol, received data appeared in raw form (in bytes). To decode them, we used a program (called Payload Formatter, see Git) to read the data more easily.
Once the data was clearly visible on the TTN platform, we revisited the prototype to solidify it. After validating our prototype on the test board, we then created a printed circuit board (PCB) in which all wires were integrated, providing much greater robustness to our system. We based our circuit on Labdec to design our PCB (see attached document).
After the PCB was printed, we had to solder the components and test the system again. Our system was almost ready; now, we needed to measure its power consumption and optimize it. To achieve this, we utilized the sleep mode of the card, significantly reducing its consumption and thereby increasing its autonomy. Clearly, depending on the sleep time, the card's autonomy increases.
With the system design itself completed, we then modified the waterproof box. We soldered extensions to each sensor (1.5 meters) and drilled holes, fitting cable glands to ensure the system's waterproofing. For the scale, we screwed a multipoint connector onto the box. Once the cables passed through the cable glands, we soldered the Grove connectors to the extensions and added a switch to the system. The system was then entirely finished.
III. Results and Conclusion
The system was installed on a beehive, and we observed the results remotely over several days.
The received data seems quite convincing; for instance, we noted that the battery level is at 87%, the indoor humidity is 44%, the hive's weight is 37 kg, the indoor temperature is 20.2°C, and the two DS18B20 temperature sensors indicate 25°C, which raises some doubts. The outdoor humidity is 64% (on Beep, there is no variable for a second humidity value, so we decided to store it in a temperature variable), and finally, the outdoor temperature is 19.9°C, which seems coherent.
Overall, the system appears to be functioning quite well; however, we identified one critical issue, its autonomy. Indeed, our system has a lifespan of only 4 days, which is relatively short. We brainstormed improvement options, such as changing the battery, which represents a solution. Another approach is to decrease the transmission frequency (an option we tested and successfully increased autonomy by several days). A more radical solution, with significant performance gains, would be to add a low-power timer that cuts power to the sensors during idle phases, drastically increasing the project's lifespan.
Comments