HOWTO - Make a BrewPi Fermentation Controller For Cheap

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
My guess is no thermowell and your measuring it through the side and its not insulated enough. That can cause wild swings like that.
 
My guess is no thermowell and your measuring it through the side and its not insulated enough. That can cause wild swings like that.

Yes, no thermowell on beer, but I have a brass tube, good fit, JB welded to my Blichmann fermenter, at the cone transition. All sits inside a 13 CF upright freezer with a muffin fan constantly pulling air off the bottom & pushing to the top via 4" PVC so all should be pretty stable, one would think without added insulation on the beer temp. probe. Oh yeah and probe is ~ 90 degrees away from PVC air circulator. Plus the big swings are the Frig. Setting, which I don't understand why it should swing so much.

Update: I had some of that aluminized bubble wrap and I put a double layer over each (left & right) probe with some packing tape, tight wrap. Had not thought this would matter, but will check tomorrow....
 
Yes, no thermowell on beer, but I have a brass tube, good fit, JB welded to my Blichmann fermenter, at the cone transition. All sits inside a 13 CF upright freezer with a muffin fan constantly pulling air off the bottom & pushing to the top via 4" PVC so all should be pretty stable, one would think without added insulation on the beer temp. probe. Oh yeah and probe is ~ 90 degrees away from PVC air circulator. Plus the big swings are the Frig. Setting, which I don't understand why it should swing so much.

Update: I had some of that aluminized bubble wrap and I put a double layer over each (left & right) probe with some packing tape, tight wrap. Had not thought this would matter, but will check tomorrow....

Ignore the fridge setting(orange) thats just what the fridge is setting itself too in order to maintain temps, the lower ones cycling are because somehow your probe isnt insulated enough. Looking at that graph you can see the blue and green lines are on top of eachother while its cycling. Theres no way your beer (if it was measuring properly) and fridge temp should be the same like they are, your beer temperature changes should lag behind fridge temperature changes by a good amount of time. The fact your beer temp is going up at the exact same rate as the fridge sensor tells me its measuring the same temperature as your fridge sensor is, not the beer itself.

If that doesnt fix it, do you have one of the Fermenators that has a rubber stopper on top? You could always buy a new one the same size thats not drilled out, freeze it and drill out two holes one for a thermowell and one for an airlock.
 
I have been watching it cycle and even with 2 layers of the aluminized bubble wrap the two track, which I agree makes no sense. My fermenters are stainless steel Blichmann 14 gallon fermenters, so I assumed that JB weld woudl be conductive enough to transfer the beer temp. through some thin wall brass tubing to the temperature sensor. However what makes no sense to me is even if the JB Weld is insulating the sensor from the stainless with two layers of the bubble wrap insulation over the sensor inside the brass tubing it is still tracking the frig. air. I will try taping the sensor directly to the stainless and insulate over that and watch for a couple of cycles. My second unit is built the same and is tracking fine..
Thanks
 
Found it my chamber probe was assigned twice (chamber & beer). Got it removed and got my beer probe assigned. However I see that my heater is also assigned twice and I cannot remove the second duplicate entry, I get a spinning wheel that does not stop. However I already see the two lines diverging.
Thanks
 
There are some bugs I've noticed before. Sometimes when assign two probes the "first on bus" will change its address to something usually will a bunch of ffffffff's at the end instead of the actual address. When that happens it can he hard to disable it. But the probe will pop back up under detected devices and will have to be assigned again. I've fixed it in the past by reprogramming until it stops doing it. I don't know why it does this. Another bug can happen, if for whatever reason one of the devices doesn't "take" after applying the assignments, that device can sometimes become impossible to remove. It just keeps coming back. Try unassigning the device by either changing the device number to unassigned, but do that change only. Hit apply and refresh the device list. If it won't go away (ie. nothing happens). Then change the sensor/actuator assignment (chamber heat/cool, fan, or door switch…) to unassigned, do not change any other setting. Hit apply, then refresh. It might go away. If it doesn't then reprogram without restoring device settings. I've had luck getting them to go away using this method. But sometimes it just won't.
 
