Would you like to build a Refrigerator?

Post pictures of your System
User avatar
cscade
Posts: 49
Joined: Wed Sep 16, 2009 1:54 pm
Bot?: No

Would you like to build a Refrigerator?

Post by cscade »

I received by new BCS three days ago, and excitedly set to work building what will be an all-inclusive fermentation and refrigeration control chamber. I thought I'd share the process with everyone.

In my basement, I decided on an area near the sump pump well, to deal with any condensation that may drip off of the A/C unit. I took an old Amana 6k BTU A/C unit, tore it apart, cleaned it, and rewired it to remove the thermostat. Other than an on/off switch, it's now a dumb unit and runs when it has power.

I built a 4' x 8' x 4' framed box, with two access doors and full internal insulation. All sides and the top are insulated, including from the floor. Expanding foam was then shot into every crack and crevice to make things as airtight as possible. Both doors are tightly gasketed with stick-on weather strip.

There's a temperature probe inside the chamber, and a 25A relay (eBay) controlling the A/C unit.

Right now, the entire chamber is one volume of air, and one temperature. The BCS program looks as follows:
  • 0: Compressor Wait. Exit Condition: timer0 <= 0. timer0 is a 15:00 timer. Goto 1.
  • 1: Hold. Exit Condition: temp0 >= 44. Goto 2.
  • 2: Cool. Assert out0 (A/C compressor). Exit Condition: temp0 <= 40. Goto 0.
The process starts automatically when power is applied. The purpose of the Compressor Wait state is so that if I open the doors and cause a temperature spike, or if the power drops out while the compressor is running, I can guarantee that the compressor will never be asked to cycle ON less than 15 minutes after it was last cycled OFF. This should significantly extend compressor life.

As is, with only ~8 gallons of beer stored in it, it is able to maintain 42f (23f < Ambient) by running the compressor for two minutes every twenty minutes. I'm very pleased.

The chamber is so large, because soon it will be upgraded. I am installing a movable gasketed internal wall to divide the space. The refrigeration cell will then be smaller, and I will have a fermentation/lagering/aging cell as well. The movable wall will have computer fans in it, which the BCS will control to exchange air with the refrigeration cell. Thereby allowing me to have a chamber that is both < Ambient, and > Refrigerator. The ferment chamber will be equipped with 3 thermistors. One to monitor air temp, and two more to drop in thermowells in active fermentors. The fermentors (Sanke kegs) will be equipped with electric blankets, which the BCS will independently control. In this way, I can theoretically ferment 20 gallons of beer at once, while maintaining +/- 1f temperature control, per fermenter. They can even have different set temps at the same time.

The main purpose of this design was to kill three birds with one stone (BCS) and also require only one cooling source (window A/C) for the entire process.

Thoughts/questions appreciated! Here's some pictures:

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
np0x
Posts: 110
Joined: Wed Oct 15, 2008 7:16 am
Bot?: No
Location: Vienna, VA

Re: Would you like to build a Refrigerator?

Post by np0x »

That is a thing of beauty...you might be able to accomplish your wait cycle affect by using the "Output Update Period
(PID Sample Period)" and setting it to 15 minutes...meaning that it would only measure once every 15 minutes, i believe the fridge if cycled on wouldn't be checked to cycle it off again for 15 minutes, and vice versa....(ecc correct me if I am wrong here)..

Nicely built structure!

I love my bcs for the long term temperature control function as well...temperature ramps are cool too if you want to cool beer down but don't want to shock the yeast out of solution, i have ramped down slowly when I realized I hadn't got the temps right, but didn't want to freeze the yeast out...just brought it down slowly(over 8-12 hours).
Check out the Brew Buddy for iphone controlling your bcs-460.
User avatar
cscade
Posts: 49
Joined: Wed Sep 16, 2009 1:54 pm
Bot?: No

Re: Would you like to build a Refrigerator?

Post by cscade »

I considered the PID period, but my assumption is that it would begin it's cycle at process start, which is not what I want if the compressor had just gone off from a power drop out. We unfortunately have a fair number of those in my area. Also, since the compressor only needs to run for two minutes to achieve my set temp I think it would nail me there too.

Great thought on ramping. I hadn't considered that for cooling applications! Once my fans are in for ferment control, I'll certainly give that a try!

This is probably a good time to say congrats on the iPhone app as well, I was toying with iPhone development up until this summer, but I got out of it due to market instability. I didn't see it as a viable primary source of income, which is what I needed. It's a heck of a lot of fun though!
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Would you like to build a Refrigerator?

Post by ECC »

Wow, great build. I agree, a 15min pid period wouldn't be what you want, it would hold the output on for 15min before sampling again. However setting it to 20-30sec would probably be appropriate (depending on the ac unit) if using differential control.

I really like your state machine, your program is tailored to your specific requirements. This is exactly the kind of system control that I envisioned when pondering the best way to give the user access to as many variables as possible.

Here's an alternate method just for kicks:
  • 0: Compressor Wait. Exit Condition: timer0 <= 0. timer0 is a 15:00 timer. Goto 1.
  • 1: Cool Control: Output controlled differentially, 42deg +-2 (swing=4). Exit Condition: timer0 <= 0. timer0 is a 15:00 timer. Goto 0.
I think your method is better, as it doesn't enter the wait state until after you hit the low end of the target temperature, thereby giving more confidence that it'll hold temp during the wait. And your method also only stays in the cool state for as long as necessary. The only thing that my method brings to the table is simplicity. When you want to change the temp, you only have to do it in one place, and you don't have to go through the agonzing pain of adding 4deg. And you can use the 'Temp Setpoint Adjust' page to modify a running process. But, like I said, your method really gives superior control. Well done!
User avatar
cscade
Posts: 49
Joined: Wed Sep 16, 2009 1:54 pm
Bot?: No

