****** I HAVE EDITED THIS POST TO SHOW MANUAL INTERACTION WHERE NEEDED *******
While waiting for some parts to arrive I wrote my Mach Cycle State Machine.
I might combine a couple of states later on but for now this helps me organize my thoughts.
PUMPA is now HLT_PUMP
PUMPB is now MLT_PUMP
Initial setup
VERIFY ALL VALVES CLOSED (Includes Boil Kettle (A.K.A. BK))
Hose from HERMs output valve on HLT attached to MLT recircIN
Hose attached to MLT_PUMP IN, other end loose
Hose from MLT_PUMP OUT valve to HERMs IN valve of HLT attached
Hose from HLT OUT valve to HLT_PUMP IN attached
Hose from HLT_PUMP OUT valve to HLT recircIN valve attached
Wort transfer hose attached to BK OUT valve, other end loose
PROCESS
Mash Cycle
• State 0: Ramp up of HLT.
Resources
Out0, HLT element under PID control using temp0 = HLT temp probe,
temperature at setpoint
Timer0: Elapsed time to reach HLT set point, init to 0
Timer2: Total Elapsed time for mash process, init to 0
Out1: HLT_PUMP recirculate HLT water for even temperature
Exit Condition, HLT temp >= HLT setpoint Goto State 1
Manual Actions:
Open HLT OUT valve
Open HLT recircIN valve
Prime HLT_PUMP
Start HLT_PUMP
• State 1: Dough In
Out0, HLT element under PID control using temp0 = HLT temp probe,
temperature at setpoint
Timer2: Total Elapsed time for mash process, cummulative from State 0
Out1: HLT_PUMP transfer measured strike water from HLT to MLT
Exit Condition: Web Input button activated to start mash after
dough in complete, Goto State 2
Manual Actions:
Stop HLT_PUMP
Close HLT OUT valve
Close HLT recircIN valve
Close HLT_PUMP output valve
Move HLT_PUMP hose output from HLT recircIN to MLT output valve
Open MLT output valve
Open HLT_PUMP output valve
Prime HLT_PUMP
Start HLT_PUMP
Use HLT sight guage to meter strike water transfer to MLT
When transfer complete stop HLT_PUMP
Close MLT Output valve
Close HLT_PUMP output valve
Move HLT_PUMP hose output to HLT recircIN
Open HLT_PUMP output vavle
Open HLT recircIN valve
Prime HLT_PUMP
Start HLT_PUMP
Add grain to MLT/Dough In
Attach loose end of MLT_PUMP IN hose to MLT OUT valve
Open MLT OUT valve
Open MLT_PUMP OUT valve
Open HERMS IN valve
Open HERMS OUT valve
Open MLT recircIN valve
Prime MLT_PUMP
Start MLT_PUMP
Enable START MASH Win Button
• State 2: Mash
Out0, HLT element under PID control using temp1 = MLT temp probe,
temperature at desired mash setpoint
Timer1: init to desired length of mash, count down to 0
Timer2: Total Elapsed time for mash process, cummulative from
State 0 and State 1
Out1: HLT_PUMP recirculate HLT water for even temperature
Out2: MLT_PUMP recirculate wort through HERMs coil in HLT to
maintain mash temp
Exit Condition: Timer1 <=0; Goto State 3
Manual Actions:
Monitor temps and adjust MLT_PUMP flow or PID setpoint as needed
Other duties as needed (out of scope of this process)
• State 3: Transfer 1st Runnings to boil kettle
Out0, HLT element under PID control using temp0 = HLT temp probe,
temperature at mashout
Timer2: Total Elapsed time for mash process, cummulative from
States 0, 1 and 2
Out2: MLT_PUMP transfer wort from MLT to boil kettle
Exit Condition: Web Input Button activated to start batch sparge
Goto State 4
Manual Actions:
Stop MLT_PUMP
Close ALL MLT valves including MLT_PUMP output valve
Close HERMs IN and HERMs OUT valves
Remove MLT_PUMP OUT hose and leave loose (in clean catch bucket)
Connect loose end of BK wort transfer hose to MLT_PUMP OUT valve
Open BK OUT Valve
Open MLT OUT valve
Open MLT_PUMP OUT valve
Prime MLT_PUMP
Start MLT_PUMP
When MLT drained, stop MLT_PUMP
Close BK OUT valve
Close MLT OUT valve
Close MLT_PUMP OUT valve
Remove BK wort transfer hose from MLT_PUMP OUT and leave loose in clean catch bucket
• State 4: Batch Sparge
Out0, HLT element under PID control using temp0 = HLT temp probe,
temperature at mashout
Timer2: Total Elapsed time for mash process, cummulative from
States 0, 1,2 and 3
Out1: HLT_PUMP transfer sparge water from HLT to MLT
Exit Condition: Web Input Button activated to start vorlauf;
Goto State 5
Manual Actions:
Stop HLT_PUMP
Close HLT OUT valve
Close HLT recircIN valve
Close HLT_PUMP output valve
Move HLT_PUMP hose output from HLT recircIN to MLT output valve
Open MLT output valve
Open HLT_PUMP output valve
Prime HLT_PUMP
Start HLT_PUMP
Use HLT sight guage to meter sparge water transfer to MLT
When transfer complete stop HLT_PUMP
Close MLT Output valve
Close HLT_PUMP output valve
Move HLT_PUMP hose output to HLT recircIN
Open HLT_PUMP output vavle
Open HLT recircIN valve
Prime HLT_PUMP
Start HLT_PUMP
Attach loose end of HERMS IN hose to MLT_PUMP OUT valve (previous loose hose in catch bucket)
Open MLT OUT valve
Open MLT_PUMP OUT valve
Open HERMS IN valve
Open HERMS OUT valve
Open MLT recircIN valve
Prime MLT_PUMP
Start MLT_PUMP
Enable VORLAUF Win Button
• State 5: Vorlauf
Out0, HLT element under PID control using temp0 = HLT temp probe,
temperature at mashout
Timer2: Total Elapsed time for mash process, cummulative from
States 0,1,2,3 and 4
Timer3: Init to 10 minutes, count down to 0
Out1: HLT_PUMP recirculate HLT water for even temperature
Out2: MLT_PUMP recirculate wort through HERMs coil in HLT to vorlauf
Exit Condition: Timer3 <= 0, Goto State 6
• State 6: 2nd runnings to boil kettle
Timer2: Total Elapsed time for mash process, cummulative from
States 0,1,2,3,4 and 5
Out2: MLT_PUMP transfer wort from MLT to boil kettle
Exit Condition: Web Input Button END MASH activated
at end of transfer;
Manual Actions:
At vorlauf timer expiration
Stop MLT_PUMP
Close ALL MLT valves including MLT_PUMP output valve
Close HERMs IN and HERMs OUT valves
Remove MLT_PUMP OUT hose and leave loose (in clean catch bucket)
Connect loose end of BK wort transfer hose to MLT_PUMP OUT valve
Open BK OUT Valve
Open MLT OUT valve
Open MLT_PUMP OUT valve
Prime MLT_PUMP
Start MLT_PUMP
When MLT drained, stop MLT_PUMP
Close BK OUT valve
Close MLT OUT valve
Close MLT_PUMP OUT valve
Remove BK wort transfer hose from MLT_PUMP OUT and BK
Enable MASH END Win button
End Mash Cycle
Mash Cycle program
Mash Cycle program
Last edited by rcrabb22 on Fri Sep 23, 2011 3:14 pm, edited 3 times in total.
-
- Posts: 383
- Joined: Wed Feb 09, 2011 3:43 pm
- Bot?: No
- Location: Clearwater, FL
- Contact:
Re: Mash Cycle program
I would put your hose and valve interactions in there... may help you decide if you need another state or whatever, will help us see if you missed something...
-mike
-mike
Re: Mash Cycle program
I agree.clearwaterbrewer wrote:I would put your hose and valve interactions in there...
For example, between states 5 and 6, you have to switch a hose connection, correct? I would put a state in there that holds everything the way it was except turn off the pump that is recirculating through the HERMS (you need that one for pumping out the 2nd runnings I'm guessing) and have the exit condition be a win button that indicates you have finished switching hoses.
I had so many 'user interaction' states that I had to break them up into Heat Strike Process and Mash Process.
EDIT: actually, after looking at my current setup I have it back down to 8 states (but still have it broken into 2 processes). I had to have additional states for when I jumped to the next process (this was before the firmware update that fixed exit condition spawning a new process).
-
- Posts: 383
- Joined: Wed Feb 09, 2011 3:43 pm
- Bot?: No
- Location: Clearwater, FL
- Contact:
Re: Mash Cycle program
Another option to an additional state is to use a Hand-Off-Auto switch to force a pump off when moving hose from HLT to MT, for example..
Re: Mash Cycle program
Or the Process Pause button. It will turn off all of the outputs controlled by that process while paused, which is handy for swapping hoses.clearwaterbrewer wrote:Another option to an additional state is to use a Hand-Off-Auto switch to force a pump off when moving hose from HLT to MT, for example..
Re: Mash Cycle program
There's really no difference between State0:Ramp up of HLT and State1:Dough In. Both are holding HLT to a temp with the pumpA on. There's nothing wrong with that (especially if you want to insert an alarm or measure the ramp time), just pointing it out.
I think it looks very good!
I think it looks very good!
Re: Mash Cycle program
Thanks for that. I actually have Hand-Off-Auto switches for my pump and heater on my control panel. Sounds much easier than programming it (and possibly forgetting to change a temp setpoint between different beers), I just never thought to use them for that, doh!clearwaterbrewer wrote:Another option to an additional state is to use a Hand-Off-Auto switch to force a pump off when moving hose from HLT to MT, for example..
Re: Mash Cycle program
Thanks for the input. I agree with your observation. I was doing this in 2 states to capture and record elapsed time for HLT ramp up for future reference. After I have some experience with my system I may combine into 1 state.ECC wrote:There's really no difference between State0:Ramp up of HLT and State1:Dough In. Both are holding HLT to a temp with the pumpA on. There's nothing wrong with that (especially if you want to insert an alarm or measure the ramp time), just pointing it out.
I think it looks very good!
Re: Mash Cycle program
I will. Thanks for the current and future inputclearwaterbrewer wrote:I would put your hose and valve interactions in there... may help you decide if you need another state or whatever, will help us see if you missed something...
-mike
Re: Mash Cycle program
I should mention I was going to turn on and turn off the pumps with mouse clicks on the appropriate outputs so a state transition would not change the pumps running or not. I think will need to reconfigure hoses at every state change anyway. If I happen to be away from the brewery when mash timer expires for example, nothing really happens except HLT temperature set to mashout. When I get there I would manually stop the pumps to reconfigure hose(s) to drain the mash tun.
Does this make sense?
Does this make sense?