30A - three vessels running quazi-simultaneously. - Home Brew Forums

 Home Brew Forums > 30A - three vessels running quazi-simultaneously.

04-30-2013, 03:45 AM   #1
chuckjaxfl
Recipes

Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts

I should be starting on a three vessel, all electric system shortly.
The plan is to build the physical system all "manual" to begin, then continue adding automation, well, indefinitely, I suppose. I'll be using Arduino and the PID library, until my interests take me elsewhere.

The plan is for a 5500 watt HLT, a 5500 watt KET, then probably a 1500 watt RIMS tube. However, my power source is only 30A.

My plan is to have the "on time" for all three vessels computed each 2000 millis cycle, have the vessels fire sequentially, with one third of the remaining idle spread between each vessel's portion of the duty cycle.

For example, if the HLT PID computes 5%, the RIMS PID computes 6%, and the boil kettle PWM is set to 50%, then the firing order would be:

HLT on for 100ms, all off for 260ms, RIMS on for 120ms, all off for 260ms, KET on for 1000ms, all off for 260ms. Then read the sensors, recompute, and start over.

Obviously, the total off all three vessels couldn't exceed 100%. I would constrain the output of the second two vessels to 0 until the first vessel dropped below say, 95%, at which point it could start firing the second vessel, constrained to 3% (arbitrary numbers for now). As the duty cycle required to the first vessel continues to drop, the time available to the second vessel would increase. When the sum of those two drop, time would become available to the third vessel.

I intend to program a minimum delay between each vessel. Each cycle on the SSR is 8.3ms, so what do you guys think a safe margin is to ensure the "on" cycles don't overlap? Should 50ms be enough?

As a backup, in case something weird happens with the code, I'd route the output through a set of AND & NOT gates arranged so that only one of the three vessels could fire at once. And, of course, as a second backup there's always the 30a breaker itself.

I think this is a really viable option, but I haven't seen it done before. What do you guys think? In what order would you prioritize the vessels? I have ideas, but I'd like to read your thoughts. Also, what about the minimum dwell time between each vessel, 50ms too much? Not enough?

04-30-2013, 02:55 PM   #2
alien
Recipes

Apr 2012
Posts: 1,235
Liked 68 Times on 59 Posts

The SSR will turn off at zero crossing which is every half cycle or 8.3 ms as you say. The SSR you will be using will probably be the type that turns on at zero crossing so all you have to do is ensure a gap of one half cycle between off and on. So a delay of 8.3ms should be fine.

You could also measure the zero crossing directly by having the mains AC go to an input pin on the Arduino via a 1M resistor.

http://www.avrfreaks.net/modules/Fre...46/doc2508.pdf

As for priorities, I would say RIMS has the highest priority but it will depend a bit how you use the set up. Sharing power in this way will totally screw with the PID parameters especially during autotuning. So you want to prioritize whichever single vessel whose power/temperature you want to hold stable at that point in the brew.

So if you want to heat the BK a bit while fly sparging, you want HLT > BK but if you want to heat up the next batch of liquor a bit while boiling, you want BK > HLT.

05-01-2013, 02:32 AM   #3
chuckjaxfl
Recipes

Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts

Your thoughts mirror mine on priority, I think the RIMS should be priority one, HLT priority two (to maintain sparge water temp), and whatever time is left could be used to start the HLT heating.

Why do you think this would mess with autotune? I'd autotune to a 2000ms cycle, then run each loop on a 2000ms cycle. I'm not following.

I *do* think that doing this will mess with my "I" term (because the of the constrain function), but my experience so far is to eliminate the "I" term until I'm within just a few degrees anyways.

05-01-2013, 02:45 AM   #4
kpr121

Recipes

Jul 2009
Pittsburgh, PA
Posts: 3,151
Liked 127 Times on 111 Posts

Following this....I don't think I understand the electric enough but this is definitely something I would have loved to do when I put together my 30a system.

05-01-2013, 04:38 AM   #5
alien
Recipes

Apr 2012
Posts: 1,235
Liked 68 Times on 59 Posts

Depends a bit how you implement the auto tune but basically the way it works is to vary the set point and calculate the gain parameters based on the response. If the response is output limited because another element is on then the gain parameters will be different than they would otherwise be. So I think when auto tune is on you can only have one element firing.

The hard bit will be trying to maintain sparge temp in the HLT while mashing with the RIMS.

You might want to think about some way to boost the gain for the output limited element (HLT) to compensate for the smaller power available.

Another thing to watch out for is that you need a way to implement the output limitation so that a massive integral windup does not accrue. i.e. when you turn off the RIMS you don't want the HLT to overshoot because of the big backed up integral term that has built up during the mash when the HLT couldn't keep up to temp.

05-01-2013, 05:26 AM   #6
chuckjaxfl
Recipes

Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts

Ahh.. I see what you're saying. I would tune each loop individually, on a 2000ms cycle, then code those parameters into the final sketch. I wouldn't try to autotune them while the constrain was screwing with each one. That would be disastrous.

I agree about the I term windup, I've already been through Arduino autotune hell once, in this thread.

Right now, I brew two-vessel, single-element, like in the "I love no-sparge brewing" thread. I can maintain mash temps using 4% of the duty cycle available. I would hope maintaining HLT temps to get sparge water ready would be a snap.

I'm a long ways away, still. I haven't even started building it yet! I'll post the failures & successes along the way, of course.

05-01-2013, 02:17 PM   #7
alien
Recipes

Apr 2012
Posts: 1,235
Liked 68 Times on 59 Posts

Sounds good. I guess if you are step mashing you could have 100% RIMS for a while.

Insulating everything will help generally with power use.

By the way I think the fail safe logic is a good idea. One way to implement it, if you dont mind hard coding the priority, would be to use something like a 74HC148. With the non-prioritized signals on inputs 1, 2, and 4, the prioritized signals will emerge on bits 0, 1, and 2 of the output, respectively.

05-01-2013, 09:01 PM   #8
crane
Recipes

Sep 2011
San Diego, CA
Posts: 686
Liked 95 Times on 80 Posts

A simple way to implement failsafe hardware priorities is with PFETs. If your RIMS has priority over the HLT the connect the source of the PFET to the HLT control output and the gate to the RIMS control output. Finally connect the drain to the input of your SSR. This way the input to the HLT SSR will only be high when the HLT output is high and the RIMS output is low. This way you don't need those fancy logic gates that require their own power and ground connections. KISS

05-02-2013, 02:43 AM   #9
chuckjaxfl
Recipes

Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts

I'd be wrong not to point out to anyone reading this thread that this is actually crane's vision. He's the one who put this idea in my head quite some time ago.

Sheesh, a year ago this idea seemed like absolute voodoo. Now it's well within my grasp to code this. I'm just working the minutiae out in my head about how I want the final product to work.

I'd really encourage anyone who thinks that they *want* to get into writing code, but is intimidated by it, to just go buy an UNO and start watching YouTube videos. As another poster said, "If you can read a sensor and blink an LED, you're halfway there."

I have a pile of 3904's & 3906's on hand. Is there any reason I couldn't build a similar system with them? How would you set it up with three signals?

05-02-2013, 03:25 AM   #10
alien
Recipes

Apr 2012
Posts: 1,235
Liked 68 Times on 59 Posts

http://en.wikipedia.org/wiki/Resistor–transistor_logic