Mini fridge build part 2

Because no project is complete without some sort of optoelectronic display, I’ve decided to attach an LCD to the fridge for the nerd-cred.

It appears the the mini-fridge is constructed with two shells, with the internal space filled with expanded polystyrene. The mini-fridge’s door is of similar construction, providing us with ample space in which to mount the LCD display. The LCD display itself is an inexpensive STN display with a paralel data interface consisting of 8-bit wide bus plus 3 control wires, courtesy of the HD44780 chip.

Accessing the inside of the fridge door is possible by finding the super-secret hidden screws behind the black foam seal (I can’t work out exactly why they need a whole 10 screws to keep on the front of the door).

Like candy, the fridge door combines a hard sugar-coated shell with a cruncy interior.

With the door panel off, I can mark out and cut the viewport. With that done, I next start cutting conduits for the cable. Because of the fridge’s two shell construction, there should be room for us to run a cable between the layers. I start by cutting a hole in the back end where the electronics are, and a corresponding hole at the top side.

Because the intervening space is filled quite tightly with styrofoam, it’s not a simple case of pushing the ribbon cable through, I need to pull it through with something. The only thing I had on hand at the time was my trusty metal ruler, which has a hole on one end. So I decided to shove this metal ruler up the inside of the fridge, and then try to attach some nylon cord to the hole and pull that through. The nylon cord can then be used to pull the ribbon cable through (there was no way of easily attaching the ribbon cable directly to the ruler.)

At this point, I feel that my time watching all those TV medical dramas have paid off – I have fashioned a paperclip into some hook, threaded a loop of nylon, and via an incision in the top of the fridge, I hooked the paperclip onto the hole of the metal ruler, laparoscopy style.

With the loop of nylon pulled through, I then used that to pull the ribbon cable through, which is actually a loop of flat CAT6 ethernet cable.

The cable is stripped, and soldered to a socket, plugged into the LCD, and duct-taped into position. I’ve made a bit of a dog’s ear of the polystyrene. No doubt I could have carefully cut the polystyrene to shape instead of ripping it apart with my bare hands. raaaar.

Finally, the cable is thread through another hold, and there is enough play in the cable to avoid stretching it as the door opens and shuts.


Mini fridge build part 1

Following the schematics I posted previously, I made up a little board containing all the external components, including the resistors, optoisolators, and isolated DC/DC converter.

The DC/DC converter in question is the XP Power IE1205S, costing £4, which is by far the most expensive component on this board. This little black square in the bottom left of the board in the image above, converts the 12V DC of the fridge’s power supply to 5V, which feeds Forebrain. In addition, there is isolation between the two sides.

The isolation is probably not strictly necessary since the fridge’s mains transformer board should also isolate its 12V supply from the mains too, but better be safe, particularly when I intend to plug Forebrain into my computer via USB. The isolation will prevent any unhappy “incidents” involving computers and mains electricity.

Beside this, there is also the rather fetching ivory-white chip, which is the optoisolator, a Vishay Semiconductor K824P, this chip allows the transistor on the fridge’s 12V side to be controlled, in an isolated fashion, by forebrain.

And there is also the TO-92 packaged BC237 transistor that drives the LCD’s backlight.

The three wires coming off this board are: orange (12V), black (PGND), and green (control signal). You will see these wires in later images.

The green control signal wire is attached to the base of this here TO-220 packaged BDX53B NPN darlington transistor, which in hindsight was probably a very poor choice (it has quite a large collector-emitter saturation voltage). I should have used a MOSFET instead.

However, by a quirk of thermodynamics, the large collector-emitter saturation voltage of the transistor doesn’t bite us in the ass half as hard as it should have; the high saturation voltage means that a lot of the power that was supposed to go to the peltier is instead lost as heat in the transistor. But because the peltier is a thermoelectric device, I can use it to pump the lost heat of the transistor back into the inside of the fridge! All I have to do is clip the transistor to the peltier’s heatsink, which will get cold as the peltier siphons the heat out of it and dumps it in the fridge like some kind of thermodynamic vampire.

But first, wiring the rest of the circuit:

This is the junction between the fridge’s mains supply board and the switch board, as per the schematics I posted previously, I have to wire our transsitor in the black wire there, to control the power flow from the mains supply board to the switch board (and therefore controlling the power supply to the peltier and fan). I also need to access the 12V supply as well to power Forebrain, the LCD, and the temperature probe.

Snip snip snip (somehow it seems wrong that I’m making sound effects to accompany my blog pictures)

CUT THE RED WIRE…THE RED WIRE!!! NO WAIT…THE BLACK WIRE…THE BLACK WIRE!!! AAAARGH…CUT THEM BOTH!!!

I cut the red 12V supply wire to solder our orange wire into it, reconnecting the severed ends.

Next, I strip and solder some leads to the bifurcated black PGND wire (I’m calling this black wire Power-GrouND to distinguish it from the isolated 5V GND that Forebrain uses). These are the brown and a blue wire in the image (no doubt previously scrounged from some mains lead in the forgotten past). The ends of these wires are connected to the collector and emitter pins of the transistor (importantly the collector comes FROM the switch board, the emitter TO the supply board).

