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.
Just tried to install but it looks like I will need a little help. Here is what I am working with:
Jessie on the latest NOOBS from the PI website with a Sainsmart UNO and relay
DS18b20 (3 of them)

OS is installed with wifi working correctly and a reserved IP on the router vs using static

I install Brewpi as per the directions on the wiki page linked at the beginning of this post.

I make it all the way through the first time using the defaults for all. (which included using /var/www/html for the web files. Jessie defaulted to this and the wiki page says to use the html so I did.) Then I run the python updater and it get all the way to where it wants to flash the arduino and it gets stuck on opening serial port... then will say can not read it... then asks if it is unresponsive. click n and it is done.
I can see the web interface with this set up. Just no devices or ability to program controller.

I then went and ran the install again but this time changed the web files when it asks to /var/www I then run the python and get the same result as before where it can not read the version.
This time I can not see the web interface. (error 404 on the webpage)
Where should the files go? /var/www/html (the default that Jessie brings up) or /var/www ?

Now with the controller... I am able to write programs such as blink to it through the IDE on my computer. Also when the trying to read the serial port the UNO is flashing the LED like something is happening but nothing can ever be read. I tried last week and said that it was unresponsive and it seemed to do something more but I still was unable to get it to recognize my devices on the web interface.

I am new to this programming stuff and if given the commands I can post things up here for you guys to take a look at. Thanks

edit: I went through this time said it was unresponsive and answered yes to this question... it continued to flash the arduino it looked like. I can now run the script on the website but I can not get any values to show on the temp sensors. SHows a total of 5 detected devices (0-4) controller pins 2(act3), 5(act2), 6(act1), A5(act4), 4(door). All are unassigned, chamber1 inverted, and hardware type of digital pin.

edit2: I tried to flash from the web interface and it says it is successfull in putting 0.2.10...
This is the progress I was shown.:
May 05 2016 18:52:29 New program uploaded to controller, script will restart
May 05 2016 18:52:35 Opening serial port
May 05 2016 18:52:35 Notification: Script started for beer 'My First BrewPi Run'
May 05 2016 18:52:45 Checking software version on controller...
May 05 2016 18:52:45 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/ttyACM0

**** Arduino Program script started ****
Settings will not be restored
Devices will not be restored
May 05 2016 18:54:14 Opening serial port
Loading programming settings from board.txt
Checking hex file size with avr-size...
Program size: 26896 bytes out of max 32256
Programming Arduino with avrdude: /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P /dev/ttyACM0 -U flash:w:"brewpi-arduino-uno-revC-0_2_10.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf
Result of invoking avrdude:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "brewpi-arduino-uno-revC-0_2_10.hex"
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: writing flash (26896 bytes):

Writing | ################################################## | 100% 5.18s

avrdude: 26896 bytes of flash written
avrdude: verifying flash memory against brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: load data flash data from input file brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex contains 26896 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.92s

avrdude: verifying ...
avrdude: 26896 bytes of flash verified

avrdude done. Thank you.


Avrdude done, programming succesful!
Giving the Arduino a few seconds to power up...
Back up in 5...
Back up in 4...
Back up in 3...
Back up in 2...
Back up in 1...
Back up in 0...
Waiting for device to reset.
May 05 2016 18:54:53 Opening serial port
Waiting for device to reset.
May 05 2016 18:55:04 Opening serial port
Checking new version: Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/ttyACM0

Resetting EEPROM to default settings
INFO MESSAGE 15: EEPROM initialized
**** Program script done! ****
May 05 2016 18:55:14 New program uploaded to controller, script will restart
May 05 2016 18:55:20 Opening serial port
May 05 2016 18:55:20 Notification: Script started for beer 'My First BrewPi Run'
May 05 2016 18:55:30 Checking software version on controller...
May 05 2016 18:55:30 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/ttyACM0

May 05 2016 18:56:08 Installed devices received: []
May 05 2016 18:56:08 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 2, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 5, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 6, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 19, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 4, "t": 0, "x": 1}]
 
Just tried to install but it looks like I will need a little help. Here is what I am working with:
Jessie on the latest NOOBS from the PI website with a Sainsmart UNO and relay
DS18b20 (3 of them)

OS is installed with wifi working correctly and a reserved IP on the router vs using static

I install Brewpi as per the directions on the wiki page linked at the beginning of this post.