Any idea how to fix a blank chart/graph? I have refreshed my Firefox page, shutdown & reloaded, reloaded BrewPi hex file and am not sure how to get my graph back.

BlankChart.jpg
 
Have you tried another browser. Firefox may not want to run multiple scripts simultaneously. You may have an extension causing this. Who knows. But first try chrome or ie before deciding that there is anything wrong with brewpi. Are you sure the other (non-graph) instance is working?
 
The bit that runs the graph could also be missing or corrupted only on that instance. Doing a folder comparison by size and contents will show if there are any discrepancies.
 
Have you tried another browser. Firefox may not want to run multiple scripts simultaneously. You may have an extension causing this. Who knows. But first try chrome or ie before deciding that there is anything wrong with brewpi. Are you sure the other (non-graph) instance is working?

I closed Firefox and opened my left, offender, in Chrome same issue. I will do the /var/www/ compares tonight, agreed probably something there.
Thanks and the output on my other chamber is great. I will work on the extra device removal tonight. Nearly ready to put some wort in them!:ban:
 
Output:
pi@raspberrypi /var/www/right $ diff -q /var/www/right/ /var/www/left
Files /var/www/right/config_user.php and /var/www/left/config_user.php differ
Common subdirectories: /var/www/right/css and /var/www/left/css
Common subdirectories: /var/www/right/data and /var/www/left/data
Common subdirectories: /var/www/right/font and /var/www/left/font
Common subdirectories: /var/www/right/.git and /var/www/left/.git
Common subdirectories: /var/www/right/js and /var/www/left/js
Common subdirectories: /var/www/right/uploads and /var/www/left/uploads
Common subdirectories: /var/www/right/utils and /var/www/left/utils

I checked both files and they are expected to be different as they point to left and right directories. Not sure if this command also searched the sub directories.
 
Found recursive search Output:
pi@raspberrypi /var/www/right $ diff -q -r /var/www/right/ /var/www/left
Files /var/www/right/config_user.php and /var/www/left/config_user.php differ
Only in /var/www/right/data: Ale
Files /var/www/right/data/My First BrewPi Run/My First BrewPi Run-2014-10-01-1.j son and /var/www/left/data/My First BrewPi Run/My First BrewPi Run-2014-10-01-1. json differ
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-01-2 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-01-3 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-01-4 .json
Files /var/www/right/data/My First BrewPi Run/My First BrewPi Run-2014-10-01.jso n and /var/www/left/data/My First BrewPi Run/My First BrewPi Run-2014-10-01.json differ
Files /var/www/right/data/My First BrewPi Run/My First BrewPi Run-2014-10-02-1.j son and /var/www/left/data/My First BrewPi Run/My First BrewPi Run-2014-10-02-1. json differ
Files /var/www/right/data/My First BrewPi Run/My First BrewPi Run-2014-10-02.jso n and /var/www/left/data/My First BrewPi Run/My First BrewPi Run-2014-10-02.json differ
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-1 0.json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-1 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-2 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-3 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-4 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-5 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-6 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-7 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-8 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04-9 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-04.j son
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-05-1 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-05-2 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-05.j son
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-06-1 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-06-2 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-06-3 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-06-4 .json
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-06.j son
Only in /var/www/left/data/My First BrewPi Run: My First BrewPi Run-2014-10-07.j son
Files /var/www/right/data/My First BrewPi Run/My First BrewPi Run.csv and /var/w ww/left/data/My First BrewPi Run/My First BrewPi Run.csv differ
Files /var/www/right/data/profiles/Ale%20-%20Basic.csv and /var/www/left/data/pr ofiles/Ale%20-%20Basic.csv differ
Files /var/www/right/data/profiles/Lager%20-%20Basic.csv and /var/www/left/data/ profiles/Lager%20-%20Basic.csv differ
Only in /var/www/left/data/profiles: test%20run.csv
Only in /var/www/right/data/profiles: Test%20Run.csv
Only in /var/www/right/data: Test%20run
Only in /var/www/right/data: Test%20Run
Only in /var/www/right/data: Testrun2
Files /var/www/right/.git/index and /var/www/left/.git/index differ
Files /var/www/right/.git/logs/HEAD and /var/www/left/.git/logs/HEAD differ
Files /var/www/right/.git/logs/refs/heads/master and /var/www/left/.git/logs/ref s/heads/master differ
Files /var/www/right/.git/logs/refs/remotes/origin/HEAD and /var/www/left/.git/l ogs/refs/remotes/origin/HEAD differ
 
