Project
| # | Title | Team Members | TA | Documents | Sponsor |
|---|---|---|---|---|---|
| 50 | Closed-loop High-accuracy Universal Drink System |
Aiden Robinson Kevin Lu |
Xiyue Zhu | ||
| Team Members: - Kevin Lu (Kevinlu5) - Aiden Robinson (Aidenr2) # Problem Preparing mixed beverages requires accurate control of the amount of each ingredient in order to maintain consistent ratios. Small errors in ingredient proportions can noticeably affect the taste of the final drink. Many automated beverage dispensers determine the amount of liquid dispensed using a predetermined pump activation time. This assumes that each pump maintains a constant flow rate. In practice, flow rate can vary due to liquid viscosity, reservoir level, tubing conditions, and pump performance. As a result, operating a pump for the same amount of time does not necessarily dispense the same amount of liquid every time. Our project aims to solve this problem by measuring the amount of liquid actually delivered to the cup and using that measurement as feedback to control the dispensing process. The final system will be demonstrated using non-alcoholic liquids, but the same system can be applied to other mixed beverages where accurate ingredient ratios are important. # Solution We propose an automated beverage dispenser with at least four independently controlled ingredient reservoirs. Each reservoir will use a 12 V peristaltic pump to deliver liquid into a cup placed on a load-cell weighing platform. Instead of relying only on pump timing, the system will continuously measure the change in cup weight while dispensing. The controller will use this measurement to determine how much liquid has actually entered the cup and adjust pump operation as the target amount is approached. The system will also estimate the current liquid flow rate using the measured change in mass over time. When the dispensed amount is far from the target, the pump can operate continuously. As the target is approached, the controller can reduce the dispensing rate or use short pump pulses to reduce overshoot. This allows the system to compensate for changes in flow rate instead of assuming that each pump always behaves the same way. An ESP32-S3 will act as the main controller and will host a local web application over Wi-Fi. A user will be able to connect using a phone, tablet, or laptop to select a drink, customize ingredient quantities, start or stop dispensing, and monitor the status of the system. A custom PCB will integrate the microcontroller, load-cell interface, pump drivers, sensor connections, and power circuitry. # Solution Components ## ESP32 Web Interface and Main Controller An ESP32-S3-WROOM-1 will control the complete system and host a local web interface over Wi-Fi. The web interface will allow the user to: - Select a predefined beverage - Create a custom mixture - Adjust ingredient quantities - Start or stop preparation - View dispensing progress - View requested and measured amounts - View completion and fault messages Because the ESP32 hosts the interface itself, no dedicated touchscreen or external server is required. ## Load Cell Measurement Subsystem The cup will sit on a weighing platform connected to a 5 kg strain-gauge load cell. Proposed components: - TAL220 5 kg load cell - NAU7802 24-bit load-cell ADC - Mechanical cup platform - Analog filtering components Before dispensing begins, the system will measure the initial cup weight. During each pour, the ESP32 will continuously measure the increase in mass. The approximate mass flow rate can be calculated using: dm/dt ≈ Δm/Δt This information will be used as feedback for the dispensing controller. ## Peristaltic Pump Dispensing Subsystem The system will contain at least four independently controlled 12 V peristaltic pumps, with one pump assigned to each ingredient. Proposed components: - Four 12 V peristaltic pumps - AO3400A N-channel MOSFETs - Flyback protection diodes - Gate resistors and pulldown resistors - Food-compatible tubing Each pump will be controlled by a MOSFET driver circuit on the custom PCB. While far from the requested amount, the pump will operate continuously. As the measured weight approaches the target, the controller will use shorter pump pulses to improve dispensing accuracy. ## Adaptive Dispensing Control The controller will continuously compare the requested ingredient amount with the amount measured by the load cell. Rather than assuming a constant pump flow rate, the controller will estimate the current flow rate during each pour. This allows the system to adapt to changes caused by reservoir level, liquid viscosity, tubing conditions, or pump variation. The system can also account for residual liquid that continues to enter the cup after the pump is turned off and use this information to improve future shutoff decisions. If a small dispensing error occurs, the controller may also adjust the remaining ingredient quantities to better preserve the intended final drink ratio. ## Fault Detection The load cell will also be used to detect several abnormal operating conditions. The system will: - Prevent dispensing if no cup is detected - Stop dispensing if the cup is removed - Detect a possible empty reservoir, blocked tube, or pump failure if a pump is active but the cup weight is not increasing - Report detected faults through the web interface A conductive leak sensor may also be placed underneath the dispensing area so that the pumps can be disabled if unintended liquid leakage is detected. ## Custom PCB and Power System A custom PCB will contain the major sensing, control, and power circuitry for the project. The PCB will include: - ESP32-S3-WROOM-1 - NAU7802 load-cell ADC - At least four MOSFET pump-driver channels - Load-cell and sensor connectors - Optional INA180 pump-current sensing circuits - 12 V input protection - 5 V and 3.3 V voltage regulation - Programming/debug connections - Status LEDs and test points The system will use an external 12 V DC supply. The 12 V rail will directly power the peristaltic pumps, while regulators on the PCB will generate the lower voltages required by the ESP32 and sensing circuitry. # Criterion For Success - The system will automatically prepare a beverage using at least four independently controlled liquid ingredients. - For requested ingredient quantities between 20 g and 150 g, the system will dispense each ingredient within ±5% of the target mass or ±2 g, whichever is larger, for at least 9 out of 10 trials. - Ingredient quantities will be controlled using real-time load-cell feedback rather than only predetermined pump activation times. - The controller will estimate the current liquid flow rate during dispensing and use this measurement when determining pump shutoff or pulsing behavior. - The system will continue to satisfy the dispensing accuracy requirement when the flow rate of a pump changes by at least 20% from its original calibrated condition. - The ESP32-hosted web interface will allow a user to select or customize a beverage, start dispensing, and monitor the system from a phone, tablet, or computer. - The system will prevent dispensing when no cup is detected. - If a pump is activated but the measured cup weight does not increase sufficiently, the system will stop dispensing and report a fault within 5 seconds. - After preparation is complete, the system will compare the measured final weight with the expected value and report whether the drink is within the required tolerance. |
|||||