• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

HOWTO - Make a BrewPi Fermentation Controller For Cheap

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
Back on the Update thing: Success!

Digging through Github I found Elco did an update to the AVR firmware in July which I never captured. Thinking just maybe that was the problem I reflashed the first Uno. No change, same issues.

So I fired up the javascript console and after doing some digging I discovered that somewhere along the line the /var/www/brewpi1/userSettings.json file went missing in the updated web server repository. As soon as I copied that file from my backed up repository everything started working just fine.

I had two more BrewPi instances to update and decided to see if I could get through an update cleanly this time.

My second instance script repository is at /home/brewpi/brewpi2
My second instance www repository is at /var/www/brewpi2

After cloning both repositories...

to update the script repository:

cd /home/brewpi/brewpi2
sudo -u brewpi git pull

to update the web repository:

cd /var/www/brewpi2
sudo -u www-data git pull

Checked that these files were still present and matched the backed up versions:

/home/brewpi/brewpi2/settings/config.cfg
/var/www/brewpi2/userSettings.json
/var/www/brewpi2/config_user.php


Run the fix permissions script on this instance:

cd /home/brewpi/brewpi2/utils
sudo bash fixPermissions.sh


Launched a Chrome window on my peecee and got right into the second BrewPi instance, which by then was already running (I never stopped the script). All panes and panels are fully functional.

Repeated for third instance with same success.

So...I agree with Elco: don't use the canned update script. Use git pulls, it's wicked fast, doesn't invoke what looked like a global package update, and it works! :rockin:

Cheers!

[edit/ps] Forgot to note: I verified that I can now run BrewPi sans any network connection and have everything work as expected. That said, it took so long for Chromium to fill out the full BrewPi gui on the local console that I had my doubts.

[edit/pps] I should note that just for grins I updated the second Uno's firmware before I updated it's BrewPi software instance (scripts and www repositories) and that worked just fine, the BrewPi-Uno dialog had no issues at all.
 
I can't seem to find a USB to USB B cable with ferrite beads on Monoprice. Any chance you could link the one you have?


I don't seem to see them either I know I bought some from there. It may have been eBay. I know they're out there because I need them to run my hd pvrs from inside my closet. I'll dig through my past purchases and see if I can find them.
 
Everyone who said the cable was right.

I dug through /home/brewpi/logs/stderr.txt and found a few spots that looked like data corruption:

