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.
Same circuit as in going through the same black block? I know from experience those can sometimes be flakey with their connections to the wire...

Have you tried wiring it all up with just electric twist ons or soldering the wires together rather than going through the extra step?
 
I don't see the relays hooked up in any of your pictures. It looks like you have the temp probes connected to the black box thingy and that to the Andruino. Shouldn't there be a relay in there?
 
True but you shouldnt need the relays for the Sensors to show up in the Device manager unless they changed something?
 
I disconnected and re-fed everything but nothing

Or should I restart with some command?

I checked the probes on another circuit as in the picture and as good as an suno that the cables are the correct color red + 5V GND Black Signal Yellow

What does your /home/brewpi/settings/config.cfg look like?

Mine is:
Code:
# ======= settings above this line have been added automatically =======
# uncomment settings here, these override the settings in defaults.cfg

scriptPath = /home/brewpi/
wwwPath = /var/www/
port = /dev/ttyACM0
altport = /dev/ttyACM1
boardType = uno
startupDelay = 1.0
debug = true
beerName = Saison Mead 201405
dataLogging = active
interval = 120.0


# On a standard pi installation, the defaults should work.
# If you are using a different linux flavor or Windows, you can set the tool locations here

# arduinoHome = c:/arduino-1.0.4/
# avrdudeHome = # location of avr tools, defaults to arduinohome/hardware/tools
# avrsizeHome = # defaults to empty string because avrsize is on path on Linux
# avrConf = # location of global avr conf. Defaults to avrdudeHome/avrdude.conf

# on Windows, the scripts defaults to an Internet socket instead of a system socket.
# useInetSocket=true
# socketPort=6332
# socketHost=127.0.0.1
 
It is as you can see from the previous post photos
I also tried with no welded screw connector
to ensure that it was a problem of bad contact

You do not have to now connected Relay Card is also because incoming
and in any case I want to check one thing at a time


What does your /home/brewpi/settings/config.cfg look like?

Mine is:
Code:
# ======= settings above this line have been added automatically =======
# uncomment settings here, these override the settings in defaults.cfg

scriptPath = /home/brewpi/
# socketPort=6332
# socketHost=127.0.0.1

Thank you for your code how do I view it?

I'm not an expert on Raspberry I installed Putty
typing this command, but by mistake

login as: pi
[email protected]'s password:
Linux raspberrypi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jul 1 23:22:12 2014 from 192.168.1.30
pi@raspberrypi ~ $ /home/brewpi/settings/config.cfg
-bash: /home/brewpi/settings/config.cfg: Permission denied
pi@raspberrypi ~ $
 
Did you install from the Install script or did you do it manually? You should be able to access that file. You should be able to edit that and the defaults.cfg
 
True but you shouldnt need the relays for the Sensors to show up in the Device manager unless they changed something?

Fuzze, I still have not connected relays and have been using your implementation of BrewPi on laptop for data logging only for weeks now. Just to chime in.
 
Has anybody hooked up a third temp sensor to a brewpi? When configuring my system, I noticed an option for an ambient sensor. Here is what I would like to do (because I am curious): hook up a 3rd temp sensor and tape it to the outside of my Spiedel fermenter. I would insulate it like I did when I was using my STC-1000. Will the software plot this 3rd sensor? Will it affect the control algorithm? This would give me real data for the thermowell vs outside of container argument.
 
Has anybody hooked up a third temp sensor to a brewpi? When configuring my system, I noticed an option for an ambient sensor. Here is what I would like to do (because I am curious): hook up a 3rd temp sensor and tape it to the outside of my Spiedel fermenter. I would insulate it like I did when I was using my STC-1000. Will the software plot this 3rd sensor? Will it affect the control algorithm? This would give me real data for the thermowell vs outside of container argument.

Yes it should add it to your plot to turn on and off, it doesnt affect the PID algorithm. Thats a good idea for comparison.
 
Ok, so if I add a third temperature sensor it gets discovered and can be configured for "Room Temperature". And as Fuzze related, all that means is you add a plot line to the chart.

