• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

PWMing the output of a PID

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

binarybuddha

Member
Joined
May 28, 2014
Messages
20
Reaction score
0
tl;dr- A large wattage element in a RIMS tube is great to quickly ramp up to dough-in temp, but boil cavitates at mash temp, even on the lowest period/cycle time of the Auber PID.
Possible solution: PWM the control logic?

Other solutions found to this problem:
  1. A DPDT switch to run the 240v element at 120v. This offers a 'fully off' middle switch position, but only has 1 setting, <edit>1/4 power</edit Thanks Bobby>. It also sends power down the neutral with the potential to have an unbalanced load on one leg of the 240 connection.
  2. PID+SSR+SSVR.

I'll offer up a third idea that I'm testing for some community review.
PWM the control/logic of the PID to allow a high-wattage element to be an adjustable, gentle heat source; but still have full power for quick strike-temp:
17652818741_17ee15b1bb_k.jpg

17652724255_3d227d3cff_k.jpg

17032373163_3771542591_k.jpg


Oscilloscope video
https://youtu.be/ccSVUfYwc4U

qB7gqBl.jpg

(This was my first analog protoboard project, and I made myriad mistakes in construction that took awhile to troubleshoot, so I know it looks like arse, but it seems to be working)

555-based PWM, powered by & in series with the PID control/logic output.
The o-scope seems to report 15Hz with 1-99% duty cycle variance in sweeping the potentiometer. The idea is the panel-mount pot is double-stick taped to the protoboard and will hold the protoboard up on the brewing control panel, and provide visual LED indicator of pulsing.

If this works, the circuit could be miniaturized with surface mount components and all fit nicely on the back of a panel mount potentiometer in a tiny package.

Blichmann kinda does this with the electric tower of power, although reading the manual on page 8, it would seem like it swaps over to an internal SSVR instead of PWMing the PID output.
 
Yes, there's definitely benefit to PWM "inline" with PID. On one hand, making the effective power variable messes with the PID's learned system behavior, but not to the degree that it makes it not worth doing. One correction though, running a 240v element on 120v quarters the power, not 1/8th. I've run my rig as a single vessel recirculating BIAB with the 5500w element on 1375w and it's perfect. In a less stable environment like RIMS, the more granular the control, the better.

The 3rd option is to use the Auber Power Regulator which offers even more granular pulsing and a nice looking display but I suspect it's the most expensive option since it also requires a second SSR. I'd see that as a premium solution. If the PWD package is less than $20, it would be a great budget solution.
 
Thanks Bobby!
I think it would certainly be under $20, especially if a small run of PCBs was made, say 20-50.
I'm thinking of doing a 20, maybe 30% duty cycle, with plain water at 140F then auto-tuning the PID. For pre-strike heating, the PID will be calling for heat nonstop, so I'll crank it up to 99%.
 
Ive read before that the pwm mode as well as manual mode minimum cycle time defaults on the auber pids is set to a high amount of time like a few seconds but I thought this was adjustable for finer control?
I know the defaults on the mypins I use allow the element to turn on and off for a fraction of a second...all the way down to 1% of a second I believe.

I use a low wattage 1000w ULWD cartridge heater so scorching is not a concern for me but even with that element which is 25" long and the low 2gallon per minute flow rate I use the pid runs the element on and off at around 20- 30% duty cycle to maintain mash temps (the pid allows the element to be on for about 20% of each second) I am failing to understand how a pid that will adjust all the way down to say 10% on and 90% off for each second on its own could possibly need this additional limiting of power?
I would think the better solution would be to correct your flow rate to match by slowing it down so the rims can ramp up without over firing the element?

I do believe longer rims tubes work better for these reasons and plan on extending the length of my rims tuber to be longer for more contact time in the rims and better heating in one pass. With longer cartridge heater up to 36" in length I see no problems with doing so.

I dont really run wort through my rims thats drastically cooler than the desired setpoint and I assume thats when all these issues could arise. I guess I dont understand why one would need to heat strike water in a rims since the HLT could and should easily have its own element to do it more efficiently?
 
I've had mypin TD4s in the box for 6 months and still haven't messed around with them. However, there are two different concepts at work here. When a manual capable PID is put into manual mode, setting a % of on to 60% turns the element on for (.6 x cycletimesetting). On the Auber, the shortest cycle time is 2 seconds so it's .6 x 2 = 1.2 seconds on and .8 off. If the Mypin can do a shorter cycle time like 1 second, then 60% manual would be .6 seconds on and .4 off. Sure, it's better for less boil pulsing at lower power settings.

