Fridge temperature control testing

I've got my fridge up and running using an ATMEGA328P based Leostick from freetronics - the code is on Github here.

One thing I noticed during the initial testing was the lag between the temperature inside the fridge and fermenting beer, and the temperature of the fridge enclosure was much bigger than I thought! The fridge enclosure would be consistently 10-15 degrees celsius below that of the inside/beer temperature. This was a problem - because turning the compressor in the fridge off based on this temperature, meant that over the 5-10 minutes following, the fermenting beer would cool some 10 degrees below the cutoff temperature.

I've combatted this by adding a predictive cutoff. I've tuned it for my fridge, and now the temperature gradually lowers to the target temperature after the compressor is turned off. I have also added a timer to prevent the compressor from turning on within 15 minutes of it being turned off - to protect the compressor and also to allow the temperature to drop once the predictive cutout has happened.

I'll be adding an ethernet module to the setup shortly, so I can get some control and logging happening. Once that's done, I should be able to chart the temperature over time to better tune the temperature control.