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.
After about a year hiatus I brewed up my first batch and fired up my DIY BrewPi fermentation chamber. That batch fermented as expected and the fermentation chamber ran as expected.



I brewed again over the weekend and was surprised to find my beer temp 10 degrees cooler than it was set for. I thought perhaps I forgot to put the probe in the thermowell, when I got home that night I checked and the probe was in the thermowell. I then decided to stop that batch in brewpi and start a new beer. The temps went back to normal but last night it looks like things went crazy and my beer temps hit almost 80 degrees F.

Interesting, can you get a zoomed in shot of the "broken" timeframe? Its hard to see what the fridge/heater along the bottom are doing at such a zoomed out timescale its just a mash of blue and red.

Also where is your fridge probe? You can see during the bad time that the fridge setting is set low where it should be(so i dont think its a software problem), but your fridge is not getting the fridge temp anywhere near where it wants it so it just keeps cycling trying to get it down.

Cant tell why though without a zoomed in shot. Is it possible that you actually wired both outlets together(didnt break the tab)? So both your heating and cooling are running at the same time keeping the fridge from doing its thing?
 
Hey guys,

I've had my first batch going with the BrewPi in beer constant mode for two weeks. Everything has been great until last night, it appears my heat side did not turn off. Looking at the UI, it appears that the BrewPi thinks it turned it off, then kicked on the cooling side, which is just a computer fan to circulate the cold air in my basement.

I rebooted everything, and the power to the heat side seems to be stuck on. I can manually toggle the cool side through the UI, but if I manually toggle the heat side, I hear the 'click' but the power stays on.

Is my relay already fried after only two weeks of use? I'm using the SainSmart 2-Channel listed in the wiki.

Screen shot of the UI below.

Thanks for any help/suggestions.

brewpi.JPG
 
Hey guys,

I've had my first batch going with the BrewPi in beer constant mode for two weeks. Everything has been great until last night, it appears my heat side did not turn off. Looking at the UI, it appears that the BrewPi thinks it turned it off, then kicked on the cooling side, which is just a computer fan to circulate the cold air in my basement.

I rebooted everything, and the power to the heat side seems to be stuck on. I can manually toggle the cool side through the UI, but if I manually toggle the heat side, I hear the 'click' but the power stays on.

Is my relay already fried after only two weeks of use? I'm using the SainSmart 2-Channel listed in the wiki.

Screen shot of the UI below.

Thanks for any help/suggestions.
Can you post a picture of your set up? How do you plug in the cooling and heat source? did you break the tab between the hot and cold sides on the outlet?
temp-plug.jpg

attachment.php
 
Hey guys,

I've had my first batch going with the BrewPi in beer constant mode for two weeks. Everything has been great until last night, it appears my heat side did not turn off. Looking at the UI, it appears that the BrewPi thinks it turned it off, then kicked on the cooling side, which is just a computer fan to circulate the cold air in my basement.

I rebooted everything, and the power to the heat side seems to be stuck on. I can manually toggle the cool side through the UI, but if I manually toggle the heat side, I hear the 'click' but the power stays on.

Is my relay already fried after only two weeks of use? I'm using the SainSmart 2-Channel listed in the wiki.

Screen shot of the UI below.

Thanks for any help/suggestions.

That graph would be easier to understand if the Fridge Setting was visible and the Room Temperature probe wasn't inside the same cabinet with the other two probes.

Anyway...the SainSmart dual-relay module has an LED for each channel.
If the LED for the Heat channel is out but your heater is still running, either the relay has gone to Heaven or your heater circuit is miswired.
If the latter, it's usually the hot-side bridge on the duplex receptacle is still intact, as already noted.
If the former, it's possible the relay points are welded together, though that's a symptom associated with too high a load, and unless you're using something like a 2KW heater it seems unlikely that's the root cause problem...

Cheers!
 
Hey guys,

I've had my first batch going with the BrewPi in beer constant mode for two weeks. Everything has been great until last night, it appears my heat side did not turn off. Looking at the UI, it appears that the BrewPi thinks it turned it off, then kicked on the cooling side, which is just a computer fan to circulate the cold air in my basement.

I rebooted everything, and the power to the heat side seems to be stuck on. I can manually toggle the cool side through the UI, but if I manually toggle the heat side, I hear the 'click' but the power stays on.

Is my relay already fried after only two weeks of use? I'm using the SainSmart 2-Channel listed in the wiki.

Screen shot of the UI below.

Thanks for any help/suggestions.

Sounds like your heat relay is stuck closed. Time to replace it with an SSR.
 
Hey guys,

