Beer Cooler or: a Raspberry Pi Zero W walks into a bar…

You know how it is. You move into a house that used to be a pub, and you can’t bring yourself to do away with the bar. In fact, after several years of planning, you find yourself buying a hand pump on eBay, and a polypin of craft ale from the local microbrewery. Suddenly, you’re the landlord. The barkeep. Everyone’s best friend.

A GIF from the movie Shaun of the Dead - Raspberry Pi Beer Cooler

And yet …

There’s something not quite right about this setup. Something not quite perfect. You’re pulling pints and drinking your craft ale one day when you realise — the beer isn’t cold enough!

You need a beer cooler.

Cool customer

Electrical engineer Alan Platt found himself in this enviable position, and he decided to design his own draft ale fridge.

‘The original pub cellar had been filled in, so I couldn’t keep my beer underground and pipe it up to the handpump — it had to sit under the bar. I needed to build my own beer cooler, because there is only so much space under the bar, and a commercial fridge wouldn’t fit.”

Alan set about constructing a box for the beer using sheets of insulation board and elastic bands. He then installed two Peltier cooling pumps in the lid of the box, and routed a pipe up to the handpump for the beer. One trip to the microbrewery later, and the craft ale was chilling nicely.

The outside of Alan's beer cooler showing the cooling apparatus and insulation boards

Alan’s beer cooler

But there was a problem.

‘The Peltiers ran happily for an hour or two, but after that, they proved to be too effective. A layer of ice built up on the heat sink connected to the cold side of the Peltiers, jamming the fans, and allowing the beer to grow warm. They also made a horrible rattling sound, and disturbed everyone in the house.”

It seemed that the perfect pint was still out of reach.

Complex circuitry

Not to be defeated, Alan realised he would need a way to control the power to the Peltier units. Switching the power using a simple thermostat would cause damaging thermal shock in the Peltiers, so Alan turned to Raspberry Pi Zero W as his solution.

A photo of the inside of Alan’s beer cooler complete with Raspberry Pi and a heap of wiring (as described in the paragraph below)

Testing the completed control circuit

In order to fine-tune the cooling process, Alan decided to control the current running through the Peltier units. He used a hardware PWM output on a Raspberry Pi Zero W alongside a power MOSFET, an inductor, a capacitor, and a current measurement circuit to create a switched-mode variable current power supply. By measuring the temperature on the cold side of the Peltier units, and using a PID control loop to adjust the PWM output, Alan was able to maintain the cold side at just above freezing. He used a second PID control loop to keep the beer inside the fridge at a perfect cellar temperature of 8°C.

Aware that this cooling system was both overcomplicated and built from very high-power components, Alan designed multiple failsafes using hardware and software to ensure that the control unit would not spontaneously combust while attempting to cool the beer.

The perfect pint was within reach.

Consultation

And then Alan tried to explain the failure modes to his wife, in case he wasn’t in the house when the electronics overheated, or the failsafes kicked in.

“I wanted her to know what to do if the cooler failed”, Alan explains. “But this required her to check the beer fridge regularly. It’s on the floor, under the bar, and she didn’t seem keen.”

The project was about to get significantly more complicated.

What about an audible alarm?

It was an innocent suggestion, but the idea grew from a simple beeping alarm to a series of spoken alerts. What could be used to produce these alerts?

“I found myself programming a second Raspberry Pi Zero with a DAC HAT, audio amp, and speaker, just to communicate the status of the beer cooler. Originally, the spoken alert was to indicate a fault in the control circuits, but it seemed a waste to stop at a single message.”

A breadboard covered in wires - Raspberry Pi Beer Cooler

Prototype for the audio amplifier

After days of planning, programming, and searching for MP3 files online, the fridge can now inform Alan (and his wife) when it is switched on, when the Peltiers power up, when it reaches maximum power, when it is switched off, and when there is a fault.

The alert messages are all quotes from sci-fi shows and films: Han Solo claiming he has a bad feeling about this; Scotty telling Captain Kirk that the Enterprise is giving it all she’s got; and Kaylee telling Captain Reynolds that everything is shiny.

And the fault alert?

“If there’s a problem with the beer cooler, the Raspberry Pi declares ‘Danger, Will Robinson, danger.’ on a loop, until someone checks it and resets the controls. It’s annoying and effective!”

The perfect pint

The Raspberry Pi also acts as a web server, using the REMI library to display and change the temperatures, currents, and control parameters, so the beer temperature can be monitored and regulated from anywhere on the home WiFi network.

The final build next to a laptop displaying the beer cooler web interface for maintenance on the go

Control box and web interface

