Software apps and online services
Hand tools and fabrication machines
The IOTA coffee machine is a simple demonstration how IOTA can be integrated into a device. It shows the relative ease and simple code that can be used to have basic functionality in a standard machine.
This device will listen for tokens to be sent to a predetermined address and once received it will wake the coffee machine and dispense coffee to the user. The Nespresso machine is used to prove the concept, given that you have to load the coffee pods, rather than offer a fully fledged self-grinding solution that could be used in an office, co-working space or as a general vending machine.How It Works
A standard Nespresso has been modified to be controlled by an ESP32 development board with an attached E Ink display. The ESP32 can sense whether the boiler is hot or cold as well as emulating a button press for a coffee. The ESP32 connects over WiFi to an IOTA node and checks regularly to see if a new transaction has appeared at the address. When it finds one, it wakes the Nespresso machine and dispenses a coffee.ESP32 Prototype
Even before opening the Nespresso machine I was able to sketch out much of the software into four routines: Setup, Fetch transactions, Request Payment and Dispense Coffee.
These routines controlled multiple different elements such as the WiFi, the Eink screen, the HTTPS calls and the button functions. See the code comments to have a better understanding of the program flow.
I spent most of my time with the E Ink screen: formatting and adjusting the different screens that user would be presented with. Next was the HTTPS library which was annoyingly hard to debug and the JSON library.
After that was completed I finally went out and bought the cheapest Nespresso machine and started to tear it apart.Nespresso Teardown
The Nespresso machine was definitely not designed to be disassembled. The two torx screws on the bottom were no problem, however the various hidden notches and confusing order of parts made it hard to disassemble without destroying the components. Eventually, I was able to get it apart and thankfully there were no glues, resins or stickers to hinder the reassembly.
The main points of interest were the control PCB (which housed the devices buttons), the front shroud that covered the coffee spout (which would hold the ESP32) and the power supply (that I'd need to vampire off to power the secondary device).
The control PCB was well designed with a very effective button design of two concentric circles that needed to be shorted in order to activate and LEDs that signaled the boiler state. Using the excessive test points provided, a multimeter and trial & error I found out the location of Ground, the Buttons and the LED power circuit. I jotted these down before continuing on.
Next was the front shroud that covered the coffee spout. The contoured design gave me the headroom to squeeze the ESP32 development board into the Nespresso machine without looking too ugly. I removed the shroud and using a vernier I was able to measure the part and replicate it in a CAD application.
Finally was the power supply which was well placed at the back of the machine and away from liquids. I determined there would be enough space to fit a small 240v to 5v buck converter to power the secondary system and marked where I'd need to cut.3D Printing
After measuring the shroud I created a less sexy, but infinitely more function front shroud that would just fit the dev board. I also added in a programming port in case it was moved to different WiFis and incase it needed to be upgraded.
I went through several shroud designs before reaching the one I've uploaded below. I then used my Cetus3D mk3 printer to print out the designs. The process was iterative; slowly adding model features 1 or two at a time to ensure that it would interface with the Nespresso machines joining mechanisms neatly.
Below are my iterative prints I used to get to my final design.
Then after a bit a last bit of printing I was able to get the final front plate I'd use in the coffee machine. Not even close in terms of industrial design but it did the trick.
So now I had everything I needed: a coffee machine, a programmed dev board and a 3D printed shroud. It was time to wire it up, or so I thought….
After a little bit of testing with the ESP32 and the control board, I wasn't able to emulate the pressing of a button by driving the button pads HIGH or LOW. This stumped be for a bit but after figuring out that mechanically shorting them worked a charm (just like the mechanism intended 😂) I was able to come up with a solution.
From a previous project I had lying around, which involved making my door phone open via WiFi, I was able to harvest a section of the PCB which controlled a tiny relay switch. I delicately wired this up and tested it on the Nespresso machine. It worked well and I integrated it into the design.
The final wiring for the control PCB looked a little messy but worked perfectly. First, I tied the ground plane of the board to the ESP32 ground which would let me accurately sense the boiler state from the LED circuit. Secondly I wired one of the buttons into the Normally Open (NO) terminal of the relay to short the button out when required.
I carefully added the power supply system and then taped all the components with craftsmanship that could be described as a fire hazard.
After it was all wired up, I used the debugging port to power the device, double checked the code and then proceeded to check that the relay was firing.
Finally it was time for the to power the coffee machine on and check all the routines worked. It booted, connected to the WiFi and waited for a transaction. Once sent the device saw and fired up the boiler then started to dispense a long coffee.
I quickly pulled the plug as there was no water at this point but it was all ready to go. I put the covering back on and screw it into place, which left me with this handsome bugger.Drinking Coffee
After finishing up all that was left to do was drink coffee.
Overall I was happy how this project turned out. This was the first time in a while I was able to tie together hardware, software and 3D printing to create something completely different. Feels good.
I hope this gives you an idea how you might go about integrating IOTA into your next project. Plus, check out our current contest on Hackster, I'd love to see you there!
For example, imagine a parking lot that recognizes the number plate of a vehicle as it arrives. Once the vehicle exits it calculates the time spent and asks the owner, or event the vehicle its self, to send tokens to the parking structure wallet in order to leave. This would simplify the maintenance of the parking lot as you wouldn't need a change machine or to restock the ticket machine. Additionally, you wouldn't need a card or an account to keep track of credit cards or credit. Just send the tokens and leave.
I'd like to thank you for getting this far down the page and hope you enjoyed the post.