I've had my first batch going with the BrewPi in beer constant mode for two weeks. Everything has been great until last night, it appears my heat side did not turn off. Looking at the UI, it appears that the BrewPi thinks it turned it off, then kicked on the cooling side, which is just a computer fan to circulate the cold air in my basement.

I rebooted everything, and the power to the heat side seems to be stuck on. I can manually toggle the cool side through the UI, but if I manually toggle the heat side, I hear the 'click' but the power stays on.

Is my relay already fried after only two weeks of use? I'm using the SainSmart 2-Channel listed in the wiki.

Screen shot of the UI below.

Thanks for any help/suggestions.

Your heat relay is stuck closed. Tap it with a screwdriver handle. Then start shopping for a replacement.
 
Interesting, can you get a zoomed in shot of the "broken" timeframe? Its hard to see what the fridge/heater along the bottom are doing at such a zoomed out timescale its just a mash of blue and red.

Also where is your fridge probe? You can see during the bad time that the fridge setting is set low where it should be(so i dont think its a software problem), but your fridge is not getting the fridge temp anywhere near where it wants it so it just keeps cycling trying to get it down.

Cant tell why though without a zoomed in shot. Is it possible that you actually wired both outlets together(didnt break the tab)? So both your heating and cooling are running at the same time keeping the fridge from doing its thing?

Here is a zoomed in shot of when the problem started. I really don't understand what is going on. The display will say something like "waiting to cool for x minutes" then instead of actually cooling, a few seconds later say "idling for x seconds" or "waiting to cool" again.



I've also noticed I get "null" values quite often when in the "device configuration" tab and hitting "refresh devices" with the "read values" box selected. I'll click refresh it and it'll show temps, click it again and one or both will show "null". Click refresh again it they both read a temperature.

Also, is it normal for the display to show "--.-" for temps every 10 to 20 seconds?

I'm starting to think my temp probe wiring has a bad connection. It's too late to look at it tonight but it may be worth looking at.

View attachment 1479873236485.jpg
 
Another reason I think it maybe an issue with the probe wiring is the fact when I zoom in on the graph I'm seeing breaks in the lines. They should be solid right?
 
The plot lines should be solid - I've never seen them hashed like that even when zoomed all the way out or all the way in.
And you should never get Null readings from the Device manager.

Check the logs, I bet you'll find probe related error messages.
Do you have a 4.7K pull-up resistor to 5V on the one-wire data line?

Cheers!
 
The "Null" value is likely a wiring issue with the probes, and the breaks in the graphs are probably a result of the probe dropping out. I had this happen when one of my homemade probes had been exposed to their limit of condensation inside the thermowell. I've replaced the beer probe with a waterproof version, and have had no problems since.

And my guess is that is also why you see the "--.-", which is not normal by the way.

If you take a look at the logs as day_trippr suggests, I'll bet you'll see a bunch of "sensor disconnected" / "sensor connected" messages.
 
Yup im with the others, your probe(s) are screwed up. Resetting the Arduino may have brought it back to life for a bit but you should definitely rewire them and possibly get new probes if they still exhibit the behavior.

Its struggling to cool because its being turned on and off every 30 seconds.

On the flip side, had the most vigorous fermentation ive ever had with this Robust Porter i made(ive made it before but never seen this), ended up filling the remaining 3 gallons of headspace in my 8 gallon bucket with Krausen. Can you guess where the fermentation took off lol? I seriously went out there this morning expecting that the door was slightly ajar as ive done that before for the fridge to cycle that much..nope just one crazy ferment.
RobustPorter.PNG
 
You suppose pitching at 80-something degrees had anything to do with that ballistic launch? ;)
That plot looks like an accelerated life test on your compressor...

Cheers!
 
Your heat relay is stuck closed. Tap it with a screwdriver handle. Then start shopping for a replacement.

Thanks Brewski (and others who responded)....it does indeed appear to have just been stuck. A little tap with a screwdriver handle seemed to fix it.

Are there better alternatives to the SainSmart? I tried searching the thread, but 'SSR' is too short of a search string and 'solid state relay' just turned up some generic references.

Thanks again!
 
You suppose pitching at 80-something degrees had anything to do with that ballistic launch? ;)
That plot looks like an accelerated life test on your compressor...

Cheers!

I dont pitch @ 80 something lol, i tend to get my beer down to mid 70's to low 80's with my CFC then put it in my chamber to come to temp before i pitch.

It just helps save water because those last 10-15 degree's can take forever.

Also this was a 10g batch split into two buckets, so there was a lot more heat being generated in there than i think my system was used too.

