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.
OK now this is weird, new arduino and they don't work

This is going to sound insane, but it may be that your sensors aren't 5v capable. The Raspberry Pi runs on 3.3v for the logic lines. DS18B20s are supposed to support both 3.3 and 5v, but they're also notorious for being counterfeits.
 
Out of curiousity, what data would you like to track?

I am working with new (for me) yeast that ferment differently from sacch. Torulaspora, brett, pichia, and a handful of lactic acid bacteria. If I'm lucky, I may also be working with sacch. c. hybrids if I can develop a method to get the little buggers to form spores. At this point I want to track as many variables as possible. Contribution of organic acids might correlate with a drop in pH. Seeing how well yeast handle fermentation at 1 atm and under varying pressures with spunding valves is another area worth exploring. Attaching a pressure sensor, especially for the spunding valve experiments, may be helpful in anticipating the end of attenuation. Temp is also great but density is the most desired.

I really appreciate your thoughtful response, and the others you've had on the forum. I am intrigued by the ESP8266 suggestion and will do more research into what it would involve. I balance work and grad school and I simply don't have time to learn code and read a board. I have a breather this weekend so I will look into it and see if it is within my sphere of possibility in the time frame I need it.
 
I am working with new (for me) yeast that ferment differently from sacch. Torulaspora, brett, pichia, and a handful of lactic acid bacteria. If I'm lucky, I may also be working with sacch. c. hybrids if I can develop a method to get the little buggers to form spores. At this point I want to track as many variables as possible. Contribution of organic acids might correlate with a drop in pH. Seeing how well yeast handle fermentation at 1 atm and under varying pressures with spunding valves is another area worth exploring. Attaching a pressure sensor, especially for the spunding valve experiments, may be helpful in anticipating the end of attenuation. Temp is also great but density is the most desired.

Huh - So you're specifically interested in syncing pressure data to the BrewPi temperature data then I take it? I mean, it would be a hack, but there ARE ways that could be done in a similar fashion to the way the Brewometer data was integrated (have brewpi-script integrate with the sensor & store the data alongside the temperature data)

Alternatively, you could log it using a separate tool and just marry the two data sets together elsewhere.

The one word of caution I will provide when it comes to pressure sensors, however, is that not all pressure sensors are capable of remaining under pressure (and accurately reporting said pressure) for long stretches of time. I tried to build a specific gravity sensor using a differential pressure sensor last year and found that when I had two tubes submerged in water they would both fill up to the water line, as if they weren't sealed on the end. While it's certainly possible that I had a leak in the seal between my tubing & the sensor itself, for the sake of argument I'll claim my work was perfect and it was a defect in the sensor itself. Point is - test the hardware before you go crazy on the software-side of things.


I really appreciate your thoughtful response, and the others you've had on the forum. I am intrigued by the ESP8266 suggestion and will do more research into what it would involve. I balance work and grad school and I simply don't have time to learn code and read a board. I have a breather this weekend so I will look into it and see if it is within my sphere of possibility in the time frame I need it.

I'm obviously partial to the ESP8266, but every implementation has trade-offs. With the ESP8266 you're trading the rotary encoder and 600+ pages of helpful forum posts in exchange for WiFi support and a slightly simpler implementation. Personally I think the trade off is worth it but I also have an Arduino and a Spark sitting about five feet away that eventually I plan to use with BrewPi. It's all about finding the right tool for your scenario, as you noted.
 

Exactly like that. This is using the ECP8266 from what I've found, correct? A blog post I found about this program seems like a good solution option for brew process history. Thanks.
 
Huh - So you're specifically interested in syncing pressure data to the BrewPi temperature data then I take it? I mean, it would be a hack, but there ARE ways that could be done in a similar fashion to the way the Brewometer data was integrated (have brewpi-script integrate with the sensor & store the data alongside the temperature data)

Alternatively, you could log it using a separate tool and just marry the two data sets together elsewhere.

The one word of caution I will provide when it comes to pressure sensors, however, is that not all pressure sensors are capable of remaining under pressure (and accurately reporting said pressure) for long stretches of time. I tried to build a specific gravity sensor using a differential pressure sensor last year and found that when I had two tubes submerged in water they would both fill up to the water line, as if they weren't sealed on the end.

