PID + PWM = good idea or crazy?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

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

wrench

Well-Known Member
Joined
Jan 11, 2011
Messages
181
Reaction score
9
Location
Berlin
I am putting together a single keggle eBIAB system as the first phase of going all grain with bigger batches. However, what I have is a cheap PID that doesn't do manual control, which means it won't work for the boil. (Obviously, buying a new, correct PID would be the smart solution, but I'm trying to not spend any more money) I ordered the cheap PWM circuit that was mentioned on another thread to be able to switch to manual control of the element for the boil. I've been trying to figure out what new relays and switches I would need (which actually could have added up to teh coast of a new PID anyway) when a light bulb went on...

Do I really NEED extra relays and switches? Can't I just wire up the PWM control between the PID and relay input? If the PWM is set to 100% output, the PID should be happy as a clam for controlling mash temperatures. When I'm ready to boil, I can dial down the PWM knob. The PID would still be sending its signal, but that signal would get intercepted by the PWM and scaled back.

Best idea since sliced bread? Or would this not work and possibly end up damaging the PID, PWM or both? It's been a LONG time since I took an electronics course, and it was never my best subject. Thanks for teh sanity check and any other advice.
 
You probably don't want to do this. The two devices (PID and PWM) are both outputting a DC voltage signal to power the PID, but they are not going to be the same voltage signals.

No guarantees that anything bad would happen, but you really just need a low rated DPDT switch to select which device is in the control of the SSR. You'd only save a couple of dollars by omitting the switch and would risk potential harm to both the PWM and PID without it.
 
i misread the first post.

you're talking about using the PID's SSR control as the power source for your PWM circuit?

*might* work. But I'd still spend the extra $2 and remove the potential risk by making the PID and PWM separate control devices and putting a selector switch in there.
 
OK, yeah. Thanks. Brain fart. I kept thinking that I needed a high-current switch or relays to switch back and forth. But I'm just switching the control signal leading into the SSR, NOT the high voltage/current circuit coming out of it. Yeah, I can spring for a switch. Might even get a perty one that lights up 'n junk.

Still, now I'm curious how my original idea might work and part of me is itching to try it anyway.
 
the idea is interesting for sure. I'd check the amp requirement of the pwm vs the amp limit of the PID's ssr control output. If the PID can handle the PWMs current needs, then this is a pretty clever way of adding a throttle to the PID output. You save a selector switch AND the separate dc voltage source required for a PWM circuit.
 
I dunno I think it is just going to confuse the PID.

You might be better off just wiring in a 3-way switch so that you can switch between PID, off, and PWM.

I understand you don't want to spend any money, but switches are cheap (at least compared to a new PID) and it will definitely solve your problem.
 
I dunno I think it is just going to confuse the PID.

You might be better off just wiring in a 3-way switch so that you can switch between PID, off, and PWM.

I understand you don't want to spend any money, but switches are cheap (at least compared to a new PID) and it will definitely solve your problem.

Yes, the switch I need is cheap and that's the way I'm going to go. But the switch I convinced myself I needed wouldn't have been. ;) As far as confusing the PID, that's not the part I would be worried about. If anything, the PID would try to fire the element more often which would just mean the PWM would get a more steady input signal. IF the probe returned a value under 100*C, the PID would just up the output. But since I'd be maintaining a boil, even that shouldn't be an issue. Worst case scenario, the PID would be all "Screw this, I'm turning this sucker on full blast." And the PWM would be like "Good show, old bean. But might I suggest a more rational heat output?" Hey... maybe I should write a comic strip about it. :D
 
PID won't get confused. When he wants the PID really in control, the PWM will be set at 100%, so the PID will get what it wants. The PWM is totally tranparent in this case and passes SSR on with no changes.

When boiling, the PID just gets set to something over boiling temps and will just end up trying to run the element at full blast. The PWM then has a constant power source and can be used to dial down boil strength.

It's a good idea... If the PID can support the PWM's power needs.
 
After thinking really hard about this:confused: What the op is describing is really an off-board manual mode addition to the PID. Manual mode in a PID is pulse width modulation; its actually quite genius!

But.... By the time you add a PWM circuit to the "inexpensive" PID you have already spent enough to buy an auber with manual mode. For the OP this is a viable option, but I would'nt suggest this method for a start-up.
 
The PWM circuit will have a startup delay, so it would funk up the timing. For a low cycle speed it wouldn't be that big a deal but at anything over 10hz I think you would lose a lot of control.
Of course this is just an engineering assumoption based on experience with similar circuits, you'd have to do timing analysis to actually know what you would end up with.
 
On the other hand, you could power them separately and run the ouput to a summing amp (cheap op amp or an "OR" logic gate) that would give you stable results using the concept you laid out in the OP
 
The PWM circuit will have a startup delay, so it would funk up the timing. For a low cycle speed it wouldn't be that big a deal but at anything over 10hz I think you would lose a lot of control.
Of course this is just an engineering assumoption based on experience with similar circuits, you'd have to do timing analysis to actually know what you would end up with.

If the PID is tuned with the PWM in place, I don't think it would cause any problem.
 
If the PID is tuned with the PWM in place, I don't think it would cause any problem.

How about you put together the transfer function and whip out the bode plot. I'd like to see the region of stability on that one. Do you suppose the startup lag on the PWM is deterministic? Would it be a function of frequency, how about load? Hmmm.... Not sure here either. :confused:
 
How about you put together the transfer function and whip out the bode plot. I'd like to see the region of stability on that one. Do you suppose the startup lag on the PWM is deterministic? Would it be a function of frequency, how about load? Hmmm.... Not sure here either. :confused:

Relax man. We're not building a nuclear reactor here.:rolleyes:
 
Relax man. We're not building a nuclear reactor here.:rolleyes:

It's all good, just trying to point people towards more bullet proof solutions. Anything that you would have to put that much analysis into to verify proper functionality is going to be hell in a home brew environment.

It's simpler, and more stable to just sum the two outputs. (of course you could still build the transfer function for that too if you like)
 
I'm the kind of engineer that would rather just conduct an experiment than over analyze things.

If it didn't work, oh well. Put in the $2 switch and call it a day.

If I could easily get at the DC supply lines to the PWM I built for my kettle, I would absolutely try this just for ****s and giggles. But the thing is packaged up in a plastic box with the brick from an old wall wort, so it currently takes 120VAC on the power leads hanging from it.

I'm interested in knowing if it works, but not interested enough to take apart part of my system.

:D
 
I'm the kind of engineer that would rather just conduct an experiment than over analyze things.

If it didn't work, oh well. Put in the $2 switch and call it a day.

If I could easily get at the DC supply lines to the PWM I built for my kettle, I would absolutely try this just for ****s and giggles. But the thing is packaged up in a plastic box with the brick from an old wall wort, so it currently takes 120VAC on the power leads hanging from it.

I'm interested in knowing if it works, but not interested enough to take apart part of my system.

:D

I'm willing to bet a $2 switch that it won't work at the upper or lower ends of the control band. I see it getting super unstable at low output and never able to achieve max output. But what do i know (insert amusing quip about what kind of day job I have here). :mug:
 
never able to achieve max output.

I'm curious about your thoughts there. The PID will be outputting a constant "ON" signal when attempting max power, because it will be trying in vain to achieve a temp greater than boiling. From the PWM's point of view, the PID will be providing a static DC voltage source.

Why would this not work exactly like a PWM being powered by a wall wort?
 
The PID output will likely never achieve true 100% on, all designs I have worked for will always go to 0 for a prescribed minimum portion of the cycle. Without doing that downstream components would be unable to measure the PWM output with a digital circuit (no trailing edge for cycle). There are mitigations, but they will be hardware dependant. Or you could do a power filter but then low D.C. Performance will suffer more and startup current may be too high for the output.

Too much crap to consider, just do it the other way. The world will be a better place.
 
The PID output will likely never achieve true 100% on, all designs I have worked for will always go to 0 for a prescribed minimum portion of the cycle. Without doing that downstream components would be unable to measure the PWM output with a digital circuit (no trailing edge for cycle).

Interesting. I've never paid attention to whether mine does cycle off during the initial heating up of water (well... I mean it does cycle off at the start while the PID gets it's bearings, but then it starts cranking). I can see how it could be necessary to do so if you had things hanging off of it downstream.