As previously mentioned, I will attach this transistor, and it’s 7W heat loss to the peltier’s heatsink. If I had used a MOSFET or a BJT with less VCESAT, then this whole heat-sink attachment operaion wouldn’t have been necessary.

Heatsink paste must be applied as the side of the heatsink fin that the transistor is to be attached to is ribbed and doesn’t have a smooth surface. Unfortunately that nice wide flat area of the heatsink wasn’t quite wide enough to accept the TO-220 transistor.

I should mention at this point that the tab of the TO-220 transistor is connected to the collector pin. Since I’m not using any insulation between the tab and the heatsink, the heatsink is likely to be connected to the collector via the TO-220 tab, and therefore can be anywhere up to 12V relative to PGND. While I did check that the heatsink itself was not connected to any of the other wires, and therefore no chance of electrical short, I did find out after construction that the inside of the fridge itself is enameled metal. Given that the heatsink is bolted to the peltier, which in turn appears to be bolted to the metal interior of the fridge, there is a good chance that there could be an electrical connection between the heatsink and the metal interior via the bolts.. It would therefore be a good idea not to touch the inside of the fridge while the mains is plugged in in case I was wrong about the fridge’s supply being isolated.

I simply clip the transistor to the heatsink with this 100 year old invention, a baby-blue binder clip (I wonder if babies are really this blue colour). The great thing about the binder clip is that the handles are designed to be removable, leaving a semi-permanent atachment..


Schematics

The two main elements to this build are: 1. control of the mini-fridge’s peltier element and 2. measurement of the temperature.

Having investigated the mini-fridges internal workings previously, I’ve established that the fridge’s internals is fairly simple, consisting of a large mains to 12V DC supply board, which supplies 12V DC to a switch board. The switch board contains a switche that allow the direction of voltage supplying the peltier to be switched (this allows the fridge to change from heating to cooling modes).

The simplest option in controlling the peltier is to attach a transistor between the mains board and the switch board, this allows the fan to be also switched. I can also splice into the 12V DC rail to power the Forebrain microcontroller board too. Isolating devices are used here (the isolating 12V to 5V DC/DC converter, and an optoisolator fo controlling the transistor.

Oh yeah, I had this LCD lying around too, I’d better throw that in as well:


Temperature probe arrived

Finally, got hold of a temperature probe (PT100 from eBay).

Most conductive materials have properties that change with temperature, materials whose resistance changes reliably with temperature are used as thermistors. PT100 devices uses platinum as that material, and has a very linear response with temperature compared with other devices.

More importantly though, I bought this PT100 probe simply because it’s housed in a nice stainless steel probe!

PT100 will be connected like this:

With the equation:

Vout = Vin R2 / (R1RTD + R2)

The resistance of a PT 100 is given in this PT100 chart, the temperature-to-resistance profile isn’t exactly linear, so the code in the microcontroller must make a conversion

Although as a demonstration, this chart shows the error when trying to linearise the PT100 temperature response curve

Now my PT100 is terminated with three wires, this is to reduce the errors introduced by the resistance of the connecting wires. For example, if it only had one wire, the equivalent circuit would look like this:

The effective resistance of the RTD (resistive temperature device) is therefore the resistance of the RTD plus the resistance of the two connecting wires, skewing the results a bit.

But with three wires connected like this:

The effective circuit looks like:

Note now that the resistance introduced by the wire is symmetrical now, and so does not skew the results as much.

Also, four-wire probes are available:

Equivalent:

WordPress won’t let me upload zip files, so I’ll put the code up on GitHub at some point


Got myself a mini fridge

Purchased a cheap mini fridge for converting into a sous-vide cooker. I hear these things are pretty rubbish at cooling your beer with, but from experience, peltier devices are much better at heating duty.

Not much space inside, but that’s a good thing – less thermal mass to worry about, and as long as it fits a steak or two, all good.

The thing has a three way switch to enable cooling or heating mode, that’s good, just what we need for sous vide

As an engineer, the urge to take this thing apart to see how it works is overwhelming.

So the insides look pretty standard, but they are EXACTLY what is needed.

At the top there is a heatsink, under which must be the peltier device.

On the right is the yellow mains AC to 12V DC board, with its rectification and smoothing and regulation circuits. Two wires come off this board carrying 12V DC and GND to the green switch board on the left.

This green switch board on the left does two things – switch between mains power and 12V DC power from the external socket, and switch between heat and cool mode. It does this by simply reversing the polarity of the peltier device – feeding in 12V one way causes the inside of the fridge to cool down (and the back to heat up), and feeding in 12V in the other direction causes the inside of the fridge to heat up (and the back to cool down).

So it looks like all I need to do is to add a transistor in there to control the power to the green board, and add some temperature sensors.


Sous Vide

I’ve been looking at doing some sous vide cooking, but all the sous-vide equipment is so expensive out there.  I’ve looked at some DIY projects out there, but it seems to me that there aren’t really any decent ones out there that require minimal electronic components.

I’m going to go out and buy a cheap mini-fridge lying, and I have a few old prototype micro-controller development boards that I thought I’d use up (these guys: http://www.universalair.co.uk/forebrain).  The conclusion is obvious.

Microcontroller + mini-fridge = Sous Vide cooke

This blog shall chronicle these exploits