Project

# Title Team Members TA Documents Sponsor
50 Closed-loop High-accuracy Universal Drink System
Aiden Robinson
Kevin Lu
Xiyue Zhu design_document1.pdf
other1.pdf
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.

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

Isaac Brorson, Stefan Sokolowski, Mitchell Stermer

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

Featured Project

Multipurpose Temperature Controlled Chamber (for Consumer Applications)

#TEAM MEMBERS:

Stefan Sokolowski (stefans2)

Mitchell Stermer (stermer2)

Isaac Brorson (brorson2)

#PROBLEM:

Have you ever put a drink in the freezer to make it cool down faster, only to forget about it and later find it exploded and frozen?

Or have you wanted to cook a steak, but forgotten to move it from the freezer to the refrigerator the previous day?

Finally, has there ever been a time when you set food out overnight in order to prepare it for the next day but only to find that it didn’t thaw as expected?

We have done all of these things plus more and have always wished there were a smart device that could quickly cool or warm food without freezing or cooking it.

#SOLUTION:

Our project would be a programmable temperature controlled chamber which allows a user to set the temperature curve of a food item they are planning on consuming in the near future. This device would be able to quickly heat or cool food to a desired temperature, then hold it at that temperature until the user is ready to use the food. The way someone would use this device would start by placing their food item in the device's insulative chamber and closing the door. The user interface would present the user with a variety of options: standard heating or cooling presets for common food items, temperature set and hold, or the ability to set a detailed temperature curve.

If you want to cool a drink to just above freezing, you would select the corresponding menu option, and this device will lower the temperature of its chamber to well below freezing, then slowly raise its temperature to ensure the drink doesn't freeze.

If you select the menu option to thaw a steak, this device will raise the temperature of the chamber to just below the point at which meat begins to cook, (roughly 105 degrees F) then slowly lower the temperature towards room temperature.

This device could also be used for applications outside of cuisine. Say you’re running an experiment to test the capacity of a battery at different temperatures. You could set a temperature curve to visit several different temperatures and hold each one as your battery capacity tester runs its tests. This would allow you to automate an experiment that would otherwise require intermittent attention over the span of multiple hours.

There are temperature controlled chambers on the market, but they’re all exorbitantly expensive and large for a household kitchen. We want to make a device that could sit on a countertop and be affordable to anyone who has the budget for other standard kitchen appliances.