Very cool, I will look into your project this weekend. So perhaps I could place a small valve in-line and record the current pressure manually and then close the line and relieve the pressure from the sensor.

As for the two roads to choose for data collection, I will continue to educate myself and see what works best.
 
Exactly like that. This is using the ECP8266 from what I've found, correct? A blog post I found about this program seems like a good solution option for brew process history. Thanks.

Yep - the ESP8266. I may be mistaken, but I'm pretty sure that blog post was written by our very own @pocketmon . Great thing about the ESP8266 devices is that they're dirt cheap. That one is genuine WeMos, but you can find clones for <$4 as well if you were so inclined. There are similar options on Amazon as well -- though admittedly not quite as inexpensive.
 
Last edited by a moderator:
For anyone who is wondering or having this issue. I used to have it setup with the mechanical relays sanismart like in the diagram. I switched to two separate SSR's as i was having interference on my graph from the mechanical and now it is gone and works perfect.

ARDUINO.gif


ARDUINO SSR.jpg
 
Begg to differ, Thorrak`s solution got me up and running on first try.
Arduino with all the clones and hassel bacause of this is not straight forward
anymore either. A little fine tuning on the articles for Thorrak solution, and I would say that is the easiest one by a long shot.
You can beg to differ, but you do so by ignoring the reasoning I gave. My reasoning was not solely based on the relative ease but the number of people who exist with firsthand knowledge of implementation who are willing to help.

I have a small vested interest in people thinking Thorrak's solution is easier and well documented, but that does not change the fact that far more people are here helping with the Arduino version than are helping with the Thorrakian (I've given it a name) version.

Remember also that the "true" Arduino code has been tested for probably hundreds of thousands of hours under all manner of conditions. I think Thorrak would agree his is not so thoroughly tested. This will likely always be the case.

Which one do I use? Both.
 
For anyone who is wondering or having this issue. I used to have it setup with the mechanical relays sanismart like in the diagram. I switched to two separate SSR's as i was having interference on my graph from the mechanical and now it is gone and works perfect.
It's a shame that the Sainsmart SSR board is not capable of the loads needed (they are limited to 2A). It would sure be a nice compact solution to it.
 
Yep - the ESP8266. I may be mistaken, but I'm pretty sure that blog post was written by our very own @pocketmon . Great thing about the ESP8266 devices is that they're dirt cheap. That one is genuine WeMos, but you can find clones for <$4 as well if you were so inclined. There are similar options on Amazon as well -- though admittedly not quite as inexpensive.

Yes. That's my page. I'll provide more information in a new thread when it's ready. Let's back to the topic of this thread. Thanks.
 
Last edited by a moderator:
For anyone who is wondering or having this issue. I used to have it setup with the mechanical relays sanismart like in the diagram. I switched to two separate SSR's as i was having interference on my graph from the mechanical and now it is gone and works perfect.

I've been having this issue and have studied about it. Although switching to SSRs is a solution, the SSR is larger( you might need heat sink) and more expensive.

Using spark killer might be another solution.

A software solution is to re-initialize the display periodically or when it is 'waken' up. I learn this solution in the forum, but I haven't tried because I can live with it.
 
Here is a zoomed in shot of when the problem started. I really don't understand what is going on. The display will say something like "waiting to cool for x minutes" then instead of actually cooling, a few seconds later say "idling for x seconds" or "waiting to cool" again.



I've also noticed I get "null" values quite often when in the "device configuration" tab and hitting "refresh devices" with the "read values" box selected. I'll click refresh it and it'll show temps, click it again and one or both will show "null". Click refresh again it they both read a temperature.

Also, is it normal for the display to show "--.-" for temps every 10 to 20 seconds?

I'm starting to think my temp probe wiring has a bad connection. It's too late to look at it tonight but it may be worth looking at.

I ended up doing some re-wiring and now all is well...we'll almost. I'm not sure if I'm keeping or dumping the Left Hand Milk Stout Clone. I tried a sample and it doesn't taste horrible but it doesn't really taste like it supposed to. Also, for some reason the color is off. It looks more like a porter than a stout.

I'm not sure if the guy at the brew shop messed up on my grain bill or the 80F fermentation temps had something to do with it. I'll give it time and see what happens before I feed it to the driveway.
 
I tried to build a specific gravity sensor using a differential pressure sensor last year and found that when I had two tubes submerged in water they would both fill up to the water line, as if they weren't sealed on the end. While it's certainly possible that I had a leak in the seal between my tubing & the sensor itself, for the sake of argument I'll claim my work was perfect and it was a defect in the sensor itself. Point is - test the hardware before you go crazy on the software-side of things.
I just found an interesting application of an electronic gravity tester:

http://www.instructables.com/id/Inline-Digital-Hydrometer/

The same basic idea, slightly different application. It might be interesting to use this while brewing; while sparging for instance, or during the boil.
 
@Prymal - Just used your password writeup. Worked perfectly. Thanks so much.
 
The last few days, I noticed something odd about my web display. Both the Refresh Chart & Help buttons were blank w/o the inside symbols, and the radio buttons wouldn't work. However, I could refresh the page to update the display, so I didn't worry about it. Then last night I wanted to modify my profile, only to realize that the bottom half of the screen with the temperature profile was missing. I refreshed several times to no avail, and then cycled the power on the RPi.

It wouldn't connect, but finally did after a 2nd or 3rd power cycle. However, when I finally got a display, it indicated "Script not running". Similar to the lack of responsiveness of the previous radio buttons, there was no response when clicking the Script Not Running button. I refreshed the page a few times, and then it would no longer connect. I have cycled power at least once more, and now I can no longer to get it to connect. All attempts to connect are wirelessly using the Edimax USB plugged into my my Pi B+. I have occasionally had connection problems, but have always reconnected fine after a single power cycle, always leaving the power off 15-30 seconds; Arduino is powered via the USB from the Pi.

Any insights or typical routine to recover? Fortunately, I'm just dry-hopping , so I'm controlling temp with the STC-1000 in my freezer.
 
The last few days, I noticed something odd about my web display. Both the Refresh Chart & Help buttons were blank w/o the inside symbols, and the radio buttons wouldn't work. However, I could refresh the page to update the display, so I didn't worry about it. Then last night I wanted to modify my profile, only to realize that the bottom half of the screen with the temperature profile was missing. I refreshed several times to no avail, and then cycled the power on the RPi.

It wouldn't connect, but finally did after a 2nd or 3rd power cycle. However, when I finally got a display, it indicated "Script not running". Similar to the lack of responsiveness of the previous radio buttons, there was no response when clicking the Script Not Running button. I refreshed the page a few times, and then it would no longer connect. I have cycled power at least once more, and now I can no longer to get it to connect. All attempts to connect are wirelessly using the Edimax USB plugged into my my Pi B+. I have occasionally had connection problems, but have always reconnected fine after a single power cycle, always leaving the power off 15-30 seconds; Arduino is powered via the USB from the Pi.

Any insights or typical routine to recover? Fortunately, I'm just dry-hopping , so I'm controlling temp with the STC-1000 in my freezer.

Hmm - sounds like there's a number of things potentially going on here.

The icons thing is strange - but would point to some kind of filesystem corruption. The icons themselves are stored in brewpi-www/css/redmond/images/ within the various ui-icons files. If the files are deleted, get corrupted, etc. then the images won't load.

Similarly - and admittedly this is just speculation - if the radio buttons are controlled by javascript and the .js files are corrupt, that would explain why they aren't working either.

The "Script Not Running" button doesn't really do much in BrewPi -- All it does is make sure that the file that would prevent brewpi-script from launching doesn't exist. You are still relying on the crontab entries to relaunch brewpi-script. Again -- If you have filesystem corruption, that would explain why brewpi-script would fail to launch as it's possible that the script, other files it relies upon, the python interpereter, or crontab itself could all be corrupt.


Honestly, from the sound of it, your best bet is to reformat & reinstall from scratch. Your Arduino is probably fine, but I would replace the SD card if you can.
 
I agree with both Thorrak and Day_trippr regarding the SD card. And because it must be asked, what is you power cycle procedure? Are you doing a proper shutdown, or just pulling the power on the pi?
 
I agree with both Thorrak and Day_trippr regarding the SD card. And because it must be asked, what is you power cycle procedure? Are you doing a proper shutdown, or just pulling the power on the pi?
just pulling the power. What's the proper shutdown procedure, and where is this defined?
 
just pulling the power. What's the proper shutdown procedure, and where is this defined?


If you google RPI shutdown you'll find the code but Sudo shutdown -h now works.

Think of the RPI as like your computer you wouldn't just yank the power cable you'd turn it off using the shutdown procedure.

You can do this either through the GUI interface or using a command mentioned earlier over SSH.
 
Within the software in the "about" section there is a "shutdown" button next to the "donate" button... I encourage you to use both buttons.
 
just pulling the power. What's the proper shutdown procedure, and where is this defined?

I use Sudo shutdown now, but day_trippr knows more than me. So do what he says. Pulling the power is like playing Russian Roulette with the SD card. You're only going to get lucky for so long.

Within the software in the "about" section there is a "shutdown" button next to the "donate" button... I encourage you to use both buttons.

I believe you are thinking of CraftBeerPi, I don't know of any such thing in BrewPi. If I'm wrong please show me where it is.
 
just pulling the power. What's the proper shutdown procedure, and where is this defined?
Now that the proper procedure is covered, we should cover the rest. Some of the issues you are having may be due to a corrupt SD card caused by the power cycles.

You could try resetting the WWW directory after checking the card:

Code:
sudo touch /forcefsck
sudo reboot

Then, if you are on Jessie, something like:

Code:
cd /var/www/html
git reset --hard origin/legacy
sudo /home/brewpi/utils/fixPermissions.sh

If you are on Wheezy, change the cd command to /var/html

If this does not work, you may be looking at re-imaging the card and starting over. I've posted some easy to follow instructions here:


The way you describe it, the files which are at fault are the web files. If the files themselves are corrupt, resetting via the GIT command may be all you need. It's possible the actual file structure of your card is bad though and there's not much you can do other than re-image the card.
 
Out of curiousity, is there any interest in having a cheap, wireless thermometer that could be submerged in your beer and would serve as a beer sensor for BrewPi?

Basically, for those people who don't/can't have a thermowell actually going into the beer itself.
 
Out of curiousity, is there any interest in having a cheap, wireless thermometer that could be submerged in your beer and would serve as a beer sensor for BrewPi?

Basically, for those people who don't/can't have a thermowell actually going into the beer itself.


Yep that sounds like something I'd use, planning to try a brew under pressure in the next month or so, so something like that would come in handy if I did any more
 
Out of curiousity, is there any interest in having a cheap, wireless thermometer that could be submerged in your beer and would serve as a beer sensor for BrewPi?

Basically, for those people who don't/can't have a thermowell actually going into the beer itself.
I would use it in my cooler mash tun
 

Added that to my Amazon wish list, that thing is ****ing sick.

Its products like this that make me love kickstarter.

It looks so good, and they really thought of everything. Measures internal temps and external temps with 1 probe? This thing will make smoking with my Kamado way easier than dealing with my bull**** weber 2 probe thing that needs to be re-sync'd all the god damn time.

Wifi and bluetooth? The "Meater block" acts as a wifi extender?

They seriously thought of everything.
 
Don't forget that pioneers catch the arrows. The survivability of that probe will be a huge challenge.
The Tilt thing still doesn't look solid enough to bother with - and it's in a lot less hostile environment than the inside of a ceramic grill.

As for the question: I see no advantage using thermowells in fermentors over a properly coupled and insulated external probe, so a floating wireless thermometer doesn't interest me...

Cheers!
 
Day got it right again… even though there are very few cases where you can't place a thermowell in the beer. it's perfectly acceptable to just strap it to the side. the temps inside and out are rarely that far off from one another. plus anything you put in the liquid is a potential source of infection. the only reason I have to use a thermowell is because I use heatwrap on my fermenters. if I were doing like a starter and for whatever reason that vessel couldn't have a thermowell in it id be using a chamber setup anyway. although that thing does look pretty slick
 
I would use it to measure my mash tempt.I mash in a Rubbermaid cooler and as it is now the lid cant close completely because of the probe wire.
 

Holy crap, that thing looks awesome! Not quite what I would want for a fermenter (48 hour battery life, boo) but perfect for cooking with (Holy crap, a 48 hour battery life!).

Added that to my Amazon wish list, that thing is ****ing sick.

Its products like this that make me love kickstarter.

It looks so good, and they really thought of everything. Measures internal temps and external temps with 1 probe? This thing will make smoking with my Kamado way easier than dealing with my bull**** weber 2 probe thing that needs to be re-sync'd all the god damn time.

Wifi and bluetooth? The "Meater block" acts as a wifi extender?

They seriously thought of everything.

Seriously! My only concern is that it appears to be one of those kickstarters that is running a year behind schedule at the moment despite collecting ~$4MM from Kickstarter/Indiegogo. As soon as they get probes in the hands of backers, I'll be in the market for one.
 
Can anyone help me to some resources on how to delete old brew files from my brewpi I built? Where are they stored, commands, etc? I use putty to control it. thank you guys!
 
Data files are kept in /var/www/brewpi/data or /var/www/html/brewpi/data depending on your installation.
Each run will be in a unique folder, so you can blow the folders away that you don't want to keep...

Cheers!
 
Data files are kept in /var/www/brewpi/data or /var/www/html/brewpi/data depending on your installation.
Each run will be in a unique folder, so you can blow the folders away that you don't want to keep...

Cheers!

Thank you for the info! Now once I find the folder What is the command to view the folders in the data folder? Is it "ls" or something similar? Then the command to delete the unique brew folders once I view them? Is it "rm"? So if I delete all the folders in the data folder that is what deletes the different brews I have data for?
 
'ls' will list the files and folders in the folder of current focus.
'ls <path>' will list the contents of the folder at the end of the path

'rm -r <folder name>' will remove the target folder and everything in it recursively.
If the user you're logged in as doesn't have the privs, elevate the rights by using
'sudo rm -r <folder name>'

Don't wipe out the root folder /var/www/brewpi/data or wherever your logs are stored, just delete the individual run folders.

And look into WinSCP.
It's the bomb for remote file management .
I use it exclusively across my RPi fleet, as I can open simultaneous sessions to multiple machines if I have something I want to distribute from my development system to the rest.
It's much easier to paw around your SD card than using CLI stuff...

Cheers!
 
'ls' will list the files and folders in the folder of current focus.
'ls <path>' will list the contents of the folder at the end of the path

'rm -r <folder name>' will remove the target folder and everything in it recursively.
If the user you're logged in as doesn't have the privs, elevate the rights by using
'sudo rm -r <folder name>'

Don't wipe out the root folder /var/www/brewpi/data or wherever your logs are stored, just delete the individual run folders.

And look into WinSCP.
It's the bomb for remote file management .
I use it exclusively across my RPi fleet, as I can open simultaneous sessions to multiple machines if I have something I want to distribute from my development system to the rest.
It's much easier to paw around your SD card than using CLI stuff...

Cheers!

Thank you for the file transfer program. I will look into that. It looks much easier to work on that! for now....
I was able to navigate to the data folder and view my brews. When trying to delete the brew folders it asks me to confirm a bunch of write protected Json files. Do I just confirm through all of these to delete the folder? They all have a date associated with them it looks like.
 
I ended up doing some re-wiring and now all is well...we'll almost. I'm not sure if I'm keeping or dumping the Left Hand Milk Stout Clone. I tried a sample and it doesn't taste horrible but it doesn't really taste like it supposed to. Also, for some reason the color is off. It looks more like a porter than a stout.

I'm not sure if the guy at the brew shop messed up on my grain bill or the 80F fermentation temps had something to do with it. I'll give it time and see what happens before I feed it to the driveway.

So this was short lived. Things seemed to be working fine for a few days and then it went nuts again so I stopped using it.

I decided to try replacing the uno as well as the DS18B20's last night. I also installed Jessie and brewpi on a known working SD card. Everything ran fine without any problems while on my bench with nothing connected to the relays.

I hooked it up to the cooler today and now I'm getting errors again. The logs indicate a temp sensor being disconnected but I can assure you they are connected.

I am wondering if I am getting some sort of electrical noise in my DS18B20 wiring. I have 2 sensors that run through the bottom of the cooler all the way to the top of the cooler along with the rest of the wiring for the evaporation fan and florescent light. I may try moving the wiring for the sensors tomorrow to see if that helps. Other than that I am out of ideas.

View attachment 1482810736858.jpg

View attachment 1482810752267.jpg
 
Status
Not open for further replies.
Back
Top