Brew Pi

Postby BigYin » Sat Nov 04, 2017 14:19

I've spent a couple of days getting a diy Brew Pi set up.... This is partly to share my experience of that, and partly to remind me what the hell I had to do, and what the solutions were!

What is Brew Pi - sorry, do skip this if you already know what it is! - it's a very smart system that will control a fridge and a heater to maintain your fermention at a prescribed temperature, or a temperature profile. You can buy a complete system (https://www.brewpi.com/introducing-brewpi-spark/) or make your own using either a laptop or raspberry pi, an arduino board and a relay board, and a few other bits an pieces.

Why a Brew Pi? Well for me the problem is simple - my brew shed is at the end of the garden. The shed is roasting hot in the summer and freezing cold in the winter - so not the best for fermenting! But as my brew length is now 40 litres to 60 litres, and carrying a fermenter that heavy is a recipe for back problems! So, I want to be able to brew AND ferment in the shed, so I can pump wort around rather than carry it/lift it.

So, I needed something insulated to keep the fermenter in - a sod of big fridge is perfect - and something to control the fridge in the summer, and in the winter, something to heat it and control that heat.

Kev on here uses a BrewPi - so I decided to make one.

Now building it - as in wiring it all together - is a doddle - destructions are here : http://diybrewpi.wikia.com/wiki/DIYBrewPi_Wikia

Because I'm using a Pi there was then the fun things to learn about that...

these are useful sites if you're a Pi virgin ;)

http://www.makeuseof.com/tag/great-things-small-package-your-unofficial-raspberry-pi-manual/

https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=83372

I won't do a How-To because honestly, the issues anyone will face will mainly be horrible technical about the pi, the arduino etc...

But, here's a few tips if you're going to do one :

Pi 3 vs Pi 2 - pretty much the same price, but the Pi3 comes with built in WiFi - so I'd say go for that.

Case / heat sinks / fan / power - your Pi is bare bones - as it's going to be running for days on end while managing your ferment, it would be wise to invest in heatsinks and a cooling fan - e.g. https://www.amazon.co.uk/dp/B06XTJVRGM

Micro SD card - a fast 16 GB or 32 GB card -
- then needs to be FULLY formatted - a dedicated SD card formatter seems to be recommended - https://www.sdcard.org/downloads/formatter_4/

operating system - https://www.raspberrypi.org/downloads/ - save to your pc/laptop and the 'image' the SD card from it using Win32DiskImager https://sourceforge.net/projects/win32diskimager/ - be CAREFUL with it! Pick the wrong drive from the dropdown and you might wipe your own harddrive!!

So format the SD card, then write the image to it (drag and drop does NOT work - unless you go for the NOOBs OS)

Which OS?

The Wiki How to recommends Raspian Wheezy - but it does NOT work with the Pi3

I'm using the Raspian Stretch OS.

Now, how to connect the Pi up so you can work with it?

My solution - it's got an HD port, so I hooked it up to the telly, stuck in a USB mouse and a USB keyboard, and connected it to the router with a cable (wifi is fine too, but this was simpler to start with)

You can do the install of the brew pi software from the Pi, or you can actually conned to it over SSH - I used Putty : https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html - although if you're not familar with it, maybe better to just use the command line window on the Pi itself?

Now, the install of the BrewPi - I ran into an issue with this because the latest version of Raspian Stretch doesn't include some of the packages that the Brew Pi software references - But there is a solution...
- this might sound ridiculous, but bear with me!
- the initial Brew Pi download (that line in the Wiki How to that tells you to use the command : git clone https://github.com/BrewPi/brewpi-tools.git ~/home/pi/brewpi-tools ) will install a bunch of files onto you Pi in the home/pi/brewpi-tools directory.

Pause after getting that download, do NOT do the install yet.

On your PI, navigate to the home/pi/brewpi-tools folder and find the install.sh file - open it in text editor, find (cntrl + F) the line containing :
"libapache2-mod-php5 php5-cli php5-common php5-cgi php5 "
Use the editor to change that to read :
"libapache2-mod-php php-cli php-common php-cgi php" - without all the quotes ;)
Save the file, and then you can start the install.

