Semi-automatic filling machine that fills a magazine of honey jars to a set weight at the press of a button.
Built as the practical part of my bachelor thesis about dosing viscous media.
Motivation
Current situation
Honey is stored in big buckets and filled into jars one by one: hold a jar under the outlet, open the gate, wait, close it again when it looks full enough. With water that takes seconds - honey needs well over a minute per jar, with thick honey several minutes.
Problems
- Time → you have to stand there the whole time
- Mess → honey strings, drips and leaves traces on the jar rim
- Inaccurate → filling by eye gives uneven jars, so you overfill to be safe
- Hard to time → the flow reacts late and keeps running after closing
- Never the same → warm honey behaves completely different from cool one, and the falling bucket level changes it again
Idea
Put several empty jars into a rotating magazine and press start. A load cell tracks the weight, a servo-driven gate meters the honey and closes as soon as the target is reached.
Why this makes sense
- Hands-free → load jars, press start, no watching
- Repeatable → weight-controlled instead of by eye
- Continuous → filled jars can be swapped for empty ones while it runs
- Fault tolerant → missing or already filled jars are detected
- Compact → ~300 mm diameter, stores inside the honey bucket itself
- Reversible → clamps onto the bucket, no permanent changes to it
Result:
Specification
- Target weight: freely adjustable, stored per preset
- Accuracy: typically within ~2 g
- Fill time: ~10-20 s per jar with runny honey, 100 s+ with thick honey
- Magazine: 6 jar positions, swappable during operation
- Outer diameter: ~300 mm (fits inside the filling bucket)
- Supply: 12 V plug-in PSU
- Operation: fully local - start button, rotary encoder and OLED menu
- Presets: switchable parameter sets per honey type
- Mounting: dosing unit clamps onto the outlet pipe - no permanent changes to the bucket
- Cleaning: magazine disc pulls off without tools, dosing unit unclamps completely
Components
Mechanics
- Magazine: rotating disc with 6 jar cut-outs, driven by a DC gear motor (~7 rpm) through a turned steel shaft adapter - only pushed on, so it comes off without tools for cleaning
- Weighing: separate weighing plate at the fill position, decoupled from the magazine
- Position detection: bar magnets in the disc + adjustable reed switch
- Dosing unit: FEETECH FT5320M servo (20 kg·cm) with a lever linkage on the honey gate, clamped onto the outlet pipe - removable, no permanent modification of the bucket
- Base structure: carries motor, load cell and control board; outer ring holds the connectors, the start button and an LED status ring
- Mostly 3D printed (FreeCAD); bucket stand in wood, shaft adapter turned from steel
Electronics
- MCU: ESP32-DevKitV1 (ESP32-WROOM-32)
- Weighing: load cell + HX711 24-bit ADC module
- Servo output with adjustable 4.4-9.9 V supply - more voltage means more torque and a faster gate
- Magazine motor via relay, shorted when it drops out → generator braking, so the jar stops repeatably
- Reserve outputs: second relay + 2 MOSFETs for an outlet heater or a tank pressurisation valve
- Supply: 12-40 V DC, 2× LM2576 buck converters
- UI: 0.96″ OLED (I²C), rotary encoder, 2 buttons, LED ring, buzzer
- Custom double-sided board, 129 × 96 mm, CNC-milled in-house and hand-soldered
Firmware & Control
- C on ESP-IDF / FreeRTOS, weight acquisition in its own task on a dedicated core at a fixed 100 ms cycle
- State machine for the whole cycle: index → check for an empty jar → fill → evaluate → next. It only stops after a full revolution without a fillable position, so jars can be swapped while running
- Errors (no weight reaction, timeouts, empty bucket) close the gate and stop the motor
- Parameters in NVS, split into machine settings (calibration) and switchable recipe presets per honey type
- Telemetry as JSON over UART for logging and plotting
- Dosing is the actual hard part: honey answers a gate change only after 2-10 s, keeps dripping after closing, and behaves differently with every honey, temperature and bucket level - fixed thresholds do not stay correct for long. Three strategies are switchable from the menu; the one in use learns dead time, flow rate and after-flow from the previous jars instead of being tuned by hand
Planning
The whole machine was designed in FreeCAD as one assembly first. That made it possible to try lever geometries for the gate, check clearances around the load cell, and put mounts, cable routing and connector openings straight into the printed parts.
Technical Assets
Electrical schematic
PCB layout & 3D model
Double-sided board, 129 × 96 mm (vector plot as PDF)
Part drawing
Everything printed came straight out of the CAD model - the motor shaft adapter is the one part that had to be turned from steel, so it is the only one that needed a dimensioned drawing.
Repository
PCB project (KiCad), CAD model (FreeCAD), firmware (ESP-IDF) and the telemetry tooling:
GitHub - honey-jar-filler
Bachelor Thesis
This machine is the practical part of my bachelor thesis at Hochschule Landshut:
Entwicklung eines intelligenten Dosiersystems für viskose Medien
(Development of an intelligent dosing system for viscous media)
It goes much deeper into the dosing problem itself and compares three strategies for hitting the target weight despite dead time, after-flow and constantly drifting conditions. The videos below are referenced from it as optional extra material.
Read the thesis - PDF, 84 pages, ~28 MB
Written in German. Public version without personal details.
Videos
Full run
A complete cycle running through the state machine shown above: index to the next position, check for an empty jar, fill, evaluate, continue. Dosing is done by the adaptive heuristic strategy, which learns dead time, flow rate and after-flow from the previous jars. Tested with a medium-thick test fluid.
Cascade control
The same machine running the cascade control strategy, which adjusts the gate continuously from the measured fill rate instead of switching between fixed opening steps. Tested with a medium-thick test fluid.
Thin test fluid, with live telemetry
A run with a thin, slimy test fluid. The laptop on the left shows the telemetry being logged live while the jar fills.
First test with real honey
The first test on actual thick honey. It shows the properties that make the dosing hard: the flow reacts to the gate only after a noticeable delay, and it keeps running and dripping well after the gate is closed again.





