My first post on the forum but I thought it would be worthwhile before I delve too deeply into my project. Some guidance could save me a lot of hours and hassle in the long run.
I have a dual boiler espresso machine that I want to computerise (loosely).
I already have all the parts running with Arduino but I fear I may run into trouble with timing/delays/interrupts when I implement the functions and menu system.
The machine consists of:
2x Boiler Heating Elements
1x Water Pump
I've added the following:
2x PT100 RTD's with MAX31865 boards (Measure Temp @ each boiler)
1x HC-SR04 Ultrasonic Sensor (Measure cold water level)
1x Volumetric Flowmeter (Measure flow when brewing coffee)
2x 40A SSR relays (Switching heating elements on/off)
3x 2A SSR relays (2x Solenoids, 1x Water Pump)
2x 1.5" OLED displays
1x Arduino Mega2560
U8G2 using hardware SPI (Driving OLED displays)
Adafruit_MAX31865 (Driving PT100 temp sensors)
PID (Reading 2x PT100's and switching 2x40A SSR's to heating elements)
The Ultrasonic is using digitalWrite , delayMicroseconds, pulseIn for measurements (delay negligible?)
The flowmeter however needs about 500mS delay, possibly less with experimentation.
Brief view of variables I wish to change through menus:
- Both PID setpoints
- Brew time for Single, Double, Triple shots (essentially should be the same but I want the control individually)
- Volumetric based shots should either be 30ml, 60ml, 90ml, but being able to adjust an offset would be nice.
- Pre-infusion time/Pre-infusion pressure (based on PWM'ing the Pump)/wait time - again, individual for all brew shot methods and sizes (time/volumetric, single/double/triple)
My big issue I think may be the use of the flowmeter. Would I be able to start a shot, read or reset the Flow Count and be able to automatically stop the shot once the Flow Count reaches a desired value? If so, I want to make sure that this wouldn't allow the PID's to "run-away" as an extraction will be around 25-35 seconds.
I would consider using an Arduino Nano for the Flowmeter to remove the delay and communicate via I2C when pulling a shot using the volumetric methods - Would this be advisable?
Thanks for your help in advance. If any clarification is required I'm happy to provide as soon as I can.