However, the discussion here is not about the length of pulses in manual mode but rather the effective power output while in auto/PID mode. If the PID setpoint (SV) is several (ten or more) degrees away from process temp (PV), in most tunings it's going to turn the element on for a pretty long pulse (more than a couple seconds). That long pulse is at 100% power output. I'm not aware of any single PID units that can both run PID programming AND do PWM as in manual mode at the same time.

The idea of PWMing a PID in auto mode let's you pick the wattage of your element for any purpose you can think of. In RIMS, you can use really long 5500 LWD elements and dial in response time for on demand strike or sparge water and then super low wattage for RIMS with very little pulsing. In other words, you would still want temp feedback to affect the controller, but you could effectively tune the wattage for your preferred flow rate such that the temperature is quite stable.

The other useful application is in single vessel electric brew in a bag. 5500 watts for fast ramps and then 800 watts for maintaining temp is awesome control.
 
I'm not aware of any single PID units that can both run PID programming AND do PWM as in manual mode at the same time.
I wonder if this is something Auber could do easily in firmware or minor redesign?

The other useful application is in single vessel electric brew in a bag. 5500 watts for fast ramps and then 800 watts for maintaining temp is awesome control.
This is the exactly the application!

With really clever single vessel solutions like Brewha, BrewEasy, and DIY BIAB I think this approach could work well.
 
I've had mypin TD4s in the box for 6 months and still haven't messed around with them. However, there are two different concepts at work here. When a manual capable PID is put into manual mode, setting a % of on to 60% turns the element on for (.6 x cycletimesetting). On the Auber, the shortest cycle time is 2 seconds so it's .6 x 2 = 1.2 seconds on and .8 off. If the Mypin can do a shorter cycle time like 1 second, then 60% manual would be .6 seconds on and .4 off. Sure, it's better for less boil pulsing at lower power settings.

However, the discussion here is not about the length of pulses in manual mode but rather the effective power output while in auto/PID mode. If the PID setpoint (SV) is several (ten or more) degrees away from process temp (PV), in most tunings it's going to turn the element on for a pretty long pulse (more than a couple seconds). That long pulse is at 100% power output. I'm not aware of any single PID units that can both run PID programming AND do PWM as in manual mode at the same time.

The idea of PWMing a PID in auto mode let's you pick the wattage of your element for any purpose you can think of. In RIMS, you can use really long 5500 LWD elements and dial in response time for on demand strike or sparge water and then super low wattage for RIMS with very little pulsing. In other words, you would still want temp feedback to affect the controller, but you could effectively tune the wattage for your preferred flow rate such that the temperature is quite stable.

The other useful application is in single vessel electric brew in a bag. 5500 watts for fast ramps and then 800 watts for maintaining temp is awesome control.
but it is relevent... with the mypin in auto/ pid mode the cycle bursts are still shorter and therefore the element surface doesnt get as hot right? instead of just double pwming it the mypin does it once but with a faster and finer adjustment over temp output.... so even in auto mode the mypin allows the element to be only turned on for a fraction of a second... the element turns on and off just as fast in pid mode as in manual mode the only differentce is the cycle time varies as needed to get the temp change results expected... Again if your strike mash temp is close to the desired temp this works great without the need of any additional limiting means.... scortching can still occur if you beginning mash temps are much lower than the desired setpoint.
I understand what the OP is attempting to do by cutting the total wattage output and one can accomplish the same thing with less effort and money using this ssvr kit
http://www.ebay.com/itm/140553987088?_trksid=p2060353.m1438.l2649&ssPageName=STRK:MEBIDX:IT

as many have been doing unless I'm missing something?
 
You can easily get 1/8, 1/4, 1/2 and full power with a couple of switches and a diode. Use 1 switch to select either the neutral or the opposite hot phase as the current return. This selects either 1/4 or full power. Now wire the diode into the line from the selector switch to the element and use the second switch to either short it out or not. With it shorted you get either 1/4 or full power depending on the setting of the first switch. With it in the circuit (not shorted) you get half that (because current is only drawn on alternate half cycles).

Amazing that the 555 is still around. I remember when they were giving out free samples of those to anyone who would propose an application. 1972?
 
