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.
It would be wonderful if someone would indeed post a blow-by-blow How To Compile BrewPi Hex Code In Atmel Studio 7.
I've given it a couple of tries and utterly failed both times...

Cheers!

Honestly, I tried, and found it wasn't worth it back when I was working on the ESP8266 version of the firmware. As I get Arduino support in Fermentrack up and running if there's a need to recompile anything I may take a stab at getting everything ported over to Platformio.

Otherwise, I would strongly, STRONGLY recommend anyone that is interested in recompiling the hex code look into platformio as an alternative to Atmel Studio/Visual Micro.
 
Hi All,
I'm hoping some of you can point me in the right direction to troubleshoot. I have built a brewpi controller running on a RPI3 and 4 official arduinos (or at least I think so - ordered from Amazon Prime, and all look legit). I have installed the legacy branch of the software, and xloader to install the script on the arduinos. All 4 arduinos run off of a usb powered hub w/ 1.5 amp psu, and the RPI3 is powered by the original 2.5a psu. I have coded the arduino.rules file so that all arduinos are called by their exact ttyACM and KERNEL info. While all of them are capable of running, I am struggling to get all four running at the same time.

If I reboot the PI, the system will boot up with 2 or 3 of 4 scripts running for the Arduinos. The third and/or fourth will say that it can't get the correct version from the controller. It seems to be random which Arduino(s) fail to run the script. If I check the assignments on the RPI, they all seem to have the correct ttyACM and KERNEL assignments.

Any thoughts where I should be looking for the conflict?
 
Hi All,

I'm hoping some of you can point me in the right direction to troubleshoot. I have built a brewpi controller running on a RPI3 and 4 official arduinos (or at least I think so - ordered from Amazon Prime, and all look legit). I have installed the legacy branch of the software, and xloader to install the script on the arduinos. All 4 arduinos run off of a usb powered hub w/ 1.5 amp psu, and the RPI3 is powered by the original 2.5a psu. I have coded the arduino.rules file so that all arduinos are called by their exact ttyACM and KERNEL info. While all of them are capable of running, I am struggling to get all four running at the same time.



If I reboot the PI, the system will boot up with 2 or 3 of 4 scripts running for the Arduinos. The third and/or fourth will say that it can't get the correct version from the controller. It seems to be random which Arduino(s) fail to run the script. If I check the assignments on the RPI, they all seem to have the correct ttyACM and KERNEL assignments.



Any thoughts where I should be looking for the conflict?


Not enough power on the USB rail. you're definitely going to need a powered USB hub
 
There is a powered hub described, but if each Uno has a connected dual relay module and a few probes, the hub's power supply may simply not have the amperage to keep everyone happy.

It'd be close, though, which may inform why as many as 3 will run but not four...

Cheers!

[edit]btw, you may want to take a look at this post and consider using Uno serial numbers instead of device ports for your symlinks. It's much more flexible (and possibly more reliable)...
 
fwiw, 500ma is the maximum device current draw allowed, not actually a host port specification.
It does set the minimum source current requirement of a host port, but that same port could supply considerably more current without violating any spec.
I can tell you there are a lot of host ports that have nothing more than a 2A PTC connected to the power pin...

Cheers!
 
I've switched the ids to work off of serial numbers, and have connected the 4th Arduino directly to the RPi, and finally have all 4 scripts running. This is currently with only 1 temp probe attached to each unit, and all 4 connected to a 4 channel 5v relay board. Thanks for the quick support!

A quick google search gives estimates of the Arduino draw at 50mA. I am surprised that the 1.5a USB hub would not provide enough power for the 4 boards. Is there anything specific about the way we utilize the Arduino that would result in a much larger current draw? Or is jimdkc saying that by utilizing USB as a connection medium we are automatically requiring 500mA per device?
 
