A two-Arduino, closed-loop ice dispenser that delivers a user-specified mass of ice into a cup using real-time weight feedback. Custom 3D-printed hopper and auger, 5 kg load cell, and Simulink-generated SR-latch motor control.
Build, and validate an automated ice-dispensing machine capable of delivering a user-specified mass of ice into a cup using real-time weight feedback. The system must be repeatable, easy to maintain, and safe to operate around melting ice.
Sensing and actuation are split across two Arduino Mega 2560 boards. Cleanly separating the scale and motor responsibilities meant the SR-latch logic in Simulink stayed simple and the load-cell sketch could focus on filtering and tare.
Cup placed on the platform, button pressed on Pin 10 of the Motor Arduino — Latch S input goes HIGH.
Q output enables a fixed PWM duty cycle (~50%) on Pin 5, driving the H-bridge that powers the FIT0186 gearmotor. The auger begins rotating ice into the cup.
HX711 reads the 5 kg load cell at 10-20 Hz with digital averaging. Tare is captured at startup; sustained readings are compared to the 100 g target.
When the cup mass crosses 100 g, the Scale Arduino drives Pin 22 HIGH. The Motor Arduino sees the 5 V signal as the latch's Reset, Q drops to 0, PWM goes to zero, and the motor stops without overshoot.
If the cup is already at or above 100 g, the latch stays reset and a button press cannot restart the motor — a built-in safety against overfilling.
All mechanical components — hopper, auger, motor housing, drainage tray — were modeled in SolidWorks and Fusion 360, then 3D-printed in PLA. Two Arduino Mega 2560s, an HX711 amplifier, and an H-bridge motor driver formed the electronics stack on a perfboard breadboard.
The completed system met every functional and performance goal. Filtered HX711 readings produced a clean 5 V stop signal at 100 g; the SR-latch and PWM driver shut the FIT0186 gearmotor off with minimal overshoot. The 3D-printed hopper and auger geometry held up across repeated trials with crushed ice — minor tolerance tweaks resolved the early jamming during testing, and the drainage tray kept water away from the electronics throughout testing.