*I've raised this issue on GitHub and if there's a fix put in place permanently I'll try and remember to update this post*


The rest of the install was straightforward :D

While you have the Pi plugged in, sort the Wifi - on the raspian stretch system that's a doddle - click on the Wifi icon in the top bar and enter the password for you wifi and that's it done!

Now, in it's final place of use, the Pi will be living in my brew shed, a long way from the router, but I can log into the BrewPi interface on my PC in the house and see exactly what it's doing - ace!! No trips back and forth to check, or wondering if it got too hot or too cold - the BrewPi logs it all.

A note about living with the Pi - don't just switch it off - As I'm using my Pi 'headless' (i.e. no screen or keyboard attached) - I can connect to it over Putty and send the shutdown command (sudo shutdown -h now) (if you're using putty, instead of the user being pi, now it's the pi@ip string - e.g. pi@123.456.1.2)

How do you find the IP address - well on windows start 'Command Prompt' and type in ipconfig - that'll give you the IP addresses. If you need to go through the rigmarole of setting a static IP, please don't ask me! Google, or the Raspberry Pi forums are the place to ask ;)

Backup - Once you have a working Pi and all the software behaving it would be a good idea to backup the image from your SD card, just in case the card gets corrupted (allegedly switching the pi off without shutting down properly first can corrupt it..) - to do this use the Win32DiskImager to 'read' from the card - create an empty file at the desired location on your pc/laptop - I did it with notepad - an empty file called SDbackup.txt, then edit the name via windows explorer to be SDbackup.img and then Win32DiskImager happily wrote the image off the SD card into that file.
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby Cheebs » Sat Nov 04, 2017 16:52

Great post yin. Thanks. Roughly how much did the setup cost omitting the heating and cooling?
User avatar
Cheebs
Brewer
 
Posts: 49
Joined: Fri Mar 03, 2017 14:21

Re: Brew Pi

Postby BigYin » Sat Nov 04, 2017 17:46

Shhh, don't tell the Mrs! :whistle:

You can see that if you already have a Pi, or an old laptop that could be used instead you don't need to spend the £44.49 on the Pi and case etc.

Pi 3 https://www.amazon.co.uk/dp/B01CD5VC92 £31.50
Case, power, heatsinks & cooling fan kit https://www.amazon.co.uk/dp/B06XY3KF3V £12.99

Relay board for Arduino https://www.amazon.co.uk/dp/B005WR753Q £5.99

Arduino Uno http://www.dx.com/p/uno-r3-atmega328p-uno-r3-development-board-deep-blue-285620#.Wf3rLHZpGpo £6.64

Digital temperature probes https://www.amazon.co.uk/dp/B00EU70ZL8 £11.75

4.7 kOhm resistors https://www.amazon.co.uk/dp/B00SWK970O £1.72