fwiw, 500ma is the maximum device current draw allowed, not actually a host port specification.
It does set the minimum source current requirement of a host port, but that same port could supply considerably more current without violating any spec.
I can tell you there are a lot of host ports that have nothing more than a 2A PTC connected to the power pin...

Cheers!

You must be psychic! Thanks for answering my 500mA question before I could even type it!
 
Yes... the 500mA is a maximum current that can be supplied by a standard USB 1.1 or 2 port. USB 3 is up to 900mA.

Actually some USB ports can provide more. When iPads came out, they required more than 500mA current to charge. Apple made their computer USB ports so that the device could request more power, and the ports would provide 1100mA.

Edit: This is a simplified explanation... a full explanation of USB port currents gets considerably more complicated...

I was just pointing out that a 1.5A supply doesn't provide the full current that 4 USB ports COULD provide. You'd have to be powering quite a bit of stuff to be needing a full 2 Amps...
 
[...]A quick google search gives estimates of the Arduino draw at 50mA. [...]

You need to do a longer search :)
The Mega328P can supply up to a sustained total of 200mA of output current on its I/O cells alone, plus there's internal consumption to run the logic (admittedly small by comparison).
Then there's the 16U2 bridge chip power, the inefficiency of the small linear 3.3V regulator, a couple of LEDs...

I'm guessing it might peak out around 400mA before you start adding in accessories like relay boards, temperature probes, LCD screen, Bluetooth or Wifi radio, etc...

Cheers!
 
For my existing minions, I have used wall warts that I have broken apart and resoldered wires to for the 120v power in and USB power out to power my UNOs. On my next project, I'm going to have one box with an UNO for the BrewPi (via bluetooth), another UNO to run my 'Pints taplist (via bluetooth) and a 5v fan for moving air in the keezer. I want to have all of this in one box with one main power cord to plug into the wall so that I can move my keezer from time to time without having to disconnect power cords, fan wires, probes, etc.

Would you guys suggest using 3 separate wall warts inside of the project box? Is there a better way to go that I'm not considering?
 
I use a stripped down 'wart in my single-instance BT minions, but I wouldn't use three stripped down 'warts for something more complex, too inefficient on a couple of levels.

Similar to jmark, my BrewPints controllers (with an RPi2B, Uno, relay module, cooling fan and a bunch of other crap) use a small 5V 3A switcher in a package about an inch smaller than the 5A model...

Cheers!
 
Last edited by a moderator:
You need to do a longer search :)
The Mega328P can supply up to a sustained total of 200mA of output current on its I/O cells alone, plus there's internal consumption to run the logic (admittedly small by comparison).
Then there's the 16U2 bridge chip power, the inefficiency of the small linear 3.3V regulator, a couple of LEDs...

I'm guessing it might peak out around 400mA before you start adding in accessories like relay boards, temperature probes, LCD screen, Bluetooth or Wifi radio, etc...

Cheers!

Thanks for the help! With one UNO now powered directly from the RPi, the problem seems to be resolved. Although, if RPi and UNOs are booting at the same time, not all will be recognized. A simple reboot of the RPi solves the issue, but it's a bit of an annoyance.

My system includes a 5000btu AC/glycol build with 3 separate fermentation vessels w/ cooling coils (1 SSBrewtech 14g BME, and 2 FastFerments that I will be adding external cooling coils to). I'm currently letting the system run the glycol temp, and hoping to start testing with the Brewtech tomorrow. Any suggestions for PID settings on the glycol and Brewtech?
 
I made up a distribution cable that ties the supply to all the loads.
Floor space for a block would have been tight...

Cheers!
 
Thanks. Sorry for the questions. I've been going through pages and pages looking for the picture of your mega build in the metal box but I haven't found it yet. It's here somewhere...and elsewhere...

Edit : found it!
 
That was my original plan, but didn't need it in the end since the arduinos are being run off the pi. If you need to do that and have space, that should work just fine.
 