I make it all the way through the first time using the defaults for all. (which included using /var/www/html for the web files. Jessie defaulted to this and the wiki page says to use the html so I did.) Then I run the python updater and it get all the way to where it wants to flash the arduino and it gets stuck on opening serial port... then will say can not read it... then asks if it is unresponsive. click n and it is done.
I can see the web interface with this set up. Just no devices or ability to program controller.

I then went and ran the install again but this time changed the web files when it asks to /var/www I then run the python and get the same result as before where it can not read the version.
This time I can not see the web interface. (error 404 on the webpage)
Where should the files go? /var/www/html (the default that Jessie brings up) or /var/www ?

Now with the controller... I am able to write programs such as blink to it through the IDE on my computer. Also when the trying to read the serial port the UNO is flashing the LED like something is happening but nothing can ever be read. I tried last week and said that it was unresponsive and it seemed to do something more but I still was unable to get it to recognize my devices on the web interface.

I am new to this programming stuff and if given the commands I can post things up here for you guys to take a look at. Thanks

edit: I went through this time said it was unresponsive and answered yes to this question... it continued to flash the arduino it looked like. I can now run the script on the website but I can not get any values to show on the temp sensors. SHows a total of 5 detected devices (0-4) controller pins 2(act3), 5(act2), 6(act1), A5(act4), 4(door). All are unassigned, chamber1 inverted, and hardware type of digital pin.


See I told you… those are hard coded devices, not detected devices. did you click on refresh devices in the devices tab?

Also to the earlier posts, I didn't coin the term thermal momentum, it's physics bro…
http://itmewewhy.com/thermal_momentum_force
 
I have clicked on the refresh devices. When I first pull up the devices tab it shows nothing. Then I click on the refresh devices button and devices will show up under the detected devices column... With those pin assignments. Nothing is under the installed devices. I have also tried the restore factory defaults button as well.

Edit. I now have checked my temp sensors with a onewire program on the arduino... I get readings from them. This should rule out faulty temp sensors. Also shows the arduino can accept programs and run them.
 
[...]Edit. I now have checked my temp sensors with a onewire program on the arduino... I get readings from them. This should rule out faulty temp sensors. Also shows the arduino can accept programs and run them.

Did the one-wire program use pin A5?
If it didn't can you edit it to do so?

Cheers!
 
Good thinking. I will look into that and see if that is an option. I know I could change it between digital pins but going to the analog pin might change things up a bit for the program.
 
I was able to edit the program and use A5... I was actually able to use all of the analog pins. Changed the code to use pin 14-19. I believe 19 was equal to a5. Was able to hook up multiple sensors into the one wire as well.
 