Re: Would you like to build a Refrigerator?

Post by cscade »

Thanks for the kind words! You've built a heck of a product here, I can attest to that.

The only thing I could put on my wish list would be:

Is it possible to create a state machine that includes an AND on the exit conditions? I see the ability to have multiple exit conditions, but they are all ORs. Even a single AND/OR flag per state would probably do the trick. I can see this being very useful. For instance, I could combine states 0 & 1 in my A/C process into a single state if I had access to an AND flag for the exit conditions.
User avatar
cscade
Posts: 49
Joined: Wed Sep 16, 2009 1:54 pm
Bot?: No

Re: Would you like to build a Refrigerator?

Post by cscade »

As an update to the OP, I need to let anyone considering a similar build know about the severe failure that followed my initial posting after the build. :oops:

After running smoothly for about two days, I was confident the system was stable. I was away from home for 24 hours, and returned to disaster. When I checked the BCS control panel, I discovered to my horror that the A/C unit had been running for 15 hours solid, and the temperature in the refrigeration unit was 51f. What the heck had happened?? Ice! I had to completely tear apart the A/C unit, and removed about six pounds of ice from the evaporator coil, and lots and lots of water from the chassis.

When I reassembled the unit, I relocated the temperature probe to be in direct contact with the coil and rewrote the state machine as a stopgap measure so I could limp along with halfway cold beer while I solved the problem properly. I knew this wouldn't last though, I simply needed more data and more control than one thermistor and one relay could provide. Without more data there was no way the BCS could ever be aware of, and remedy, an ice condition while simultaneously maintaining a set temperature.

I contacted Derrin at http://www.brewershardware.com who happily agreed to build me a custom thermistor assembly with no stainless probe end. He quickly turned around three probes for me (all three custom in their own way, I needed the other two for other projects) and dropped them in the mail the same day.

When they arrived, I tore apart the A/C unit again, this time mounting an additional relay inside the control panel housing of the unit. It, in tandem with the relay I already had controlling the main power to the unit, would allow me to control the circulation fan separately from the A/C compressor. I covered the thermistor Derrin had assembled with heat shrink to prevent shorts against the A/C evaporator coil, and inserted the probe directly into the fins. This would allow me to check for ice. I then placed a second temperature probe inside a glass jar full of water. This would allow me to maintain a set liquid temp rather than a set air temp.

Image

After reassembling everything, I ran the relays manually for two hours (via the BCS of course), collecting data about the way my particular A/C unit interacted with the space it was cooling. Based on the output from the new sensors, and what I was seeing in the logs, I developed a new state machine to cool the chamber. Here's a flow chart:

Image

It should be pretty self explanatory, but please feel free to ask questions. State 0 is first to prevent the compressor from cycling fast if there is a power outage, and in between phases. This is covered in the OP. Originally, this was 15 minutes, but after research into compressors it seems 3 minutes is sufficient to prevent premature wear in my use case. State 0 also performs double duty to defrost the coil after a cooling phase. The only confusing bit might be the two timers counting up in states 1 & 2. They simply exist so that when I pull up the BCS control panel to check on the unit, I can see how long it has been in either one of those states. The state machine does not use them. Here's the machine in action, after the contents of the chamber stabilized temperature.

Image

As you can see, the system now consumes no power for upwards of 45 minutes, waiting for the chilled liquid to rise one degree. Once it does, the compressor will run as many six minute cool/defrost cycles as needed until the liquid temperature in the chamber hits 38f. It will then return to an idle. Ambient air temp is irrelevant and ignored.

I am extremely pleased with the results. It can now keep the beer colder, using less power, with more idle time, and far less likelihood of things going pear-shaped. The state machine is flexible so that as weather conditions (mostly ambient humidity) change, the defrost cycle may extend beyond 3 minutes (via State 1) as much as needed to prevent icing.

Cheers! :D
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Would you like to build a Refrigerator?

Post by ECC »

Very methodical analysis, and elegant solution! Great work. If I ever build an A/C based cooler (and you've about got me talked into it), you'll be getting a PM from me requesting your config file!

Cheers
rcrabb22
Posts: 43
Joined: Fri Apr 30, 2010 6:33 am
Bot?: No

Re: Would you like to build a Refrigerator?

Post by rcrabb22 »

cscade wrote:Thanks for the kind words! You've built a heck of a product here, I can attest to that.

The only thing I could put on my wish list would be:

Is it possible to create a state machine that includes an AND on the exit conditions? I see the ability to have multiple exit conditions, but they are all ORs. Even a single AND/OR flag per state would probably do the trick. I can see this being very useful. For instance, I could combine states 0 & 1 in my A/C process into a single state if I had access to an AND flag for the exit conditions.

Did I miss the answer to this question? Are multiple exit conditions AND's or OR's? if OR's is a flag like cscade suggested an enhancement possibility?

Thanks
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Would you like to build a Refrigerator?

Post by ECC »

Multiple exit conditions are "OR"s. In other words, the BCS will transition if Exit Condition 1 is true, OR if Exit Condition 2 is true. If you want an AND condition, you need to use 2 states in series.

Adding an AND flag is a possibility for future enhancements. Probably not the highest priority since the function can be accomplished using existing facilities, but it would save some states.
rcrabb22
Posts: 43
Joined: Fri Apr 30, 2010 6:33 am
Bot?: No

Re: Would you like to build a Refrigerator?

Post by rcrabb22 »

Duh!! 2 states, of course! Thanks!
Post Reply