Breadboard jumper wires (not essential, but do have the right plugs on the end to just slot onto to the boards https://www.amazon.co.uk/dp/B01LZWFTPK £5.69

I adapted this cheapo toolbox to be the case for the Arduino, relay, and the plug points - https://www.screwfix.com/p/ws-tbx9-polypropylene-tool-box-12/6228p £3.49

Sockets - 2 of https://www.screwfix.com/p/1-gang-13a-sp-unswitched-socket-white/6856d 2x £1.39

Pattress boxes - 2 of https://www.screwfix.com/p/1g-moulded-box-25mm/9474d

Cable glands https://www.screwfix.com/p/tower-male-comp-gland-black-20mm-pack-of-2/80851 £1.39

Last edited by BigYin on Sat Nov 04, 2017 18:15, edited 1 time in total.
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby BigYin » Sat Nov 04, 2017 17:59

Plenty of space inside the case for the Arduino Uno and the relay board

IMAG2613_edit.jpg
IMAG2613_edit.jpg (72.37 KiB) Viewed 1263 times



I ripped the covers off the top of the box and cut the moulding back a bit so the pattress boxes fitted in snugly

IMAG2615_edit.jpg
IMAG2615_edit.jpg (56.66 KiB) Viewed 1263 times



I had some rubber grommets from another project - not really needed, but do help prevent the wires rubbing, and looks nice and neat

IMAG2614_edit.jpg
IMAG2614_edit.jpg (58.8 KiB) Viewed 1263 times



The cable glands make a nice tidy way of securing the power cable coming in, and the temperature probe wires.

IMAG2616_edit.jpg
IMAG2616_edit.jpg (44.96 KiB) Viewed 1263 times



And a wee hole at the back for the USB connection from the Pi to the Arduino board

IMAG2617_edit.jpg
IMAG2617_edit.jpg (67.82 KiB) Viewed 1263 times



I deliberately left the Pi outside the case, so it could be placed away from the 240v cables in case they interfered with WiFi - and also means I can bring it inside if I need to for any reason...

Note that the Arduino board was a power socket for a 6v DC supply, but you don't need to use it - the USB to the Pi supplies all the power that the Arduino and relay board need :drink:
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby MarkF » Sat Nov 04, 2017 18:56

Very interesting, I might have a go one day as a project, but my fermenting is in the garage using ITC controllers, a bit cheaper, but not as much fun or geeky. I have a pi as a multimedia centre under the TV so we can see the family photos etc. Also have worked with the arduino, but I digress, I am looking at a small fermenting shed behind the garage, I have run out room in the garage really, but my concern is extreme heat in the summer and extreme cold in the winter and the fridge coping, I had a freezer in the shed down the bottom of the garden once, seemed like a good idea at the time, never got through July.

Will you be insulating the shed?
User avatar
MarkF
Brewer
 
Posts: 24
Joined: Thu Mar 23, 2017 18:36

Re: Brew Pi

Postby Aleman » Sat Nov 04, 2017 20:01

Careful, the USB port may or may not provide enough current for the Arduino. If it's 'unstable' then the advice is to use the PSU ;)

please note:The use of punctuation, bold, underlining, italics, and different sized type, follows the convention used in writing, for many years, to place emphasis on the point being made, and to highlight the importance of that point in the opinion of the author. It is not the intention of the author to shout, if that was the case the author would adopt the, much more recent, convention of using all capital letters.
Albert Einstein wrote:Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
User avatar
Aleman
Curmudgeonly Brewer
 
Posts: 2851
Joined: Thu Apr 03, 2014 00:28
Location: Mashing In Blackpool, Lancs, UK

Re: Brew Pi

Postby BigYin » Sun Nov 05, 2017 14:19

Aleman wrote:Careful, the USB port may or may not provide enough current for the Arduino. If it's 'unstable' then the advice is to use the PSU ;)


I checked the voltages coming off the 5v supply from the Arduino to the relay with and without a power supply and it never varied - however I do have a port cut into the case so that if need be, I can supplement it :thumb:
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby BigYin » Sun Nov 05, 2017 14:24

MarkF wrote:Very interesting, I might have a go one day as a project, but my fermenting is in the garage using ITC controllers, a bit cheaper, but not as much fun or geeky. I have a pi as a multimedia centre under the TV so we can see the family photos etc. Also have worked with the arduino, but I digress, I am looking at a small fermenting shed behind the garage, I have run out room in the garage really, but my concern is extreme heat in the summer and extreme cold in the winter and the fridge coping, I had a freezer in the shed down the bottom of the garden once, seemed like a good idea at the time, never got through July.

Will you be insulating the shed?


No plans to insulate the shed.

I had 3 fridges running in the conservatory of my last house - highest temp I recorded in there was > 50c :o I don't actually know how high it got, because the mercury thermometer only went up to 50c and it burst :o

Through 3 summers those fridges worked away quite happily despite the often crazy high temps in the summer.

Initially I had worried it would be too much, but then I figured what the hell, they have fridges in Dubai where it regularly hits over 50c in the summer, and then stays blasted hot all through the night, unlike my conservatory which also lost heat at crazy rates once the sun was off it, so the fridges at least got a bit of break every night.
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby MarkF » Sun Nov 05, 2017 14:47

That is reassuring to know, I want to "expand" but concerned over my previous experience :) although it was a quite a few years ago, but most if not all fridge sellers won't recommend a fridge for the garage or shed. Good luck, look forward to progress report eventually :)
User avatar
MarkF
Brewer
 
