Kegconnection Complete Starter Kit and More Giveaway!


Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > 30A - three vessels running quazi-simultaneously.

Reply
 
LinkBack Thread Tools
Old 04-30-2013, 03:45 AM   #1
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default 30A - three vessels running quazi-simultaneously.

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?

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 04-30-2013, 02:55 PM   #2
alien
Feedback Score: 1 reviews
Recipes 
 
Join Date: Apr 2012
Location: Philadelphia, PA
Posts: 1,233
Liked 65 Times on 58 Posts
Likes Given: 61

Default

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.

alien is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 02:32 AM   #3
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

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.

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 02:45 AM   #4
kpr121
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Pittsburgh, PA
Posts: 2,754
Liked 59 Times on 56 Posts
Likes Given: 57

Default

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.

__________________
ADD ME on GOOGLE+
Primary: Nugget Nectar 2014
Kegged:

Bottled:
Bulk Aging:
Up Next: ???? Suggestions?
kpr121 is online now
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 04:38 AM   #5
alien
Feedback Score: 1 reviews
Recipes 
 
Join Date: Apr 2012
Location: Philadelphia, PA
Posts: 1,233
Liked 65 Times on 58 Posts
Likes Given: 61

Default

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.

alien is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 05:26 AM   #6
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

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.

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 02:17 PM   #7
alien
Feedback Score: 1 reviews
Recipes 
 
Join Date: Apr 2012
Location: Philadelphia, PA
Posts: 1,233
Liked 65 Times on 58 Posts
Likes Given: 61

Default

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.

__________________
Magic Smoke brewhouse and grill

Arduino PID controller - Automatic Smoker - Cooler MLT - Counterflow Chiller - SSR demo - PWM timer - Folding Brew Table
alien is offline
 
Reply With Quote Quick reply to this message
Old 05-01-2013, 09:01 PM   #8
crane
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2011
Location: San Diego, CA
Posts: 282
Liked 25 Times on 22 Posts
Likes Given: 1

Default

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

__________________
crane is offline
 
Reply With Quote Quick reply to this message
Old 05-02-2013, 02:43 AM   #9
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

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?

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 05-02-2013, 03:25 AM   #10
alien
Feedback Score: 1 reviews
Recipes 
 
Join Date: Apr 2012
Location: Philadelphia, PA
Posts: 1,233
Liked 65 Times on 58 Posts
Likes Given: 61

Default

http://en.wikipedia.org/wiki/Resistor–transistor_logic
__________________
Magic Smoke brewhouse and grill

Arduino PID controller - Automatic Smoker - Cooler MLT - Counterflow Chiller - SSR demo - PWM timer - Folding Brew Table
alien is offline
 
Reply With Quote Quick reply to this message
Reply


Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fermenting 2 Beers Simultaneously In Chest Freezer OKCAg2002 Beginners Beer Brewing Forum 2 03-03-2013 08:42 PM
Simultaneously run wort into two carboys lutherslagers Equipment/Sanitation 16 02-05-2013 12:36 AM
brew two beers simultaneously? OHIOSTEVE Beginners Beer Brewing Forum 1 10-17-2010 06:55 PM
simultaneously using 2 strain of yeast for same cider naeco Cider Forum 6 09-02-2010 03:24 PM
How to hurt yourself and F*** up your batch simultaneously html034 General Beer Discussion 26 09-20-2008 07:28 PM