Did you ever woke up in the morning wishing to have your first coffee already brewed? Well, this project may be you solution!
For this automation project we simply need a coffe machine, one 230V AC to 5V DC converter and a relay in combination with an ESP-01, have a look at the linkes below:
Converter
ESP-01 with programmer
Relay board
Caution: In this project we deal with 230 Volts! This requires prior knowledge and should only be done by persons with appropriate training and experience. The author will not take responsibility for any damage caused by the use of information provided below.
For the first step disassemble the coffe machine until you have access to the connections of the power switch. Near by you need to find some space in the housing where the relay and the power converter can be placed. Make sure that the position has no contact to water, steam or heat!
In the second step connect the the relay parallel to the switch using the NO (normally opened) connector. Then connect the relay board with the 5 Volt output of the converter. For the input find a place where you can attach it to 230 Volts. Commonly the power switch has a light to indicate wether it is turned on or off. There it probably is possible to contact with the 230 Volts. Make sure that every connection is perfectly isolated – safety first!
I added some small seperating walls between the converter, relay and the power switch to realy make sure they do not come in contact with each other. See the pictures below.
Once everything is connected program the ESP-01. You may use this code:
It contains a webserver where you can program date and time to switch on the relay. Besides it includes a NTP client to get the time. You just need to add your Wifi SSID and password in Wifi.cpp.
![](https://projects4maker.com/wp-content/uploads/2021/03/Coffee_3.jpg)
Double check all connections, plug the ESP into the relay board and connect the coffee machine to mains. Try to switch your coffe machine on and off via the webserver running on the ESP.
Once everything works fine reassemble all parts of the coffee machine, prepare it to brew some coffee, program the desired time, wait and enjoy your coffee!