On the morning of the 20th i pitched a packet of Notty + Yeast nutrient into each bucket. Usually i dont mess with nutrient, but i have really low calcium in my water(10ppm) and sort of high sodium(35ppm) and couldnt get the calcium up any higher after already adding a ton of sodium from Baking Soda as i tried to control the mash pH. No chalk on hand :(
 
Thanks Brewski (and others who responded)....it does indeed appear to have just been stuck. A little tap with a screwdriver handle seemed to fix it.

Are there better alternatives to the SainSmart? I tried searching the thread, but 'SSR' is too short of a search string and 'solid state relay' just turned up some generic references.

Thanks again!

The downside to SSR's is they are going to take a bit more space, i dont know if at this amperage if you need heat sinks on them or not but im guessing no?

Just amazon search for 40A SSR, they are only $10 each and are way overkill for what you need, so much so that you shouldnt need heat sinks for such low current devices.

That said, the Sainsmart relays are rated for like 100,000 cycles each and should last a half dozen years or more under normal use.
Maybe you just got a bunk one but ive been using the same one for years. I prefer their small form factor.
 
posted on the brewpi forums as well but thought I would ask for advice here.

I have used brewpi successfully for a number of brew and gone to use it today to see it is not working.

The first error I noted was that it was not showing a temperature, I went into maintenance, device configuration and requested to read the values but were null. I deleted a device and tried to re-add it but couldn't see it. I had three sensors (Fridge, Beer and Room) and none were working. The SSRs were still showing and I have been able to remove and re-add them.

I unplugged it and checked all connections then re-flashed the arduino and pi.

There is continuity between the 5v on the sensor and the 5v on the arduino and the same with the GND and A4 pins.

The output between 5v and GND is 4.83v.

Before the sensors looked like this

9f516468a8ccf7352134200a23f4e7d208f52405_1_690x299.png


Now they look like this

aba1903798e441777c20840ebb60668544fbe57b_1_690x306.png


I am a bit stuck for what to do, everything should be working fine and has done in the past but now doesn't seem to be. I was debating replacing the arduino but I don't have a spare and it seems to be outputting the right voltage. I did try to move the onewire data to A5 to see if that worked but that didn't make a difference either.
 
Its not properly detecting your sensors, likely due to wiring. Its unlikely the digital pin went out.

The SSR's dont detect, they are hard coded to be there. So seeing those doesnt tell you anything.
 
One thing to be aware of, just to add to any confusion - there are Sainsmart solid state relay boards out there as well. Don't buy them. They can't handle the current needed for A BrewPi installation.
 
Its not properly detecting your sensors, likely due to wiring. Its unlikely the digital pin went out.

The SSR's dont detect, they are hard coded to be there. So seeing those doesnt tell you anything.

I've checked continuity so now sure where this can have gone wrong....

could the internal wiring on the arduino have stopped working>
 
I've checked continuity so now sure where this can have gone wrong....

could the internal wiring on the arduino have stopped working>

Checking the continuity only tells you that your sensors are wired to the Arduino - not that the sensors are wired correctly, unfortunately. It sounds like your issue may be that your sensors are bad. Alternatively, your Arduino as a whole may be having issues.

Have you tried flashing a OneWire test image to your Arduino to test it?
 
they can't be wired wrong as they have worked before and I don't think they would have all failed at the same time, will try to flash a test image, do you have one or should I google!

EDIT:

Found one here

https://arduino-info.wikispaces.com/Brick-Temperature-DS18B20#test1

and it is showing this which suggests the temp doesn't work.

Requesting temperature...DONE
Device 1 (index 0) = -127.00 Degrees C
Device 1 (index 0) = -196.60 Degrees F

I have ordered a new arduino on amazon prime so should be able to try that
 
If you are the enterprising sort - and you're using an RPi - you could wire the probes up to that and use Python to test the probes.

This Python script will look for ds18b20 sensors and report their respective values.

Code:
#!File: /usr/lib/cgi-bin/test_sensors.py
#!Version: 20mar2014
#!Discover and test any DS18B20 temperature sensors
#!Run from user space (/home/pi)
#!/usr/bin/env python

import os
import time
import glob

#-------------------------------------------------------------------------------------------------------
# global variables
speriod=(15*60)-1
#speriod=(5*60)-1


#-------------------------------------------------------------------------------------------------------
# get temperature
# returns None on error, or the temperature as a float
def get_temp(devicefile,devicenumber):

    try:
        fileobj = open(devicefile,'r')
        lines = fileobj.readlines()
        fileobj.close()
    except:
        return None

    # get the status from the end of line 1 
    status = lines[0][-4:-1]

    
    equals_pos = lines[1].find('t=')
    if equals_pos != -1: 
        tempstr = lines[1][equals_pos+2:]
        print "Read Sensor",
        print devicenumber
        print "Raw Data = ",
        print tempstr,
        tempvalue_c=float(tempstr)/1000.0
        print tempvalue_c, "Degrees C"
        tempvalue_f = tempvalue_c * 9.0 / 5.0 + 32.0
        print tempvalue_f, "Degrees F"
        tempvalue = round(tempvalue_f,1)
        print tempvalue, "Rounded"
        return tempvalue
        
    else:
        print "There was an error."
        return None


#-------------------------------------------------------------------------------------------------------
# main function
# This is where the program starts 
def main():

    # enable kernel modules
    os.system('sudo modprobe w1-gpio')
    os.system('sudo modprobe w1-therm')

    print "Looking for W1_Slave Temperature Sensor Devices..."
    # search for a device file that starts with 28
    devicelist = glob.glob('/sys/bus/w1/devices/28*')
    print " "
    devicecount = len(devicelist)
    print "Number of W1_Slave Devices found:",
    print devicecount
    print " "
    for deviceindex in xrange(0,devicecount):
    	print "Sensor " +str(deviceindex)+ " ID: " +devicelist[deviceindex]
    print " "
    if devicelist=='':
    	return None

#    while True:

    # get the temperatures from the device files
    
    for deviceindex in xrange(0,devicecount):
    	w1devicefile = devicelist[deviceindex] +'/w1_slave'
    	temperature = get_temp(w1devicefile,deviceindex)
    	if temperature != None:
    		print "Sensor " +str(deviceindex) +" Temperature = " +str(temperature) +" F"
    		print " "
    	else:
    		# Sometimes reads fail on the first attempt
    		# so we need to retry
    		temperature = get_temp(w1devicefile[deviceindex],deviceindex)
    		if temperature != None:
    			print "Sensor " +str(deviceindex) +" Temperature = " +str(temperature) +" F"
    			print " "
    		else:
    			print "Error Reading Sensor " +str(deviceindex)



#        time.sleep(speriod)


if __name__=="__main__":
    main()

Cheers!
 
have done this and the sensor works using the exact same wiring used on the arduino, looks like the arduino is the thing thats broken then
 
One thing to be aware of, just to add to any confusion - there are Sainsmart solid state relay boards out there as well. Don't buy them. They can't handle the current needed for A BrewPi installation.
most fridges or freezers are 3amp or less. The relays are rated to 5amp each, and in real terms switching very slowly compared to what they were designed for.
 
most fridges or freezers are 3amp or less. The relays are rated to 5amp each, and in real terms switching very slowly compared to what they were designed for.

Most fridges are 3a less running, yes. BUT, When the compressor comes on some older fridges can spike upwards of 25A or higher with inrush current for a split second as they power on. All fridges will have inrush of some sort, how big they are and how big their compressor is really determines how big that spike gets. It would blow those relays out fast.

Theres a reason the NEC wants 20A circuits for fridge receptacles in kitchens.

Honestly even the Sainsmart are "underpowered" for this type of switching, but they are also super cheap so if it blows out every year or two who cares.

You can google about fridge compressor inrush current if your interested.
 
most fridges or freezers are 3amp or less. The relays are rated to 5amp each, and in real terms switching very slowly compared to what they were designed for.

I don't know how much power draw it takes, but I was trying to run a crock pot off one of the SainSmart SSRs (woo, 1 gallon mash temperature control!) and managed to blow the relay out almost immediately. It's pretty obvious when one of the four relays had ballooned out to twice the size of the other three. :eek:
 
Difference maybe that down under obviously our fridges are upside down and 240 v at 50hz standard 10 amp outlets
 
I don't know how much power draw it takes, but I was trying to run a crock pot off one of the SainSmart SSRs (woo, 1 gallon mash temperature control!) and managed to blow the relay out almost immediately. It's pretty obvious when one of the four relays had ballooned out to twice the size of the other three. :eek:


At risk of going off taking this completely off topic. Crock pot mash controller you say??
 
Still a learner, but I'm trying to educate myself.

3 things:

1. I have read about hacks to get the BrewPi to track data for the brew day. How accessible is this for someone with no experience in coding and with no available time to currently teach myself? What should I know that isn't commonly found in online research? I have been doing a decent amount of reading into this process (especially the BrewPi forums) and it seems like the people using it are familiar with python or the lynux kernal. It goes over my head.

2. I like the Tilt for hydrometer readings but I work with pichia, brett, and torulaspora yeasts along with sacch, and some of these ladies are tiny and love scratches in plastic. If this can speak to BrewPi, are there other means of tracking density data through the unit?

3. A lot of discussion around Arduino or no, some alternatives seem to work well for lots of people. For a newb with an extra 20 bucks in his pocket, is it safer to go with arduino to save diagnostic workarounds?
 
Difference maybe that down under obviously our fridges are upside down and 240 v at 50hz standard 10 amp outlets


Nema refs are starting to require 20amp sockets but most houses have 15amp sockets on 20 amp breakers, and really there isn't much difference in the US between the sockets or what they can handle…
 
3. A lot of discussion around Arduino or no, some alternatives seem to work well for lots of people. For a newb with an extra 20 bucks in his pocket, is it safer to go with arduino to save diagnostic workarounds?
If you have a few extra bucks I would build both models. The price for both of them is low.seeking out a pcb for both designs will make the build easier.
 
1. I have read about hacks to get the BrewPi to track data for the brew day. How accessible is this for someone with no experience in coding and with no available time to currently teach myself? What should I know that isn't commonly found in online research? I have been doing a decent amount of reading into this process (especially the BrewPi forums) and it seems like the people using it are familiar with python or the lynux kernal. It goes over my head.

Out of curiousity, what data would you like to track?

Nothing would prevent you from sticking a temperature sensor in the mash tun and just disconnecting anything from the relays. The BrewPi will track the temperature the same as it would track the temperature inside your fridge/beer, but admittedly this is a hackish way to accomplish what you are looking to do (if what you are looking to do is track mash temps). This wouldn't require any additional code/kernel hacks.

2. I like the Tilt for hydrometer readings but I work with pichia, brett, and torulaspora yeasts along with sacch, and some of these ladies are tiny and love scratches in plastic. If this can speak to BrewPi, are there other means of tracking density data through the unit?

To clarify a few things - the Tilt integration adds the Tilt data to the BrewPi graphs allowing you to see both side-by-side. The integration entirely exists on the Raspberry Pi and allows the Pi to replace the mobile device the Tilt otherwise requires.

That said - there is no current official support for additional sensors such as the Tilt. The support is entirely unofficial, and was added by someone other that elco/the BrewPi team. As a result, there aren't currently other means of tracking density data -- but that isn't to say there won't be new means created in the future.

3. A lot of discussion around Arduino or no, some alternatives seem to work well for lots of people. For a newb with an extra 20 bucks in his pocket, is it safer to go with arduino to save diagnostic workarounds?

I'm partial to the ESP8266 implementation. The advantage to the ESP8266 implementation is that you can get the microcontroller and at least 4 of the shields for a combined price of under $20 - and have WiFi support if you want to expand to a multi-controller setup later.

The advantage to the Arduino implementation is that a ton of people (on this forum!) use it, so there's lots of information on it out there, and a lot of the problems you may encounter may have already been discussed.

Pros on both sides. :)
 
