Smart beehive scale: weigh your hive with an ESP32, HX711 and a load cell
An ESP32, an HX711 amplifier and a bar-type load cell turn a hive stand into a telemetry station: weight every day, temperature beside the brood, and a graph on your phone — so you watch the nectar flow come in and catch the swarm sign from your kitchen, without opening the hive once.

What it is
A build-it-yourself beehive scale: an ESP32-DevKitC and an HX711 amplifier read a bar-type load cell mounted in the hive stand, a DS18B20 probe watches hive-body temperature, and the ESP32 reports over Wi-Fi on a deep-sleep schedule — web charts, MQTT into Home Assistant, or scheduled Telegram messages. Copy-along firmware from darkvolg/BeehiveScale-ESP32 (MIT); the teaching core is the bogde/HX711 library and SparkFun's wiring convention. MCU Atlas is not affiliated with the makers.
What you need
- ESP32-DevKitC (ESP32-WROOM-32) linked — the controller: HX711 reads, web server, deep sleep
- HX711 24-bit load-cell amplifier breakout unlinked — no catalog page; the ubiquitous green board, about a dollar
- Bar-type load cell, 50 kg (TAL220 class) unlinked — no catalog page; one to four under the hive stand
- DS18B20 waterproof temperature probe (1 m) linked — hive-body temperature on GPIO4
- DS3231 RTC module + CR2032 linked — keeps the report schedule through deep sleep
- 0.96in 128x64 OLED (SSD1306, I2C) linked — the easier swap for the reference build's 1602 LCD
- TP4056 charger + MT3608 boost + 18650/21700 cell linked — the power chain (MT3608 unlinked, no catalog page)
How hard
Beginner, and unusually forgiving: four load-cell leads and four HX711-to-board leads, nothing a wrong wire can damage — an inverted reading is fixed by swapping two leads. An afternoon to first bench readings; a weekend to calibrate, enclose and install under a real hive.
Key Facts
- Teaching core is textbook-standard: ESP32 + the bogde/HX711 library (MIT, 995★ as of 2026-11-15) + SparkFun's HX711 hookup-guide wiring convention — the three project repos are honestly-attributed reference builds, not battle-tested by thousands
- Copy-along build: darkvolg/BeehiveScale-ESP32 (MIT, 6★ as of 2026-11-15) — the only vetted build with exactly this architecture; web UI with charts, CSV export and anomaly markers, MQTT into Home Assistant, scheduled Telegram reports (the README's example: 09:00 and 21:00)
- Variants, honestly labelled: deaneeth/smart-beehive-monitor (MIT, 21★ as of 2026-11-15) is the solar + Firebase + BME680 route; MacNite/HiveHub (MIT, 8★ as of 2026-11-15) is the multi-hive graduate path on a NAU7802 ADC — a different architecture, not HX711
- About $25 total per scale — the copy-along author's BOM, checked 2026-11-15; our catalog-grounded costBand estimate is $15-40
- Battery life 20–44 days per charge and ±10 g accuracy are author-reported, measured on the author's own hardware; the 10 kΩ SCK pullup that holds the HX711 in power-down during deep sleep is credited with roughly twelve extra days (author-measured)
- Three version traps the README is explicit about: the bogde/HX711 library, ArduinoJson 6.x (not 7.x), and the Huge APP (3MB) partition scheme on the DOIT ESP32 DEVKIT V1 board definition
- Calibration is transferable: tare empty, place a known mass, persist, verify — the offset-plus-scale-factor model behind every HX711 scale ever made (tare() and set_scale() in the library)
- The copy-along repo's automated build fails on a GitHub infrastructure step before any code compiles — treat "it works" as author-verified rather than CI-verified
- A scale is not a full inspection: weight telemetry tells you WHEN to look, never replaces looking
About This Project
A beehive is heavy — tens of kilograms of bees, comb, honey and wood — and its weight is the single most honest signal a keeper has. A bar-type load cell (a metal beam whose strain gauges change resistance microscopically as it bends) sits in the hive stand; an HX711 breakout excites the load cell with a precise voltage, amplifies the tiny differential signal, and hands the ESP32 a clean digital reading. The ESP32 wakes on a schedule, takes a weight and a temperature, reports it over Wi-Fi, and goes back to deep sleep. On your end: a web page with charts, a Telegram message at nine in the morning, an MQTT feed into Home Assistant — whichever you configure. That is the whole machine: the hive sits on a sensor, the sensor talks to your network, and you stop driving out to ask the bees how they're doing. An ESP32, an HX711 amplifier and a bar-type load cell turn a hive stand into a telemetry station: weight every day, temperature beside the brood, and a graph on your phone — so you watch the nectar flow come in and catch the swarm sign from your kitchen, without opening the hive once. If you can wire four sensor leads and copy a calibration number, you can build this.
Why build this — and why it's a kind first wiring job
Two reasons, one for the bees and one for you.
For the bees: every inspection is an intrusion. Weight telemetry inverts the relationship — the hive reports daily without anyone lifting the lid, and you open it only when the data says something changed. For you, if you live rural or keep the hives at a far corner of the property, this is the preparedness mindset applied to animal husbandry: instrument the thing you care about, read the instrument from the house.
For the builder: this is one of the most forgiving first-sensor projects on MCU Atlas. The HX711-plus-load-cell pairing is classic — the library we use has been the de-facto Arduino standard for a decade (995 stars on GitHub as of 2026-11-15, MIT-licensed), and the SparkFun hookup guide that established the wiring convention is still the reference the makers of every build in this page followed. Four load-cell leads, four HX711-to-MCU leads, and nothing that can be damaged by a wrong wire: no high voltage, no precise timing protocol, no configuration handshake. Wire it wrong and the worst outcome is an inverted or frozen reading — swap two leads and it works. There is no way to brick the sensor. And the payoff is unusually concrete: kilograms on a graph, the first day.
Skills you'll learn
**Load-cell amplification with the HX711** — why a strain gauge's millivolt signal needs a 24-bit amplifier, what excitation voltage is, and why the red and black leads are special. **ESP32 Wi-Fi telemetry** — deep-sleep-serve-report cycles, a built-in web server with charts, MQTT and Telegram as reporting paths. **Calibration against known weights** — the offset-plus-scale-factor model that underlies every scale ever made, from this one to a laboratory balance: tare empty, place a known mass, let the firmware compute the factor, verify with a second mass.
Difficulty, time and cost
Difficulty: beginner. Soldering is minimal (a few header pins and two resistors), the wiring is low-stakes, and the firmware route below is flash-and-configure, not write-from-scratch. Time: an afternoon to first readings on the bench, a weekend to calibrate, enclose and install it under a real hive. Cost: a dev board, an HX711 breakout, a load cell and a handful of support parts — the author of the copy-along build prices his complete bill of materials per scale (his dated total is in the key facts); today's part prices are in the parts list below.
The parts list
The controller is an ESP32-DevKitC (ESP32-WROOM-32) — it reads the HX711, runs the web server, and sleeps between reports; the copy-along firmware targets the DOIT ESP32 DEVKIT V1 board definition, and any WROOM-32 DevKit matches. The HX711 load-cell amplifier breakout is the 24-bit ADC that makes the load cell readable — no catalog part page yet, but every maker-parts seller carries the ubiquitous green board for about a dollar. The sensor itself is a bar-type load cell, 50 kg (TAL220 class); the reference build uses one to four of them under the hive stand (no catalog page yet — the label matches wrong marketplace products easily). A DS18B20 waterproof temperature probe (1 m) reads hive-body temperature next to the weight channel. A DS3231 RTC module with its CR2032 keeps time through deep sleep so reports stay on schedule. The display is a 0.96 in 128x64 OLED (SSD1306, I2C) — or the 1602 LCD with I²C backpack the reference build uses; the OLED is the easier swap. The power chain is a TP4056 charger, an MT3608 boost and an 18650 or 21700 cell: charge, boost, sleep. Passives: two 100 kΩ (battery voltage divider), one 4.7 kΩ (DS18B20 pullup), one 10 kΩ (HX711 SCK pullup — this one buys you days of battery, see Power and weatherproofing below). Two tactile buttons and an IP65 enclosure (roughly 85×65×30 mm) round out the reference build's weatherproof box.
Tools
Soldering iron and solder for the header pins and two resistors; wire strippers; a multimeter (mostly for peace of mind); a USB cable for flashing. A known calibration weight — a new bag of sugar, a dumbbell plate, anything whose mass you actually trust to the gram or so.
Wiring, step by step
This wiring follows the canonical pinout of the copy-along build (darkvolg/BeehiveScale-ESP32, MIT, 6★ as of 2026-11-15), which matches the SparkFun hookup guide's standard convention — the full step card with the wiring diagram sits below. The shape of it: four load-cell leads to the HX711 (red to E+, black to E− for excitation; green to A+, white to A− for the signal pair — learn the rule instead of the colors: red and black are excitation, and if the reading goes down when you load the scale, swap green and white; SparkFun's own fix for inverted readings, and a swapped pair is harmless). Four HX711-to-MCU leads: VCC to 3V3 (never 5 V on this 3.3 V-logic build), GND to GND, DT to GPIO16 and SCK to GPIO17 — with the 10 kΩ pullup from SCK to 3V3 that the reference build calls mandatory for deep sleep and credits with roughly twelve extra days of autonomy (author-measured). The pins themselves are flexible — the HX711 library runs on any GPIO, and the other reference build uses GPIO32/33 — so if 16/17 are taken, move them in the firmware config. The DS18B20's DATA line sits on GPIO4 with its 4.7 kΩ pullup; the DS3231 and the display share the I²C bus on SDA GPIO21 and SCL GPIO22; and the 100k+100k battery divider's midpoint lands on GPIO34, an input-only ADC pin, which is exactly what a sense line wants. Mechanically, a bar-type load cell mounts in a Z shape between two rigid plates — the z-mount figure in the step card shows the arrangement — and that mounting is the difference between a scale and a random number generator. If the load cell sits under the hive and the electronics in a nearby box, the reference build worth copying runs the load-cell lead as a shielded twisted pair with the shield tied to ground at the HX711 end only.
(The 4-wire cells above are what everyone uses. 6-wire load cells add two sense leads for long cable runs — none of the builds on this page needs them.)
Firmware: the copy-along build
darkvolg/BeehiveScale-ESP32 (MIT, 6★ on GitHub as of 2026-11-15) is the recommended route: of the open-source beehive scales vetted for this page, it is the only one that is exactly this architecture — ESP32 DevKit + HX711 + load cell + battery + deep sleep — with a calibration flow a first-timer can actually finish. It is a single-maintainer project with a small following, and the page says so plainly; what earned it the lead slot is exceptional documentation for its size — a full per-pin wiring table including wire colors, a twelve-tab bilingual manual, and power measurements the author reports as "verified on real hardware". Its automated build currently fails on a GitHub infrastructure step before any code compiles, so treat "it works" as author-verified rather than CI-verified.
The flash path is ordinary Arduino IDE, with three version traps the README is explicit about (and this page confirms as the known gotchas): the HX711 library is bogde/HX711 (MIT, 995★ as of 2026-11-15 — the decade-old de-facto standard this build and the other HX711 build below both sit on); ArduinoJson must be 6.x, not 7.x; and the ESP32 board partition scheme must be Huge APP (3MB) on the DOIT ESP32 DEVKIT V1 board definition.
Once flashed, it serves a built-in web UI (it can start as its own Wi-Fi access point at http://192.168.4.1) with charts, CSV export and anomaly markers, and reports however you configure it: MQTT into Home Assistant, scheduled Telegram messages (a morning report with yesterday's curve is the README's example, at 09:00 and 21:00), or both.
Variants, honestly labelled: the solar-plus-cloud route is deaneeth/smart-beehive-monitor (MIT, 21★ as of 2026-11-15) — same HX711 approach, but it reports through Google Firebase, so be ready to create a Firebase project, and it adds a BME680 environmental sensor and bee-activity counters that make it a bigger system than a scale. The multi-hive graduate path is MacNite/HiveHub (MIT, 8★ as of 2026-11-15) — genuinely active, with green CI and pinned dependencies, but note it is a different architecture: on its recommended XIAO ESP32-C6 it reads load cells with a NAU7802 ADC over I²C, not an HX711, and it expects a self-hosted backend. It belongs at the end of this road, not the beginning.
Calibrate against something you trust
Calibration is four steps, identical in concept across every HX711 build ever made (and built into the web UI of the copy-along firmware above). With the scale unloaded, zero it — the firmware records the raw offset. Place a known mass — a trusted kilogram, a sealed bag of sugar you weighed on a kitchen scale, a calibrated weight if you have one — and type what it is in the web UI; the firmware averages twenty samples and computes the scale factor. Persist: the factor is saved to non-volatile storage, so it survives reboots and deep sleep. Then verify with a second mass — put something different on and read the display; if both masses agree, you're calibrated. The copy-along build's author reports ±10 g after calibration on his hardware (author-reported; your load cell and mounting will vary, and SparkFun notes a few percent variance is normal between load cells).
The underlying model is the same offset-plus-linear-factor math whether you use this firmware or call the bogde/HX711 library directly (tare() sets the offset, set_scale() sets the factor) — so this procedure is transferable to every scale you ever build.
How to read the data
The graph is the instrument. A hive's weight tells a story you cannot get any other way at a distance: a steady daily rise through the season is the nectar flow — a kilogram up today, another tomorrow means the colony is bringing it in; when the curve flattens, the flow has stopped, and your supers are as full as they're getting (keepers use exactly this signal to decide when to harvest without guessing). A sudden drop of a kilogram or two — especially overnight, on a rising curve — is swarm preparation: half the colony just left with a bellyful of stores; it is the single most valuable alert a scale can send, because a swarm that has already settled is much harder to recover than one you see preparing (treat the kilogram figures as field interpretation, not physics: watch for the step-change against your hive's own baseline, not for an exact number). Gentle sawtooth is daily life — foraging out by day, home and drying nectar by night; a sharp drop that isn't swarm season can be a knocked-over hive or a robbed one, and either way you want to know today, not on Saturday.
The rule for all of it: the absolute number matters less than the shape. Calibrate so your kilograms are honest, then let the hive's own baseline teach you what normal looks like — deviations from YOUR hive's normal are the signal.
Power and weatherproofing
The copy-along build runs a 18650 or 21700 cell through a TP4056 charger and an MT3608 boost, and its power discipline is the part worth copying: the ESP32 sleeps deep, wakes on the RTC's schedule, measures, reports, sleeps — and a P-MOSFET cuts power to the display, HX711 and RTC entirely during sleep (that 10 kΩ SCK pullup from the wiring section is what holds SCK high while the ESP32 deep-sleeps, keeping the HX711 in its microamp power-down state — with SCK floating, the chip wakes back up and draws milliamps). The author reports 20–44 days per charge depending on report frequency, with a measured progression from 13 days at 10 mA average toward two months at 2 mA — all author-reported figures from his own hardware, but measured with a discipline you rarely see at this star count.
Beyond one charged cell: solar, if the hive is truly far — the solar reference build (deaneeth) runs two 18650s in parallel with a 5 W panel and charges from it in firmware-monitored daylight; the parts are in its BOM. No Wi-Fi at the apiary — the community field report on r/esp32 (fetched November 2026) is a keeper running the same HX711 stack with a SIM800L GSM module on a single 3.7 V cell, so the scale texts you from wherever it is. Many hives, still no Wi-Fi — the same thread's design worth stealing is LoRa sensor nodes on each hive and one master node with LoRa plus a single GSM link; in that keeper's words, "having a gsm module and sim card (and data plan) per hive seemed annoying and expensive." One SIM, many hives. Weatherproofing: the copy-along build's answer is concrete — an IP65 plastic enclosure, roughly 85×65×30 mm, a few dollars; the scale electronics live in the box, and only the load cell and its lead face the weather.
Honest limits
Small-star sources, stated plainly: the copy-along build has 6 stars (as of 2026-11-15) and one maintainer; nothing on this page should be read as "battle-tested by thousands" — the teaching core (bogde/HX711 and the SparkFun convention) is the battle-tested part, and the project repos are well-documented reference builds. Battery-life and accuracy figures are author-reported, measured by the copy-along build's author on his own hardware — your enclosure, climate and report rate will differ. A scale is not a full inspection: weight telemetry tells you WHEN to look, never replaces looking. The swarm-drop kilogram figures are field interpretation, not lab physics; the signal is the step-change against your own hive's baseline. All three project repos are MIT — use and modify freely, and keep the license notice when you share. MCU Atlas is not affiliated with any of these makers.
Where to go next
Start with one scale on one hive and a week of graphs — the first nectar-flow curve you watch from your kitchen sells the rest of this road better than any pitch. The next-step build, when that one scale isn't enough: a multi-hive LoRa network — one node per hive (this page's parts, minus the Wi-Fi reporting), a master with a LoRa receiver and that single GSM link, and every hive on one dashboard. That's exactly the shape of MacNite's HiveHub at the far end (up to 16 scales on one hub, CI-green and actively maintained), and the r/esp32 keepers are building it by hand today. Grow into it: one hive this season, the apiary next.
Related: /projects/esphome-soil-moisture-sensor-18650-node/ · /projects/airrohr-citizen-science-particulate-matter-air-sensor/
Source & Attribution

How to Build It
Parts Needed
- ESP32-DevKitC (ESP32-WROOM-32) — the copy-along firmware targets the DOIT ESP32 DEVKIT V1 board definition
- HX711 24-bit load-cell amplifier breakout (the ubiquitous green board, about a dollar)
- Bar-type load cell, 50 kg (TAL220 class) — one to four under the hive stand
- DS18B20 waterproof temperature probe (1 m)
- DS3231 RTC module + CR2032
- 0.96in 128x64 OLED (SSD1306, I2C) — or a 1602 LCD with I²C backpack
- TP4056 charger + MT3608 boost + 18650 or 21700 cell
- Passives: 2×100 kΩ, 4.7 kΩ, 10 kΩ (the SCK pullup is the important one)
- Two tactile buttons, IP65 enclosure (~85×65×30 mm), a known calibration weight
Steps
- 1
Mount the load cell in a Z
A bar-type load cell mounts in a Z shape between two rigid plates: one end bolted to the bottom plate, the other to the top plate, with spacers so the beam can flex freely in the middle. The hive sits on the top plate; the bottom plate sits level on the ground. This is the standard mounting from SparkFun's setup guide, and it is the difference between a scale and a random number generator.

- 2
Wire the load cell to the HX711
Four wires: red to E+, black to E− (excitation — the HX711's reference output), green to A+, white to A− (the signal pair). Red/black for excitation is consistent across every source on this page; the signal colors vary by maker — one reference build's PDF swaps green and white entirely — so learn the rule instead of the colors: red/black are excitation, and if the reading goes DOWN when you load the scale, swap green and white (SparkFun's own fix for inverted readings; a swapped pair is harmless).
- 3
Wire the HX711 to the ESP32
VCC to 3V3 — never 5 V on this 3.3 V-logic build; the HX711 tolerates 2.7–5 V, and running it at 3.3 V keeps its data pin at safe logic level (standard practice per SparkFun). GND to GND. DT (DOUT) to GPIO16, SCK to GPIO17, with the 10 kΩ pullup from SCK to 3V3 — the reference build calls it mandatory for deep sleep and credits that single resistor with roughly twelve extra days of autonomy (author-measured). The pins are flexible: the HX711 library runs on any GPIO, and the other reference build uses GPIO32/33 — if 16/17 are taken, move them in the firmware config.

- 4
Add temperature, clock and display
DS18B20 DATA to GPIO4, with the 4.7 kΩ pullup from DATA to 3V3. DS3231 and the LCD/OLED on the I²C bus: SDA to GPIO21, SCL to GPIO22. The DS3231 is strictly 3.3 V; an LCD backpack may take 5 V from VIN for its backlight.
- 5
Wire the battery sense
The 100k+100k divider from battery positive to GND, midpoint to GPIO34 — an input-only ADC pin, which is exactly what a sense line wants. The power chain is the TP4056 charger, the MT3608 boost and the 18650 or 21700 cell: charge, boost, sleep.
- 6
Flash the copy-along firmware
Ordinary Arduino IDE, with three version traps the README is explicit about: the HX711 library is bogde/HX711 (not another fork); ArduinoJson must be 6.x, not 7.x; and the board partition scheme must be Huge APP (3MB) on the DOIT ESP32 DEVKIT V1 board definition. Miss any one of the three and the flash fails or misbehaves in ways that look like hardware faults.
- 7
Calibrate against something you trust
Built into the web UI: with the scale unloaded, tare it (the firmware records the raw offset). Place a known mass — a sealed bag of sugar you weighed on a kitchen scale — and type what it is; the firmware averages twenty samples and computes the scale factor, saved to non-volatile storage so it survives reboots and deep sleep. Verify with a second mass: if both masses agree, you're calibrated. The author reports ±10 g after calibration on his hardware (author-reported; your load cell and mounting will vary, and SparkFun notes a few percent variance is normal between load cells).
- 8
Enclose and install
The scale electronics live in the IP65 box (roughly 85×65×30 mm); only the load cell and its lead face the weather. If the load cell sits under the hive and the electronics in a nearby box, run the load-cell lead as a shielded twisted pair with the shield tied to ground at the HX711 end only. The build's power discipline does the rest: the ESP32 sleeps deep, wakes on the RTC's schedule, measures, reports (web UI, MQTT, Telegram — the README's example reports at 09:00 and 21:00), and a P-MOSFET cuts power to the display, HX711 and RTC during sleep; that 10 kΩ SCK pullup holds the HX711 in its microamp power-down state while the ESP32 sleeps.
Bill of Materials
Parts list
9 parts · 5 linked
Heads up: some Buy links are affiliate links. If you buy through one, MCU Atlas may earn a small commission at no extra cost to you. It never changes which parts we list. How this works
1× HX711 24-bit load-cell amplifier breakout
1× Bar-type load cell 50 kg (TAL220 class)
1× Passives (2×100 kΩ, 4.7 kΩ, 10 kΩ)
1× Buttons + IP65 enclosure (~85×65×30 mm)
Learn
Docs & guides
Read these before you buy. These pages explain things; they don't sell anything.
- Source: darkvolg/BeehiveScale-ESP32 (copy-along build, MIT)The copy-along build: ESP32 DevKit + HX711 + battery + deep sleep, web-UI calibration, MQTT and Telegram reporting.Docs
- Docs: SparkFun HX711 breakout hookup guideThe wiring convention every build on this page follows: wire colors, Z-plate mounting, inverted-reading fix, variance guidance.Docs
- Library: bogde/HX711 (MIT)The decade-old de-facto Arduino HX711 library — tare() and set_scale() are the calibration model this page teaches.Docs
- Variant: deaneeth/smart-beehive-monitor (MIT)The solar + Firebase route with BME680 and bee-activity counters — a bigger system than a scale.Docs
- Graduate path: MacNite/HiveHub (MIT)Multi-hive hub on a XIAO ESP32-C6 with a NAU7802 ADC (not HX711) and a self-hosted backend — the end of this road.Docs
- Community: r/esp32 GSM/LoRa field threadWorking keepers on SIM800L GSM scales and LoRa multi-hive designs — field practice, not a spec source.Docs
Related Projects




