A view from the fridge

Why the fridge? Well, having built various things for the tortoise, your normal host has been doing a good amount of research about hibernating Tilly. You need a good stable temperature of somewhere between 3 and 7 degrees which, you may well know is the sort of temperature a domestic fridge maintains. If you are shocked about the prospect of putting a pet in a fridge, don’t be, it is a widespread practice. Keeping a constant is important but getting too cold is not going to be good for her and too warm risks her waking up which also causes problems.

While a fridge aims to keep a good temperature, its own control system gives some variation and opening the door of course lets in warm air. The quest set was to see how stable the temperature is and what makes it vary. This is where some Shed Engineering comes in. You can buy various devices for simple temperature measurement which gives you maximum and minimum but if you want something that logs temperature, you are into industrial controls territory and lots of money. After being given a Raspberry Pi for Christmas a couple of years ago, there have been a couple of ideas for small projects that are in various schemes in different stages of development so why not have a go at another one.

Objective: measure the temperature of the box of soil in the fridge and record it so that worried tortoise owners can check on it.

I had already got a thermocouple unit so that we could calibrate the Rayburn oven temperature so as to burn the cakes less so we had a go using that. While that is good for very high temperature ranges, it is not great for sub-degree accuracy and early results showed things to be reasonably stable but not with the certainty needed.

The wonderful world of internet searches and open source development pointed me at a little device which would link up to the Raspberry Pi, allow regular, accurate measurements and be able to store them to look at them over time. The assembled nature of each of the hardware items meant very little construction was needed for the test and the various software tutorials  pointing you to the library files for the temperature board enabled very simple program to give spot readings. The Raspberry Pi Zero board shown below is the core of things for the processing and here is seen dwarfed by the cable connectors for the prototype.

The Pi

The fact that the operating system that is fairly normal for Raspberry Pi allows you to automatically run a program however frequently you like (a thing called Cron Jobs, which always takes me back to the time travel machines called the Chron-o-John in Day of the Tentacle, a game which distracted us from our final year studies for far too long, but that is another story) and has the ability to access web pages all means that we had something that sampled the temperature every minute and stored it in a database on a website for easy viewing where every you are.

Looking at a list of numbers is not that great. As much as selling my soul to Google goes against most feelings I have on the matter, looking for an easy way to turn lists of numbers into a nice graph without hours of coding led me to Google Charts which did just the job.

Having looked at the general temperature of the fridge, the box for Tilly was put in place and the measuring device refined slightly to make it suitable for being buried in the soil. This involved adding a small metal plate to one side to contact with the temperature measuring chip on the board and encapsulating the rest of the device so that it would survive being buried in soil which may be slightly damp.

Going Underground

The early results were promising in that the fridge appeared to be, and stay, within the required limits.

First Tests
It did, however, highlight a few obvious things.

The fridge has some sort of defrost cycle so every eight hours or so the temperature rises up a couple of degrees before settling back to its gentle wobble around its target temperature, varying just by the hysteresis in its control system.


Putting stuff in the fridge which is warmer that the bits already in there has an impact on temperature, but not necessarily in the way that you think. If you put something room temperature in the fridge, you would think that the temperature inside would go up. True there is more thermal energy in the box. However, it very much depends where you put the item as to what happens. If, as we found (and is actually blindingly obvious) you put the warmer thing near where the fridge has its temperature sensor, it will think that things are warming up and run the compressor for longer to overcome this. The result is that the already cold bits of the fridge get very cold until the vital area gets cool enough to register all is well. While it does not matter if your milk gets a bit of ice on it or a small corner of your salad drawer gets a little frosted, your tortoise is a bit more picky and wants to avoid permanent eye or brain damage.

Too Cold

A few months of observations and experiments led to the happy position of a bottle of water always stored next to the sensor to give a) a cold mass to generally act as a sink for things going in and out and the air changes when the door opens (acting as a temperature dampener) and b) a physical reminder that you do not want to put a room temperature thing next to the sensor. A bespoke device was rustled up to make sure the appointed bottle does not roll away.

Bottle Stop

A couple of other refinements were made along the way.

Wrapping the box up in foil covered insulation gave the box an even slower response time to changes in the fridge so gives a very smooth profile.


The link to the website also gives a few more possibilities. The script that uploads the data checks the information to see if the temperature is within limits. If it is not, you can have an alarm condition to send you an alert. This is set up to be via e-mail and text message. E-mail is straight forward from the web hosting and there are many SMS applications that allow you to send text messages. Most have a free introductory offering but inevitably, there is a small cost to an ongoing service. Hopefully things will be stable enough to mean that we do not eat through texts as too fast a rate. The tests so far look good.