Alan’s beer cooler has been successfully tested, and several polypins of local craft ale have been drunk and enjoyed — and it’s only taken two Raspberry Pis; some high-current circuitry; two Peltier units; a pile of household insulation board; and Han Solo, Scotty, Kaylee, and the robot from Lost In Space to achieve the perfect pint.

Over-engineering

Use the comments to tell us about your own over-engineered projects and any excuses you’ve found for including an extra Raspberry Pi in your build!

And thank you to Rachel, aka ‘the wife’, for this wonderful blog post!

15 comments

Avatar

I needed to do a proof of concept’ for a four node cluster of MongoDB no-sql database servers. I used a BR04 Bitscope Blade rack with four Pi 3Bs in it, running a 64-bit Arch Linux. One node was the ‘master’, two replica nodes and one ‘arbiter’ (MongoDB nodes in a replica set hold an election among themselves when a master fails, so the arbiter brings the remaining nodes up to an odd number if the master fails). Had to use 3Bs instead of 3B+s because for some reason 64-bit Arch won’t boot on 3B+s.

Blade rack was a bit pricey but it contains a network hub as well as four places to plug in a Pi. I drilled a new front panel and fitted four toggle switches so I could turn off individual nodes to test failover and test the election of a new ‘master’ in the event of the original master failing.

Set up port forwarding on my router and address reservation so each node would always have the same address.

Worked well and was a good ‘proof of concept’. A lot cheaper than running four PCs and keeps her indoors off my back when the electricity bill comes in

Got some help with soldering the toggle switches because I am blind but drilled the holes and did all the other wiring myself.

Over-engineered because I could have just wired up four Pis on the desk, but could not tolerate the spaghetti that would produce

Avatar

Beer and engineering… <3
Enginbeering?

Avatar

Clearly there is justification for two/no three/no four additional features:
1. Fire suppression system (activated by Pi; may need additional sensor)
2. Direct line to emergency services
3, Direct line to insurance broker to dynamically select the cheapest house and contents insurance given the health of the beer cooler
4. Automated weekly mental health tests for wife, cat and dog

Avatar

Agreed! Also a constant update as to the volume of beer remaining in the fridge – essential for marital harmony!

Avatar

Three weeks ago I finished my beer-cool-cabinet to be used during fermenting. I use a h-bridge to be able to heat, cool and do nothing. It seems I have less cooling power than your system despite I use 2 peltier elements 12V / 6A.
Can you give me a hint about thermal shock? Maybe I have yo change my driver system. Or maybe I should not use cheap chinese peltier elements.

Avatar

Hi Barman, the H bridge will work nicely for a while, but every time it switches off (or even worse, reverses the direction of heat flow), the peltier conducts the heat between the hot and cold sides very effectively, meeting in the middle with some nasty thermal shock. Eventually it will cause the peltiers junctions to crack, lose efficiency and eventually stop working. That’s why I switched to current control.

Avatar

Excuse me. The Pi is a *British* innovation. What is it doing being used to bring beer to the undrinkable temperature of “just above freezing”?

Avatar

The beer isn’t just above freezing. The beer is at 8°c, the cooling pumps are being maintained at just above freezing so they don’t lock up.

Avatar

Please rest assured that the beer served from the beer fridge is at a perfect British pub cellar temperature! No ice-cold craft ale here … :-)

Avatar

It’s because he take the beer outside to barbecue area where thé raspberry pi weight controler Of the unused charbon coal sometimes interfer with thé RP heat checker
When he open the lid (because Of the children safety RP device) Un fact he had to understand that were conflict with thé weighting machine for food wich is alimented by à RP controled solarpanel (because no sun no barbecue)hé took thé same name for variable forgetting that the wifi Always reset to on. Si the beer has the time to warm

Avatar

It’s a pretty good idea, but no offense it’s kinda ugly. I’m surprised the wife pitched a fuss over not wanting to check on it but didn’t complain that it looked like a box made of insulation panels held together with bungee cords. That certainly wouldn’t be ok with my better half. She’s fine with me tinkering and building stuff but it can’t look like it was pieced together on an episode of Junkyard Wars.

Avatar

Tough talk, that. Beauty is, after all, in the eye of the beholder.

Avatar

:-)

Avatar

The Wife is, among other things, a qualified Architectural Technician, with an interest in the re-use of waste building materials. She also enjoys a perfectly served craft ale in her own living room. Plus the fridge is under the bar, and mostly out of sight. ;-)

Avatar

Nice to see a project on here that doesn’t look like its going to burn the house down.. Well designed and well made – a credit to you :)

Leave a Comment

Comments are closed