I actually started by adding three sensors for a total of five, but while BrewPi correctly enumerated all five, there's only three Functions you can assign to temperature sensors. And when I tried just setting three sensors to Room Temperature, all five sensors allegedly returned Null values on subsequent Refreshes with the Read Values switch turned on.

I have one more experiment to prove that's a code problem and not a bad sensor. Back in awhile...

Cheers!

[edit] So all five probes work, and all five can be plugged on the One-Wire bus simultaneously, but only three (any three) can be configured as active sensors, best as I can tell. Eg: if I assign two as Room Temperature sensors, only one will return data to the gui when the device list is refreshed, the other shows Null data.

In addition to adding the Room Temp line to the plot, the "LCD" display cycles between Fridge and Room temperatures...

[edit2] Just to clarify, as long as there are no conflicting assignments, all five sensors will return data to the Device Configuration gui when refreshed with Read Values enabled. If nothing else one could use that to correlate different probe readings in case one is suspect. I will say that I currently have an even dozen three meter ds18b20 sensors assembled in China attached to various wee machines and the correlation error band is less than a tenth of a degree F wide, so I reckon if the probe works it's going to be pretty accurate...
 
Has anybody hooked up a third temp sensor to a brewpi? When configuring my system, I noticed an option for an ambient sensor. Here is what I would like to do (because I am curious): hook up a 3rd temp sensor and tape it to the outside of my Spiedel fermenter. I would insulate it like I did when I was using my STC-1000. Will the software plot this 3rd sensor? Will it affect the control algorithm? This would give me real data for the thermowell vs outside of container argument.


I've got a third one running on a brew right now. I have it plotting room temp. It shows as an extra line on the graph. My small fridge is in a shed out the back so it's handy to help understand what's happening external to the fridge. I also hooked up the door sensor so I can tell when I've gone for a peek.


Sent from my iPhone using Home Brew
 
Did you install from the Install script or did you do it manually? You should be able to access that file. You should be able to edit that and the defaults.cfg


I have run all installations automatically

As explained in the site BrewPi

But it is the first time I use raspberry
I may have done something wrong in the 'installation?

As a user I used

user pi
Password raspberry

Maybe I suare altor user or another command to check the configuration files
When I explained I check my files at this point I like how the electrical connection is good it is very likely that my problem is configuration raspberry
 
Thanks Guys I'm sorry but between instructions in English and linux system two things for me a little lost ostiche I know: (

In practice, I did not understand how to configure the device following a bit here now seems OK;)

http://docs.brewpi.com/after-install/device-configuration.html

BrewPiOK.jpg


So recap
input on A4
I can put up to three sensors
Outside Beer Fridge Right?

2 Launch Fan
4 Sensor Door fridge
5 relay resistance
6 Pump Start Relay Refrigerator
A5 Light in the fridge that need?
 
Great! I've already got another sensor on order and once it shows up, I'll run the test when I have a new fermentation start.

Ok, so if I add a third temperature sensor it gets discovered and can be configured for "Room Temperature". And as Fuzze related, all that means is you add a plot line to the chart.

I actually started by adding three sensors for a total of five, but while BrewPi correctly enumerated all five, there's only three Functions you can assign to temperature sensors. And when I tried just setting three sensors to Room Temperature, all five sensors allegedly returned Null values on subsequent Refreshes with the Read Values switch turned on.

I have one more experiment to prove that's a code problem and not a bad sensor. Back in awhile...

Cheers!

[edit] So all five probes work, and all five can be plugged on the One-Wire bus simultaneously, but only three (any three) can be configured as active sensors, best as I can tell. Eg: if I assign two as Room Temperature sensors, only one will return data to the gui when the device list is refreshed, the other shows Null data.

In addition to adding the Room Temp line to the plot, the "LCD" display cycles between Fridge and Room temperatures...

[edit2] Just to clarify, as long as there are no conflicting assignments, all five sensors will return data to the Device Configuration gui when refreshed with Read Values enabled. If nothing else one could use that to correlate different probe readings in case one is suspect. I will say that I currently have an even dozen three meter ds18b20 sensors assembled in China attached to various wee machines and the correlation error band is less than a tenth of a degree F wide, so I reckon if the probe works it's going to be pretty accurate...
 