![pic](https://i.imgur.com/HJiCQsN.png)

#POWER

We plan to use a dual output DC power supply such as the RD-125B[1] to power both our digital electronics and the high power heating and cooling elements. This power supply would be plugged directly into an outlet using a 120V plug, and would create 5V and 24V DC outputs. According to its datasheet[1], the RD-125B’s 24V output is rated to supply 4.6A, which equates to just over 110W. Based on our research of thermoelectric coolers and heating elements, we think this should be plenty of power for our application.The RD-125B’s 5V output is rated to supply far more power than our 5V electronics could possibly draw.

#MECHANICAL DESIGN

In order to reach temperatures below freezing with thermoelectric coolers, we’ll need to thermally insulate the chamber very well. Since this insulation needs to be able to withstand the heat produced by the heating elements, we landed on Kaowool. This ceramic wool insulates very well while also being rated to over 1000℃[2].

Since our device is intended for food applications, it’s important for our temperature controlled chamber to be waterproof and food safe. For this reason, we plan to purchase an off-the-shelf cooking pot such as this one[3]. By fitting a smaller pot inside of a slightly larger pot, we can create an affordable and convenient way to insulate our chamber. We can fit the gap between the pots with Kaowool insulation, and use the larger pot’s lid with Kaowool in it to seal the top.

To heat the chamber, we plan to wrap a resistive heating element (such as nichrome wire) around the inner chamber. Since we plan to use an electrically conductive pot for our inner chamber, we’ll need to insulate the heating element from it to prevent shorting. This can be done with Kapton tape, which can withstand temperatures ranging from -269℃ to 400℃[4].

To cool the chamber, we plan to use thermoelectric cooling modules. These require a good thermal pathway to work well, so we’ll need to use a material with high thermal conductivity to mount them to the chamber wall. We plan to ask the machine shop to machine us aluminum mounts which match the curved outside surface of the pot composing the chamber to the flat faces of the thermoelectric cooling elements. Additionally, we’ll use thermal grease to reduce the thermal resistance of the junctions. The thermoelectric coolers will require rectangular holes cut through the wall of the outer pot so they can pump heat to outside of the device.

We plan to mount our circuit board and the user interface electronics in an E-box attached to the side of the outer pot. We can use standoff rods to ensure the electronics don’t get heated or cooled too much from being close to the chamber, though we expect that our thermal insulation will be good enough for that not to be a concern.

#HEATING SUBSYSTEM

As mentioned in mechanical design, we plan to use a resistive heating element to heat the chamber. This will be powered by the higher voltage DC power rail produced by the power supply, which is 24V for the RD-125B. We'll use a solid state switch to control the current through the heating element. This allows us to control its power using PWM, which is essential for ensuring the chamber temperature remains below a certain prescribed level.

The simplest and most cost effective switching device would be an N-channel power MOSFET such as the Taiwan Semiconductor TSM170N06CH[5].

#COOLING SUBSYSTEM

We plan to use thermoelectric (Peltier) coolers to provide the cooling. These work as heat pumps, so we’ll need heat sinks and cooling fans to dissipate the heat they produce. The thermoelectric coolers and fans will be run off of the same higher voltage DC that powers the heating element.

We want to have the option to run the thermoelectric coolers in reverse while the chamber is heating to prevent their heat sinks from cooling down the chamber. To do this we’ll need to power the thermoelectric coolers through an H-bridge so that we can reverse their polarities. The H-bridge can be composed of two N-channel MOSFETs such as the one mentioned above[5], and two P-channel MOSFETs such as the Rectron Semiconductor RM15P55LD[6]. The H bridge can be controlled by the STM32 microcontroller, allowing us to use PWM to vary the power supplied to the thermoelectric coolers. We may or may not need gate drivers for the H-bridge. Gate drivers are necessary for a fast switching rate, but our application doesn’t require high frequency PWM.

#TEMPERATURE MEASUREMENT SUBSYSTEMS

To be as precise as possible, we want distinct temperature sensors for measuring the temperature of the air in the chamber and the temperature of the item being warmed or cooled. Measuring the temperature of the food is made difficult due to many food items having insulative packaging. (Glass bottles, styrofoam containers, etc...) Since we want our device to work for as wide of a range of food items as possible, we plan to give the user the option to select from multiple different interchangeable food temperature probes. Temperature sensing probes could include a meat thermometer, a flat metallic probe that could be placed on frozen meat, or a ring shaped thermometer that could go around a bottle or can.

Temperature sensing (thermocouple / thermopile) may require some basic analog electronics, such as an op amp to amplify the small voltage produced by a thermocouple.

#USER INTERFACE SUBSYSTEM

We plan to use an STM32 microcontroller, for our use a STM32F103C8T6 would probably suffice with IO and processing power, but more capable F4’s might be considered if we add more sensors. The microcontroller and user interface will require logic level voltage DC.

We would most likely use an I2C enabled LCD display as well as a bright, external RGB LED in order to show the user what state the machine is in from a distance. We plan to use a push button rotary encoder to allow the user to interact with the device, in addition to an ON/OFF switch and a "cancel" button. User feedback should be fairly simple and if time allows, we might consider connecting the device to an external service to send users notification as to the status of their heating/cooling cycle.

The user interface screen will have multiple interactive menus: one to select the behavior mode of the device, one to set temperature and time values, one to show a temperature curve, and one to be displayed while the device is operating.

#CHALLENGES & CONSIDERATIONS:

- Everything inside the chamber will need to be able to withstand the full range of temperature.

- Electronics will need to be very well thermally insulated from the chamber if we want to use it as an oven.

- Since thermopiles operate off of a temperature gradient, they require a stable case temperature. This means we'll need to keep the thermocouple in a temperature controlled environment.

- The chamber should ideally be made watertight for the case of a spill or leak.

- When making the mechanical design, we'll need to keep in mind how different materials expand / contract at different rates when they're heated / cooled.

#CRITERION FOR SUCCESS:

- Inside of the chamber should be able to reach at a low end 0 degrees Celsius and at a high end 40 degrees Celsius.

- Be able to hold temperature to within +-5 degrees Celsius of target temperature.

- User has the ability to set target temperature, heating/cooling curve and max/min temperature allowances through GUI on an LCD display.

- Display of current temperature, and possibly a plot of the temperature vs. time graph.

- Ability to select the behavior of the device from a provided menu of presets for different foods.

- (Stretch Goal) We could possibly include multiple different methods to measure food temperature in addition to the ambient temperature. (Stainless steel probe to measure the internal temperature of meats, thermocouple for bottles and containers)

[1] Power Supply:

https://www.mouser.com/datasheet/2/260/RD_125_SPEC-1511572.pdf

[2] Kaowool:

https://www.morganthermalceramics.com/media/llhhadih/5-14-205_kaowoolblankets_072018.pdf

[3] Aluminum pot: https://www.amazon.com/Winco-Winware-Aluminum-Stockpot-12-Quart/dp/B001CHMIQ4/ref=sr_1_10?crid=1VECOQHCN2UC2&keywords=aluminum%2Bpot&qid=1706684643&sprefix=aluminum%2Bpot%2Caps%2C93&sr=8-10&th=1

[4] Kapton tape:

https://www.dupont.com/electronics-industrial/kapton-hn.html#:~:text=Kapton%C2%AE%20HN%20has%20been,C%20(752%C2%B0F).

[5] N channel MOSFET:

https://services.ts.com.tw/storage/resources/datasheet/TSM170N06CH_A2211.pdf

[6] P channel MOSFET:

https://www.mouser.com/datasheet/2/345/rm15p55ld-1396325.pdf

Project Videos