I want to say thanks for a great thread. I have a question about shutting down raspberry. Should I do sudo shutdown command when I need to shutdown my brewpi to say move the controller?
Thanks
Ken


Sent from my iPad using Home Brew
 
I want to say thanks for a great thread. I have a question about shutting down raspberry. Should I do sudo shutdown command when I need to shutdown my brewpi to say move the controller?

As opposed to simply cutting power?

Yes, definitely, do a true shutdown, either from the console or a remote terminal. If the latter (using Putty, for instance) you can run this command and it'll shut down the RPi and quit the terminal session before the link is lost...

$ sudo shutdown -h now & exit

Cheers!
 
For all of you guys that have the basic setup figured out, is this controller completely reliable like a Love controller, STC-1000, etc? I know there are major differences between this and the controllers I just mentioned, but I am asking about reliability only. What if your power goes out and comes back on during a ferment? Will it resume fermenting at the correct temperature without human intervention? Sorry if this has already been discussed.
 
You should be ok with power outages. But like all the other controllers that are "reliable". You are still at the mercy of your thermoprobe. Placement is key and thermowells are almost necessary depending on the application. 1 good thing about the pi and arduinos is you can run your whole system from 1 power source as long as it's rated properly and carries enough amperage potential to fit your needs. 1 thing I like about not having to depend on lines voltage for power is the use of batteries as a fail safe for power outages. I personally use a 6000mAh USB batter pack that I leave plugged into the wall. Although the pi and arduinos are programmed to pick up where they left off, power surges and outages can do damage to any electronic components and having an intermediary power supply can provide some peace of mind in these situations.
 
What Wbarber69 said; plus I'm pretty sure the Arduino is doing the temp controlling, BrewPi is doing the logging and web-serving. Arduino is very solid, so even if you lose BrewPi (Raspberry Pi or Debian laptop/pc) the temp controlling just keeps on keepin' on.
 
You know while writing that last it occurred to me one simple flaw in this setup. I can leave the arduinos and pi running during a power outage. But the refrigerator will shut down…. Since it's not very cost effective to put the fridge on back up power, I see a possible problem. If the arduino is still running, that will have the relays potentially left in an open state and given the nature of power outages (flickering and such), I see the potential for damage to the refrigerator itself. If it's able to flicker on and off while the relay is left open. I think I'll just use the wall wart I bought for the pi to power the whole system from now on.
 
I use a 1-->3 outlet for extension cords that has a GFI built in, which must be manually reset after power outage. Great for flicker; lousy because, well, it has to be manually reset. Unless Fuzze's willing to somehow program that into the script for me. :D
 
What Wbarber69 said; plus I'm pretty sure the Arduino is doing the temp controlling, BrewPi is doing the logging and web-serving. Arduino is very solid, so even if you lose BrewPi (Raspberry Pi or Debian laptop/pc) the temp controlling just keeps on keepin' on.

Unless you run this stuff on battery power (not including the refrigerator), if you lose power, both the Arduino and the RPi are shutting down. When power comes back on, does everything fire back up and resume where it left off? Does anyone care to do a test? All you would have to do is unplug everything for a few minutes and plug it back in.
 
I don't get the concern about "relays...in an open state". In fact if you could have the system open the relays when the household power went away and later wait a few seconds before allowing them to close after the household power returned, that'd be pretty much ideal.

I'd be slightly concerned about closed relays - which when you think about it is more likely to be the case (ie: RPi and AVR are on back-up power while the chambers are warming above target). If the power in your area has a habit of glitching its way back on the points might get slightly toasted, but even that's likely a stretch.

Anyway...all that said, the actual utility of putting BrewPi on batteries is not particularly compelling to me...

Cheers!
 
