Hive weight is the single most informative number you can log without opening the box. This build costs about $38 in parts, reads to ±40 g, and takes an afternoon.
| Tested on | Raspberry Pi 3B+ · Raspberry Pi OS (Bookworm, 64-bit) |
| Sensors | 4 × 50 kg half-bridge load cells · HX711 amplifier |
| Parts cost | ≈ $38 · no soldering iron required if you buy pre-tinned cells |
| Accuracy | ±40 g over 0–100 kg after two-point calibration |
| Time | 2–3 hours, most of it calibration |
A colony’s weight tells you whether a flow is on, whether they are eating into stores, and — if it drops by 1.5 kg in an afternoon — that they have probably swarmed. None of that requires opening the hive, and all of it is invisible on a monthly inspection schedule.
What you’ll need
- 4 × 50 kg half-bridge load cells
- 1 × HX711 breakout board
- Raspberry Pi 3B+ or newer, or a Pico WH
- Two pieces of 18 mm plywood, roughly hive-footprint sized
Note
Buy the load cells in a set of four from one seller. Cells from different batches have different gauge factors, and mixing them shows up as a load reading that shifts depending on where weight sits on the platform.
Wiring the HX711
Combine the cells first, then wire the bridge to the amplifier and the amplifier to the Pi. Only four pins are involved on the Pi side.
HX711 Pi 3B+ (BCM)
------ -------------
VCC → 3V3 (pin 1)
GND → GND (pin 6)
DT → GPIO 5 (pin 29)
SCK → GPIO 6 (pin 31)Code language: plaintext (plaintext)
Watch out
All four cells must face the same way — the arrow stamped on the beam points in the direction of the load. One cell flipped and the bridge partially cancels itself: you get readings that look plausible but scale wrongly, which is much harder to spot than an obvious failure.
Reading the sensor
from hx711 import HX711
import statistics, time
hx = HX711(dout_pin=5, pd_sck_pin=6)
def read_kg(samples=15):
"""Median of N reads — rejects the odd spike from a passing forager."""
raw = [hx.get_raw_data_mean(1) for _ in range(samples)]
return (statistics.median(raw) - TARE) / SCALE
while True:
print(f"{read_kg():.2f} kg")
time.sleep(900) # 15 minutesCode language: Python (python)
Why the median, not the mean
A single read occasionally comes back wildly wrong — electrical noise, a gust against the platform, a bee landing on the edge of a poorly mounted cell. A mean drags those spikes into your data; a median of fifteen reads discards them and costs about two seconds.
Calibration
Two numbers, measured once: TARE is the raw reading with an empty platform, and SCALE is raw-units-per-kilogram.
| Known mass | Raw reading | Implied scale | Error |
|---|---|---|---|
| 0.00 kg | -118,402 | — | tare |
| 10.00 kg | 92,118 | 21,052 | — |
| 20.00 kg | 302,377 | 21,039 | +0.03 kg |
| 40.00 kg | 723,180 | 21,039 | −0.02 kg |
Weight is the only measurement that tells you what the colony did rather than what it looked like on the one afternoon you happened to open the box.
Frequently asked
Can I use one load cell instead of four?
Only if the hive’s weight is centred over it, which in practice it never is. One cell reads the load at its own corner, so a frame shifted to one side changes your total. Four cells wired as a bridge sum the whole platform.
How much does temperature affect the reading?
A full bridge cancels most of it. We measured under 60 g of drift across a 22 °C swing, which is below the noise you get from wind.
Does this work on a Pico WH instead of a Pi?
Yes — the HX711 protocol is the same and the MicroPython port is a near-identical translation. Use a Pico if the hive is out of Wi-Fi range of an indoor Pi.