Given that you can run cron jobs on the web hosting too, it is set up to check every ten minutes whether readings have been posted (they should be there every minute). If there has been no activity, it sends an alert warning of system failure. This is not 100% sophisticated in that the fault could be that the Pi has stopped working or that the home internet which links it to the page has dropped out or that the reasonable value web hosting (which incidentally is the same used to host this blog) is having an off day. It may also be that the power to the house has gone off (and hence so has the fridge). However, given the relatively slow response time of the soil mass in the fridge with a reasonable amount of thermal mass (the general stuff and extra bottles of water), a Pi Failure alarm will not require urgent response as it will take a few hours to rise up to anything worrying if the fridge has failed as well. Anyway, the alert is there and someone can look into it.

The Finished Article

Tilly is just preparing for hibernation now – no food and waiting for her insides to be empty before a bit of cooling down next week and into the box thereafter. If you want to see her comfort levels (if you can call 5 degrees C comfortable) have a look at the Tilly Temperature. Don’t fret about some of the variations in the past weeks and months, these were the various experiments. Hopefully it will be a smooth line over the next couple of months.

Here is the display squashed into a small box on this screen. The real page is a bit clearer.

A view from the shed

Before you start, this is not by your normal correspondent.

I have been meaning to write about a couple of things that have been made in the shed. Like most of the things in the shed, those best intentions never got past the design stage, but not today.

Like many young people, I had a set of Scalextric when I was small. As a teenager, it got a bit bigger with some that was left over from a school fair. A job lot on e-bay added a further wedge and a closing down sale at a local shop extended the car collection. All of this sat in several boxes for many years. The last time it came out was in 2006 and then it did not really work because a) we tried to build too big a track and b) it had not been used for about fifteen years and hence needed some TLC. It went back in the boxes and life went on.

Small saw the piles of boxes a while ago and asked several times if we could get out the electric cars. Well, could a dad refuse such an offer? No, so last week I made a simple layout which used the best bits of the track. After a little bit of fettling of the track, the new cars from the last purchase some years ago worked spectacularly well. The only real problem was that the track got in the way of the chairs from the dining table and some friends were coming to dinner (the maths tutoring would just have to work round it, but dinner would be a bit more awkward) and this meant it got “tidied away” (put in a pile in the corner) yesterday.

During the week, I had tried using the old F1 cars and the Mini Clubmans but the rubber on their tyres had dried out and had no grip. I found a dedicated bunch who supply tyres and brushes to revitalise the cars and I also ordered some of the pads to clean up the track.

One of the other items that I have from childhood is a book entitled “101 Circuits for Scalextric Drivers“. Small and Tiny looked through it today declaring “wow” for all of the layouts and they settled on one that they wanted me to build (SCX.1278 if you have the book). With a bit of modification for the fact that, while I have a lot of track, the only curve types are the same radius and hence where the layout wanted four bends with smaller radius, I had to improvise. We managed and got a layout that looked about right and had the advantage that it fitted at the end of the room, mostly out of the way of the dining table.

The kids helped out (surprisingly well) with cleaning the track. Their enthusiasm waned eventually but was rekindled a bit later when Small was asked to go and tidy up his Lego… We had a new layout and it worked quite well.


That is all very fine, I hear you say, but what about making stuff in the shed? Well, some spare brush components, a new layout and thoughts of Lego. Surely there must be an opportunity to join the two toys up. I pottered for a bit to put together a very basic chassis and then disappeared to the shed to come up with a way of interfacing a brush unit with standard Lego pieces. I could always cut and drill things, but that would not be in the spirit of Lego, would it? In the end, the only extra that was needed was a washer to retain the spigot in the Lego brick that had a hole for a Technics joiner.

IMG_2993IMG_2994I used the 12v Lego motor which, in hindsight, has two drawbacks. 1) It has nowhere near enough torque so it is more of a tractor than a race car and 2) the orientation of the terminals on the motor mean that it travels the opposite direction round the track to a conventional Scalextric car. Ah well, I had fun doing it and seeing Small’s face light up when he saw a Lego car running round the track was worth several hours work. The picture below is a link to a short video if you want to see it in action.

While I have been working out how to use WordPress, someone else has been getting closer to finishing off a Clanger that has been in the making for some years and really should get finished in time for Tiny’s birthday this year, so here is the obligatory picture of some knitting which is required as a fee for me getting my hands on the keyboard.