You know while writing that last it occurred to me one simple flaw in this setup. I can leave the arduinos and pi running during a power outage. But the refrigerator will shut down…. Since it's not very cost effective to put the fridge on back up power, I see a possible problem. If the arduino is still running, that will have the relays potentially left in an open state and given the nature of power outages (flickering and such), I see the potential for damage to the refrigerator itself. If it's able to flicker on and off while the relay is left open. I think I'll just use the wall wart I bought for the pi to power the whole system from now on.

I liked your idea of using a battery backup to keep the Arduino and RPi running, but do you need to? As you said, the refrigerator won't be running, so it doesn't really matter if the Arduino and RPi are on or off. The main question is will the the Arduino and RPi come back on when the power comes back on and will temp controlling resume? Will you lose the data that was logged before the power went out or is it saved and will it continue to log after the power comes back on?
 
Unless you run this stuff on battery power (not including the refrigerator), if you lose power, both the Arduino and the RPi are shutting down. When power comes back on, does everything fire back up and resume where it left off? Does anyone care to do a test? All you would have to do is unplug everything for a few minutes and plug it back in.

The Arduino will come back to life in seconds and pick up where it left off.
The RPi may come back to life, but it isn't important wrt keeping the chamber in the desired state...

Cheers!

[edit] And fwiw, I've tested this countless times and none of the AVRs has ever failed to recover.
 
Arduino, should its program not be marred by any power surge, will start up and start running the program, which is the temp controlling.

GAA! you're too fast, Day_trippr
 
It'll pick up just fine. I only did it because every device on my network is on some kind of battery backup…
 
So just a quick question for those of you that are old hat using the BrewPi...

I built one of these and just purchased a new Maytag 14.8 cubic foot chest freezer for fermentation. The system is working great thus far, but...

Is there a way to have the chest freezer act as a combo keezer and fermentation chamber using the BrewPi? I have a kegerator (sitting next to the chest freezer) with dual tap tower, but I'd love to be able to serve a wider variety of beers. I have a spare regulator and CO2 tank. So, in theory, I could have the chest freezer set to serving temp (e.g. 38-40F), and then use the BrewPi to control fermenter temp using FermWrap (or similar pad heater) connected to the Heat outlet. To minimize heat loss, the fermenter could be wrapped with some sort of insulation.

I know that the BrewPi is set to control either fridge constant or beer constant, but it would be cool if you could set the fridge temp independent of the fermenter temp. In this way, the "keezer" could be kept at serving temp, and then the FermWrap could keep the fermenter(s) at proper fermentation temps. Given that the BrewPi controls both circuits, it seems doable with some tweaking of the firmware. Alternatively, I could just employ an STC-1000 to control the chest freezer (set to serving temp) and use the BrewPi to control the FermWrap on the fermenter(s). But, it would seem more elegant if the BrewPi could accommodate this.

Any thoughts?
 
If you stick with ales for tapping and do lagers in the freezer you could probably find an ok balance temp.
 
If you stick with ales for tapping and do lagers in the freezer you could probably find an ok balance temp.

Yes, I considered this. But, it would seem possible to be able to use a FermWrap to control fermentation temps even with the chest freezer at a lower temp for serving out of corny kegs. It would be particularly cool if the BrewPi could control both. I know this could be done by simply adding another BrewPi shield, but it seems that this could be doable with just a single BrewPi shield and some modification of the code. Of course, the Arduino Uno that runs on the BrewPi might not have enough space for this, so it may be necessary to add another to make this work.

Edit: Wow, page 200 on this thread!
 
So how will you be taking temp on these various kegs? Also couldn't the fermwrap get shorted by condensation in the keezer? I have used a similar heater for my ferm camber but I never had the moister that my keezer has. I also never had it wrapped around my fermenter because at the time I had my probe taped to the side, which when wrapped cause issues.
 
So how will you be taking temp on these various kegs? Also couldn't the fermwrap get shorted by condensation in the keezer? I have used a similar heater for my ferm camber but I never had the moister that my keezer has. I also never had it wrapped around my fermenter because at the time I had my probe taped to the side, which when wrapped cause issues.