Wait, without the USB end on the wall wart, how are you guys powering the Pi and Unos? Are you going straight to the 5v and GND pins on the devices? Are you hacking USB cables? What say you?
 
I'm going straight into everything that runs on 5V.
That required a small mod on the AlaMode that runs my tap list, but the others you just plug right into a 5V header pin (or preferably, two, for redundancy/halved R and L).

I found that the LDO used on the Uno doesn't mind having its output connected to an externally applied 5V source, so no mod required there...

Cheers!
 
Wait, without the USB end on the wall wart, how are you guys powering the Pi and Unos? Are you going straight to the 5v and GND pins on the devices? Are you hacking USB cables? What say you?

Grab yourself a bag of these:
http://www.dx.com/p/diy-90-degree-angle-micro-usb-male-plug-adapters-black-10-pcs-363228

Then you can make your own power lead and use heavier gauge wires. Some of the cheap USB cables use really thin wiring which can lead to a voltage drop.
 
I'm going straight into everything that runs on 5V.
That required a small mod on the AlaMode that runs my tap list, but the others you just plug right into a 5V header pin (or preferably, two, for redundancy/halved R and L).

I found that the LDO used on the Uno doesn't mind having its output connected to an externally applied 5V source, so no mod required there...

Cheers!
So ... no need to remove the FET?
 
Sorry folks...I haven't been here in awhile because I really haven't brewed and used the BrewPi. I've been using it to power a second "keezer" so to speak (just to keep beer cold). Anyway, I have a script error that reads as follows:

http://127.0.0.1/js/dysgraph-combined.js:1103

The thing is so bound up and slow because of this that I can't even hit "stop script" or any other options.

I'm guessing it is from logging so many days worth of temps that it just was too much. We're talking months.

Any guesses? Any answers on how to stop this and clear it out?

Thanks for all the help. The brewing community never ceases to amaze me. :mug:
 
I can use Debian, but if I open the browser, I can't open with BrewPi in a tab. I could go into command prompt and go to the folder and delete the data files if I knew what I was looking for. I'd like to not delete the other logs and the profiles, though.
 
You need to remove the appropriate folder under the /home/brewpi/data/ directory. I don't think it will hurt to remove everything but you should be able to tell which folder to delete by its name. If you don't remember the name of your fermenting beer log, it'll likely be the folder with the HUGE, HUGE number of .json files in it!

EDIT: You won't lose your profiles as those are under the /home/brewpi/settings directory.
 
Hey everyone, just finishing up my first brew using the BrewPi, and have entered the cold crash phase. I have, however, noticed some issues.

I set the BrewPi using the beer profile, with the fridge to go down to 2degC, and then hold there for a cold crash. This process started out fine, with the fridge being on and lowering temp effectively. After checking the web-interface however, I noticed that the BrewPi said the fridge was cooling (currently at 12degC), and had been for a while, however the fridge was completely dormant - no light coming on when the door was opened, and no motor sounds. Slightly paranoid about a broken fridge, I unplugged it from the set-up, and put it into mains, where it turned on immediately, and after a while cooled down to around 0. I've done some more experimenting, including setting the fridge to run off fridge temp instead, and setting it to 2degC manually - still no response, despite the systems claim that it was on and cooling. The fridge's chill temperature limit had, up to this point, been 2DegC, so I don't think that's the issue.

Does anyone have any idea why something like this is happening? I assume it's less an issue with the software, and maybe something has happened with the wiring?

Any help greatly appreciated,
thanks
 
From the description it appears BrewPi was working at some point. True?

If you're using the typical SainSmart dual relay module it has LEDs for each channel that when lit indicate the corresponding relay has been picked.
If the Cooling LED was lit but the fridge wasn't on it would finger the Cooling relay.

Otoh if the Cooling LED isn't lit there's either a wiring issue or the Uno wasn't doing what BrewPi thinks it was doing.
That'd be exceedingly rare in my experience - I have four BrewPi functions doing useful work and a couple of test beds that just sit there running scripts, and I've never seen that particular paradigm in a couple of years of running BrewPi...