Code:
Aug 06 2014 18:34:27   JSON decode error: No JSON object could be decoded: line 1 column 0 (char 0)
Aug 06 2014 18:34:27   Line received was: S:{"mode":"f","beerSet":g for     43m41"]

Aug 06 2014 18:34:27   JSON decode error: Expecting : delimiter: line 1 column 7 (char 7)
Aug 06 2014 18:34:27   Line received was: S:{"m:t$"^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$

Aug 06 2014 18:34:27   Cannot process line from Arduino: t^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^$

Aug 06 2014 18:34:27   Cannot process line from Arduino: ��dge Const.","Beet`�e^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$

Aug 06 2014 18:34:27   Cannot process line from Arduino: "��,^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$

As a temporary fix, I took the USB cable, wound and ziptied it, wrapped it in some aluminum foil to block interference and covered with electrical tape so it wouldn't short anything.

It's been up now for 12+ hours with zero issues. :mug:



I can't seem to find a USB to USB B cable with ferrite beads on Monoprice. Any chance you could link the one you have?

You can always just buy the ferrite cores and snap them on your cables instead...

http://www.monoprice.com/Search/Index?keyword=ferrite

I'd think you would be ok with a 24AWG one, they are sized for HDMI cables but theres no reason it shouldnt still work even if its not entirely clamped tight. Looking at my HDMI cables they are thicker than your standard USB cable. But looking online i think many USB cables use around 24AWG.

If your not sure just buy both, apparently they come in pairs(2 sets) one for each end of the cable, so for $5 its a good deal... im sure you can find a use for the other set you dont use on something with an HDMI cable ;)
 
You could probably find better ferrite core sizes. I use both the 22 and 24AWG hdmi cables from monoprice and they are considerably larger in diameter than my 22AWG USB cables. Hdmi uses 9-11 wires/support and are usually double if not quad shielded. Mine range about 3/8" average diameter, where the USB cables are between 3/16 and 1/4".

Anyway I found this one on eBay.
http://www.ebay.com/itm/130852220266
 
Thanks for all the suggestions guys.

I picked up a pair of snap-on ferrite cores from radioshack. They fit the USB that came with my Uno perfectly: http://www.radioshack.com/product/index.jsp?productId=3012599

Unfortunately they don't help. After it crashed again, I put the kludge back with the foil and tape and it's rock solid.

I think I need to either find an ultra-shielded USB cable or rearrange my project box.
 
Running my first rapid cold crash… I come home to check on it. Good thing I checked when I did. Half a 64oz growler full of star San just about made its way into my fermenter. It's insane, like 26oz of liquid crawling up a 1" blow off tube that's nearly 5' long.
 
Bouncing ideas off you guys. I'm building a 4 chamber fermenter out of one fridge. I want to use all 1-wire devices in an attempt to reduce the amount of cabling going into the fridge. Wondering if it's possible to run the temp probes off of phantom power? Would I need a cap or something? If so I think I could run everything off of 1 cat6 line (4x2). But I'd still need to get ground in there somehow. So I was thinking about doing it a little differently. Like sharing ground with the 4 arduinos and just using power from one if them to power up the devices totaling up in only 6 needed wires. Or would it be more prudent to just bind all the gnd and 5v between the 4 arduinos. I'm sure only one could supply plenty if voltage for 10 temp probes. The ds2413s would be phantom powered so they wouldn't all be drawing off the 1 arduino. Idk what y'all think? I think it would be cool to run everything through 1 cable.
 
Bouncing ideas off you guys. I'm building a 4 chamber fermenter out of one fridge. I want to use all 1-wire devices in an attempt to reduce the amount of cabling going into the fridge. Wondering if it's possible to run the temp probes off of phantom power? Would I need a cap or something? If so I think I could run everything off of 1 cat6 line (4x2). But I'd still need to get ground in there somehow. So I was thinking about doing it a little differently. Like sharing ground with the 4 arduinos and just using power from one if them to power up the devices totaling up in only 6 needed wires. Or would it be more prudent to just bind all the gnd and 5v between the 4 arduinos. I'm sure only one could supply plenty if voltage for 10 temp probes. The ds2413s would be phantom powered so they wouldn't all be drawing off the 1 arduino. Idk what y'all think? I think it would be cool to run everything through 1 cable.

Thats the beautiful thing about the DS18b20 probes, they can run off no power in Parasitic power mode. Look it up, its in the DS18b20 data sheet as Parasite mode, i am not 100% positive the BrewPi will work with it in this mode, thats something you will have to try.

Basically it pulls its power from the data line, they do have to be wired a bit differently.
 
By wired a bit differently, what do you mean. It seems that all I have to do is not connect the 5v line. From what I'm reading so far. Or is there more that must be done on the interface.
 
I assume I'll have to have some low voltage ps inside the fridge if I'm going to go with pc fans. Both the models I'm looking at use 5v but the ones from thermaltake use more than half an amp each but I also have some that use less than a tenth of an amp. Either way I think it would be best to run the fans off their own psu so 5v should be available if I find the parasitic power to be unreliable.
 
Well just running data and ground doesn't work. I can read the probes but I get no temperature reading. There must be some kind if capacitor or MOSFET that is need to leech power from the 1-wire
 
Well just running data and ground doesn't work. I can read the probes but I get no temperature reading. There must be some kind if capacitor or MOSFET that is need to leech power from the 1-wire

No the problem is that you communicate to it differently in parasitic mode, you have to set a bit on the bus to use parasitic mode. I didnt know if BrewPi did this or not but doubted it.
 
Yeah I've found that to be true in the last 5 minutes. I'm going to go for adding an external power source since I'll need one for my fans anyway. Or I can use a single 5v rail from 1 arduino to feed all my temp probes bringing my wire total to 6 which is what I was shooting for. I was just hoping I could power each 1-wire separately from its respective arduino but I think it'll take a bit more hardware if I went that route. This way I'll be using something that's already available and I'll just need to make sure that all my components use a common ground between devices.
 
I recompiled the hex file changing the necessary value to enable parasite power but it still doesn't work with the temp probes. I got the ds2413 to be detected in devices. Now I'm just trying to figure out how to use both pins as actuators. I can switch 1 pin on and off but the other doesn't do anything. Trying to get some help in the brewpi forums but it takes forever.
 
Try the IRC channel, Elco and MDMA are there and many others can help..its also slow but if you get on when they are you can get fast responses.
 
Ah HAH! Someone that's actually gotten this project to compile in Atmel Studio 6.2?

I'd like to generate a hex file for an AlaMode, which requires changing a couple of pin assignments (the AlaMode hardwires AD4 and AD5 to the on-board RTC). But I've been having zero luck recompiling the original ZIP file with the AVR code. I have a yellow bang in Solutions Explorer on Config.h, if that means anything (not the one under Fallback - the other one).

If one of you folks that have been able to compile the existing AVR firmware using this suite could write up a step-by-step to do a successful build it would be greatly appreciated. I suppose it doesn't suit their needs, but none of the BrewPi sites/forums is particularly helpful on this...

Cheers!
 
Yeah download the avr-master in zip format and then unzip it. Run atmel studio and go to build options or whatever it's called right under build. And remover the post build strings that are there. Then hit build. Change the code to your liking and then hit build again. Then you should have a hex file in that same folder that is freshly compiled.
 
Ah HAH! Someone that's actually gotten this project to compile in Atmel Studio 6.2?

I'd like to generate a hex file for an AlaMode, which requires changing a couple of pin assignments (the AlaMode hardwires AD4 and AD5 to the on-board RTC). But I've been having zero luck recompiling the original ZIP file with the AVR code. I have a yellow bang in Solutions Explorer on Config.h, if that means anything (not the one under Fallback - the other one).

If one of you folks that have been able to compile the existing AVR firmware using this suite could write up a step-by-step to do a successful build it would be greatly appreciated. I suppose it doesn't suit their needs, but none of the BrewPi sites/forums is particularly helpful on this...

Cheers!

In the Q&A part of the brewpi site there's some helpful information, specifically this post:

http://ask.brewpi.com/question/78/how-do-i-compile-my-own-hex-file-for-the-arduino/
 
It's important that you delete the ARDUIJO_HOME stuff to get it to compile
 
Thanks, guys. But I followed that thread to get to where I am ;)

But...I just thought of something: I've seen poorly written programs that are unable to handle long file names/paths, and I did have the brewpi AVR archive a few folders deep. And indeed I just found that Atmel Studio "could not find" some of the deeper folders in the archive, which likely was causing some of my issues (for instance, that part about editing the "Post-build event command line" - nothing would actually show up to edit!).

So...I started over, rooted the archive in the partition root, and now that "Post-build" thing appeared and I was able to remove the offending symbol.


Still, there's some unsettling weirdness. After loading the project file, the ASF Wizard window appears, and the Solution Explorer pane at the far right appears. If I scroll down that pane there's a yellow bang on Config.h. Anyone else see that?

There's a "Project" button in the upper left corner of the ASF Wizard with a blank "Project", so I select brewpi_avr. A message pops up about C++ not guaranteed to work and to use C instead (?). Ohhh kay. Should I not care? Should I not even click on that Project button?

There's a "brewpi_avr" tab, so I select that. The Current Device is set to a mega328P, which is what I want.

So I edit the "Post-build event command line" and remove the Arduino_Home reference. Then I run the build.

- I don't get any indication of a successful build

- I get a system-level pop-up window that says Windows doesn't know what to use to open an elf file (? That makes two of us! And why does it want to open an elf file, anyway?)

- When the build "completed" there's a yellow-banged warning message at the bottom of the window: "unused variable 'pinNr' [-Wunused-variable]" in the OneWireTempSensor.init.pinNR file (note that to this point, I haven't changed anything anyway, other than that "Post-build event" thing). No errors, and no messages (like, "Build Successful").

- I DO end up with a hex file - but I don't know if I should trust it.

Anyone seeing any of this?

Cheers!

[edit] And if I do a file compare between what Studio produced and the latest released hex file for the rev C shield, they're so different FC gives up...
Speaking of which, how do we know that the build is for the "Rev C Shield"?
 
Ds2413 success. And it's so easy!

ImageUploadedByHome Brew1407803791.585234.jpg
ImageUploadedByHome Brew1407803804.533871.jpg
 
You can use Apache's reverse proxy ability to have multiple servers on one IP address - that is also how I've done that. The brewery webserver is on old P3 dell I had laying around with Debian Wheezy loaded on it.

Check out this page on how to setup the reverse proxy.
http://jaykhimani.blogspot.com/2010/04/setting-reverse-proxy-with-apache2-on.html

next up this. want to get my raspberry pints/temp logger and my brew pi accessible externally. thanks for all the great info in this thread!
 
What's the file size of the new hex file

Without changing anything from the zip file contents, 72,918 bytes.
The official rev C shield hex file is 72,501 bytes.

So I tried uploading the hex file to the AlaMode anyway, but AVRDUDE clearly did not actually update the firmware.
The BrewPi window showed:


"Programming Arduino with avrdude: /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P /dev/ttyAMA0 -U flash:w:"brewpi-alamode.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf

result of invoking avrdude:
avrdude: stk500_getsync(): not in sync: resp=0x60

avrdude done. Thank you."

So I'm still wandering around in left field. But it's nightcap time so it's going to have to keep.

It's the story of my life: I can break any program written, whether it's free or costs $20K per seat per year (I'm pretty sure Cadence has a contract out on me for finding bugs ;) )

Cheers!
 
Any reason why you have to use alamode instead of an uno. Other than, "because it was there."
 
Any reason why you have to use alamode instead of an uno. Other than, "because it was there."

It's for science! :D

I have a pair of them patiently waiting for R'Pints V2 at which time they'll be pressed into flow-meter interface service. Meanwhile, I'm running out of things to tweak with my 'Pints and BrewPi systems, and my brain needs play time ;)

Anyway, an AlaMode on a 'Pi is a pretty efficient hardware platform for a home-brewed BrewPi setup, as it snaps on top of the 'Pi so no cables required, and doesn't use either USB root port (it uses the 'Pi serial port instead) leaving the USB ports available for a nic and a keyboard dongle if so desired.

I actually have the thing nearly working, but the AlaMode has an RTC chip that the 'Pi talks to that is also hardwired to the AVR using the pins that BrewPi assigns to the One-Wire bus and Actuator4. If I watch the log I can see the AVR struggling to read the temperature sensors as the RTC goes nutty trying to figure out who is talking to it and in what language and they fight over the state of the wire.

So if I could get a hex file cranked out after reassigning pins it should just plain work.

So there's that. And then there's my obsession with recalcitrant software - I want to be able to build a friggin' hex file! :drunk:

Cheers!
 
It's for science! :D



I have a pair of them patiently waiting for R'Pints V2 at which time they'll be pressed into flow-meter interface service. Meanwhile, I'm running out of things to tweak with my 'Pints and BrewPi systems, and my brain needs play time ;)



Anyway, an AlaMode on a 'Pi is a pretty efficient hardware platform for a home-brewed BrewPi setup, as it snaps on top of the 'Pi so no cables required, and doesn't use either USB root port (it uses the 'Pi serial port instead) leaving the USB ports available for a nic and a keyboard dongle if so desired.



I actually have the thing nearly working, but the AlaMode has an RTC chip that the 'Pi talks to that is also hardwired to the AVR using the pins that BrewPi assigns to the One-Wire bus and Actuator4. If I watch the log I can see the AVR struggling to read the temperature sensors as the RTC goes nutty trying to figure out who is talking to it and in what language and they fight over the state of the wire.



So if I could get a hex file cranked out after reassigning pins it should just plain work.



So there's that. And then there's my obsession with recalcitrant software - I want to be able to build a friggin' hex file! :drunk:



Cheers!


Well building the hex file should be easy enough. Changing pins can be funky. You have to edit pins.h certain parts of brewpi.h and config.h and some other locations. If you could just move one-wire to a3 or something that isn't used by brewpi then your talking. But I've had issues trying to get that 4th actuator pin on a5 to go away. I actually gave up and started using a relay board that wasn't on a shield. You also have to edit pins.py in the script location.
 
Since my last post at
https://www.homebrewtalk.com/f51/ho...roller-cheap-466106/index131.html#post6298642
Haven't made any progress trying to figure out what's wrong....seems there was a suggestion of not enough power to the UNO but not sure if that was directed at me...my UNO is plugged into the PI so I'm assuming there is enough power....can I leave the USB to PI plugged in and also power the UNO with it's own just to make sure that it isn't a power problem....also thinking I need to order new 1wire sensors but don't know since mine seemed to test OK....any more comments from anyone appreciated.
 
Can anyone spot anything wrong with this wiring, can't get any devices to list! See attached pic..
Red on left is 5 v, black is gnd and white is data.


Gonna need some more detail this pic doesn't show anything. Where are the sensors. How are they wired. Can't really glean anything from this pic
 
And just when I thought I was nearly done with this project… rpints is about to release version 2 with flow meter support.
 
I wish I could find the link I was looking at a few weeks ago. I had found some 1/4" flow meters somewhere and now I can't remember where, but they were like 10 bucks a piece and small. I remember saying to myself, "if only rpints supported flow meters already."
 
Besides the uno or the Leonardo, will any other arduino's work with the brewpi?
 
Pretty sure you could use the mega if you want to pay 75 bucks for it
 
Besides the uno or the Leonardo, will any other arduino's work with the brewpi?

I had success with a dirt-cheap nano clone from Amazon. I just used the .hex file for the uno, and the pin numbering is the same.
 
I had success with a dirt-cheap nano clone from Amazon. I just used the .hex file for the uno, and the pin numbering is the same.

You just have to make sure whatever Arduino you use has the same amount of space as the Uno/Leonardo, because they max out that image...anything smaller it wouldnt fit on.
 
Status
Not open for further replies.

Latest posts

Back
Top