The goal of this project is to make a nice interface to my coffee-machine. It is already equipped with an ESP8266 from an earlier project. The most sensible approach would be to build an app for my smartphone, or integrate it with some existing home-automation platform. Instead of an app, I want to have a physical control interface with lights and switches. Eventually the idea is to have a big home(-automation) control panel. The coffee alarm will be the first subsystem.
The coffee-machine is a very basic one, which comes with the classic sputtering sound when the coffee is almost done. This is one of the nicest sounds to wake up with, especially when combined with the smell of fresh coffee. On the inside of this machine is a lot of empty space. A long time ago, I managed to fit in an old Nokia charger for 5V, an ESP8266 NodeMCU board and a relay. I am able to control the relay from the network using the ioESP library. Unfortunately I screwed up (literally) by accidentally replacing one of the normal screws with a one-way screw. Therefore I’m not (easily) able to access the ESP and update the firmware inside the machine.
The PCB from SeeedStudio
I wanted to use the PCB as the front panel. The challenge was to have no visible traces on the front. Because it is almost impossible, I decided to put the TM1637 display driver on the front, which looks kind of cool. All the via’s are placed underneath the chip. Crossing traces without using via’s was solved by using zero ohm resistors.
The PCB was designed in KiCad and ordered from SeeedStudio. The reason to go with SeeedStudio was because they are cheaper than my favorite supplier itead when you decide to use another color than green. It was not as good as expected. They decided to put a serial number on the front of the PCB and they also treated some of the holes as via’s by poring copper in them. I ordered 5 PCB’s and it seems arbitrary which ones they added copper to. Also two of them were slightly damaged as can be seen in the picture.
The 7 segment display
Attaching the 7 segment display to the PCB with connections on only one side of the board is a little bit of a challenge. I figured out that a nice way of doing it would be to use SMD pin headers. in combination with a little piece of proto-board. This would hold the display firmly attached to the PCB as well.
Well that looks nice, but unfortunately I screwed up in the PCB design by mirroring the connections. The fix is ugly but functional.
Another thing that I screwed up are the LED’s. The initial idea was to use nice panel-mount LED’s from banggood. The title clearly says ‘6mm’ and I probably also measured this before designing the PCB. However I still screwed up (again!) by making the holes 5mm instead. However that did not defeat me. Some of the traces were to close to the hole so it was not an option to make the holes bigger myself. However I did have a big pile of traditional LED’s left, which are exactly 5mm. With some glue they remain nicely in place.
The rotary encoder
And there is more that I screwed up. The circuit below I simply copied from somewhere on the internet. The increment and decrement channels of the rotary encoder are equipped with (a wrong implementation of) a low-pass filter to prevent spikes to the micro-controller. This was simply fixed by removing R7 and R9, which was possibly because the breakout-board of my rotary encoder already had pull-up resistors on it.
The knob can also be pressed, but I did not think of equipping that with a low-pass filter. However the fix was relatively simple because I had some zero ohm resistors. I simply replaced R14 with a 10k resistor and added a capacitor on top of R23. Coincidentally there was a component next to it which was attached to ground, which I used to connect to other side of the capacitor.
I will talk about the software for the Arduino and Banana-pi in another post. The banana-pi basically interfaces with the coffee-machine and the Arduino on the clock.
The following video shows how the interface is operated at the moment.