
Purchase a kit from the Schematix Store: Click here
Index:
Smart Coffee Software Features
Specifications of the Smart Coffee board:

Power in: 100~240VAC
On board DC power supply: 5VDC, 2A
On board 3.3V power supply: 1A
On board, Solid-Sate relays 100~240VAC live outputs:
2x Boiler element (10A)
1x Pump (10A)
2x Programmable relays (usually connected to solenoid valves) (1A)
Total combined output current limit from relays: 20A
Element 1, and Pump combined max current: 10A
Element 2, RLY1, and RL2 combined max current: 10A
7x 5VDC relay control outputs: (used to control external relays for high current loads)
2x Boiler element
1x Pump
4x Programable relays
Fuse:
2x 5x20mm, 10A
ESP32:
Model: 30pin Development Board
Quantity required: 2
Purchasing link: https://s.click.aliexpress.com/e/_DFc08KN
Inputs/Outputs:
4/6 wire Load Cell Input
I2C display screen interface
2x Pressure transducer inputs
2x Boiler water level detection probes
Brew Switch input
Espresso mode selection input
Reservoir water level detection options:
Reservoir touch-sensitive probe (for detecting water)
Reservoir float switch (compatible with NO and NC switches)
Ultrasonic water level detection
Ultrasonic distance sensor (for measuring water level inside a reservoir tank)
2x MAX31865 temperature sensors (compatible with 2, 3, and 4 wire probes. PT100 and PT1000 series compatible)
6x User programable GPIO pins (M1, M2, S1, S2, S3, and PT3) write your own code to make use of these pins to really customize your coffee experience
7x 5VDC relay control outputs: (used to control external relays for high current loads)
2x Boiler element
1x Pump
4x Programable relays
Smart Coffee Software Features:
Single and Dual boiler compatible with a single group head
PID and PWM logic boiler control
Boiler target can be programmed as Temperature or Pressure
Boiler water level probes (used to trigger a refill when required)
Display metric units (kPa, Celsius, grams, mls) or imperial units (PSI, Fahrenheit, Ounces, fluid ounces)
Pre-Infusion cycle for every coffee extraction (3 stages consisting of: Prime the system > Cycle pump on/off > Extract coffee until the programmed amount has been dispensed)
Momentary or latching switch compatible for Brew and Espresso mode switches
Pressure transducer inputs to control/monitor pressure
Programmable pressure safety limits (machines shuts down when safety limits are exceeded)
Thermocouple temperature sensors to monitor any temperature on the machine
Programmable pressure safety limits (machines shuts down when safety limits are exceeded)
Espresso shot output (when espresso mode is activated by the user)
Espresso shot timer
Espresso shot by weight target (requires loadcell)
Espresso shot by volume target (requires flow meter)
Pause boiler refill (pauses a boiler refill if an espresso extraction is currently taking place)
Ultrasonic distance sensor (used for machines with a reservoir tank to measure the water level)
Reservoir empty standby mode (prevents the machine from operating until the reservoir is refilled)
Programming and wiring guides:
Download the programming guide: click here
Download the wiring guide: click here
Purchase Sensors and Hardware:
ESP32:
Model: 30pin Development Board
Quantity required: 2
Purchasing link: https://s.click.aliexpress.com/e/_DFc08KN
Pressure transducer:
Max voltage input from pressure transducer: 5V
Recommended signal range: 0.5 to 4.5V
Recommended pressure rating: 200 kPa (0.2mPa)
(pressure rating should be at minimum 20% higher than your running pressure)
Purchasing link: https://s.click.aliexpress.com/e/_DkQsvxd
Optional G1/4 to 1/4BSP thread adapter (select type 2): https://s.click.aliexpress.com/e/_DdueKDl
Right angle adapter: https://s.click.aliexpress.com/e/_DE8J34X
Display screen:
Model: OLED SH1107
Interface: I2C
Pixels: 128x128
Input power: 5V
Purchasing link: https://s.click.aliexpress.com/e/_DlH1C43
Load cell:
Weight rating: 1kg
Wiring: 4wire
Purchasing link: https://s.click.aliexpress.com/e/_DdDwihl
4 Pin pogo connector:
Purchasing link: https://s.click.aliexpress.com/e/_DB2fN7N
Small size flow meter:
Model: USN-HS06P
Voltage: 5V
Barb Size: 5mm OD
Flow range: 30 ~ 150ml/min
Purchasing link: https://s.click.aliexpress.com/e/_DCCjQh5
Medium-size flow meter:
Model: USN-HS06PS
Voltage: 5V
Barb size: 7mm OD
Flow range: 0.1 ~ 1.5L/min
Purchasing link: https://s.click.aliexpress.com/e/_DFVTRbV
High-pressure Gicar flow meter:
Purchasing link: https://s.click.aliexpress.com/e/_Dlr1vgB
Thermocouple:
Compatible wiring: 2/3/4 wire
Type: PT100 and PT1000 compatible
Purchasing link for screw mount type: https://s.click.aliexpress.com/e/_DkV2nuB
Purchasing link for threaded mount type: https://s.click.aliexpress.com/e/_DD0nYYx
Ultrasonic Distance Sensor:
Model: A02YY
Output signal: PWM
Input: 5V
Purchasing link: https://s.click.aliexpress.com/e/_DFYOL3z
Switches:
Chrome LED lit momentary switch: https://s.click.aliexpress.com/e/_Dd0BleB
(can be used for the brew and espresso mode switches)
USB panel mount connector:
Purchasing link: https://s.click.aliexpress.com/e/_DksmHhh
Shielded multi-core cable:
28AWG, 2meter
Purchasing link: https://s.click.aliexpress.com/e/_DkdDW87
M3 Brass standoff:
These are handy for mounting the PCB
Purchasing link: https://s.click.aliexpress.com/e/_Dn3mUKB
Bug reporting and suggestions:
If you happen to find a bug in the software. Please send an email describing your software configuration, the sensors you are using, and the bug you have encountered to mail@schematix.co.nz
Updates for Smart Coffee:
Change log and updates:
V1.0 Base version published
PCB Dimensions:
Width: 101mm (3.97")
Length: 153mm (6.02")
Mounting hole spacing: 145mm (5.7") x 93mm (3.66")
Mounting hole size: 3.7mm

I have a load cell set up and when I calibrate it I can see the weight change on the display. When it reboots however, it stays at 0g no matter what I do. Any thoughts on how to troubleshoot this? Also, is there wifi support and homeassistant integration? That sounds SO good, but I can't tell if it was implemented
I was wondering the same thing but never got around to asking. I know there is a prime pump setting which one can set before the pre-infusion, but this dead time is just a 1-2 sec delay before anything happens. May be needed but would like to understand what is going on during this time. May be needed for some process? Not a big issue but would just link to understand.
Is there a way to add a delay to the new shot timer feature? I find that there is a significant delay(a few seconds) between when i pull the brew lever and when the pump actuates.
Hi Justin,
I also use a smart plug to turn my machine on in the morning before i get up. I have not had any issue with over pressure. Evrythings works as normal as if turning the machine on with the switch. Been doing this for over 6 months every morning. Just to give you another data point in your debugging. Maybe you have a loose connection in the pressure sensor wiring or a flaky pressure sensor? Godd luck in debugging. Hope you find the issue.
@amon one other issue I have noticed which has just randomly started happening recently. I have my machine connected to a smart plug so that the machine turns on in the morning so that its warm when I wake up. I have had zero issues with this setup, but recently the machine would be in the overpressure safe mode. the machine would still be warm, so I knew that it heated up, so I cycled the machine off and on, then it would heat up normally and not go into safe mode. we keep the machine on through lunch with no issues. I thought updating to v1.1 would fix it, but its still happening and its a daily occurrence. I tried turning the machine on without the smart plug and I could see the system reach the desired pressure and then exceed it without turning the heater off. not sure if this is the relay failing or a software issue. I have also noticed that sometimes the brew switch will not engage the pump, but resolves itself after cycling the power switch. not sure if these things are related, but both then to only happen on initial startup and not throughout the day.
Hi Amon, Just updated to V1.1 software and noticed that the version number in the two Display codes were not changed from v1.0 to v1.1. I changed my code to display v1.1. Display of timer works great.
Thanks for the update.
Amon, I do have one other question that I have been meaning to ask for sometime but just keep forgetting.
When I am pulling a shot, the pump is obviously turned on. However I notice that the heater also is turning off and on during pulling the shot. When the heater turns on, the voltage to the pump drops and the pressure flucuates. I don't know if the traces on the PCB have a resistance drop due to both pump and heater being on at the same time. Is there way to prohibit the heater from turning on while the pump is on. Maybe a way to adjust the relays section?
Hi Amon, I have a similar question to Justin below. Do you have any instructions for upgrading from V1.0 to V1.1 code. Does any of the calibation settings and user settings change? Do we need to print out the present settings to re-enter after upgrading firmware. Also is the a change log somewhere listing what changed from V1.0 to V1.1?
Still enjoying very much the Smart Coffee upgrade to my Expobar Office Lever machine. Got pre-infussion working and gavimetric load cells working.
I just upgraded the software to v1.1, decided to do a fresh install on each ESP32(and turns out, one of them had an issue and would not connect via the USB). Therefore, I recalibrated everything. for future updates, is it required to update the slave esp32? would recalibration be required? also, I tried playing around with Pre-infusion and trying to send enable/disable commands gave an error. when it did work, the scale seemed to wig out and the scale shot up to 2000+ grams before the end of Pre-infusion. Therefore, i decided to turn off pre-infusion, but i could only do so by lowing the priming and pre-infusion timers
*correction, looks like the reason that sending the commands for pre-infusion gave an error is that i copy and pasted from the programming guide and there is a space before the _ symbol. The commands worked correctly when i figured this out. There is the same issue in the guide if you copy and past commands like e command “ENABLE_ TRANSDUCER_1_KPA_SAFE”, notice the space between the _ symbol and TRANSDUCER.
Hi
I have a Wega mininova with 1group solenoid valve, where on the pcb would I install that solenoid? Instructions only has 2 solenoids, a fill/brew valve pin and hotwater valve
Don't thnk it was a random glitch. As the reboot did clear solve, the issue, I could repeat the same effect again. When the panels returns from the "Fill Reservoir" message, the "Refilling Boiler" message returns but the pump does not restart to filling the boiler.
Hi Amon,
I have noticed a strang behaviour. I have a HX machine and was de-scaling the boiler. This emptys the water in the boiler by pressurizing the boiler than draining though the hot water dispenser til empty. The the boiler refills from the reservoir. After refilling the boiler with the de-scaling soultion, I have to flush the boiler with fresh water several times to rid the tainted water. The boiler was refilling from the reservoir, then the "Refill Reservoir" message appered and the refill of the boiner stopped. I refilled the reservoir and the "Refill Reservoir" went away and the "Refilling the Boiler" message redisplayed. But the pump never restarted to continue refilling the boiler. The only way to continue refilling the boilwe was the power off and power on the machine. This might be a setting that I have configured incorrectly or a bug. Not sure. It might have something to do with the contoll of the relays. Thought you might have some insight or possible areas to look. Still enjoying the upgrade.
Also I think using the volumetric (dual flow meters) for shot stop with pre infusion stops the shot way short. The readout indicates that I reached my 36ml target. but there is only about 16ml in the shot. I think maybe the cheap flow meters expect a uniform flow rate. The pulsing appears the yeild incorrect values. For now, I am sticking with normal espresso mode operation. Any comments or suggestion would be appreciated.
My target at some point is to use gravimetric sensing and ditch the flow meter approach.
Hello Amon,
Over the holidays I was experimenting with the pre-infusion funtion. If I left all the presets at default values, the machine did what it was supposed to do. A prime of 1 sec, pump modulation for 5 secs, then full pressure. However, if I change any of the default values, (i.e. INFUSION_TIME 8) pre-infusion no longer works. The pump turns on and stays on with no modulation. Have you experienced this behaviour?
This is added to my wish list.. when i have some spare coin.. its something i have been wanting to do for many years, i have a SAB Nobel which is perfect for conversion, its a pretty generic Italian heat exchanger machine. It has a 3 solenoids, one on the group head, a boiler fill solenoid and one for dispensing hot water. its running a 1800w heater and a pretty standard vibration pump. The standard pressure switch does fluctuate quite a bit, i see from 0.9 to 1.1bar fluctuations.. I guess one of the element outputs could be reconfigured for the hot water solenoid?
Some things i would really like to see would be:
Bluetooth scale pairing (for reference here is how someone else has done this, https://github.com/tatemazer/AcaiaArduinoBLE), although the drip tray mod is pretty sweet and ill end up doing that at some point, how is it holding up with the water in the drip tray?
Touch screen control, as my machine uses a solenoid for water dispensing it would also add the need for a button to dispense hot water.. and a way to adjust the dispense time would be nice. It would also be great to change modes from a touch screen too, and pre-infusion settings etc. have you had a look at the gaggiuino code? there was quite a few forks before they hid it away.. pretty sure they just use a nextion touch screen
Home assistant integration, via ESPhome. I haven't had a look at your code yet.. not sure where to find it.. but could the slave run ESPHome and then the master just pull the sensor data from it via uart? ESPhome makes OTA possible and gives access to loads of libraries for various sensors and also displays etc. even if this is just on the slave, leaving the master to control the main features (for safety). Some ideas here for uart https://esphome.io/cookbook/lambda_magic.html
these are the main features i would love to see via ESPhome:
a) full profiling - feeding all the data back when pulling a shot.. I'm thinking every 100ms send pressure, boiler temperature, group head temperature, flowmeter, weight, solenoid status and pump status.
b) temperatures, pressure and status every minute or so at other times.
c) Power saving modes, auto power on in the morning etc.
d) calibration stuff, instead of typing in a terminal
cleaning/back flushing function and reminders! - to automate some of the cleaning process
scales mode/button, for weighing beans before grinding.. might as well have a way to use the load cell like normal coffee scales when not pulling shots
smart tracking/estimation of boiler levels, then correlating this against group head temperature when pulling shots. I was thinking of ways to achieve this, by opening the hot water solenoid till the boiler probe is dry, then doing boiler fills by time, this would set known level to verify against temperature. Flow would also play a part in this too, faster flows would result in lower temperatures, but by knowing one allows us to dial in the other.
drip tray water level sensor.. i often do purges and overflow the drip tray.. hopefully with better temp control it will be less frequent! pretty sure this could just be a touch pin next to the load cell, and go thru the same mag connector. are S_1 S_2 or S_3 touch capable pins?
where do we find the code? is the schematic open source? or is there a simplified one to show the ESP connections?
Hi! Ordered most of the stuff to get this project going on my old machine! One thing I noticed, please correct me if I'm mistaken but the screen doesn't show the shot time right? It would be very very nice and probably not that difficult of an upgrade to have an automatic shot timer that starts whenever you start pulling a shot (manual or espresso shot mode) and stops when you stop, displaying the total shot time for about 5 seconds before getting back to the default view. Thanks, great project, can't wait to play around with this!
Hello Amon, Sometimes getting the exact item you need on AliEXpress is confusing. I accidentally ordered the ultrasonic sensor with the "switched outputs" rather than "pwm". Is there any chance of using that sensor with smart coffee or will I need to reorder the one with PWM.
I have powered up my Smart Coffee board and the display indicates V 0.6
I have compiled and uploaded the two esp32 with smart coffee v 1.0
Does the V 06 on the display indicated the version of smart coffee software or version of display board?
I built my scale and I have switched from the timer based espresso mode to the gravimetric setting. I think this is the most consistent setup. I went with a separate scale as opposed to integrating into my drip tray because doing so was going to be pretty difficult.
What I would really like to see in a future update is an on screen shot timer. This would really help with dialing in shots and not needing to have any separate devices.
Long term, I would love for this system to move toward what is being done by the Gaggiuino group. a touch screen display and flow profiling would be awesome.
Hi looks like each boiler can have only one water level probe, if the steam boiler has two probes, can both be utilized by the controller ?
Hi, I really love your work. I am very new to mods on my coffee machine so I still lack some understanding of the details. Hence my question: Can your solution be installed on a Rancilio Silvia Pro (dual-boiler with two pumps)?
I have been using the new board setup for a couple of weeks now and it works really well. much more robust than the Mega setup. I am waiting on parts to add the scale functionality. I read through the calibration and its straight forward. how does it handle accounting for the weight of the cup before pulling a shot? when you add a cup to the scale before pulling a shot, do you need to tare it? or does it do this automatically when you pull the lever to start the shot?
also, when the boiler is refilling, does the system turn off the heating element? or does it stay on while the boiler is refilling.
I am thinking of DIY an expresso machine, would like to understand more on your control board, The current design support two thermocouples for steam and brew boilers, what about adding the 3rd one for brew head ? On the pump control, I am considering using PWM control for gear or DC rotary pump. Can the board extended the PWM control for Pump in addition to control the heat element ?
I am designing an enclosure for this new board. what kind of air flow should I build in for it? should I add a provision for a cooling fan?
I am thinking about swapping my vibratory pump out with a fluid-o-tech gear motor. The one i have runs on a 24v DC stepper style motor. I figured I can have the motor relay switch on the power to a motor power supply, but what would be nice is the ability to adjust the motor RPMS via the control wire(you send it 0-5v )
Also why bother with connecting these via USB when the boards have wifi?
(it's a little bit messy I apologize) I would like to use the ultrasonic distance sensor to monitor both of these. The green is my water Reservoir that gets pumped into the coffee machine and beside it is the water waste. My thinking here is I could use what you've shared with the pogo connecters when I need to remove these as the cords would obviously be external. Sound doable?
Question for the presence sensor probably a lot more to come lol.. My Rocket Espresso Giotto Evoluzione R does 9 bar so should I get 1.2 MPa (1200 kPa) to be a more suitable option to handle the higher pressure and provide a safety margin?
Im currently using Smart Coffee with the Arduino Mega. I originally was trying to use the flow meters to control shot time, but the way my machine is plumbed, I would really need 3 meters to get a truly accurate reading, so I have switched to just a timer based setup which works ok. If I upgrade to this new board, I will definitely go with the scale function. I know the little screen does not have a lot of real-estate but what I would really like is to have the high pressure flow meter as well and be able to see the weight, dispensed water volume and a shot timer all on the screen.
Neat update! To upgrade from the original smart coffee, we would just need your custom board, 2 ESP32's, and additional sensors such as the load cell?