Mechanics

The connection of MOSFET, CNC Shield and the HX711 amplifier to the Arduino board allows us to seamlessly control the liquid and pearl dispensing with weight control. This allows us to obtain the precise dispensing of each ingredient without fail. The use of Arduino Cloud in conjunction with a compatible Arduino board (Giga R1) also allows us to dispense various types of bubble tea remotely, as long as a stable and strong Wifi connection is established on both devices (harder than it sounds in NTU). As of now, our presentation model only has 9 preset bubble tea combinations to choose from, but it is worth noting that our machine is extremely scalable and the code can be easily modified to accommodate a wider variety of recipes and options, including more types of tea, ice dispensing, etc.

 

Block diagram summarising electrical components of our bubble tea dispenser

 

User Selection

The user interacts with the Arduino-based user interface to make selections, such as tea flavor, sweetness level, and whether they want pearls in the drink. Any device on which the Arduino Cloud App can be installed can work as the user interface for our bubble tea dispenser.

Phone with Arduino Cloud installed

 

Liquid dispensing

The Arduino serves as the control center, receiving input from the user and managing the dispensing process. Based on backend code on Arduino Cloud, the Arduino translates the user’s selections into specific instructions for the MOSFET. The Arduino sends signals (digital HIGH/LOW) to the MOSFET, which has 4 channels, each of which is connected to a liquid pump. When a MOSFET is activated by the digital HIGH signal, it allows current to flow to the associated pump, therefore allowing a specific liquid to be dispensed from that pump.

In total, there are 4 pumps, controlling milk tea, green tea, fruit tea and sugar syrup. For example, if a user selects a sweetened milk tea, the Arduino activates the MOSFETs connected to the milk tea and sugar syrup pumps.

 

Cooked pearl dispensing

Based on the user input (whether they want pearls in their drink or not), the Arduino sends commands to the CNC shield to initiate the pearl dispensing process. The CNC shield is responsible for inputting instructions from the Arduino and sending pulses of precise control signals to the servo motor which it is connected to. The shaft of the servo motor rotates 360 degrees for the duration that the CNC shield sends pulses to the servo motor. The Archimedes screw pump connected to the shaft of the servo motor also rotates 360 degrees, allowing pearls to be pumped upwards from a holding container into a cup.

 

Dosing control

One key advantage of a fully automated bubble tea dispenser is consistency  – automated dispensers ensure that each bubble tea is made with precise measurements of ingredients, ensuring the quality and taste of the bubble tea to uphold the brand’s standard.

As such, dosing control of our automated bubble tea machine is a critical aspect that we needed to nail. We have chosen a weight-based approach to precisely regulate the liquid dispensing process. This is accomplished by incorporating a load cell beneath the bubble tea cup holder, enabling real-time measurement of the liquid’s weight as it flows into the cup.

Before dispensing begins, the system is calibrated. This involves determining the tare weight from the load cell, which is the weight of the empty cup. The bubble tea dispenser only needs to calibrate once – for subsequent drinks, the tare weight of the first cup is used.

During dispensing, the weight of the cup is measured by the load cell (in intervals of 0.5s) and relayed to the Arduino. The Arduino then compares the current weight with the preset target weight. If the current weight is less than the target weight, the Arduino keeps the MOSFETs activated, allowing the pumps to continue dispensing liquid. If the current weight equals or exceeds the target weight, the Arduino sends a signal to the MOSFETs to deactivate, halting the dispensing of the liquid. The load cell is similarly integrated with the CNC shield and the servo motor. When the load cell indicate that the desired pearl weight has been reached, the Arduino sends a command to the CNC shield to stop sending pulses to the servo motor, ceasing the dispensing of pearls.

The load cell is highly precise, providing weight measurements of 3 decimal places. It is in good working condition and accurate, as validated by other weighing machines. Moreover, using a load cell enables the correct amount of liquid to be dispensed regardless of factors like change in liquid density or pressure differences within the same container.

 

Hardware

Housing

The exterior of the machine is a storage container of dimensions 74 x 38 x 31 cm which snugly fits four 5L jerrycans and an electronics compartment. A Dremel was used to remove circular pieces of the storage lid to allow the liquid pumps to stick out of the container.

The whole setup

 

Liquid dispensing system

Liquid containers

Food grade 5L jerry cans storing milk tea, green tea, fruit tea and sugar syrup.

Dispensing mechanism

Food-grade water pumps

Pump holders

A 3D printed pump holder than fits snugly on the mouth of the jerry can. it provides an opening for the tube from the water pump to enter the liquid container, while also preventing the liquid inside the liquid containers from being exposed to the exterior environment, preventing oxidation or contamination of liquids ingredients.

Pump holder

Tubing
Food-grade tubing connects the ingredient containers to the dispensing points.

 

Cooked pearl dispensing system

Labelled diagram of cooked pearl dispenser

Pearl container

Food grade plastic container. A small hole is drilled on the lid of the plastic container for the food grade PVC pipe to be fitted through.

Dispensing Mechanism

A food grade Archimedes screw pump is placed inside the food grade PVC pipe. The pipe contains a fitted spout made out of food-grade plastic tubing, which will funnel the pearls brought by the Archimedes screw pump into the cup. Food-grade silicon sealant is used to adhere the tubing to the pipe.

Support

The pearl container is fitted in a 3D printed stand which provides the optimal angle of tilting for the pearls to be transported up the PVC pipe.

3D printed pearl container support

Pump

We used an Archimdes screw pump to transport our pearls. As 3D printed components are not food safe, we extracted the auger from a chocolate fountain machine and used it for our pearl dispensing machine. In our machine, the auger is inside of the food safe PVC pipe.

Motor

A stepper motor with a rated voltage of 12V, rated current of 1.5A, and torque of 0.392Nm was used to rotate the Archimedes screw pump, which brings pearls from the pearl container into the spout to be dispensed out of the system. The stepper motor is connected to the Archimedes screw pump using two 3D printed components, the stepper motor holder and a connector which connects the rounded shaft of the motor with the auger which has a rounded rectangular hole.

Motor holder (left), Connector (right)

 

Cup system

Load cell support

A support is 3D printed for the load cell. This allows the cup holder to be mounted on the load cell support.

Load cell support

Cup holder

A cup holder is 3D printed to be mounted on the load cell support, holding the cup in place during the dispensing process to prevent spills. The load cell support is connected to the cup holder using two SCH M4 screw​s (16 and 20mm).

3D printed cup holder integrated with load cell support

 

Power supply

The bubble tea dispenser requires a stable power supply to operate. The Arduino Giga R1 will be powered by a computer, whereas the MOSFET and the CNC Shield have similar power specifications and will both be connected to a power generator on 24V, 2A.

 

Software

Software used: Arduino IDE, Arduino Cloud

Arduino IDE was the main platform we used in the initial stages of the project. For all of us, it served as the gateway to the World of Arduino as it was the easiest to navigate, and had many test codes and libraries that were easy to access. It also required only a connection to the Arduino board in order for us to test out simple code (as opposed to network connection, which proved especially challenging on NTU Wifi and even personal hotspot). Even as the codes got more complex, we coded mostly on Arduino IDE and only at a very much later stage translated the Arduino IDE codes onto Arduino Cloud, which was much more complex to use.