Toggling between 2 set points


 

Steve_M

TVWBB Guru
Using a spare HM v4.2 board I have and a solid state relay, I'm looking to re-purpose this as a PID controller for my espresso machine.

Leaving the HM set at a single point 100% of the time is no problem. This covers 95% of the use case for pulling espresso shots. The other 5% is where I would want to ramp up the temps ( steam wand ) and then set the temps back to the espresso shots temps.

Are there any creative ideas how this can be done? Ideally I'd like to run it with just the HM board, not even with the RasPi attached, but maybe I need the pi to be able to somehow script the 2 set point changes.

Ideas so far:

- Have a dummy meat temp probe that can trigger a SP change based on being too high or too low

- Use pre-programmed USB button that can issue lmclient commands to change the set point
 
You can change the setpoint with a script. That opens up all sorts of options. You can do it with an alarm script when the pit probe or a second probe it’s a target. You can add a delay so the setpoint changes 5 minutes (or whatever) after the alarm triggers. You can use a cron job to change the setpoint at a certain time, or maybe toggle every five minutes.

I am not an espresso guy so I have no clue what you are trying to do, but I think it should be doable.
 
The gist of the machine is that it has 2 thermostats. 1 for coffee and 1 for steam.

In coffee mode, the built in not-so-accurate thermostat cuts off power to the boiler once a temp has been reached and waits for the temps to drop before allowing the boiler to heat up again. These wide temperature swings are easily addressed by using a PID controller to keep the boiler at X degrees.

In steam mode (requires flipping a switch on the machine) the coffee thermostat is bypassed and the steam thermostat is now regulating power to the boiler. The steam thermostat also creates wide temperature swings.

Since there will already be a thermocouple watching the temps for the coffee mode (once I add the heatermeter to the machine), the goal is to use the steam switch to trigger a set point change to ramp the temps up for steam and to bring the set point back down once the steam switch has been turned off.
 
Ahhh, I get it now. Perhaps a circuit to send two different voltages (“temps”) to one of the meat probe ports depending on switch position. Something like 400+ when switch is on and less than 100 when off. Set high and low temp alarms, and use alarm scripts to change the set points when the alarm is triggered.

Switch on, probe 2 reads over 300, set pit temp to X.

Switch off, probe 2 reads under 200, set pit temp Y.

I could help with the alarm scripts. The circuit should be simple but it is just outside my pay grade without doing some research and testing. Some of the other guys here would probably be better able to help with that.
 
I was playing around with it last night seeing if I could get the temp alarms to control the set point. It didn't work well.

What I did come up with is to use the vishay 10k ambient probe and to switch it in and out of circuit. This would be controlled via a relay when the steam switch is flipped on.

Next would be script that runs when the HM boots that is basically a while loop that runs every second.

if the ambient probe shows a value, change the set point to the steam temp, else change the set point to the espresso temp

This requires the raspi to be connected to the HM board for this to work. I guess I can use a pi zero (non wireless) for this task as there's no need to actually remotely interact with this thing.

Another option is to implement this as a pure arduino solution, using HM board for the inputs and outputs. Then I just need the pi connected to upload new code to the atmega. This would also let me use a nice little OLED display!
 

 

Back
Top