I'm at a loss here. I'm afraid with my lack of knowledge I am unable to go further. I decided to download wheezy and follow the instructions on the wiki to a tee. I still end up with the same result. I have tried writing the hex file with xloader, with the interface, and with the python updater when it asks. All with the same result. ( can't detect devices and show values when checked). I have not seen any error messages with the xloader, and interface. With the python updater trying to flash it says it pauses on the opening serial port and says it can not see it.
I don't know what else to do as I feel I have tried all of the common fixes everyone else mentions. Is there a place I can pull some logs so people on here can take a look and see if they notice anything out of the ordinary? Or if someone gives me a command to run I can post the results on here to read. I know with the help of the incredible resources on this forum we will get it worked out!
 
I'm at a loss here. I'm afraid with my lack of knowledge I am unable to go further. I decided to download wheezy and follow the instructions on the wiki to a tee. I still end up with the same result. I have tried writing the hex file with xloader, with the interface, and with the python updater when it asks. All with the same result. ( can't detect devices and show values when checked). I have not seen any error messages with the xloader, and interface. With the python updater trying to flash it says it pauses on the opening serial port and says it can not see it.
I don't know what else to do as I feel I have tried all of the common fixes everyone else mentions. Is there a place I can pull some logs so people on here can take a look and see if they notice anything out of the ordinary? Or if someone gives me a command to run I can post the results on here to read. I know with the help of the incredible resources on this forum we will get it worked out!


Run lsusb and see if the arduino shows up. it may be listed as something else ftdi…ch340… I don't know the actual specs of your duino so. if it shows up then you need to look in /dev/ and see if there is a listing for ttyUSB0 or ttyACM0 if it's the USB one then you'll have to change your port configurations
 
Guys,

I just bought all the equipment from this guide, to build fermentation chambers. I bought 3 sets of everything, and was going to control 3 chambers with one Pi. It is a guide on how to do it on instructables.com (http://www.instructables.com/id/Multiple-Fermentation-Chamber-Control-with-BrewPi/)

I then read: "We dont condone arduino to new users". I didnt know about spark, cause, well.. I'm not a pro at these things, so I thought the arduino was what was used. Should I rather invest in Sparks? Is it better? I can use the arduino for other things, like controlling and growing spices etc.

thanks!
 
Run lsusb and see if the arduino shows up. it may be listed as something else ftdi…ch340… I don't know the actual specs of your duino so. if it shows up then you need to look in /dev/ and see if there is a listing for ttyUSB0 or ttyACM0 if it's the USB one then you'll have to change your port configurations

These are the results...
pi@Pier-Bier-Brewing*~*$*lsusb
Bus*001*Device*002:*ID*0424:9514*Standard*Microsystems*Corp.*
Bus*001*Device*001:*ID*1d6b:0002*Linux*Foundation*2.0*root*hub
Bus*001*Device*003:*ID*0424:ec00*Standard*Microsystems*Corp.*
Bus*001*Device*004:*ID*148f:5370*Ralink*Technology,*Corp.*RT5370*Wireless*Adapter
Bus*001*Device*005:*ID*2341:0043*Arduino*SA*Uno*R3*(CDC*ACM)
Bus*001*Device*006:*ID*258a:0001**
Bus*001*Device*007:*ID*045e:00e1*Microsoft*Corp.*Wireless*Laser*Mouse*6000*Reciever
pi@Pier-Bier-Brewing*~*$*ls*/dev/ttyACM*
/dev/ttyACM0
pi@Pier-Bier-Brewing*~*$*

Seems all is good here. Thank you for the suggestions!

edit. Im not sure where the stars are coming from... I copied and pasted. THose are not in the original. Seems they are in the spaces.
 
Meh, you can safely ignore that whole Spark thing...

Cheers!

I hope so :)

If the new versions is built for multiple chambers, it will maybe be a bit easier to expand. That is kinda my thought process. However, I probably won't need 40 ferm. chamber for a while :D
 
I hope so :)



If the new versions is built for multiple chambers, it will maybe be a bit easier to expand. That is kinda my thought process. However, I probably won't need 40 ferm. chamber for a while :D


So far the new version doesn't do multiple chambers out the box either.
 
This is my wiring setup... Follow the series carefully as the wire colors may change Midway.

Your wiring looks right, but i'd stick with pin A4...i dont think thats your problem. Also cant see the resistor to make sure your really using the right one ;)
 
Thanks for taking a look. The resistor is 4.7k and you are correct on the wire being in a5. Kind of getting desperate and tried moving into different inputs. It is in a4 currently.
If I have all wires disconnected (except power and USB) should I get any detected devices on the Web interface? I get the same thing under detected devices when I refresh no matter what I have hooked up to the arduino.
 
hi, maybe stupid question, I am not using brewpi but just looked here and seen how its wired. So why do you need arduino if you can use RPi's GPIOs to control relays and get temp probes wired?
 
hi, maybe stupid question, I am not using brewpi but just looked here and seen how its wired. So why do you need arduino if you can use RPi's GPIOs to control relays and get temp probes wired?

It's all about mission-critical reliability.

An Arduino is more state-machine than general purpose computer, and is much less likely to crash - and freeze all the actuators...

Cheers!
 
The Arduino is fine for your application, i.e. fermentation temperature control.

The Spark version is going to evolve into something with more features to control other parts of the brewing operation. If you don't need that then you don't need a Spark.

Carry on as you were.
 
OK, just loaded BrewPi on the RPI today. Only had one problem at the beginning with the RPI not recognizing the cheap Chinese Arduino uno R3. this board has a micro usb port. I had to remove and then update the drivers.All is good so far. spoke too soon
Can't load the files on the Arduino.I will try again tomorrow and post the error log. It's a cheap Chinese UNO that I got the Blink program to load.I changed the settings in brewpi to ttyUSB0 and UNO.
 
Thanks for the responses. I was a bit bummed out at first, but am happy to be using the arduino setup I have bought. I don't really see the need for anything else than PID temp controllers for the brewing. I guess some people will automate more of the brewing process, and I can't wait to see what it will be :) Brewngineering is fun!
 
It says that the latest version of Brewpi is not compatible with my UNO... Is this correct? Should I downgrade brewpi?
 
