I'm trying to figure out how to progress with my current project, i've gutted an old Dolce Gusto coffee pod machine because it wasn't working properly but figured it had some useful parts.
I was correct in that the thermoblock and pump were fine but the control board was somehow defective (it would enter a descale mode but not ever realise it was complete or run a normal drink through)
So i'm trying to use those parts to create a 'proper', if somewhat basic, espresso machine, after all the pump is rated to 15 bar and the heater can manage over 96C water.
I have my arduino connected to a 2 channel relay board and it successfully controls the pump and thermoblock heater. It also reads the 'blocks inbuilt NTC and displays the temperature on a 16x2 lcd.
I know that when i turn the machine on i want it to preheat the block to brewing temp and hold it there awaiting command to run a shot through (or flush, as required).
I will either have a single momentary button for activating a shot or use a menu on the LCD to activate it (and the arduino will then run a timed shot). Either way i need the temp maintained for the duration.
I have some sketches i have been tinkering with, including PID bits i haven't tested yet, i've just been using on/off control for testing purposes, but i need a bit of pointing in the right direction for how to build my sketch up further. What do i need to put in setup and what in loop in this case?
Some pseudo-code would help me.
I'm thinking in the simplest case i need to watch for a button press and use millis() to store the time and then wait till my given time has elapsed to conclude the shot.
As background i have played with arduino a good while back (in the region of 8-10 years), building a smart home thermostat that would assess cylinder hot water quantity and allow direct boost for a given amount extra of water, but it seems i have mucked about with the sketches and the specific LCD/menu libraries they were built around now don't compile, so it's difficult to tinker a lot with that to jumpstart this project.
Some help and a bit of to-and-fro with knowledgeable members would be appreciated