HOWTO - Make a BrewPi Fermentation Controller For Cheap | Page 121 | 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. nubrun

    Member

    Posted Feb 5, 2016
    Ok, so I am bowing out and asking for help. I have been fighting getting my setup running for 2 weeks and 2 arduino boards. I have my raspberry pi running, have installed brewpi without problems, but no matter what I do I cannot get brewpi to connect to the arduino board (either of them, or with any of the 4 cables I have tried).

    I have tried using the updater with the ask command to use legacy mode, and when it gives the option to update the controller I choose yes, but it always fails after trying to open serial port saying it can't connect to the controller.

    Does anyone have any ideas how to resolve this. I am usually tech savvy, but this has kicked my ass.

    Thanks!
     
  2. FuzzeWuzze

    I Love DIY

    Posted Feb 5, 2016
    Honestly i'd image your RPI, then start over following my instructions on the Wiki and see if you can even get 1 working.

    Your Arduino not being detected by the RPI though seems like a very basic problem, if it doesnt show up in /dev/TTYACM0 when you plug it in its possibly just ****ed...or your USB port is, have you tried plugging a keyboard into it the USB ports to see if they function?
     
  3. day_trippr

    We live in interesting times...

    Posted Feb 6, 2016
    fwiw,

    Code:
    $ sudo pip install pyserial --upgrade 
    has gotten a few folks off the schnide lately...

    Cheers!
     
  4. nubrun

    Member

    Posted Feb 6, 2016

    I agree, and it must not be that difficult since it doesn't seem to be a common problem. I have checked and the arduino does show up as TTYACM0, and I have keyboards and wireless dongles in the USB ports without problems. I will go ahead and reload the raspian software and start over based on the wiki. Thank you for the advice.


    Thank you, I will go ahead and give that a go prior to reinstalling raspian.
     
  5. nubrun

    Member

    Posted Feb 6, 2016

    So I just did a fresh install of raspian and brewpi and it still fails on the update of the controller software due to not being able to connect. I checked and it sees /dev/ttyAMC0. I do have a wireless dongle plugged in, could that be throwing off anything?
     
  6. day_trippr

    We live in interesting times...

    Posted Feb 6, 2016
    No. My twin RPi2 R'Pints/BrewPi/Much More systems are festooned with dongles and can still find their built-in USB Unos.
    Something else is missing - you're likely right at the same place that a lot of other folks have landed lately...
     
  7. FuzzeWuzze

    I Love DIY

    Posted Feb 6, 2016
    Alright I got a few minutes to look into this and I realized there's a bug in the BrewPi code that snuck by those guys. Previously i didnt blank flash my Arduino and just used what was on it, but it had no problems opening and seeing it and told me it was up to date so i just assumed it would work from blank. This is not true.

    To fix Brewpi so that you can flash the hex you need to edit /home/BrewPi/BrewPi.py
    Goto Line 636 (which should be bg_ser.stop(), delete the entire line
    Save the file
    Run sudo apt-get install arduino-core to install avrdude and some other Arduino tools for flashing.
    Go download the latest Arduino image Uno image from https://github.com/BrewPi/firmware/releases/download/0.2.10/brewpi-arduino-uno-revC-0_2_10.hex
    Using the BrewPi webpage, go into Maintenence panel->reprogram controller. Give it your hex file, select Uno, select No for both questions and hit Program..you should see it run AVR dude, and reboot the Arduino.

    I'll talk to Elco about fixing the bug so future people wont have to do this and the updating to legacy script that programs should then work for future people, but if your in a hurry to get it working do that :)
     
    mattrox likes this.
  8. FuzzeWuzze

    I Love DIY

    Posted Feb 6, 2016
    Hey Elkoe,

    I believe found a bug in BrewPi.py on the Legacy branch thats breaking all new setups using Arduinos. I submitted it to the Git Repo as well.

    On line 636 you are using bg_ser.stop(). The problem is that bg_ser is of type None, it only gets defined on line 374 if the Arduino detected a hwVersion is not none. I think this hwVersion is the brewpi revision? So right now basically you can only run the programArduino case if the arduino is already programmed and returns a hwVersion earlier in the script and thus has a valid bg_ser. Atleast this is what i believe from spending 30 minutes looking at it.

    When this code runs on a blank Arduino it errors out that bg_ser.stop does not exist because bg_ser is of NoneType. Simply removing this line fixes the problem, but obviously you do want it to stop if there is a hwVersion so some extra if logic maybe needed here:mug:

    Hopefully that makes sense, if not maybe the Git bug will.
     
  9. FuzzeWuzze

    I Love DIY

    Posted Feb 6, 2016
    Not sure if you got your setup working or not but check my post here for programming the Arduinos. Theres currently a bug in the BrewPi software for flashing blank Arduinos.

    http://www.homebrewtalk.com/showpost.php?p=7387465&postcount=4807
     
  10. cegan09

    Supporting Member  

    Posted Feb 6, 2016
    I fought for a few days with mine (see the past couple pages) and it turned out to be something really dumb. check the config file (/home/brewpi/settings/config.cfg) and see what arduino version is listed. I had that line uncommented but left as leonardo, so it failed every time. As soon as i set it to uno the pi could talk to the arduino.

    I also had the hex file pre-loaded onto the uno through xloader, so that helped.
     
  11. cegan09

    Supporting Member  

    Posted Feb 6, 2016
    So just a note. When following those instructions I kept running into a hiccup when trying to git pull the files. It told me I couldn't place them into /home/brewpi/whatever because it didn't exist, and it wouldn't let me make the folder. I ended up having to skip to step 10 and setup the brewpi user first and then go back. Not sure if this was something i was doing wrong on my end, or what.

    I still haven't gotten multiple to work, but i haven't given up.
     
  12. wbarber69

    Well-Known Member

    Posted Feb 6, 2016

    The walkthroughs are kinda put together using different parts of other walkthroughs for different apps and features you need. it's not unlikely that a portion of one doc might be referred to out of flow for a perfect install. at least there are plenty of resources for you guys today. it's definitely a project that will get you into arduinos and pis to the point where you are trying to find d a way to hook one up to every appliance you have. be careful it's a slippery slope.
     
  13. FuzzeWuzze

    I Love DIY

    Posted Feb 6, 2016
    If you see things wrong and figure out how to fix them like this please edit the wiki, that's why it's there :)
     
  14. cegan09

    Supporting Member  

    Posted Feb 7, 2016
    Didn't want to go stepping on toes if you were trying to keep the number of editors low. I'll make the note.
     
  15. jronde

    New Member

    Posted Feb 7, 2016
    I finally got my brewpi working last night! Thanks for all the help and the wonderful guide made by fuzze. I had to use the Xloader to bipass the error in the code that fuzze posted above. After everything was properly configured I had a problem with the temp sensors. They were reading the proper values, however they weren't installing. I used the command "sudo echo 'E\n' > /dev/ttyACM0". This allowed me to install the temp sensors! Thanks again everyone.
     
  16. jronde

    New Member

    Posted Feb 7, 2016
    Here are two pictures of my setup to maybe give others ideas.:mug:

    20160207_125529.jpg

    20160207_125519 (1).jpg
     
  17. jronde

    New Member

    Posted Feb 7, 2016
    I finally got my brewpi working last night! Thanks for all the help and the wonderful guide made by fuzze. I had to use the Xloader to bipass the error in the code that fuzze posted above. After everything was properly configured I had a problem with the temp sensors. They were reading the proper values, however they weren't installing. I used the command "sudo echo 'E\n' > /dev/ttyACM0". This allowed me to install the temp sensors! Thanks again everyone.
     
  18. mattrox

    Well-Known Member

    Posted Feb 7, 2016
    Off topic but

    "Sudo echo" has to be the funkiest command in Linux.






    Ok, I'll see my way out.....
     
    jronde likes this.
  19. Diver4life

    Active Member

    Posted Feb 8, 2016
    I'm having a little bit of an issue with my brewpi. I had a perfectly working brewpi setup then had to move and during the move my brewpi setup was disassembled. Somewhere in that process I had to redo all software. I have everything running but my script will random stop running which let's my beer stray away from the set point. I think it's my arduino needs to be released done. Any help would be greatly appreciated!
     
  20. GrogNerd

    mean old man

    Posted Feb 8, 2016
    was all working fine, working GREAT, until last week, it just crapped out, script stopped

    tried to reprogram Arduino and getting errors on opening serial port

    ran

    sudo pip install pyserial --upgrade

    echo -ne 'E\n' > /dev/ttyACM0

    sudo /home/brewpi/utils/fixPermissions.sh

    and now getting

     
  21. wbarber69

    Well-Known Member

    Posted Feb 8, 2016
    Try sudo echo -ne 'E/n' > /dev/ttyACM0 and see what happens also check /dev/ when the arduino is plugged in to see if it's actually there
     
  22. GrogNerd

    mean old man

    Posted Feb 8, 2016
    did the echo command, ttyACM0 and ttyACM1 are both in the /dev/ folder

    i get
    ran fixPermissions again but no joy

    can run and load Blink
     
  23. cegan09

    Supporting Member  

    Posted Feb 8, 2016
    It may be worth manually setting permissions as it will let you see if there are errors. Right from the manual install instructions, the commands to run:

    http://docs.brewpi.com/manual-brewpi-install/setup-users-permissions.html
     
  24. Elkoe

    Well-Known Member

    Posted Feb 8, 2016
    Wbarber, if he cannot acces the serial port, resetting thr EEPROM on the arduino wont do anything. It is not the magic fix for all problems and the command won't even work.

    Make sure the brewpi user is added to the dialout group. Otherwise it wont have access to serial ports.

    If you see acm0 and acm1, do you have two Arduino's connected? Try disconnecting and connecting only one to start
     
    thekraken likes this.
  25. GrogNerd

    mean old man

    Posted Feb 9, 2016
    brewpi was in dialout group, but my main login was not. I was incorrect earlier in saying it would load blink. I could do it from Windows, but not Wheezy (I'm running VirtualBox)

    so, that's now fixed

    next up was bitching about python-pip and pyserial --upgrade

    fixed that

    now it's saying it's an old version of BrewPi, but I have the latest HEX.

    it's also complaining about wlan0 not configured
     
  26. cegan09

    Supporting Member  

    Posted Feb 9, 2016
    Don't worry about having an old version of brewpi, I believe it does that whenever you're on the legacy branch.

    wlan0 is wifi, if you're on virtualbox it'll think you're hardwired, which is fine. It should work anyway. If you ever move to a real pi with a wifi adapter that error goes away.

    All that said, if you're running inside virtualbox, your arduino may not show up on the default /dev/ttyACM*. If you have issues programming you may need to do some deep diving to figure out what the virtual pi sees the arduino as and change that in the config files.
     
  27. GrogNerd

    mean old man

    Posted Feb 9, 2016
    boof me bloody

     
  28. cegan09

    Supporting Member  

    Posted Feb 9, 2016
    There are two different things going on there. The first is the wifi issue. See above where since you're in a virtual box you aren't really on wifi.

    The second is just that whatever hex you threw on the arduino is old, or it thinks it's old. What version of the arduino code did you upload to the board?
     
  29. GrogNerd

    mean old man

    Posted Feb 9, 2016
    I did have to change config to ttyACM1, the port used to upload blink (which is working fine now)

    I started this VBox from scratch last night, manual install of BrewPi this morning, including download of brewpi-arduino-uno-revC-0_2_10.hex from GitHub
     
  30. Elkoe

    Well-Known Member

    Posted Feb 9, 2016
    Disable the wifi checker by editing /etc/cron.d/brewpi
    change:

    entries="brewpi wifichecker"

    to:

    entries="brewpi ~wifichecker"

    Then run updateCron.sh


    [Errno 13] could not oopen port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACMO'

    That last digit is a letter, not a number. It should be a number zero.
     
  31. ahawk

    Member

    Posted Feb 9, 2016
    Hi guys. I have tried to search this thread, but to no avail. Simple question: is it possible to make the Arduino Uno communicate with the web server, in my case a VM on a NAS, over ethernet rather than USB using, for instance, a Ethernet Shield W5100? My NAS is in another room and I already have RJ45 sockets in my fermentation room.
     
  32. FuzzeWuzze

    I Love DIY

    Posted Feb 9, 2016
    Have you tried the automated installer?

    The only thing i can think that you'd probably need to do to get a Automated install working as i describe on the blog is you need to create a user named pi with password raspberry.

    From that error message your getting back im pretty sure your Arduino isnt even programmed.
     
  33. GrogNerd

    mean old man

    Posted Feb 9, 2016
    what I'm trying to do, program the Arduino.

    tried the automated install (I did mention this is on a PC running VirtualBox?)

    oh, for ****s sake, this **** again

     
  34. cegan09

    Supporting Member  

    Posted Feb 9, 2016
    Honestly, just program the arduino on your windows machine with xloader. Use the 2.10 version of the hex. I got sick of fighting with the web programming interface and the xloader method works great. Will help you avoid any other complications from the virtualbox setup.
     
    SBOB likes this.
  35. MrE_the_Great

    Supporting Member  

    Posted Feb 9, 2016
    THANK YOU!!!! SO much frustration lifted. :mug:
     
  36. day_trippr

    We live in interesting times...

    Posted Feb 9, 2016
    Has Elco followed up with you on this yet?

    Cheers!
     
  37. GrogNerd

    mean old man

    Posted Feb 10, 2016
    xloader + change to legacy branch + reload = SUCCESS!

    thanks guys.
     
  38. FuzzeWuzze

    I Love DIY

    Posted Feb 10, 2016
    Just setup the BrewPi entirely in a Virtualbox running Wheezy with little trouble using the automated installer. I documented the few changes required to get it to work such as installing git on the Wiki. Now there should be no issues getting new systems up regardless, unless your charting into the multiple chamber off one RPI territory.

    [​IMG]
     
    mattrox likes this.
  39. stat

    Well-Known Member

    Posted Feb 12, 2016
    Get a usb cable and an rj45 cable. Cut both in half. Solder and heat shrink the 4 wires in the usb cable to 4 wires in the cat5/6 cable, cut the other 4 short. Go into the other room and connect those same 4 usb wires to the same colored cat5/6 colored wires from the first time. Now you have 2 usb to rj45 cables. I've done this with a 20' long cable. Not sure what the max distance is.
     
  40. FuzzeWuzze

    I Love DIY

    Posted Feb 12, 2016
    Uhm you cant just connect a USB cable to ethernet like that. Your basically just making a USB cable with a Ethernet connector on the end, or an ethernet cable with a USB cable on the end. They are two totally different standards..
     
Draft saved Draft deleted

Share This Page

Group Builder