Basic arduino questions. - Page 7 - Home Brew Forums

Register Now!
Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > Basic arduino questions.

Reply
 
Thread Tools
Old 07-19-2012, 02:58 AM   #61
cwi
Registered User
Recipes 
 
Jun 2010
Austin
Posts: 845
Liked 34 Times on 28 Posts


Quote:
Originally Posted by Eighty2Fifty1 View Post
Yeah, plus I'll have multiple fermenters in the chamber. I definitely want to track the liquid temp, but I think I'll use the air temp to set it. Maybe an average of 5 sensors in different areas of the chamber.
Tracking the liquid temp will only let you see exactly why your beer tastes like ass because it rose 10+F over your air temp during the active phase. Using air as an input would only be effective as a supplemental input in a multi-input loop, which would be too much work to create/tune anyway.

Using the liquid temp as the input the to control loop is much easier. Just set your ferm temp and a differential (~.5 - 1F) that keeps compressor cycling within reason. For a fan and reservoir based system, you can set it even tighter. For a compressor based system, having a timer that prevents hot starts for at least 10 min is mandatory. Additional mass helps (prechilled to ferm temp before ferm start), as does a small fan. Surprisingly, placing the probe on the vessel wall underneath some (or a lot) of insulation provides better control than a thermowell when using air in a chamber.

You will not be able to effectively use a single chamber for multiple simultaneous fermentations without using heat wraps for each fermenter and a much colder than setpoint chamber temp. It is much easier to use multiple chest freezers or fridges.

 
Reply With Quote
Old 07-19-2012, 03:24 AM   #62
cwi
Registered User
Recipes 
 
Jun 2010
Austin
Posts: 845
Liked 34 Times on 28 Posts


Quote:
Originally Posted by carlisle_bob View Post
Hi

If you decide to control to liquid temp, be very careful of how you do it. The lag / phase margin / damping factor (how every you want to describe it) is going to be a problem with a tight control spec. Since the liquid does not change temperature very fast, a multi loop control likely is your best approach. That's getting a bit down the road from a basic control loop.

Not at all saying it's a bad idea, just that it's a bit harder than it looks.

Bob
Using liquid temp presents no problems as long as you don't want to control to an exact temp with no variation whatsoever, which is nearly impossible anyway, especially with an active fermentation over the complete ferment.

The slow response of the liquid allows for very small temp differential settings. It would only be a problem if your heat input (neg or pos) is not much larger than the ferming beer's needs. Most fridges/freezers have more than enough power to control a ferment- by a factor of 10 (~40W-400W). The main issue is compressor cycling and hot start protection (ASD).

Additional thermal mass at ferm temp provides even better control. There is the possibility of the thermal mass causing undershoot (too cold) for later phases if it got too cold during the active phase, but it is rare in my experience. If it really bothered you, it is easily solved with a dual stage controller to kick on a heater for the end of ferment. Usually unnecessary, though.

 
Reply With Quote
Old 07-19-2012, 11:57 AM   #63
hausofstrauss
HBT_SUPPORTER.png
Recipes 
 
Aug 2011
Fishers, IN
Posts: 144
Liked 32 Times on 16 Posts


If you read a lot about the UberFridge, what he did was have temperature measurement of the liquid and the air. He then wrote some logic into the PLC that did predictive control. Essentially working out the thermal response of each batch. He's got all sorts of graphs showing the validation of his design. It was a really well laid out project and I'm grateful for him sharing it all.

 
Reply With Quote
Old 07-19-2012, 12:43 PM   #64
MalFet
/bɪər nɜrd/
HBT_LIFETIMESUPPORTER.png
 
MalFet's Avatar
Recipes 
 
May 2010
NYC / Kathmandu
Posts: 8,632
Liked 1473 Times on 975 Posts


Is overswing a big problem for people? My fridge must have really low thermal mass, or something. I just stick a probe on the side with a bit of insulation and do a .5 degree deadband. An elaborate formula has just never been necessary for me.
__________________
"Be excellent to each other." -Benjamin Franklin

 
Reply With Quote
Old 07-19-2012, 07:28 PM   #65
Blauhung
 
Blauhung's Avatar
Recipes 
 
Jan 2012
Aloha, OR
Posts: 54
Liked 1 Times on 1 Posts


I believe it boils down to "over-engineering is fun!"

 
Reply With Quote
Old 07-20-2012, 12:03 AM   #66
Eighty2Fifty1
 
Eighty2Fifty1's Avatar
Recipes 
 
Jun 2011
Oak Harbor, WA
Posts: 129
Liked 9 Times on 7 Posts


