Compact conveyor bottle filling system with 4 pumps, IR placement check (3s), robust Z-axis homing, and dual-servo gates. Onboard 20×4 LCD + keypad for quick setup; all timings saved to EEPROM. Supports fractional pump/dip times (e.g., 2.5 s), target bottle count (1–4), and intelligent stopper to manage flow.
Key Features
-
IR2 “Fresh-Low” Validation: Only dispenses after bottle is stable LOW for set time (default 3.0 s, editable).
-
Accurate Counting: IR1 OFF→ON→OFF state machine counts 1–4 bottles per batch without interrupts.
-
Z-Axis Auto-Home: No-timeout homing with limit switch debounce; pull-off time configurable.
-
Dual Servos: Gate at fill point + upstream stopper to block the 5th bottle during cycles.
-
4 Independent Pumps: L298N-driven, per-batch runtime configurable in milliseconds (e.g., 2.5 s).
-
On-Device UI: 20×4 LCD + keypad (PCF8574) with decimal entry (
#as dot), long-press B to edit IR2 time. -
Persistent Settings (EEPROM): Bottle count, pump time, dip time, IR2 hold time, limit pull-off.
-
Non-Blocking Control Path: Sensors remain responsive mid-cycle; safety stop supported.
-
Maintenance-Friendly: Clear on-screen prompts; factory reset via long press.
The Conveyor Bottle Filler is a smart filling station designed for small to medium production lines. It uses two IR sensors: IR1 reliably counts bottles without interrupts, and IR2 verifies precise bottle positioning at the fill point. Dispensing only begins after IR2 has been continuously LOW for a user-set time (default 3.0 s), ensuring proper nozzle alignment and reducing spills.
A robust Z-axis homing routine debounces the limit switch and never times out, so the head always returns to a consistent reference. The system drives four pumps via L298N modules, with fractional-second runtimes (entered as seconds with one decimal, converted to milliseconds). An upstream stopper servo blocks extra bottles once the target count is reached. All parameters are set from the 20×4 LCD + keypad and saved to EEPROM, so the line is ready with the same settings at every power-up.
Ideal for edible oils, syrups, detergents, and similar low-to-medium viscosity liquids.
Technical Specifications
-
Filling Heads (Pumps): 4 (L298N-driven)
-
Bottle Counter (IR1): Active-LOW, OFF→ON→OFF state machine
-
Position Sensor (IR2): Active-LOW, fresh low validation with configurable hold (default 3.0 s)
-
Z-Axis: DC gear motor with limit switch debounce; pull-off delay configurable
-
Servos:
-
Gate (pin 9) – hold/release at filling point
-
Stopper (pin 12) – block 5th bottle while batch is full
-
-
Display/UI: 20×4 LCD (I2C 0x27) + PCF8574 keypad (0x20)
-
User Settings (EEPROM):
-
Bottle target: 1–4
-
Pump time: 0.1–600.0 s (ms resolution, fractional entry like 2.5 s)
-
Dip time (Z down): 0.1–600.0 s (fractional)
-
IR2 hold: 0.2–20.0 s (long-press B to edit)
-
Limit pull-off: 50–2000 ms
-
-
Power: Compatible with typical Arduino + L298N supply arrangements (user-specific)
-
I/O:
-
IR1: D3 (INPUT_PULLUP)
-
IR2: D2 (interrupt)
-
Limit: D4 (INPUT_PULLUP)
-
Z motor: D10/D11
-
Pumps: A0/A1, A2/A3, D5/D6, D7/D8
-
-
Firmware Features: Non-blocking cycle control, factory reset, on-screen prompts
What’s in the Box
-
Conveyor Bottle Filler (assembled unit or kit – per your listing)
-
Pre-loaded firmware with EEPROM defaults
-
Quick-start guide
Usage Notes
-
Enter fractions with
#as decimal point (e.g.,2#5= 2.5 s). -
Short-press B: edit Pump time. Long-press B (3 s): edit IR2 hold.
-
Use
#to arm/start;Dto stop. -
Factory reset: long-press
*(3 s).
FAQs
Q: Can I change the IR2 wait from 3.0 s?
Yes. Hold B for 3 s, enter time (e.g., 3#5 = 3.5 s), press *.
Q: Does counting pause during dispensing?
No. Control flow is non-blocking; IR1 keeps scanning.
Q: Can I set 2.5 s for pump or dip?
Yes. Enter seconds with # as decimal point; stored in milliseconds.
Q: What happens if the limit switch bounces?
Homing uses debounced detection and a configurable pull-off delay.
-
Heads: 4
-
IR2 Hold (default): 3.0 s (configurable)
-
Pump Time Range: 0.1–600.0 s
-
Dip Time Range: 0.1–600.0 s
-
Bottle Target: 1–4
-
Display: 20×4 I2C
-
Keypad: PCF8574 (I2C)
-
Servos: 2 (Gate, Stopper)





















