Introduction
The Smart Milk Vending Machine is my final project, designed to create a simple, low-cost, and automated system for dispensing a selected quantity of milk. The main purpose of this project is to make the milk dispensing process easier, more controlled, and less dependent on manual measuring. Instead of manually pouring and measuring milk, the user can simply press one of the three push buttons to select the required quantity. The system then controls the pump and dispenses milk through a tube for the selected amount.
The main structure of the project is based on a bucket, which is used as the main container/body of the system. The bucket does not contain the electronic control components. Only the pump and the required milk tubes are placed inside the bucket. The pump is connected to two tubes. One tube is used as the milk inlet, through which milk comes from the milk source to the pump, while the second tube acts as the milk outlet and carries the milk from the pump to the dispensing point. This arrangement keeps the milk-flow path simple and makes the system easier to assemble and maintain.
The control system is based on the XIAO ESP32-C3 microcontroller. It acts as the main controller of the vending machine and receives input from three push buttons. Each button can be assigned to a different quantity, such as 250 ml, 500 ml, and 1000 ml. When the user presses a button, the XIAO ESP32-C3 identifies the selected quantity and activates the relay module. The relay module controls the pump, allowing the pump to operate for the required time. By controlling the operating time of the pump, the system can dispense different quantities of milk.
A sensor is also included in the project to monitor the milk level or the availability of milk. The sensor provides information to the XIAO ESP32-C3 so that the system can detect whether sufficient milk is available before operating the pump. This can help prevent the pump from running when there is not enough milk. The sensor also adds an automatic monitoring feature to the project and makes the system more reliable.
The electronic components such as the XIAO ESP32-C3 and relay module are placed in a separate control box outside the bucket, while the three push buttons are mounted on the outside so that the user can easily operate the machine. Keeping the electronics separate from the milk-flow area makes the design more organized and helps protect the electronic components from contact with milk or moisture. The pump and tubes remain inside the bucket, while the outlet tube is brought to the dispensing point.
The working process of the project is straightforward. First, the user selects the required quantity by pressing one of the three push buttons. The XIAO ESP32-C3 receives this input and checks the sensor condition. If the system is ready, the ESP32-C3 activates the relay module. The relay then switches the pump on, and the pump draws milk through the inlet tube and pushes it through the outlet tube. After the required dispensing time, the ESP32-C3 switches the relay off and stops the pump. In this way, the machine provides an automated method of dispensing a selected quantity of milk.
This project combines embedded programming, sensor interfacing, input and output control, relay control, and basic mechanical design. It also demonstrates how a microcontroller can be used to control a real-world system using simple user inputs and sensors. The final design focuses on keeping the machine simple, practical, compact, and easy to understand while demonstrating the basic working principle of an automated milk vending system.
Problem Statement
When people purchase milk, they may not always be sure that they have received the exact quantity they asked for. In manual milk dispensing, the amount is measured by a person, which can sometimes lead to small differences between the requested quantity and the actual quantity given. This can create confusion and dissatisfaction for customers, especially when they regularly purchase a specific amount of milk.
There is also a lack of consistency in manual measurement, as the quantity may vary slightly each time. Customers therefore need a simple and reliable way to ensure that the quantity of milk they receive matches the amount they requested.
Reason I choose this Project
I chose this project because I wanted to create a practical system that solves a common problem in everyday milk dispensing. I was interested in combining electronics, programming, sensors, and mechanical components to make a useful automated product rather than making a project that only demonstrates one component. The milk vending machine gives me an opportunity to use the XIAO ESP32-C3, push buttons, a sensor, relay module, pump, and tubing together in one complete system. I also chose this project because it allows me to explore how an automated machine can dispense a selected quantity consistently, while learning about embedded programming, input and output control, sensor interfacing, and the operation of a pump.
Objectives
The main objective of this project is to design and develop a simple automated milk vending machine that can dispense a selected quantity of milk with minimum manual measurement. The project aims to use the XIAO ESP32-C3 as the main controller to receive input from three push buttons and control the pump through a relay module.
Other objectives of the project are:
- To provide three quantity options, such as 250 ml, 500 ml, and 1000 ml.
- To control the milk pump automatically according to the selected quantity.
- To use a sensor to monitor the milk level and help prevent empty operation.
- To design a simple and compact system using a bucket, pump, and tubes.
- To keep the electronic components organized in a separate control box.
- To understand and apply embedded programming, sensor interfacing, relay control, and pump control.
- To develop a practical prototype that can make milk dispensing more consistent and convenient.