Hi, been using the brewpi for a few months now, absolutely love it. Decided to have it heat my mash water overnight and have it ready in the morning but the fuse in the plug powering the 'heat' socket went (I don't actually use a fridge socket as room temps are low here in Ireland). I replaced the fuse and a few days later now I've done the same thing and the socket once again isn't working. It was working when I plugged it in initially.

Its a 5 amp plug and this only seems to happen when I'm heating my mash water. Do you think it could be the fact the mash kettle plug is too powerful in comparison to the usual brewbelt I have plugged in and its shorting the plug?
 
Hi, been using the brewpi for a few months now, absolutely love it. Decided to have it heat my mash water overnight and have it ready in the morning but the fuse in the plug powering the 'heat' socket went (I don't actually use a fridge socket as room temps are low here in Ireland). I replaced the fuse and a few days later now I've done the same thing and the socket once again isn't working. It was working when I plugged it in initially.



Its a 5 amp plug and this only seems to happen when I'm heating my mash water. Do you think it could be the fact the mash kettle plug is too powerful in comparison to the usual brewbelt I have plugged in and its shorting the plug?


Sounds like it. What are you using to heat your mash water?
 
Trying to troubleshoot.... Would there be any advantage to running a different version of brewpi? I know how to flash an older version to the arduino from the github. Is there older versions of the program on the rpi? How would I get these? I'm running wheezy 7.8 on rpi 2 with uno.
 
I did run the python updater and select legacy for both times it asks. I will take a look at the post! Thank you.

Edit.... I did read through that post and it seems I have followed those instructions. Thank you for pointing me to that post. There are so many to sort through.
 
I am curious on what percentage of people that have problems are using non arduino boards.
Do the arduino board users have much better luck with this project?
 
I am curious on what percentage of people that have problems are using non arduino boards.
Do the arduino board users have much better luck with this project?

Do you mean fake chinese arduinos? That is what I bought. I was able to flash the hex file fine, so its not the "arduino" stopping me. Its the brewpi version.
 
Using this peco boiler

Would it be possible get a higher amp fuse and stick that in or would I need a whole new plug?


The item you linked states that it uses 2.4k watts. So if you are on a 120v circuit that's 20 amps, and 10 amps on a 240v circuit. So yes, you are pulling to many amps. As far as just switching the plug I'm not sure, depends on the rest of your setup. If your relays are rated for 10 amps then you still can't use it on a 120v circuit, and you would be maxing them out on a 240v circuit most likely shortening their lifetime as well.
 
I'm not sure if my problem is with the sainsmart or the brewpi. I can flash the arduino but can not detect any devices and read any onewire addresses or relays or temp readouts.
 
I'm not sure if my problem is with the sainsmart or the brewpi. I can flash the arduino but can not detect any devices and read any onewire addresses or relays or temp readouts.


I had the EXACT same problem as you...bad SainSmart board. Ordered a new one, flashed hex file from Github through BrewPi console, then wired up Arduino...everything fine.

The only issue I have now are sometimes I get enormous temp spikes but only for a few minutes, so I guess there's a glitch somewhere.
 
I had the EXACT same problem as you...bad SainSmart board. Ordered a new one, flashed hex file from Github through BrewPi console, then wired up Arduino...everything fine.

The only issue I have now are sometimes I get enormous temp spikes but only for a few minutes, so I guess there's a glitch somewhere.

Just curious...Were you ever able to use the board for anything else? I can use it with the ide and simple programs with the temp sensors and relays. This using the same pins as the brewpi system.
 
I'm not sure what part of this post you were referring to but I tried the python serial updater command and it says it does not exist. Is this a command only for the spark?
https://community.brewpi.com/t/solved-cant-seem-to-program-arduino-uno/1319/25?u=jimwu
python autoSerial.py
All ports:
/dev/ttyUSB0 - USB2.0-Serial, VID:1a86, PID:7523
/dev/ttyAMA0 - ttyAMA0, VID:None, PID:None
Compatible ports:
Selected port: (None, None)

is it possible to change anything in config files by my self?

Thanks!

UPDATED: I put one more line in autoserial.py and now both PI and arduino can talk

{'vid': 0x1a86, 'pid': 0x7523, 'name': "uno"}
If you have the CH340 usb controller chip like I do you have to add a line of code to the software so it will recognize the arduino.
Edit: I think we are talking about two different things. You're having issues with the relay board?
 
Status
Not open for further replies.
Back
Top