Automatic bottle filling machine !

Zarg

New Member
Trial Member
Joined
Aug 14, 2025
Messages
8
Reaction score
11
Points
3
Hi everyone,


A few years ago, during COVID, I built my very first automatic bottle filling machine:
Watch the video

How it works:
  1. Place an empty bottle on the scale.
  2. The machine measures its weight to identify the type of bottle (33 cl, 50 cl, or 75 cl) and calculate how much beer to pour.
  3. The pump starts and constantly monitors the weight.
  4. When the target weight is reached, the pump stops.
  5. Remove the bottle → back to step 1.

V1 Hardware setup:
  • ESP32 – the brain of the machine
  • LCD screen
  • Rotary encoder with push button
  • On/Off switch
  • Load cell + HX711 for weight measurement
  • Electric pump + MOSFET board for control
  • Tubing + 3D-printed parts (basic, just for the prototype)
  • AC/DC converter

Limitations of V1:
It worked as a proof of concept, but there were some issues. For unknown reasons, the ESP32 sometimes rebooted… and of course, it often happened while the pump was running!

Plans for 2025 (V2):
  • Rewrite most of the code and make the design open source
  • Improve the hardware for better reliability
  • Test a two-bottle filling system
  • Add a beer density parameter for more precise filling

V1 already had a table scale mode and a tare calibration function, with tare values stored in the ESP32 EEPROM.

V2 – Current status:
I’m now working with an M5Stack Basic 2.7 module, which integrates a screen, three buttons, and an ESP32-S3.
See my first tests

Upgrades include:

  • Adafruit NAU7802 (24-bit ADC) for more stable and faster weight readings
  • FreeRTOS for real-time task management
I’d be happy to get your feedback, ideas, and suggestions to make this project even better!
 
Different gravity beer weigh different things, co2 content, temp will effect it too.

How does it know when to stop for that batch of that beer?

Personally I would use a refractive photo sensor or a liquid sensor

Try isolating your pump motor from the esp32 through a relay from a different power supply. Betting the noise from the motor starting is glitching the controller
 
Different gravity beer weigh different things, co2 content, temp will effect it too.

How does it know when to stop for that batch of that beer?

Personally I would use a refractive photo sensor or a liquid sensor

Try isolating your pump motor from the esp32 through a relay from a different power supply. Betting the noise from the motor starting is glitching the controller
There is already a density parameter. Temp and C02 content do not really change the density

The machine fills bottle by bottle. If no bottle is put on the scale then nothing happens and you can push a button to stop the program.

Weight measurement is verry accurate and simple to implement. Other sensors could be used. I will be happy to see how to do it !

How can I isolate the pump from the esp32 ? Maybe I should use those capacitors on the power supplies. Do you know of which values ?
Thanks
 
Is the same power supply used for both? I am assuming it is a DC pump? Is the motor physically close to the controller?

A large 100uF cap right by the supply input for the esp32 would help. Any ripple caused by the motor would get filtered.
 
Yes, it is the same power supply. I was not sure about the capacitor value. Thanks
 
Well you two sure are speaking the same language! Flux capacitors, clock towers, and all...
 

Back
Top