So I have been running my brewpi constantly for about 10 days while I finish up a 90 minute clone. Up until 07:00 07/01/14 I was running in a beer constant mode of 66.5 F. Early 7/1/14 I setup a profile that hung out at 66.5 until 7:00 and then ramped down to 34.2 over 24 hours to cold crash my beer before I keg it. Everything was going fine when I checked yesterday, but when I got up this morning, I grabbed my phone and surprised at what I saw. At a few minutes after midnight on 7/2/14, it seems that the brewpi switched over to a fridge constant mode of 86F. The system was still running, but not in the intended mode. I killed the system, rebooted the brewpi and switched over to a beer constant at 34.2F. I double checked the profile I had created and it looked fine. Nobody was awake in the house at that time the system switched and I have not made my brewpi accessible from the other side of my router. Anybody seen this type of behavior before?

crash.jpg
 
At a few minutes after midnight on 7/2/14, it seems that the brewpi switched over to a fridge constant mode of 86F. The system was still running, but not in the intended mode...Anybody seen this type of behavior before?

That is a nightmare scenario, to be sure. Any chance you have what the profile was? I would really like to know if it ran off the rails, got a poltergeist, got hit by sunspots, or the profile was open ended and "ran out" so went to 85 but you surely would have seen that?
 
Having something very weird and annoying happening to my BrewPi have never had happen before, all of a sudden i checked and my Fridge temp (the BrewPi internal setting, not the actual temp) is pegged at 85F(my max allowed) and my fridge has just been idling all day..luckily im just cold crashing my lager down so its not a huge deal but ill let you guys know the outcome from when i talk to the BrewPi guys.

No matter what i set it wont go down from 85F, UNLESS i set my BrewPi to fridge cooling mode, then it works. Im wondering if i have an old version and i need to update or something.

Yeah Fuzze did
 
I figured it out, for those of you that are messing with PID maximum beware.

If you set it too high, and your Beer setting - PID maximum is less than 0, it will screw up and set your fridge setting to 77F and essentially turn off all cooling.

I noticed it when my fridge got down to 32F, i had changed my PID Max to 32, so when it hit there the fridge went to max temp and stopped chilling for a f ew hours today.

So if you plan to use your brewpi to lager or cold crash, make sure that you dont set the PID Max to more than 30F or so...or else you may cross the threshold..

His follow up
 
Yea make sure you pull that setting back down to like 5-10. It was an unforseen side effect.

Apparently Elco has fixed it already after i talked to him on IRC a few nights ago.

So if you want to keep the setting large(it helps crash faster), goto your /home/BrewPi dir and type "git pull" which should pull the latest brewpi scripts to that folder.

Apparently it has something to do with the larger value overflowing the variable he has, so now in addition to fixing it, he set it up that if it did cause an overflow and shoot back up to max to ignore it.
 
Thanks Guys I'm sorry but between instructions in English and linux system two things for me a little lost ostiche I know: (

In practice, I did not understand how to configure the device following a bit here now seems OK;)

http://docs.brewpi.com/after-install/device-configuration.html

BrewPiOK.jpg


So recap
input on A4
I can put up to three sensors
Outside Beer Fridge Right?

2 Launch Fan
4 Sensor Door fridge
5 relay resistance
6 Pump Start Relay Refrigerator
A5 Light in the fridge that need?

So you got i t working?

Yes you can put 3 sensors all hooked up on A4, although the Room sensor doesnt do anything with controlling the chamber its more just info for you.