A lot of discussion around Arduino or no, some alternatives seem to work well for lots of people. For a newb with an extra 20 bucks in his pocket, is it safer to go with arduino to save diagnostic workarounds?
The Arduino will be the easiest to get up and running, especially if you manage to take a wrong turn and need help. The reason is there's so many more people running it and we've probably broken it more thoroughly than you will be able to do on your first go around.

Head down to your local MicroCenter and pick up an Uno for >$10 and give it a go. You can use a Windows PC to get started and see it run, but eventually you will want to get a RaspberryPi I'd think.
 
That looks awesome, but woah - 10 minute boil. ><

It's just a test. Spending 4 hours for a test doesn't make any sense.

I wanted to have a nice chart of a real brew last week, but I screwed it up by turning on my espresso machine and trigger the breaker. I didn't know it is on the same breaker. It's a good thing because I then knew there was something to be improved.
 
The Arduino will be the easiest to get up and running, especially if you manage to take a wrong turn and need help. The reason is there's so many more people running it and we've probably broken it more thoroughly than you will be able to do on your first go around.

Head down to your local MicroCenter and pick up an Uno for >$10 and give it a go. You can use a Windows PC to get started and see it run, but eventually you will want to get a RaspberryPi I'd think.

Begg to differ, Thorrak`s solution got me up and running on first try.
Arduino with all the clones and hassel bacause of this is not straight forward
anymore either. A little fine tuning on the articles for Thorrak solution, and I would say that is the easiest one by a long shot.
 
Awesome input from you all, thanks a bunch! I will follow the leads you've given and will make a much more informed decision as a result..

I love that hot side data table, that's exactly what we are in need of!
 
have done this and the sensor works using the exact same wiring used on the arduino, looks like the arduino is the thing thats broken then

OK now this is weird, new arduino and they don't work
 
Status
Not open for further replies.
Back
Top