BEEconnect

by elsarkt in Circuits > Microcontrollers

38 Views, 0 Favorites, 0 Comments

BEEconnect

WhatsApp Image 2025-04-07 at 12.26.16.jpeg

The BEEconnect project aims to remotely monitor a beehive by collecting key environmental and internal data such as internal and external temperature, hive weight, internal pressure, sound activity, humidity, and ambient light.


This data provides meaningful insights into the behavior of the bees:

  1. Is there a queen present in the hive?
  2. What is the size of the swarm?
  3. Has the swarm migrated?
  4. Are the climatic conditions suitable for the colony’s development?


BEEconnect answers these questions by transmitting the collected data via LoRaWAN at regular intervals and displaying it on a dedicated monitoring platform.

The system is fully autonomous, using solar energy to recharge its battery.

With BEEconnect, beekeepers can take targeted action to support the health and well-being of their bees by addressing the issues the system detects.

Supplies

Microcontroller:

  1. Arduino MKR1310 ×1
  2. Arduino Nano 33 BLE Sense ×1 (AI, pressure and temperature sensor)


Power Supply Unit:

  1. Solar cell – SOL3W ×1
  2. LiPo battery 3.7 VDC 2000 mAh – L903759 ×1
  3. Resistors: 100 kΩ ×2, 27 kΩ ×1
  4. Switch – DS12AIP65 ×1
  5. Power management board – LiPo Rider Pro ×1
  6. Timer – TPL5110 ×1


Sensors:

  1. External temperature/humidity – DHT22 ×2
  2. Internal temperature – DS18B20 ×2
  3. Strain gauge – H40A-C3-0150 ×1
  4. Load cell amplifier – HX711 ×1
  5. Light sensor – TSL2591 ×1


LoRa Communication:

  1. Antenna


Enclosure & Mounting:

  1. Waterproof enclosure – ABS IP65 (IP207337) ×1
  2. Sealing accessories – Cable gland
  3. Waterproof case for the light sensor

Electrical Diagram

schémaElectriqueBEEconnect.png
SchémaBranchementPréalimentation.png

Requirements: KiCad 9.0

The electrical schematic enables the following system behavior:

  1. The LiPo Rider Pro connects the solar panel to the battery (Figure 2).
  2. The switch allows the complete shutdown of the MKR WAN’s power supply (Figure 2).
  3. The TPL5110 timer is powered by the VCC from the MKR WAN and controls the power supply to the sensors and the Nano 33 BLE Sense (Figure 1).
  4. A voltage divider limits the input voltage to stay within safe levels for measuring the remaining battery percentage (Figure 1).

Each sensor is represented by a 4-pin Grove connector.

Hardware Programming

Requirements: Arduino 2.3.4


Each component was tested individually before the final assembly.

The final code is attached :

  1. beeconnect.ino is the code to upload to the MKRWAN.
  2. IA_nano.ino is the code to be uploaded to the nano.

It contains the embedded AI. Link to the library used : AI_Library


Interface

Capture d'écran 2025-04-15 162111.png

Requierements : BEEP, TTN, Ubidots


-TTN Connection Procedure - in order to retrieve sensor data sent via Lorawan :

  1. Link to tutorial
  2. Configure the Payload Formatter to automatically decode the data:
```js
function decodeUplink(input) {
return {
data: {
key: "u51ce3e6u8sn6u3w", // BEEP API Key

humidity: ((input.bytes[0] << 8) | input.bytes[1]) / 100.0, // Internal Humidity (DHT22)
t_0: ((input.bytes[2] << 8) | input.bytes[3]) / 100.0, // Internal Temperature (DHT22)

h: ((input.bytes[4] << 8) | input.bytes[5]) / 100.0, // External Humidity (DHT22)
t: ((input.bytes[6] << 8) | input.bytes[7]) / 100.0, // External Temperature (DHT22)

t_1: ((input.bytes[8] << 8) | input.bytes[9]) / 100.0, // Internal Temperature #1 (DS18B20)
t_2: ((input.bytes[10] << 8) | input.bytes[11]) / 100.0, // Internal Temperature #2 (DS18B20)

t_3: ((input.bytes[12] << 8) | input.bytes[13]) / 100.0, // Internal Temperature #3 (Nano)
t_4: ((input.bytes[14] << 8) | input.bytes[15]) / 100.0, // Internal Humidity #3 (Nano)

bv: ((input.bytes[16] << 8) | input.bytes[17]), // Battery Level (%)

l: ((input.bytes[18] << 8) | input.bytes[19]) / 10.0, // Light Intensity (TSL2591)

weight_kg: ((input.bytes[20] << 8) | input.bytes[21]) / 100.0, // Weight (HX711 Load Cell)

p: ((input.bytes[22] << 8) | input.bytes[23]) / 10.0, // Pressure (hPa)

bc_o: input.bytes[24], //Presence de la reine, 1 present, 0 non

bc_tot: ((input.bytes[25] << 8) | input.bytes[26]) / 100.0 // Colony Size (0 to 3)
}
};
}```
  1. Make sure uplink data appears in the "Live data" tab of your TTN application.


Link TTN to BEEP to monitor received sensor data via an interface :

  1. LinkToTutorial


Configure alerts when certain hive parameters exceed thresholds:

  1. Link TTN to Ubidots : LinktoTutorial
  2. Program alerts on Ubidots: LinkToTutorial



PCB

Capture d'&eacute;cran 2025-03-25 110518.png

The PCB was designed by integrating the component footprints, followed by routing the traces connecting the Grove outputs to the input pins of the Arduino.

Link to the Grove connector footprint library: ConnecteurGroveFootprint


Four Mounting Hole components were added to the circuit in KiCad to ensure that the mounting holes are drilled directly during PCB manufacturing.



Structure

WhatsApp Image 2025-04-07 at 12.40.51.jpeg
WhatsApp Image 2025-03-25 at 11.35.10.jpeg
Capture d'&eacute;cran 2025-04-15 162223.png

The BEEconnect structure is based on a waterproof enclosure in which holes have been drilled to fit cable glands, necessary for the passage of wires between the sensors and the Arduino Nano with the MKR WAN.


Final installation of components in the hive environment:

The solar panel is placed above the hive, fixed next to the TSL2591 light sensor, which is also in a waterproof enclosure.

The scale, connected to the HX711 amplifier and ADC, is placed under the hive.

Each DHT22 is placed in a protective casing. The first one is placed outside, and the second inside, at the heart of the swarm.

The DS18B20 probes are placed inside the hive, on either side of the internal DHT22, providing information about the swarm's size.

The Nano is placed under the hive. It monitors the hive's sound activity and, with the embedded AI, determines the presence of bees, including the queen.


Link to Nano protective case: LinkPrintable