The How Zone

Refrigerating the Web

Graph Fun


I've been using a wonderful little PHP graphing module called jpgraph and have used it in my php script for plotting out the fridge data. Essentially what I want to see is how often the fridge "turns on" (compressor), for how long, and then how long it is off. Plotted in relationship to this I'd like to see when the two doors are opened, helping to make a correlation with extended compressor run times.

Complicating this is the fact that each data element has varying amounts of information, at different times and durations. The compressor can be on for a half hour at times (sad, I know) while the doors are usually only open for a handful of seconds, maybe a minute when loading groceries. The answer was to stick to a fixed resolution and then pre-load the arrays with dummy, empty data at that resolution. I fixed it at one minute intervals so even if someone opens and closes a door six times in a minute you'll only see one blip on the fridge graph. But this is sufficient for what we are trying to do.

Here is a graph of the first eight hours:

fridge first eight hours
green squares=compressor, red=freezer door, blue=fridge door


Imagine my surprise to find that the fridge is on almost half of the time! Even without any doors being opened it was running for around eleven minutes, off for fifteen, and then back on again. Wow.

I sort of expected it to be bad, but then again I didn't (and still don't) have a baseline of what a normal fridge does. Even so I can make comparisons before and after cleaning, hopefully improving it somewhat.

I ran the graph again after we had been collecting data overnight. It showed that things stayed pretty much the same except during dinner preparations when I was in and out of the two doors quite a bit, at one point the compressor ran for almost a half hour. Here's an even longer sample period.

fridgebig
three days worth of fridge data


 «Hello Fridge this is OSX  Page 4 of 6 How your Fridge works»