I realized a little bit ago that I have all the parts needed to make another PWM and a solderless breadboard to plug it into so it wouldn't take much work to try this out. Maybe 20 minutes of time to plug the parts all together and move a couple wire connections around inside my panel.

I'm extremely curious as to whether it will work or not.
 
Interesting. I've never paid attention to whether mine does cycle off during the initial heating up of water (well... I mean it does cycle off at the start while the PID gets it's bearings, but then it starts cranking). I can see how it could be necessary to do so if you had things hanging off of it downstream.

I realized a little bit ago that I have all the parts needed to make another PWM and a solderless breadboard to plug it into so it wouldn't take much work to try this out. Maybe 20 minutes of time to plug the parts all together and move a couple wire connections around inside my panel.

I'm extremely curious as to whether it will work or not.

I look forward to hearing the results. An experienced lab rat like yourself will probably get something working.
:mug:
 
I look forward to hearing the results. An experienced lab rat like yourself will probably get something working.
:mug:

Well, if it doesn't "just work" right out of the box, my curiosity will be satisfied, I'll call it a failure, and I can move on to tinkering with something else.

Not going to to anything until I can figure out what kind of amp load the SSR output on my PID can handle, that's for sure! My PID is a cheap chinese one, and is severely lacking in documentation, but I still don't want to have to replace it.
 
yep, inrush current will be significantly more than op current too... And since you keep turning on and off your average current will be higher than expected, and there will be more loss. One more thing to consider.
 
I know it was my OP, but I gave up a page and a half ago - I already got the new switch in the mail. It's fun to see the hornet's nest I started, though. Maybe I should start a new post about how I'm going to use this in my new system and get all the fluid dynamics guys all hot under the collar. :rolleyes:
 
Last edited by a moderator:
I know it was my OP, but I gave up a page and a half ago - I already got the new switch in the mail. It's fun to see the hornet's nest I started, though. Maybe I should start a new post about how I'm going to use this in my new system and get all the fluid dynamics guys all hot under the collar. :rolleyes:

LOL.

Fluid dymanics is Lakewood's night job.

:p
 
Last edited by a moderator:
I know it was my OP, but I gave up a page and a half ago - I already got the new switch in the mail. It's fun to see the hornet's nest I started, though. Maybe I should start a new post about how I'm going to use this in my new system and get all the fluid dynamics guys all hot under the collar. :rolleyes:

Haha - it's on. I had figured you had already moved on... But the darn subscriber e-mail caught my eye.

Anyway that's a great pump if you've got the time.
:D
 
Last edited by a moderator:
LOL.

Fluid dymanics is Lakewood's night job.

:p

Just calc your Reynolds number to check you flow regime. Then we can calc the conduction coeficient for heat transfer in the hex. ;). It hasn't been that long.
 
Maybe I should start a new post about how I'm going to use this

The funny thing is that it looks like somebody might have tried it.

Look at the "customers who bought this also bought" section under that pump.

PID, thermcouples, bucket heaters, SSR, etc.
 
Last edited by a moderator:
Back
Top