Posts: 24
Joined: Thu Mar 23, 2017 18:36

Re: Brew Pi

Postby BigYin » Sun Nov 05, 2017 16:48

Well, the experimenting is starting in earnest - a few holes drilled through the side of the fridge, heater wired in, temperature probes in place, power on and off we go, heating nothing more than air at the moment :rofl:

IMAG2624_edit.jpg
IMAG2624_edit.jpg (44.02 KiB) Viewed 1217 times


IMAG2625_edit.jpg
IMAG2625_edit.jpg (35.58 KiB) Viewed 1217 times


IMAG2626_edit.jpg
IMAG2626_edit.jpg (31.47 KiB) Viewed 1217 times
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby Aleman » Mon Nov 06, 2017 12:06

Using a Brewpi to control an 'empty' vessel or fridge will led to much bigger temp swings(+/-2-3C) than if you had a vessel full of liquid in there (+/0.15C)

please note:The use of punctuation, bold, underlining, italics, and different sized type, follows the convention used in writing, for many years, to place emphasis on the point being made, and to highlight the importance of that point in the opinion of the author. It is not the intention of the author to shout, if that was the case the author would adopt the, much more recent, convention of using all capital letters.
Albert Einstein wrote:Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
User avatar
Aleman
Curmudgeonly Brewer
 
Posts: 2851
Joined: Thu Apr 03, 2014 00:28
Location: Mashing In Blackpool, Lancs, UK

Re: Brew Pi

Postby BigYin » Mon Nov 06, 2017 18:10

yep - I'm really just mucking it around at the moment to force it into one mode or the other to help me debug the device configuration as it wasn't turning the fridge on - but now it is :D

Think the graph tells the story :rofl:

brew pi testing.jpg
brew pi testing.jpg (109.02 KiB) Viewed 1134 times
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby BigYin » Fri Dec 08, 2017 19:48

The little heater wasn't up to the job.

It's been replaced with a 2kw fan heater, and the BrewPi is happily switching it without any issues :thumb:

edit_IMAG2677.jpg
edit_IMAG2677.jpg (167.75 KiB) Viewed 911 times


It's been very effective - even with the current baltic temperatures it's keeping the fermenter bang on temp out there in the uninsulated garden, sorry, brew shed :drink:

Screenshot 2017-12-08_2.jpg
Screenshot 2017-12-08_2.jpg (222.33 KiB) Viewed 911 times
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: Brew Pi

Postby INDIAPALEALE » Sat Dec 09, 2017 09:18

Aleman wrote:Using a Brewpi to control an 'empty' vessel or fridge will led to much bigger temp swings(+/-2-3C) than if you had a vessel full of liquid in there (+/0.15C)


You can use a pint bottle full of water and attach the sensor to it with tape. That will avoid temperature swings. I do this in both my brew fridge and keezer.

"You're not drunk if you can lie on the floor without holding on." Dean Martin
User avatar
INDIAPALEALE
Brewer
 
Posts: 231
Joined: Thu Apr 03, 2014 11:37
Location: Gascony France

Re: Brew Pi

Postby wezzel » Sat Dec 09, 2017 09:38

INDIAPALEALE wrote:
Aleman wrote:Using a Brewpi to control an 'empty' vessel or fridge will led to much bigger temp swings(+/-2-3C) than if you had a vessel full of liquid in there (+/0.15C)


You can use a pint bottle full of water and attach the sensor to it with tape. That will avoid temperature swings. I do this in both my brew fridge and keezer.


That still wasn’t very successful for me so now I trap the temperature sensor against the side of the FV with a thick wad of bubble wrap secured in place with a bungee cord.


Sent from my iPad using Tapatalk
User avatar
wezzel
Brewer
 
Posts: 162
Joined: Tue Apr 15, 2014 19:59


Who is online

Users browsing this forum: No registered users and 3 guests