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.
Try powering down both the pi and arduino. maybe a bug got in there. it could be the pis system freezing up from memory holes. are you running a new brew every time you start a fermentation or are you just editing the currently running brew. because the data can start to fill up the memory and cause the system to hang.
 
I do start a new brew each time, yes.

The arduino hasn't been powered down for quite some time, so that is worth a go. I should add though that as best as I can tell the arduino has continued to control temperature even during the logging downtime that has occurred. Still, I'll give everything a hard reset later today and see if that improves anything.
 
Have you cleared the logs of previous brews? the PI may be running low on disk space.
 
It sorta looks like the temp profile was ramping up there on the 21st, and when you hit the 22md it stopped changing. Would you have expected it to continue over midnight? If so it screams something's up on the Pi side of the house, since the Arduino is just receiving new setpoints. If the Arduino was not receiving them there would be errors.

How long would it have been logging at that point?

That's my non-expert opinion anyway.
 
Have you cleared the logs of previous brews? the PI may be running low on disk space.

I've not cleared them, but I've only used 10% of the card.

It sorta looks like the temp profile was ramping up there on the 21st, and when you hit the 22md it stopped changing. Would you have expected it to continue over midnight? If so it screams something's up on the Pi side of the house, since the Arduino is just receiving new setpoints. If the Arduino was not receiving them there would be errors.

How long would it have been logging at that point?

That's my non-expert opinion anyway.

Yeah, that's my thinking exactly. It was ramping up to 18 when it failed, and the temperature was being held at 16.3 by the arduino when I found that there was an issue. When I restarted the pi, the arduino instantly updated the target beer temp to 18. So, it definitely seems to be something with the script on the pi, but I have no idea how to further debug since there is nothing in the logs.
 
I have a BrewPi and a CraftbeerPi ready to go into a box, I had RaspberryPis so I'm going to use them rather than let them gather dust, and I have started to think about network access.

The control box with the RPis will be in my garage a distance from the router but my Nexus7 can still connect to the router from there and works normally.

My options seem to be :-


  1. used a dongle on each Pi
  2. cable them to an old wireless router and connect via that to my LANs router.

1, is much more costly and can you recommend a dongle with a good range?
2, is essentially cost free but isn't as neat.

I'd appreciate your thoughts on the best way forward.


Many Thanks. aamcle
 
I use Edimax wifi-n dongles on all of my Wifi RPi's. They work well and have quite good range ime.

Out of interest, why are you integrating BrewPi and CraftBeerPi in a single enclosure when they serve such disparate functions?

Cheers!
 
Last edited by a moderator:
I have a BrewPi and a CraftbeerPi ready to go into a box, I had RaspberryPis so I'm going to use them rather than let them gather dust, and I have started to think about network access.

The control box with the RPis will be in my garage a distance from the router but my Nexus7 can still connect to the router from there and works normally.

My options seem to be :-


  1. used a dongle on each Pi
  2. cable them to an old wireless router and connect via that to my LANs router.

1, is much more costly and can you recommend a dongle with a good range?
2, is essentially cost free but isn't as neat.

I'd appreciate your thoughts on the best way forward.


Many Thanks. aamcle


What I would do is put the RPis on a cable right next to your LAN router and get an ESP8226 board and make the arduino talk to the RPi over wifi.

For me (in Australia) the ESP boards come in slightly cheaper than a wifi dongle. I got a D1 clone from China and some ebay sellers get it shipped and to me within 2 weeks, sometimes sooner. The D1 (not the mini) literally has 4 wires attached from the Arduino 5V --> VIn Gnd -->Gnd and Rx --> Tx; Tx -->Rx.

I have documented my software install in the How to Wifi thread.
 
day_tripper.

I'm planning on one box because because the kettle and fridge are quite close together, it for convenience really.

Aamcle
 
Hey guys!
So I'm having an issue that both outlets have power when turned on. I borke off the metal tab on the hot side, but is there any other reason why it's still providing power to both outlets?
 
So what have I done wrong now? I am trying to get multiple chambers set up. I followed that wiki to the letter. (I think). I get to this part:
Open a browser window on your PC which is connected to the same network as your Pi and type in the Pi's IP address into the navigation bar.

It should open a folder with each chamber directory as shown in the photo.

Click on the first directory that you wish to access and it will open up the BrewPi web interface.

and I get this response:

apache.jpg
 
The latest version of Apache2 changed the default folder for inbound Web requests from /var/www to /var/www/html. If you rooted your BrewPi instances at /var/www Apache2 won't find them there.

Either move the BrewPi instance folders to /var/www/html, or change the Apache2 config file to move back to /var/www...

Cheers!
 
Couple of questions for @day_trippr or other qualified folks:


  1. Can I use the ICSP header pins for power and ground for the relay?
  2. Can I use 3v3 to power the DS18B20 probe?
  3. Can I use 3v3 for the pullup and 5v0 for the power (or the other way around)?