but it is relevent... with the mypin in auto/ pid mode the cycle bursts are still shorter and therefore the element surface doesnt get as hot right? instead of just double pwming it the mypin does it once but with a faster and finer adjustment over temp output.... so even in auto mode the mypin allows the element to be only turned on for a fraction of a second... the element turns on and off just as fast in pid mode as in manual mode the only differentce is the cycle time varies as needed to get the temp change results expected... Again if your strike mash temp is close to the desired temp this works great without the need of any additional limiting means.... scortching can still occur if you beginning mash temps are much lower than the desired setpoint.
I understand what the OP is attempting to do by cutting the total wattage output and one can accomplish the same thing with less effort and money using this ssvr kit
http://www.ebay.com/itm/140553987088?_trksid=p2060353.m1438.l2649&ssPageName=STRK:MEBIDX:IT

as many have been doing unless I'm missing something?

The cycles on a PID are determined by the P, I, and D settings as they relate to the difference between PV and SV. I don't know that you can program a maximum cycle time on these things. If you could, the logic would be "I don't care how far away PV is from SV, do not cycle the element on for longer than .1 second for every .2 second cycle." But, I don't think that's possible. You'll see the PID blipping the output for what seems like .1 seconds, but that's only when the program senses that it's very close to SV or it's already there and performing and maintain pulse.

Yes, running one of the element lines though a PID controlled SSR and a SSVR will do the same job pretty closely. I haven't seen many people actually doing it though. Perhaps you're talking about just using the SSVR as a power control without PID function which a lot of people seem to be doing.
 
The output of a PID controller depends on the error (SP - PV), its integral and its derivative with the proportion depending on the setting of the three tuning parameters. But remember that these controllers are not strictly PID having a fuzzy element mixed in there somehow. Now the output can be presented in several ways as the percentage on time in a PWM scheme, as the current in a 4 - 20 loop or as a variable voltage - depends on the controller. Those that use PWM schemes usually allow you to select the cycle time and in some controllers the autotune algorithm will pick a cycle time for you. In other controllers you can set limits such that if the computed output is over 50% for example, the controller will limit there (output 50%).
 
However, the discussion here is not about the length of pulses in manual mode but rather the effective power output while in auto/PID mode. If the PID setpoint (SV) is several (ten or more) degrees away from process temp (PV), in most tunings it's going to turn the element on for a pretty long pulse (more than a couple seconds). That long pulse is at 100% power output. I'm not aware of any single PID units that can both run PID programming AND do PWM as in manual mode at the same time.

For the Auber 2352 you can set "OUTH" Output high limit 0~100%.
 
For the Auber 2352 you can set "OUTH" Output high limit 0~100%.

I didn't even see this, you are absolutely correct good sir/madam!!

Output range limits &#8220;OUTL&#8221; and &#8220;OUTH&#8221;
OUTL and OUTH allow you set the output range low and high limit.
OUTL is a useful feature for a system that needs to
have a minimum amount of power as long as the controller is powered.
For example, if OUTL=20, the controller will maintain a minimum of 20% power output even when input sensor failed.
OUTH can be used when you have an overpowered heater to control a small
subject. For example, if you set the OUTH= 50, the 5000 watt heater will be used as 2500W heater (50%) even when the PID wants to send 100% output."
 
For all the times I've read that manual, I've never seen the OUTL and OUTH parts. If the mypin has it and also has a shorter minimum cycle, it's definitely closer to the function we're talking about. The only downside is that it's not a parameter you can adjust on the fly. Budget dependent folks can definitely use it if the extra SSR,SSVR,Power Regulator isn't practical.
 
The cycles on a PID are determined by the P, I, and D settings as they relate to the difference between PV and SV. I don't know that you can program a maximum cycle time on these things. If you could, the logic would be "I don't care how far away PV is from SV, do not cycle the element on for longer than .1 second for every .2 second cycle." But, I don't think that's possible. You'll see the PID blipping the output for what seems like .1 seconds, but that's only when the program senses that it's very close to SV or it's already there and performing and maintain pulse.

Yes, running one of the element lines though a PID controlled SSR and a SSVR will do the same job pretty closely. I haven't seen many people actually doing it though. Perhaps you're talking about just using the SSVR as a power control without PID function which a lot of people seem to be doing.

I get what your saying but if the auber keeps the element on for a longer minimum cycle period that means the element will get hotter even when the temp is reached and if just trying to be maintained.... it wouldnt help when the temp differential between mash temp and setpoint is larger so I after thinking about it I see your point.
as far as using the pid and ssvr wired inline, Yes a lot of people do it...I researched it and even bought the ssvr above to do it myself before I realized with a correctly sized /matched element its totally not needed...
I found a lot of threads where people claimed to be doing it.
 

Latest posts

Back
Top