Not sure what your bottom list is, pins for the rest of the BrewPi? You dont need them. You just need the digital pins 5 and 6 that i show on my schematic to go to the relay board(or SSR's).
 
Yea make sure you pull that setting back down to like 5-10. It was an unforseen side effect.

Apparently Elco has fixed it already after i talked to him on IRC a few nights ago.

So if you want to keep the setting large(it helps crash faster), goto your /home/BrewPi dir and type "git pull" which should pull the latest brewpi scripts to that folder.

Apparently it has something to do with the larger value overflowing the variable he has, so now in addition to fixing it, he set it up that if it did cause an overflow and shoot back up to max to ignore it.

So if I connect to the pi via ssh(which I just learned how to do) I just need to type in the file name and the got pull or is it more like
Sudo "file name". Then
git pull
?
 
anyone make sense of the errors I keep getting, it's running fine, I just keep getting these errors in the log file:

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 669, in
ser.write('l')
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 485, in write
raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error
Jul 02 2014 09:03:01 Notification: Script started for beer 'Kolsch'
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 322, in
ser.flush()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 491, in flush
self.drainOutput()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 565, in drainOutput
termios.tcdrain(self.fd)
termios.error: (5, 'Input/output error')
Jul 02 2014 09:04:01 Error opening serial port: could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'. Trying alternative serial port /dev/ttyACM1.
Jul 02 2014 09:04:01 Notification: Script started for beer 'Kolsch'
Jul 02 2014 09:04:12 Found BrewPi v0.2.4, running commit c0771c25 build 39, on an Arduino standard with a revC shield on port /dev/ttyACM0
 
So if I connect to the pi via ssh(which I just learned how to do) I just need to type in the file name and the got pull or is it more like
Sudo "file name". Then
git pull
?

SSH into your BrewPi.

You should be in the BrewPi home folder automatically, but if you arent sure just type cd /home/brewpi (capitalization should matter, i am pretty sure its all lower case).

If you then type ls (thats LS lowercase) it should list out all of the files, you should see a bunch of .py files among other things with the brewpi name...

In that folder type

git pull

It may ask you a question, or not i am not sure, but it should pull the latest version or tell you if your up to date.
 
anyone make sense of the errors I keep getting, it's running fine, I just keep getting these errors in the log file:

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 669, in
ser.write('l')
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 485, in write
raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error
Jul 02 2014 09:03:01 Notification: Script started for beer 'Kolsch'
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 322, in
ser.flush()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 491, in flush
self.drainOutput()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 565, in drainOutput
termios.tcdrain(self.fd)
termios.error: (5, 'Input/output error')
Jul 02 2014 09:04:01 Error opening serial port: could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'. Trying alternative serial port /dev/ttyACM1.
Jul 02 2014 09:04:01 Notification: Script started for beer 'Kolsch'
Jul 02 2014 09:04:12 Found BrewPi v0.2.4, running commit c0771c25 build 39, on an Arduino standard with a revC shield on port /dev/ttyACM0


Its a faulty USB connection, I had this issue with my Debian PC before i moved to RPI. A few things to try.

-Make sure your not using an external USB hub as they can cause this sometimes. Plug directly into the system.

-You can also just try a different USB port on your RPI/Debian system, use ones that are on the motherboard themselves, not ones that are on the front of the PC that already go through additional cabling in the system to get to that USB jack.

-It could be a cheap USB cable, and or EMI electronics noise thats getting onto the cable and screwing up your serial connection. Try to keep your USB cable from being piled up on top of the system or super close to other electronics like your fridge that are spiking their power on and off. Another possible solution is to buy a USB cable with a ferrite bead/choke on it to prevent this from happening. These power spikes can disrupt the standard USB data and power operations.

-Apply external 5V power to your Arduino. This is probably happening because the emissions from other electronics are screwing with the power being supply to the arduino through the USB cable. So either get a ferrite bead'd USB cable, or apply power from a 5V wall wort...Its probably cheaper to just get a USB cable unless you have an extra power adapter around.

Ferrite-Core-USB.jpg
 
Big honking +1 on the cable care and PC USB ports for those using laptop or PC instead of RPi. I had much weirdness until I moved cables around and separated USB from everything else like power lines.


Sent from my iPod touch using Home Brew
 
Big honking +1 on the cable care and PC USB ports for those using laptop or PC instead of RPi. I had much weirdness until I moved cables around and separated USB from everything else like power lines.


Sent from my iPod touch using Home Brew

Its basically because we power the Arduino via the same USB cable, and electronic noise can cause a disruption in the power and cause the Arduino to reset...thats basically what he's seeing is the BrewPi trying to talk to the Arduino over serial and it failing because the Arduino isnt booted up yet, eventually at the end of his log you can see the Arduino comes back up and it starts going again.
 
I didn't even consider the USB cable. I've got it plugged into the back of the computer to a motherboard port. BUT I'm using an extension on the USB cable because the fermentation chamber is 8 feet from the computer. I do have a power supply for the Arduino that I used when I originally set it up. I'll connect it and see if that helps or if I need a new USB cable.

As always, thanks for all of your help everyone!
 
SSH into your BrewPi.

You should be in the BrewPi home folder automatically, but if you arent sure just type cd /home/brewpi (capitalization should matter, i am pretty sure its all lower case).

If you then type ls (thats LS lowercase) it should list out all of the files, you should see a bunch of .py files among other things with the brewpi name...

In that folder type

git pull

It may ask you a question, or not i am not sure, but it should pull the latest version or tell you if your up to date.

Thank you! navigating in code is not my strong suit and the little things trip me up like when someone saying create a file named "xxxx". I don't know the basic command to create a file. I just need to get the basics down.
 
I am interested in converting my SS conical into two-stage temp controlled fermenter using heating pads and multiple peltiers... is there a way to augment the BrewPi software to for this setup so it doesn't need to monitor the fridge temp, but instead of ambient temp of the room and the beer temp? Basically, I am just wondering if you can change the text that it displays...


Sent from my iPad using Home Brew
 
Well its open source, so in theory yes you can...although like you said its just semantics..if it says Fridge temp but you know its actually ambient then it should still work your graph will just have the wrong text.
 
Well its open source, so in theory yes you can...although like you said its just semantics..if it says Fridge temp but you know its actually ambient then it should still work your graph will just have the wrong text.


Ha, yeah, I know... I am not about to try to learn programming for it, and was just hoping it would be easy to do, but it's not a big deal :) Definitely interested in building this though! Do you all think that this system would work well for a two-stage temperature controlled fermenter setup? In other words, using it to control both peltiers and heating pads affixed to the fermenter?


Sent from my iPad using Home Brew
 
With multiple Peltiers ganged on the far side of one relay channel serving as the single "cooling actuator", the heating blanket/pad driven by the single "heating actuator" relay channel, and a thermowell'ed ds18b20 for the beer temperature sensor, the question will come down to what BrewPi does when there really isn't an analog for a "chamber" temperature sensor.

Given what Fuzze and a couple others ran into with the PID algorithm going out of scope I'm wondering if the lack of something that indicates the chamber status will cause BrewPi fits.

Should be interesting...

Cheers!
 
I think: :drunk: that the PID algorithm is all about finding true peaks, and compensating heat/cool cycle times to limit temp error between set-point and BeerTemp. The self-correcting PID algorithm Elco uses updates the constants (I think on the peaks) so it "learns" how much cooling/heating overshoot is in the system. I would think it would learn your system, but I would think it REQUIRES a chamber temp, so I'd personally place near the cold P-junction on the bucket, faking it into being fridge chamber temp. Something like that.

Then again, I could be full of it.
 
I've been wanting to try something similar (glycol jacket) but BrewPi seems to want to manipulate fridge temp and I think that's a deal breaker.
 
dont recommend typing these out obviously, use Putty and some form of SCP file transfer to make the files on your Windows/MAC and then SCP file copy them to the BrewPi.
An example using pscp.exe from Putty

pscp -v c:\temp\PublicBeerPanel.php brewpi@brewpi:/var/www/PublicBeerPanel.php
This will copy the file from your C:\Temp folder to the brewpi at /var/www, and will ask you for your debian brewpi user account password.


Trying to figure out this part, but can i just cut and paste these two things in to sudo nano and create the files(Public.php and PublicBeerPanel.php) that way?
 
Status
Not open for further replies.

Latest posts

Back
Top