For now, I'll just be doing fermentations with a single carboy. Eventually, I will need to have separate BrewPi units (ganged off a single RPi) to provide individual heating control.

As for the FermWrap... I certainly hope that condensation inside a fridge won't cause it to short! It would seem as though this has not been an issue since this is what it was designed for. My chest freezer has a built-in drain, so I'm not too concerned about standing water due to condensation.
 
Thanks Heide264, I will look into that tonight. Elco asked me to get him some data so I will do that first.:

Can you tell me the output of:

git status


ls -ahl

And please check the apache logs for errors:

tail -30 /var/log/apache2/error.log


Also try starting a new brew (click on the beer name under the logo).


Apairently it was not an issue with the software, executable RPI & BPi, but something with the log file. Restarting a new brew session, same profile, and chart/ graph was working. no permissions issues. Thanks to Elco for his help, and the members here too!
 
For anybody looking to get a streaming image/video with a RasberryPi camera, another great (and easy) option is with RaspiMJPEG. Don't install the RPi Cam interface (it's overkill for this) all you need is the raspimjpeg process running with a config file and a few of the files from the web interface.

It's pretty much compatible on every device, streams high quality images with the RaspberryPi camera board. I managed to get my PiNoir camera inside the fridge and embedded the streaming image at the bottom of the BrewPi page (like the other camera post). Now I just need to get some IR LED's to light it up enough when the fridge is idle.

-- Edit --

Some basic steps to get it working on your RasPi, trying to re-trace what I did to get it working. Will probably update this if I remember any extra steps.

  • Install RaspiMJPEG based on these instructions:
    Code:
    sudo apt-get install cmake
    git clone https://github.com/silvanmelchior/userland.git
    cd userland
    ./buildme
    Code:
    sudo ln -s /opt/vc/bin/raspimjpeg /usr/bin/raspimjpeg
  • Download the following files from here, in raw format so there's no extra code: cam_pic.php, clean.php, script.js, script_min.js, status_mjpeg.php, status_mjpeg.txt
  • cp/mv them all into the same www directory that BrewPi software is running from (ex. /var/www/)
  • Change owner for those files: chown -R www-data:www-data
  • Create the config file with defaults: sudo nano /etc/raspimjpeg
  • Change the readfile in cam_pic.php to /dev/shm/cam.jpg and in the preview_path filed in /etc/raspimjpeg

I think that's about it, if you start the process raspimjpeg it should run and start outputting the .jpg, viewable from clean.php in your browser in essentially live video form. You can adjust the settings, flip the cameras image, change contrast, saturation, enable night mode, etc all from the config file (/etc/raspimjpeg).

Once it's working, add <?php include("clean.php");?> before </body> in BrewPi's index.php and it should be live as long as the raspimjpeg process is running.

You could launch it in a screen session, or add it as a service if you prefer in case of an RPi reboot or power outage.

-- Just brewed a batch today, it's in the fridge and ready to roll. Photo attached.

pinoir.jpg


Untitled-1.jpg
 
For anybody looking to get a streaming image/video with a RaspberryPi camera, another great (and easy) option is with RaspiMJPEG. Don't install the RPi Cam interface (it's overkill for this) all you need is the mjpeg process running with a config file and a few of the root functions from the web interface (primarily clean.php and cam_pic.php).

It's pretty much compatible on every device, streams at a high bitrate as an image with the RaspberryPi camera boards. I managed to get my PiNoir camera inside the fridge and embedded the streaming image at the bottom of the BrewPi page, like the other camera post.


Would you be willing to provide a step by step guide? I like your method.



Sent from my iPad using Home Brew
 
That is awesome! I have been wanting to add this. How about integrating thin the web interface repo as an optional part? I'll order a cam soon :)
 
Would you be willing to provide a step by step guide? I like your method.
Sent from my iPad using Home Brew

Added some steps to my post, if you (or anyone else) try it out let me know!

Also, does anybody happen to know if you can grab current BrewPi probe/temp data from terminal? I'm working on hacking together something else fun with my limited abilities :cross:
 
Status
Not open for further replies.
Back
Top