Automatic Coffee Machine
Automatic Coffee Dispenser

Control Requirements
After inserting a 1 yuan coin, a paper cup pops out from the dispensing slot, along with coffee. 2 seconds later, a hot water cup is dispensed and poured into a specified volume of water. After 60 seconds, the coffee flows out of the coffee outlet to complete the brewing.
Component Description

Control Program

Program Explanation
When a 1 yuan coin is inserted, X0 changes from Off→On, Y0 and Y1 are set and maintained, a paper cup is dispensed, and coffee is dispensed simultaneously. Y0 and Y1 normally open contacts are connected for 2 seconds, then the timer reaches the preset value, T0 normally open contacts are connected, so Y2=On, the hot water valve is opened, and simultaneously Y0 and Y1 are reset, the paper cup and coffee valve are closed. When the pressure in the mixing container reaches a certain value, X1=On, Y2 is reset, stopping the dispensing of hot water, while Y3=On, the stirring motor starts working until T1 reaches the preset value, T1=On, Y4 is set and maintained, Y3 is reset, the stirring motor stops working, and the coffee outlet begins to dispense coffee. When all the brewed coffee has flowed into the paper cup, X1 closes, Y4 is reset, and the valve at the coffee outlet is closed.