In the last post we discussed the
IPowerInterface interfaces. In this post we will discuss the remaining interfaces that we need to implement.
IScaleService will provide the weight on the scale to the app through the Weight observable. The weight is in grams and hopefully accurate to 0.1g across the entire range (two load cells, equals 2kg range. The drip tray is 700g, so we need to subtract the weight of the drip tray, which leaves us with 1.3kg of usable range. Good enough for our purpose. The scale supports taring (resetting the balance to zero) and subtracting a predefined weight (e.g. the portafilter weight if you forget to tare). The actual taring needs to take place inside the Arduino, as the brewing process is controlled by the Arduino as well, and we need to auto-stop the brewing process as soon as a target weight of the shot is reached.
Note that this interface is not prepared yet for load cell calibration. Reading upon the procedure it would involve a five point calibration with different weights to account for non-linear degradation of the load cells repeated 2 to 3 times, taking the averages. This procedure needs to be repeated every year. I’ll have to buy some calibrated weights and experience with this to be able to design the software for this.
The grinder will be controlled by the espresso machine as well to provide accurate timed dosing. A simple relay will control a socket at the back of the machine to plug the grinder into. The interface will provide indications about power status, power usage, grind time and progress. In addition, it will allow specifying the desired grind time with 0.01s accuracy. The grinder can be manually turned off or on, can auto-turn on/off for the specified duration and can be given a pulse to grind approx one gram in case you need to add a little more. (This is especially convenient if you’re dialling in a new coffee and you’re not sure about the grind time yet).
To perform maintenance there is a set of two routines, with accompanying observables to monitor the process:
- The group head flush routine, which briefly flushes the group head so you can rinse the screen and the portafilter after a brew.
- The blind flush routine which completes a complex routine previously described in this post. During the routine, the machine will wait for the portafilter to be changed by the user and subsequently for a push on the continue button, hence the
Continuemethod on this interface.
And finally, la pièce de résistance:
IEspressoMachineService, the interface controlling the brew process. We find observables for water pressure, group head temperature, heat exchanger temperature, preinfusion time, desired shot weight and temperature, brew state and whether the machine is waiting for the conformation of a step during the brew process. It provides methods for setting shot weight, pre-infusion time and for controlling the brew process (start, stop, auto, continue).
All these interfaces will be implemented through Simulation at first so that we can test the app independently from the hardware and firmware. A future post will be dedicated to simulation and testing of the app.
Stay tuned for the next post, some hardware came in from China, so we are going to look at that soon!