Raspberry Pi Monitor Unit
For two years the two BeeBug monitors based on an Arduino controller have been working very well. But I decided to merge the Auduino's capability for weight and temperature monitoring with the audio/video capability of the Raspberry Pi system. Both had been built and proven so it was fairly easy to do the merger.
The spec for the Raspberry Pi system is now:
Load cell monitoring of hive weight
Brood chamber temperature
In-hive sound monitoring
Outside video camera
PIR sensor (future work)
USB powered
WiFi linked to internet data collection service
Hardware
=======
An objective was to keep the hardware as simple as possible so as to make it easily reproducable. The same load cell and temperature sensors were used, with the same connectivity. A major simplification was achieved by using an HX711 load cell sensor as the second channel on this interface element could be used to connect to the temperature sensor, by adding just two resistors. ( a 3k3- 2k7 divider to 0v, to reduce the signal to the HX711). So for the sake of simplicity three analogue inputs have been discarded - humidity, second internal temperature, external temperature. I can read the external temperature off my weather station anyway.
Pi Wiring:
GPIO pin 14 - HX711 Gnd
GPIO pin 1 - HX711 Vcc
GPIO pin 11 - HX711 DT
GPIO pin 13 - HX711 SCK
GPIO pin 2 - to LM35 temp sensor +5v
HX711 Wiring
E+/E- to load cell bridge feed
A+/A- to load cell bridge signals
B+/B- to temp LM35 sensor signal/gnd
The Wifi connection is via a USB wifi dongle, the microphone is USB too. The camera is a standard Pi module. So apart from two resistors the only soldering required is for the leads to connectors. The total hardware cost is around £100.
Software
======
The main software was written in Python and run under control of the Linux crontab facility. In addition, to guard against hang-ups, crontab forces a system restart every 30 minutes. This is in lieu of the Arduino watchdog. The main software is currently HX7.py and there are two ancillary bits of software that generate zero offsets for the load cell and temperature sensor. These zero offsets are then read in by the main software each time it is loaded.
Initially the monitor is housed in the top of one of the hives - obviously the camera doesn't do much there in the dark. Eventually it will be mounted outside a few feet away from the hive entrance.
One nice feature of the Raspberry Pi is that it can be programmed remotely via the wifi. So once the hardware is installed, further work can be done from the comfort of my armchair.
Outstanding software work required is (and this may not happen of course!):
- Low pass filtering on audio
- Spectrum analysis on audio
- Frame comparison on the video to detect significant activity
- PIR software, to plot activity at entrance
The sofware is of course available on request should anyone be tempted to build on of these units.
See also:
http://bugthebees.blogspot.co.uk/2016/04/an-audiovideo-beehive-monitor-unit.html
Update Feb 2017:
An air temperature measurement has been added, this being a shared value from another Pi unit that monitors sky light levels. See the Skymeter blog.
For two years the two BeeBug monitors based on an Arduino controller have been working very well. But I decided to merge the Auduino's capability for weight and temperature monitoring with the audio/video capability of the Raspberry Pi system. Both had been built and proven so it was fairly easy to do the merger.
The spec for the Raspberry Pi system is now:
Load cell monitoring of hive weight
Brood chamber temperature
In-hive sound monitoring
Outside video camera
PIR sensor (future work)
USB powered
WiFi linked to internet data collection service
Hardware
=======
An objective was to keep the hardware as simple as possible so as to make it easily reproducable. The same load cell and temperature sensors were used, with the same connectivity. A major simplification was achieved by using an HX711 load cell sensor as the second channel on this interface element could be used to connect to the temperature sensor, by adding just two resistors. ( a 3k3- 2k7 divider to 0v, to reduce the signal to the HX711). So for the sake of simplicity three analogue inputs have been discarded - humidity, second internal temperature, external temperature. I can read the external temperature off my weather station anyway.
Pi Wiring:
GPIO pin 14 - HX711 Gnd
GPIO pin 1 - HX711 Vcc
GPIO pin 11 - HX711 DT
GPIO pin 13 - HX711 SCK
GPIO pin 2 - to LM35 temp sensor +5v
HX711 Wiring
E+/E- to load cell bridge feed
A+/A- to load cell bridge signals
B+/B- to temp LM35 sensor signal/gnd
The Wifi connection is via a USB wifi dongle, the microphone is USB too. The camera is a standard Pi module. So apart from two resistors the only soldering required is for the leads to connectors. The total hardware cost is around £100.
![]() |
| camera lower left, PIR upper left, temp/load cell at botton, USBs at top |
Software
======
The main software was written in Python and run under control of the Linux crontab facility. In addition, to guard against hang-ups, crontab forces a system restart every 30 minutes. This is in lieu of the Arduino watchdog. The main software is currently HX7.py and there are two ancillary bits of software that generate zero offsets for the load cell and temperature sensor. These zero offsets are then read in by the main software each time it is loaded.
Initially the monitor is housed in the top of one of the hives - obviously the camera doesn't do much there in the dark. Eventually it will be mounted outside a few feet away from the hive entrance.
One nice feature of the Raspberry Pi is that it can be programmed remotely via the wifi. So once the hardware is installed, further work can be done from the comfort of my armchair.
Outstanding software work required is (and this may not happen of course!):
- Low pass filtering on audio
- Spectrum analysis on audio
- Frame comparison on the video to detect significant activity
- PIR software, to plot activity at entrance
The sofware is of course available on request should anyone be tempted to build on of these units.
See also:
http://bugthebees.blogspot.co.uk/2016/04/an-audiovideo-beehive-monitor-unit.html
Update Feb 2017:
An air temperature measurement has been added, this being a shared value from another Pi unit that monitors sky light levels. See the Skymeter blog.

Good Morning, I'd be incredibly interested in your software and have been trying to build one of these for a few months! Please let me know the best way to be in touch. Any instruction or "how to" would be MUCH appreciated!
ReplyDeleteI love this idea, I am totally happy with writing the unit software, but any hints/tips/help/guidance with the Thinkverse side of things would be fantastic.
ReplyDeleteHow can I PM?