HOWTO - Make a BrewPi Fermentation Controller For Cheap | Page 100 | HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Homebrew Talk

Help Support Homebrew Talk by donating:

  1. Dismiss Notice
  2. We have a new forum and it needs your help! Homebrewing Deals is a forum to post whatever deals and specials you find that other homebrewers might value! Includes coupon layering, Craigslist finds, eBay finds, Amazon specials, etc.
    Dismiss Notice

HOWTO - Make a BrewPi Fermentation Controller For Cheap

Discussion in 'Fermenters' started by FuzzeWuzze, Mar 19, 2014.

 

  1. thekraken

    Well-Known Member

    Posted Sep 17, 2015
    How much time are you giving it before you reprogram the arduino? Have you tried giving it 10minutes or so to see if the arduino is recognized? Have you tried rebooting the computer after plugging the arduino back in? Have you tried manually stopping and restarting the brewpi scripts after plugging the arduino back in?
     
  2. dawalker33

    Member

    Posted Sep 17, 2015
    I have let it sit for almost a full day after plugging it back in (it's current state actually). I have tried restarting the script as well. The only thing I have not done is restarting my VM.
     
  3. dawalker33

    Member

    Posted Sep 17, 2015
    OK. I just tried restarting the script again and for some reason, it worked! I then reboot the VM and it came back up fine as well. So I guess the question is, why is the script not recognizing it when it first powers on?
     
  4. thekraken

    Well-Known Member

    Posted Sep 17, 2015
    Here is my wild guess: when you unplug the usb the script is still looking for the arduino on the same ttyUSB port, so when you plug the arduino back in the kernel assigns it to a different ttyUSB port because the first one is still opened and being read by the script. So the script is looking in the wrong port until you reset it and it can then 'search' for the proper port.

    Again this is just a guess, maybe someone else can chime in on this.
     
    dawalker33 likes this.
  5. day_trippr

    We live in interesting times...

    Posted Sep 17, 2015
    ^that^ sounds reasonable.

    Could this problem be avoided by using ATTRS{serial}== for the symlink in /etc/udev/rules.d/99-arduino.rules instead of the port name?

    I use that technique to allow me to easily move my BrewPi minions around without worrying about what ports they're attached to...

    Cheers!
     
  6. dawalker33

    Member

    Posted Sep 17, 2015
    I agree. It definitely sounds like it just cannot find the serial link on reconnect. Is that 99-arduino.rules file something I have to create? I only have one for vmware in that directory.
     
  7. wbarber69

    Well-Known Member

    Posted Sep 17, 2015

    Ok so to solve one problem you need to go back and look at some of the earlier posts after day_tripper and I played with the multi-chamber settings for using usb hubs. You need to setup a symlink device using the serial address of the arduino. This way whenever you plug it back in it will always detect the device for what it is. Altport isn't a very good alternative imho. I've used vm's in my early testing phases to get everything programmed and working for my BT minions. I think I've had your problem before. The thing is your arduino will be programmed and your vm won't see it that way for some reason. I'd try resetting the vm instead of reflashing the arduino everytime.

    EDIT: I see day_tripper beat me to the punch
     
    dawalker33 likes this.
  8. day_trippr

    We live in interesting times...

    Posted Sep 17, 2015
    Most likely. It's been awhile so I can't remember for sure, but the only entries I have in mine are for the BrewPi devices, so I believe I had to create it.

    Here are my notes on how to set this all up...

    Set up identifiers for UNOS:

    Remove all but one UNO from the USB ports and hubs, then run these commands:

    Code:
    $ udevadm info -a -n /dev/ttyACM0 | less > info.log
    $ nano info.log
    In the log file, look for "Arduino", and right below that you'll find the serial number for the AVR. Eg:

    Code:
    looking at parent device '/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4':
        KERNELS=="1-1.3.4" 
     		ATTRS{manufacturer}=="Arduino (www.arduino.cc)"
     		ATTRS{serial}=="85336303532351F0A031"
    
    Repeat for additional UNOS on the USB ports

    Then create the rules file:

    Code:
    $ sudo nano /etc/udev/rules.d/99-arduino.rules
    You can use the following as a template. This shows two AVRs.

    Code:
    SUBSYSTEM=="tty", KERNEL=="ttyACM*" , ATTRS{serial}=="85336303532351F0A031", SYMLINK+="brewpi1", GROUP="brewpi"
    SUBSYSTEM=="tty", KERNEL=="ttyACM*" , ATTRS{serial}=="85334333931351F0F020", SYMLINK+="brewpi2", GROUP="brewpi"

    Once the udev rules file is created, disconnect your Arduino and then reload udev
    before connecting all of the Ardiunos to their respective ports.

    Code:
    $ sudo /etc/init.d/udev reload
    Cheers!
     
    dawalker33 likes this.
  9. dawalker33

    Member

    Posted Sep 18, 2015
    Awesome. I will definitely give that a try. I had a chance to do some additional testing tonight and have determined that it is definitely an issue with the serial connection not being released from the VM when I unplug the Arduino. If it is running on ttyACM0 and I unplug it, it will almost always come back up on ttyACM1. It did come back up a few times on ACM0, but usually not. It would also occasionally work again by stopping and restarting the script. Again, not always. However, rebooting the VM would always fix the issue and it comes up immediately when I launch the BrewPi site.

    At this point I think I will try creating the symlink file and see if that clears it up. If not, at least I know I can just restart the VM and fix it. I might see if I can find an old physical machine to install it on and see if that clears it up as well. Thank you thekraken, day_trippr and wbarber69 for all your help.
     
    thekraken likes this.
  10. GrogNerd

    mean old man

    Posted Sep 18, 2015
    now annotations are displaying TRIPLE

    any ideas?

    annotations.JPG
     
  11. redman67

    Well-Known Member

    Posted Sep 18, 2015
    im having trouble with the udevadm info-a-n /dev/ttyACM0 | less step of the multi chamber set up, when i type the command i get this screen


    info query sysfs or the udev database
    trigger request events from the kernel
    settle wait for the event queue to finish
    control control the udev daemon
    monitor listen to kernel and udev events
    test test an event run
    test-builtin test a built-in command
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    (END)
    where i cant do anything
    any help would be appreciated
     
  12. KramE

    Supporting Member  

    Posted Sep 19, 2015
    Cut back on the booze?
     
  13. day_trippr

    We live in interesting times...

    Posted Sep 19, 2015
    I'm surprised you get anything on the terminal - the correct command dumps the stdout lines to a text file.

    Code:
    $ udevadm info -a -n /dev/ttyACM0 | less > info.log
    $ nano info.log
    Still works here...

    Cheers!
     
  14. GrogNerd

    mean old man

    Posted Sep 19, 2015
    I recognize these as words of the English language, but cannot make sense of the order in which they are arranged.
     
  15. redman67

    Well-Known Member

    Posted Sep 19, 2015
    great thanks
    i was able to get it and move forward to the web interface config part but how do you create the directories?

    sorry your dealing with a total computer noob here
     
  16. wbarber69

    Well-Known Member

    Posted Sep 19, 2015
    Are you trying to build a multi-ferment setup from scratch or are you just trying to solve the port disconnection issues. As the directories should have been created already
     
  17. redman67

    Well-Known Member

    Posted Sep 19, 2015
    Trying from scratch in the instructions it says you may have to create the directories and it's telling me the file doesn't exist
     
  18. day_trippr

    We live in interesting times...

    Posted Sep 19, 2015
    You definitely have to create some folders for the different/multiple instance files to reside.
    There are two "sets" of files for each instance, one resides under /home, the other under /var/www.

    Eg: For my four-instance BrewPi setup, I created these pairs of folders:

    /home/brewpi/brewpi1 & /var/www/brewpi1
    /home/brewpi/brewpi2 & /var/www/brewpi2
    /home/brewpi/brewpi3 & /var/www/brewpi3
    /home/brewpi/brewpi4 & /var/www/brewpi4

    I used WinSCP to create the first set of folders, made all the changes needed and got that instance running.
    Then I used WinSCP to clone that first set to the other three instances, renaming the base folders along the way...

    Cheers!
     
  19. Bluesfastduce

    Well-Known Member

    Posted Sep 19, 2015
    Here is my dual chamber set up

    Untitled.jpg

    20150918_165959.jpg

    20150918_170103.jpg

    20150913_194204.jpg

    20150913_194221.jpg
     
  20. jcc4507fly

    Well-Known Member

    Posted Sep 20, 2015

    Do you have a thread of your chamber build?

    Are you running glycol through those "oil" coolers to cool the chambers?
     
  21. Bluesfastduce

    Well-Known Member

    Posted Sep 20, 2015
    No build thread yet. When I took the pic it was just water but I added rv antifreeze to it now.
     
  22. turduckenpillow

    Active Member

    Posted Sep 21, 2015
    Are the Brewpi and Arduino Uno versions supposed to be the same? The LCD screen on my browser displays "Could not receive controller version. Please (re) program your controller". I updated the script with

    sudo ~/brewpi-tools/updater.py

    It updated Brewpi. However when I hit yes to update controller firmware, it failed. It said current version 2.4, latest 2.11 but wouldn't install. I manually downloaded and flashed 2.10 hex from Brewpi Github but couldn't find 2.11. Still seem to have the problem. On the program tab for controller, the output reads

    serial.serialutils.SerialExecution: writefailed: [Errno 5] input/output error

    During all of this, the system still controls temp and follows the set profile. It just doesn't display temps and set points on the LCD screen or log data for the plot.
     
  23. wbarber69

    Well-Known Member

    Posted Sep 21, 2015
    Seems like you got a bad usb cable or you are trying to power the arduino over usb and the pi has a bad psu
     
  24. jcc4507fly

    Well-Known Member

    Posted Sep 21, 2015

    Check your mail. Sent u a pm.
     
  25. turduckenpillow

    Active Member

    Posted Sep 21, 2015
    Could be a bad USB cable. I'm using a PC running Debian instead of the RaspPi, so the PSU shouldn't be bad on that. BUT I am connecting the Arduino power to the computer USB outlet. That could be the problem. I will try to connect it to a power outlet with a USB-to-outlet adapter when I get home. Thanks.
     
  26. BrianGee

    Active Member

    Posted Sep 21, 2015
    Hello everyone. Brand new brewer here. I've only made one batch with a friend on his equipment (bottling an APA tonight) but I got hooked and in the mean time have gotten all of my own equipment to get going.

    I'm a computer nerd and had a rasp pi literally sitting in a drawer so I figured I'd give this a shot. My aforementioned friend is an electronics tinkerer so I assisted while he did most of the wiring work.

    The Uno and relay are velco'd to the project box in case they need to come out. Holes were cut to flush mount the outlet and the USB cable for the Uno:

    [​IMG]

    Identifying probes and outlets with cup of ice water and a fan:

    [​IMG]

    Set up in my fridge with a 30L Speidel full of ~6.5 gallons of water wrapped in 3 feet of reptile heat tape with fan for circulation:

    [​IMG]

    I started with ~66F tap water and set it for 70F. It ramped up smoothly and held for a few hours. Then in the evening I set it to 64F and it's working beautifully. It had only been idle 10 minutes when I grabbed this screenshot but it was regularly going 60 - 90 minutes without running either heat or cool.

    [​IMG]

    Not bad for about $32 in parts including the thermowell.

    Two lessons learned:

    1. If using a 30L Speidel you'll need a 16" thermowell to get down into 5 or 5.5 gallons of liquid. I got the 12" and it's fine with 6.5 gallons but I don't think it would be in the liquid much or at all with 5 gallons. I have one ordered and I'll keep the 12" for carboys.

    2. I want to splice about a 2 foot extension to at least the beer probe. I thought the probe wires would be long enough but didn't account for them coming up from the floor and back down into the thermowell. Alternately I may rig up a mounting solution to the side of the fridge higher up. The shelf standing on end is a mess.
     
  27. Bluesfastduce

    Well-Known Member

    Posted Sep 22, 2015
    Wanted to ask if this look normal to you guys my refrigerator temp seams to jump around. Is this normal or is this noise.

    beer top.png
     
  28. wbarber69

    Well-Known Member

    Posted Sep 22, 2015
    It doesn't look like its jumping around. It looks like you have temperature control disabled. So you're just reading room temperature.
     
  29. AnthonyUK

    Well-Known Member

    Posted Sep 22, 2015
    Have you got the probe attached to anything at the moment?
    If it is just in air then it will cycle more often then when it has some thermal mass to dampen the rate of change.
     
  30. gromitdj

    Well-Known Member

    Posted Sep 22, 2015
    Compared to the beer temp (which is filtered) it will never be as smooth of a graph (due to the filter). But your vertical lines in the graph are 6 hours apart, so if you zoomed in to a 1 hour window, it would probably appear more constant. I think it appears to be normal.
     
  31. jhenry

    Member

    Posted Sep 22, 2015
    Hmm, mine seems to do this too, but my fermentation came out great. I'm wondering what you all attach the fridge probe to while the unit is underway? Beer line probe in the Thermowell and what, fridge probe in a glass of water? Taped to the side wall?
     
  32. gromitdj

    Well-Known Member

    Posted Sep 22, 2015
    Because the software uses the fridge temp to accurately "learn" your system and control the PID values, I would not insulate (or isolate) the fridge temp sensor. If you do, it may negatively impact the control constants. That's just my (uneducated) guess.

    I would (and do) leave the sensor hanging in the open air out of the way
     
  33. thekraken

    Well-Known Member

    Posted Sep 22, 2015
    Agreed.
     
  34. day_trippr

    We live in interesting times...

    Posted Sep 22, 2015
    Yup. You don't want to add thermal mass to slow the response time of the fridge probe, so stick it out in free air where it won't rest against anything...

    Cheers!
     
  35. Bluesfastduce

    Well-Known Member

    Posted Sep 23, 2015
    Thanks guys going to run my first 2 beers on the chamber this weekend so want to have most of the bugs out.
     
  36. gezzanet

    Well-Known Member

    Posted Sep 23, 2015
    +1 Sensor hanging in the breeze is the go
     
  37. AnthonyUK

    Well-Known Member

    Posted Sep 23, 2015
    For the fridge sensor.
    The beer sensor should be attached to the FV or in a thermowell.

    Just added that for clarity :p
     
  38. gezzanet

    Well-Known Member

    Posted Sep 24, 2015
    Yep.
     
  39. Bluesfastduce

    Well-Known Member

    Posted Sep 24, 2015
    Any one know what might cause my chambers temp sensors (beer and refrigerator) to jump up to around the 105 marks. This happens on both probes. But when I open up the chamber its around 50. After I turn it back off the temp drops back down and matches the garage temp around 75.
     
  40. Guper

    Well-Known Member

    Posted Sep 25, 2015
    Did you happen to plug the sensors in after the brew pi was already powered on?
     
Draft saved Draft deleted

Share This Page

Group Builder