Mash control with gas burners

Hi @Elco ,
In your post…

you mention…

Can you elaborate on how to set this?

I have one brewpi that I use for fermentation (which I love by the way) and am considering a second brewpi for mash control. My plan is to recirculate the mash liquid and add direct heat via gas burner. I intend the brewpi to measure the mash temp and control a gas regulator as an on/off device.


1 Like

You can use your gas valve with PWM, just configure the minimum ON time, OFF time and PWM period to work well for the gas valve.

PWM is just frequent ON/OFF, should work for gas too.

Hi @Elco,

I am just now getting around to testing this and noticed a few differences from your earlier suggestions.

I’m running brewpi-raspbian docker version (image id) 6e2eb6a36946.
There is no explicit “minimum ON time” and “minimum OFF time” for Heater 1 (those exist only for Cooler). Can you elaborate on the settings for Heater 1 that would affect minimum on/off times?

Second, my setup is a single temp probe at mash outlet and a pump to recirculate wort to the top of the mash. This seems to me identical to BIAB as far as mash temp control is concerned. Would the Heater 1 settings from this (BIAB mash) post apply equally to my situation? Can you confirm or comment?

Sorry, there are no minimum times for the heater in the firmware. I think those settings will be a good start.

Thanks for the confirmation. I don’t know what the new software looks like, but “min ON” and “min OFF” might be useful settings to consider adding.

From testing last weekend, I found those settings worked quite well; the burner stayed on constantly till water temp was 2 degrees away from target, then the heater started cycling between on and off. At about 1C away from set, I started running into issues in which the burner wasn’t off long enough to extinguish lingering flames and thus would blow out (instead of lighting smoothly) when gas turned back on. Furthermore, at about 0.5C away from set, the on time was too short for the burner to light at all. I will continue tweaking and (try to remember to) post back here with results. Any thoughts to point me in a useful direction are appreciated.

FWIW, I’m using this BURN10 burner from brewershardware with LPG.

1 Like

What’s the period that you are using? A longer cycle time will help to avoid that situation.

Period is 15 seconds.

I’ll run more tests tonight at 30 and 60 seconds (or higher as seems appropriate).

Below is the relevant PID section from the BrewPi Maintenance Panel (converted to YAML for easier human consumption):

kind: Pid
name: heater1pid
enabled: false
  kind: SensorSetPointPair
    kind: TempSensorFallback
    onBackupSensor: false
      kind: TempSensorDelegate
      name: fridge
        kind: OneWireTempSensor
        value: 23.125
        connected: true
        address: 28F93A680800006A
        calibrationOffset: 0
    kind: SetPointSimple
    name: fridgeset
  kind: ActuatorPwm
  dutySetting: 0
  period: 15
  minVal: 0
  maxVal: 100
    kind: ActuatorMutexDriver
      kind: ActuatorMutexGroup
      deadTime: 1800000
      waitTime: 0
      kind: ActuatorDigitalDelegate
      name: heater1
        kind: ActuatorPin
        state: false
        pin: 28
        invert: false
Kp: 50
Ti: 900
Td: 30
p: 0
i: 0
d: 0
actuatorIsNegative: false

I changed the period to 60 seconds and heating to 40C was perfectly smooth. Constant heat till about 1.5C from target, then a few cycles of about 20-30 seconds heat and 60-90 idle till target was reached. Then I set a new target of 45C and it was mostly smooth until target was reached, at which point it a few calls for heat lasted ony 4 seconds (burner takes 5-6 seconds till lit).
I will try again (another day) to see behavior at typical mash temps. Tuning suggestions welcome.


I’m retrofitting a set of exisiting gas burners with a flame sensor for added safety to shut off the gas in case of flame failure. I’ve looked at the ususal suspects for flame sensing and they don’t detect the propane flame consistantly or react too slowly for my liking. What I’m looking at now is Flame Rectification for testing the existance of a flame. I have ordered a kit MXA042 to test out this method. My question is:
Does anyone have practical experience with these?
How reliable is it?