Coffee machines play an important role in modern life, especially in business places and families. In order to ensure that the coffee machine can be replenished in time when the liquid level is low, it is crucial to realize the low liquid level warning and alarm function. The following is an implementation of the low level alert alarm function based on the non-contact level sensor. Install the non-contact liquid level sensor in the appropriate position of the coffee machine to ensure that it is parallel to the liquid level without touching the liquid. After the installation, conduct preliminary debugging and adjust the sensitivity of the sensor to ensure that it can accurately trigger the alarm at the low liquid level. Set an appropriate alarm threshold according to the actual use of the coffee machine. This threshold should be low enough to prevent the coffee machine from still working when the fluid level is too low. At the same time, it is also necessary to avoid that the threshold is set too sensitive, leading to unnecessary alarm. Through the above steps, we can realize the low liquid level reminder and alarm function of the coffee machine. This method is simple and reliable, and can provide timely reminder for users to ensure the safety and stability of the coffee machine in the use process.