DIY Connected Espresso Machine: Assembly (Part 7)
In the last article, the firmware was configured to be updated Over-the-Air so nothing stops from embedding NodeMCU and the whole controller board into the shell of the espresso machine to return its look back to the original!
For a long time, it was taken apart and all the prototyping was done on the breadboard, so eventually, the controller board can be assembled into one piece and this article will be fully devoted to the hardware part.
Hardware
The only missing piece to put controller board inside the espresso machine is power.
During prototyping, a microcontroller is usually powered from the computer, while in a real device it should take power from the existing source like a power socket powering the device itself.
Since a power socket has different nature of electric current to power microcontroller an AC/DC converter should be used, I took Hi-Link HLK-PM01 with 5VDC/3W output that should be enough to power the NodeMCU as well as controlling relays.
From one side it is connected to high-voltage AC wires, while from the other it can be wired to Vin and GND pins of the NodeMCU.
It’s important to understand how the AC will flow due to high voltage, so here is a simple scheme to understand connections.
Assembly
As everything is tested and ready to be assembled, let’s do it!
To put the controller board inside the espresso machine, I took a simple prototype board and a case that can accommodate the board and started to plan how all the components should be placed inside.
Apart from that, I decided to use a number of joints to connect external wires to the controller board. To use joints and to connect to NodeMCU with a USB cable a few perforations should be made, which I did with the help of a hobby-level Dremel-like tool.
A much more complicated task (for me) was to solder everything on the board. Instead of hard soldering NodeMCU onto the board, I used a few pin header rows as an adapter, so the microcontroller can be replaced (just in case).
On the backside, I used wires to connect joints to the microcontroller pin headers, but AC load goes to relays through the solder covered with the special composite (blue) to avoid wear-out and short circuit.
I marked AC wires of the espresso machine with colored heat-shrink tubing to avoid confusion and placed everything inside the espresso machine shell.
That’s it, finally, it got its original look! Hooray!
Next Steps
Well, for me it was the hardest part of the project which delayed the articles series, so I am really happy to eventually complete it and move to more advanced examples, like REST API and Web App!
The project code is available here: https://github.com/loginov-rocks/Connected-Espresso-Machine
That’s all for today, see you next time!