The reason I ask, and I hesitate to say because sometimes folks will try to solve the wrong problem, is that I am having issues with my connections. The 3D printed box I'd like to use really needs to be a bit larger to use a strip, and the wire nuts are a PIA and too bulky.

If I can power the relay for instance off the ICSP header, that's two less wire connections I need to make. If I can power the probe from 5v0 and the pullup from 3v3 (or vice versa) that's another connection I can skip. I potentially have only one connection to make that's not on a header and I can use an IDC for that (which has been pretty reliable for me.)
ArduinoUno_R3_Pinouts%20%281%29.png

Looks like I can use pin 2 for 5v0 and 6 for GND.
 
Couple of questions for @day_trippr or other qualified folks:

[*]Can I use the ICSP header pins for power and ground for the relay?

Absolutely.

[*]Can I use 3v3 to power the DS18B20 probe?

It'll likely work. The ds18b20 will work at that voltage, and while the Uno expects "5V logic" signal levels, even a 3.3v pull-up will provide a legit input.

[*]Can I use 3v3 for the pullup and 5v0 for the power (or the other way around)?

The ds18b20 is remarkably tolerant of having its data pin pulled above its power pin. Normally that's a no-no.
So you could literally go either way and not violate the chip spec...

Cheers!
 
The ds18b20 is remarkably tolerant of having its data pin pulled above its power pin. Normally that's a no-no.
So you could literally go either way and not violate the chip spec...
Thank you very much sir for confirming my suspicions. It will be much easier to achieve that which I wish to do now.

If I am following you correctly. it may be marginally less wrong to pull up with the 3v3 if I go this way?
 
You could set it up on the bench and test it's okay that way before shoehorning it into your enclosure.
 
[...]If I am following you correctly. it may be marginally less wrong to pull up with the 3v3 if I go this way?

I suppose one could say that, but it really doesn't matter wrt the sensor.
It really comes down to the Uno, and whether communication is reliable...

Cheers!
 
So I reinstalled everything and added the /html to all the instances of /var/www/. I still get the same screen. Except with the multi LCD screen that seems to work just fine. I have had to missed something. What is the best method to fix this?
 
I feel so bad for bothering all of you again. However, I am in over my head and need to do so at least on more time. Thanks to day trippr I am now able to access the web server. When I go to program the arduino this is what I get. I get the same error on both chambers. I included this scren shot because whatever I messed up I did well as it is looking for chamber 1 but I ma accessing chamber 2.

leoNARDO.png
 
Did you actually define /dev/chamber1 and /dev/chamber2?

These are the various files that need to be set to enable multi-instance operation.
The paths relate to my convention, but should be easy to understand.
Note this is from a Wheezy machine running an older Apache2 release so the web root is under /var/www instead of /var/www/html.

/home/brewpi/brewpi1/settings/config.cfg

scriptPath = /home/brewpi/brewpi1/
wwwPath = /var/www/brewpi1/
port = /dev/brewpi1


Note: the BrewPi port (eg: /dev/brewpi1 above) can be defined in multiple ways.
If using USB device serial numbers with Symlinks, the port is defined in udev rules (below).
Otoh, if using a Bluetooth bridge a /dev/rfcomm(n) will be created using the Bluetooth SSP support.
Or, if connected using a Wifi bridge ala esp8266, you'll use the actual ip socket address.

/var/www/brewpi1/config_user.php

$scriptPath = '/home/brewpi/brewpi1';

/var/www/brewpi1/index.php

<title>BrewPi1 reporting for duty!</title>


Change the rules file:

This assumes both instances have Unos connected via USB.

$ sudo nano /etc/udev/rules.d/99-arduino.rules

SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="85336303532351F0A031", SYMLINK+="brewpi1", GROUP="brewpi"
SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="754373038303510BF870", SYMLINK+="brewpi2", GROUP="brewpi"


Reload the udev rules:

$ sudo /etc/init.d/udev reload

Set up cron job to start the script for BrewPi1:

$ sudo nano /etc/cron.d/brewpi1

PYTHON=/usr/bin/python
SCRIPTPATH=/home/brewpi/brewpi1
MAILTO=""
* * * * * brewpi $PYTHON $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg --checkstartuponly --dontrunfile; [ $? != 0 ] && $PYTHON -u $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg 1>$SCRIPTPATH/logs/stdout.txt 2>>$SCRIPTPATH/logs/stderr.txt &

Restart CRON:

$ sudo /etc/init.d/cron restart


Hopefully this give you some idea of what to fix...

Cheers!
 
I suppose one could say that, but it really doesn't matter wrt the sensor.
It really comes down to the Uno, and whether communication is reliable...