So to add a dead band, I was going to add this statement for the meat of my program. Can I link IF statement like that or is there something else I should use?
PHP Code:
if (tempReading 69) {
    
digitalWrite (heaterPinLOW);
    
digitalWrite (coolerPinHIGH);
  }
  else if (
67.5 tempReading 68.5) {
    
digitalWrite (heaterPinLOW);
    
digitalWrite (coolerPinLOW);
  } 
  else if (
tempReading 67) {
    
digitalWrite (heaterPinHIGH);
    
digitalWrite (coolerPinLOW); 
__________________
Beer is not the answer. Beer is the question. Yes is the answer.

 
Reply With Quote
Old 07-20-2012, 12:14 AM   #67
carlisle_bob
Recipes 
 
Apr 2012
Carlisle, PA
Posts: 1,205
Liked 29 Times on 28 Posts


Quote:
Originally Posted by cwi View Post
Using liquid temp presents no problems as long as you don't want to control to an exact temp with no variation whatsoever, which is nearly impossible anyway, especially with an active fermentation over the complete ferment.

The slow response of the liquid allows for very small temp differential settings. It would only be a problem if your heat input (neg or pos) is not much larger than the ferming beer's needs. Most fridges/freezers have more than enough power to control a ferment- by a factor of 10 (~40W-400W). The main issue is compressor cycling and hot start protection (ASD).

Additional thermal mass at ferm temp provides even better control. There is the possibility of the thermal mass causing undershoot (too cold) for later phases if it got too cold during the active phase, but it is rare in my experience. If it really bothered you, it is easily solved with a dual stage controller to kick on a heater for the end of ferment. Usually unnecessary, though.
Hi

Since most people are controlling something other than a fermenter, it's not a very good example of what they are trying to do.

It is actually quite easy to do reasonably tight control (0.1F) of a normal keg sitting in a keggerator. There is a very large body of theory that lets you set it up. It can be done without unduly cycling compressors *or* wearing them out by running too long on each cycle.

Bob

 
Reply With Quote
Old 07-20-2012, 01:47 AM   #68
MalFet
/bɪər nɜrd/
HBT_LIFETIMESUPPORTER.png
 
MalFet's Avatar
Recipes 
 
May 2010
NYC / Kathmandu
Posts: 8,632
Liked 1473 Times on 975 Posts


Quote:
Originally Posted by Eighty2Fifty1 View Post
So to add a dead band, I was going to add this statement for the meat of my program. Can I link IF statement like that or is there something else I should use?
PHP Code:
if (tempReading 69) {
    
digitalWrite (heaterPinLOW);
    
digitalWrite (coolerPinHIGH);
  }
  else if (
67.5 tempReading 68.5) {
    
digitalWrite (heaterPinLOW);
    
digitalWrite (coolerPinLOW);
  } 
  else if (
tempReading 67) {
    
digitalWrite (heaterPinHIGH);
    
digitalWrite (coolerPinLOW); 
That will prevent short cycling, though your system will bounce between 68.5 and 69 or 67 and 67.5. In other words, it will never actually sit at 68.

A different approach would keep you between 67.5 and 68.5:

PHP Code:
const float setpoint 68.0;
const 
float deadband 0.5;

void loop() {
  if (
tempReading setpoint) {
    
digitalWrite(heaterPinLOW);
  }
  else if (
tempReading setpoint) {
    
digitalWrite(coolerPinLOW);
  }

  if (
tempReading > (setpoint deadband)) {
    
digitalWrite(coolerPinHIGH);
  }
  else if (
tempReading < (setpoint deadband)) {
    
digitalWrite(heaterPinHIGH);
  }

As Bob mentioned, you might in theory need to watch out for overswing with something like this, but I've never had any trouble. 5 gallons of beer has a lot of thermal mass.
__________________
"Be excellent to each other." -Benjamin Franklin

 
Reply With Quote
Old 07-20-2012, 02:51 AM   #69
Eighty2Fifty1
 
Eighty2Fifty1's Avatar
Recipes 
 
Jun 2011
Oak Harbor, WA
Posts: 129
Liked 9 Times on 7 Posts


Okay, I set up your code into the original and it works fine. I take it that later I could set up a way to change the setpoint and deadband variables with buttons or something, so I don't have to rewrite the code every time. Now I need figure out how to set up a multiple sensor network, and a way to log everything.
__________________
Beer is not the answer. Beer is the question. Yes is the answer.

 
Reply With Quote
Old 07-20-2012, 02:55 AM   #70
MalFet
/bɪər nɜrd/
HBT_LIFETIMESUPPORTER.png
 
MalFet's Avatar
Recipes 
 
May 2010
NYC / Kathmandu
Posts: 8,632
Liked 1473 Times on 975 Posts


Quote:
Originally Posted by Eighty2Fifty1 View Post
Okay, I set up your code into the original and it works fine. I take it that later I could set up a way to change the setpoint and deadband variables with buttons or something, so I don't have to rewrite the code every time. Now I need figure out how to set up a multiple sensor network, and a way to log everything.
Yep, though you probably won't need to change the deadband much. Basically, you want as tight a tolerance as your system can handle, and that's not going to change too much from batch to batch.

Multiple sensors with 1-wire is quite easy. You just need to wire them up in series and then poll the right addresses.
__________________
"Be excellent to each other." -Benjamin Franklin

 
Reply With Quote


Reply
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PID settings on arduino based hlt SimBrew Automated Brewing Forum 64 01-27-2013 06:56 AM


Forum Jump