Cheers!
 
From the description it appears BrewPi was working at some point. True?

If you're using the typical SainSmart dual relay module it has LEDs for each channel that when lit indicate the corresponding relay has been picked.
If the Cooling LED was lit but the fridge wasn't on it would finger the Cooling relay.

Otoh if the Cooling LED isn't lit there's either a wiring issue or the Uno wasn't doing what BrewPi thinks it was doing.
That'd be exceedingly rare in my experience - I have four BrewPi functions doing useful work and a couple of test beds that just sit there running scripts, and I've never seen that particular paradigm in a couple of years of running BrewPi...

Cheers!
Yes, up until now the BrewPi has been working perfectly. Its seemed to have stopped working mid-way through the cold-crash.

I've had a look - the power LED on the relay is on, however, no cooling LED.

EDIT: I've had a fiddle, and the script claims that the fridge is cooling, however the fridge's motor is not running - the fridge light IS on however. Is it possible that the fridge's internal thermostat is blocking the motor from running? The fridge is on its highest setting. Fridge model is Hotpoint RLA50 larder fridge.
 
Yes it's entirely possible that the fridge is overriding the controller. That can happen because of the oem thermostat hitting its limit, or a defrost cycle kicking in.

I've had both happen during cold crashing...

Cheers!
 
Yes it's entirely possible that the fridge is overriding the controller. That can happen because of the oem thermostat hitting its limit, or a defrost cycle kicking in.

I've had both happen during cold crashing...

Cheers!

Strange, I double checked wiring, but also took the fridge off of beer profile mode, and onto fridge constant, and it's working perfectly, even getting it to 0.5degC with no issues. I wonder if the issue was loose wiring that came undone very gradually?
 
Obviously I have no idea - too far away ;)

The fact that the fridge light was on says the cooling relay was closed which would agree with what BrewPi thought was going on. If the compressor wasn't running it's because of something inside the fridge.

btw, are you using a SainSmart dual relay module or something else?
The statement "I've had a look - the power LED on the relay is on, however, no cooling LED." doesn't compute as there are only two LEDs on a SainSmart dual relay module and they only light when the corresponding relay is enabled...

Cheers!
 
I tried to wire mine up today. Can someone please take a look and tell me if it looks like it will work from what you can see? I didn't know how to connect the wires to the board because the guide on page one wasn't very specific so I ended up soldering the wires to the pins sticking out of the bottom of the board in the specified locations. I also didn't know how to add in the 4.7k resistor so I just wrapped the other wires around it and used a wire nut. Did this seem ok or bad idea? I don't want to test it without installing it in a box and don't want to install it in a box if y'all don't think it's okay looking.
Thanks for the help!

IMG_20170226_213832.jpg
 
Best as I can tell you have the connectivity correct.
Don't forget to remove the bridge on the hot side of your duplex outlet so the Cooling and Heating functions aren't shorted together.

fwiw, most folks use "Dupont" jumper wires for module-to-module stuff.
Also, I'd definitely get everything working before loading it into a box...

Cheers!
 
Best as I can tell you have the connectivity correct.
Don't forget to remove the bridge on the hot side of your duplex outlet so the Cooling and Heating functions aren't shorted together.

fwiw, most folks use "Dupont" jumper wires for module-to-module stuff.
Also, I'd definitely get everything working before loading it into a box...

Cheers!

Thanks a lot. I looked at the jumpers cables. Those would have helped a lot. What about the part on the relay that has the male pins sticking out though? What's a cleaner way to connect to those?
 
Thanks a lot. I looked at the jumpers cables. Those would have helped a lot. What about the part on the relay that has the male pins sticking out though? What's a cleaner way to connect to those?


They make them in male to female also.
 
Status
Not open for further replies.
Back
Top