Cheers!
Well, I was actually able to achieve my goal just using power off the ICSP for the relay. That way I only had a max of three wires to join in which case the network IDC worked swimmingly.
2848842

I know there is a size of wire nut smaller than the blue, I just can't seem to find it anywhere. Still, the IDC should be more reliable in the long run.

I'm done with my basic pi now, it's in the 3D printed box and running. No display, just the Arduino and relay with an outlet. I'm going to turn my attention to the ESP8266 now and see what I can come up with. I should also have a couple shields here soon to mess with .... ah, possibilities!
 
day trippr,

You are a wonderful resource and a great help. Everything is now up and running. I am so grateful and excited. I owe you many thanks for all of the help you have provided me personally. That isn't even counting the contributions to the community and others.

Thank-you again

Cheers
 
Ok, now you're just embarrassing me :)

I'm pleased you're up and running, and thanks very much for the kind words, they are appreciated.

Have fun with your new system!

Cheers! :mug:

[edit] Now would be a fine time to create a full bootable backup of your SD card :)
 
Sorry my hopes and dreams were premature. I just shutdown the pi, correctly even, and put all the components into an enclosure. I can't get t he script to run. There is no data to display. It is like the arduinos don't exist. SO I tried to reprogram them. Then the error comes back! All the miss naming errors that I had before were corrected and are still correct. To be even more confusing it happened after I was able to assign the temp probes on chamber 2. Now I am even more confused and lost. The
 
So I figured it out mostly. I have more questions. I went back to the only thing that I did different. I plugged a power supply into each arduino when I placed them in the enclosure. When I unplugged that everything was restored to normal. Why did that happen? Now I have 2 temp probe and a 2 channel switch on chamber 1. The device manager only sees one temp probe. Where do I need to go first to trouble shoot this?
 
I currently have a Brewpi running and just got a second fermentation chamber. Can I follow the "Multiple fermentation chamber control with Brewpi" wikia and add on to my current setup or do I need to reset the pi and start from scratch?
 
Brewpi arduino power supply?

If I power the raspberypi via its micro USB port and the Arduino from the pi and the relays from the Arduino will I have enough power to go around?

Should I power the Arduino as well as the pi?


Atb.
Aamcle
 
So I figured it out mostly. I have more questions. I went back to the only thing that I did different. I plugged a power supply into each arduino when I placed them in the enclosure. When I unplugged that everything was restored to normal. Why did that happen? Now I have 2 temp probe and a 2 channel switch on chamber 1. The device manager only sees one temp probe. Where do I need to go first to trouble shoot this?

No idea why that would happen unless the RPi was running while you were plugging power cables.

As for the probe configuration, any chance you mixed them between the two Arduinos?

In any case, using the Device Configuration panel to remove all the devices from the Configured list, rebooting everything, then re-reading all the devices and configuring them again, usually sorts things out.

When I was outfitting my fleet of BrewPi "minions" I occasionally ran into some tail-chasing with the probe configuration that only removing them and starting over would solve...

Cheers!
 
I realized I forgot the mandatory "done" picture. Here's my setup. No heater installed (yet) as it's quite warm in the garage and I need to figure out a way to hang the paint pail from the top of the chamber so there's room for everything. Thanks to everyone who helped!

IMG_5398.jpg
 
Just wanted to thank everyone for contributing to this epic thread. I only read the first few pages, but it sounded like what I needed after my Brewbit temperature controller became unreliable. I already had a Raspberry Pi 3 and some probes hanging around, so I ordered an Arduino and got everything working under Jessie on a breadboard. I just had a change of heart about the relay board and ordered a couple of cheap SSRs, so I'll wait before finalizing everything in an enclosure. That reminds me - are there any project boxes or Home Depot enclosures that you guys would recommend?

I like listening to music while I'm brewing in the garage, so my Pi was originally used to emulate an Apple AirPlay device so that I could stream music from my iPhone. I hate the sound quality and poor range of Bluetooth audio, so a Pi with a cheap USB audio adapter (the built-in sound capability is noisy and pretty much worthless) and a small powered speaker suited my needs. I installed the BrewPi stuff alongside the Airplay stuff, so I should be able to use it simultaneously for both purposes. Then I'll work on getting BrewPi to work with my Brewometer/Tilt Bluetooth gravity/temperature monitor.
 
I currently have a Brewpi running and just got a second fermentation chamber. Can I follow the "Multiple fermentation chamber control with Brewpi" wikia and add on to my current setup or do I need to reset the pi and start from scratch?

You never have to start over just to add another instance.
You could add an instance by using the BrewPi installer and just point to the new folders as it goes along.
Or you can clone your existing instance, then edit the necessary files (which I just pointed out a few posts back).

The latter is what I've always done as it's so quick and easy...

Cheers!
 
Status
Not open for further replies.
Back
Top