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.
Check that the inverted controls are correct.

You have both actors inverted in the Device manager settings. That would be proper for a typical, relay-board configuration, but it isn't clear what the actors in this case actually are...

Cheers!
 
Assuming you have color-coding on the pins @ the Arduino and all of the terminals to the high-voltage power, some of those pics (taken so we can see the connections) may help us help you figure it out.

Other than that, you just have to go step by step in the chain, testing and checking. The firmware is pretty well-baked, but if you wanted to test things starting there, get a red and blue LED (for heat and cool of course!), and a 150-200 Ohm resistor and wire it up like so:
1-HeatCoolTest.jpg

Then you can force heat or cool on by using fridge constant, one sensor, and moving the set-point way above or below the ambient. Once you prove to yourself that works, move out from there.

Also, since you are using SSR, you want to be sure your wiring is correct for that. You'll want 5V to the SSR, then the other pole to D5 or D6 AFAIK.

If you can't get good pics, a drawn diagram of your wiring would help.

ETA: And of course @day_trippr beat me to the punch on the SSR question. :)
 
Last edited:
I will take some better pictures of my wiring tonight when I get home. Thanks guys
 
OK so I'm missing the 5v wire from fuzze's diagram going to my SSR's. I have the negative side of the SSR's connected to the ground pin and I have pins 5&6 connected to the positive side of the SSR's.

The more I think about it the 5v pin should be connected to the positive side of SSR and pin 5 or 6 should be connected to the negative side.

Is that correct?
 
I think that is incorrect. When pin 5&6 call for heating and cooling, it will provide 5v to the SSR. Hook up ground and 5 or 6 to each SSR.

Fuzzee's diagram includes the 5v because the relay board needs power.

I believe the problem is that you have them as inverted when they should be non-inverted. Change that setting and give it a try.
 
Last edited:
This is the same as my wiring but pin 5 goes to the SSR that controls the fridge.
Capture%2B_2019-04-09-14-10-00~2.jpg
 
I think that is incorrect. When pin 5&6 call for heating and cooling, it will provide 5v to the SSR. Hook up ground and 5 or 6 to each SSR.

Fuzzee's diagram includes the 5v because the relay board needs power.

I believe the problem is that you have them as inverted when they should be non-inverted. Change that setting and give it a try.
Thank you I will try that.
 
With a relay, when the pin is set to "inverted", pins 5 & 6 can be thought of as "switched grounds" (although I am sure @day_trippr would take exception to my armchair electronics.) True, the relay boards need 5v to operate, however you should still be able to use the pins inverted by supplying the SSR's with 5v+ and the negative side to 5 or 6. I think. :) But, one way or the other that wiring is wrong. You have a ground and a ground basically when the pin is inverted. What's odd is how your fridge was coming on at all.

ETA: Found the reference:
They (the digital pins) can provide a substantial amount of current to other >circuits. Atmega pins can source (provide positive current) or sink (provide >negative current) up to 40 mA (milliamps) of current to other devices/circuits.

Where do the other leads go coming off the low side of the SSRs? Not sure I've seen that diagram.

And, only mildly related - does anyone have a source for the DS18B20 probe and/or an SSR for Fritzing?
 
I switched them to not inverted and it appears to be running properly. I will run a fermentation schedule this week just to make sure, then it will be time to brew... [emoji482]

Thank you everyone and thank you Lee for BrewPi legacy remix.
Capture%2B_2019-04-10-06-18-04.jpg
 
Love happy endings :D
Not so fast... [emoji6]

I have a new problem now. I came home this evening and I can't access the web interface or SSH my Brewpi. It is still maintaining temperature and everything just no access.

I checked my routers device table and the Brewpi is no longer on our network. All can do is unplug it and hope for the best.

Any ideas?
 
Is your RPi totally headless or could you plug a monitor and wireless mini-KB/mouse in it and do a normal shutdown -R?
Pulling the plug on a running RPi is harsh on SD cards. Might work, might corrupt the card...

Cheers!
 
Is your RPi totally headless or could you plug a monitor and wireless mini-KB/mouse in it and do a normal shutdown -R?
Pulling the plug on a running RPi is harsh on SD cards. Might work, might corrupt the card...

Cheers!
I did hook up a monitor and keyboard but there was no picture or no response from entering the shutdown command.

So I pulled the plug and fired it back up... Everything is working properly now, but what would cause this and how can I prevent it?

Thanks
 
I did hook up a monitor and keyboard but there was no picture or no response from entering the shutdown command.

So I pulled the plug and fired it back up... Everything is working properly now, but what would cause this and how can I prevent it?

Thanks
Are your RPI and Uno r3 powered separately? Maybe voltage drop off when the fridge compressor kicks on and messes with the RPI. Now might be a good time to back up the SD card.
 
Wireless and Raspberry Pi have had a long history of tearful outcomes.

I do have an updated WiFi checker that does a little better job of keeping things running. It’s in the dev branch now but I have a stand-alone too. I’ll post a link here in a bit.

Why updated? Well because “they” messed with commands again of course.
 
Okay I have the github here.

You can just go ahead and install it with the command:
Code:
curl -L wifi.brewpiremix.com | sudo bash
(I should have remembered that.)

It should give you an option to overwrite your existing daemon unit file.

The downside to installing this before I release 0.5.2.1 (which has this same logic) is that the version checking for the WiFi checker in the BrewPi installer will break. I believe that would result in the BrewPi installer always thinking this stand-alone version is "higher" so the default would always be to not overwrite. You could choose to do so of course, and then version checking would again work properly.
 
Hey all. Gonna cross-post this to the Brewometer/Tilt Mega-Thread as well as the BrewPi Mega-Thread:

I need your help.

I've been working on support for Tilt in the main branch of BrewPi Remix. While trying to incorporate battery level by sniffing around some old posts on the subject, I finally threw up my hands and asked them for help from the owners/creators of Tilt. Here's what I learned:
We don't have a voltage divider/voltmeter on the board, so it's not possible to get battery voltage even if you could connect (it's not a bluetooth "connectable" device). Anything read online regarding connecting was in regards to the original "Lightblue Bean" board which could be connected to and battery voltage read as you mentioned. The battery only lasted 3 months maximum of constant use. The custom board we have now lasts easily 12 months, probably 24 of steady use.

It's possible we will add a battery level feature in the future versions, however for now the best way to get the battery state remotely is to read the "measured RSSI" bit in the iBeacon packet. This value has been changed to represent "weeks since last battery change" for numbers below 153 (153-255 and above are reserved for other alerts, like for a future indicator for "battery low" state). So when the battery is first installed it will read "0" and at the end of a year it will read "52", this is conservatively when we recommend changing it.
I found this exceedingly interesting, and obviously I'll incorporate this in the version I release with Tilt support. I guess I also didn't realize that they had completely switched boards to a purpose-built device, but obviously thrilled that they get that kind of battery life out of the new boards.

(This also explains why after literally HOURS of screwing around, I was unable to use gatttool to get the battery level. Sigh.)

What I am not sure of is when they made this switch, or more importantly; How many people have which version. To that end I'm putting out an ask to my brethren (and sisteren?) here for some help. I'm looking for a person who has one of the early ones with the Lightblue Bean to either very helpfully let me borrow their Tilt, or at least find someone who can run a script or ten for me and send back the results to help gather the information I need to incorporate support for both.

So, any takers?

Also: If you want to discuss the Tilt itself, please respond to the Tilt thread. If you want to talk about BrewPi (Remix) and support for Tilt, please respond to the BrewPi thread. If you are able to help me out, please drop me a PM directly.

Thanks!
 
First of all, Thorrak reached out to help on the Tilt thing so thank you @Thorrak!

Next, I wanted to "put out to the Internet folks" my plans for:
  1. Providing a tool to back up BrewPi Legacy or Remix data
  2. Using that tool to facilitate migration to the currently supported Arduino fork/branch
To that end, I've been trying to determine what to back up. Obviously there's no way to figure out what people may have messed with. If they mess with something that was not designed to be messed with, they should know how to back up their own system. Here's my list of "stuff" I do think is important and would allow someone to recreate what they had from scratch:

Define (scriptDir) - Default to /home/brewpi
  • (scriptDir)/data/*/, !(scriptDir)/data/Sample Data/
  • (scriptDir)/settings/config.cfg

Define (webDir) - Either /var/www/ or /var/www/html/
  • (webDir)/data/profiles/*.csv, !(webDir)/data/profiles/Sample Profile.csv
  • (webDir)/data/*/ !(webDir)/Sample Data/
  • (webDir)/config_user.php
  • (webDir)/userSettings.json
Am I missing anything?
 
Hi there.
Loving Brewpi Remix!
I've got two chambers chugging away via usb on a Debian laptop and just trying to add one with wifi, across the room.
Testing on a test system. I'm running Debian Stretch on a laptop, and everything works fine with arduino nano plugged into usb, but having trouble with nano attached to Wemos D1 mini ESP board. D1 comes up fine on local network, and normal Brewpi Remix webpage comes up, script starts, but I can't add devices. When I try to refresh devices, the monitor says: Device list updated for null with a null shield. When it's connected via serial, it comes up as Arduino Uno and all's good, temp sensors can be added and work. Any ideas? Thanks
 
I've got two chambers chugging away via usb on a Debian laptop and just trying to add one with wifi, across the room.
Testing on a test system. I'm running Debian Stretch on a laptop, and everything works fine with arduino nano plugged into usb, but having trouble with nano attached to Wemos D1 mini ESP board. D1 comes up fine on local network, and normal Brewpi Remix webpage comes up, script starts, but I can't add devices. When I try to refresh devices, the monitor says: Device list updated for null with a null shield. When it's connected via serial, it comes up as Arduino Uno and all's good, temp sensors can be added and work. Any ideas?
The log would be helpful, might be interesting bits in stderr.txt and/or stdout.txt. What are you using for firmware for the D1? What version of BPR?

There are some improvements I've made for wireless bridges in 0.5.2.0. More changes are in the dev branch which seems ready to release as soon as two external dependencies are sorted out. 0.5.2.0 should be good though.
 
Thanks for the reply, Lee.
Logs show the controller is running 0.2.4! Having troubles flashing 0.2.11 at the moment, but this could be the problem?
BPR is 0.5.2.0
 
I'd have to go back and look, but I thought I left the compatibility at 0.2.4. Anything interesting in the rest of the log? There should be some entries when it trues to get the current version from the controller.

I do have some pretty significant improvements to the updateFirmware script in the Dev branch, but 0.2.4 should be fine for what you are trying to do.

If we can't get you rolling on this version, the Dev branch should be pretty solid.
 
root@brewpi-remix-test:/home/brewpi# git describe --tags $(git rev-list --tags --max-count=1)
0.5.2.0
root@brewpi-remix-test:/home/brewpi# git branch | grep \* | cut -d " " -f2
master
root@brewpi-remix-test:/home/brewpi# git -C . log --oneline -n1
e5eefc9 Change order of functions

And from stdout log in the web page:
2019-05-25 23:30:23 Opening serial port.
2019-05-25 23:30:23 Notification: Script started for beer 'My First Legacy BrewPi Run'
2019-05-25 23:30:38 Checking software version on controller.
2019-05-25 23:30:38 Found BrewPi v0.2.4, running commit 00000000 on port socket://192.168.0.106:23
2019-05-25 23:30:38 Warning: minimum BrewPi version compatible with this script is 0.2.10 but version number received is 0.2.4.
2019-05-25 23:30:38 Warning: version number of local copy of logMessages.h does not match log version number received from controller. Controller version = 3, local copy version = 1.
2019-05-25 23:30:39 {"BeerTemp":null,"BeerSet": 20.00,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 20.00,"FridgeAnn":null,"State":0}
2019-05-25 23:30:40 {"BeerTemp":null,"BeerSet": 20.00,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 20.00,"FridgeAnn":null,"State":0}
2019-05-25 23:31:00 Installed devices received: []
2019-05-25 23:31:00 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Unknown controller or board type
2019-05-25 23:32:40 {"BeerTemp":null,"BeerSet": 20.00,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 20.00,"FridgeAnn":null,"State":0}
2019-05-25 23:34:41 {"BeerTemp":null,"BeerSet": 20.00,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 20.00,"FridgeAnn":null,"State":0}
2019-05-25 23:36:41 {"BeerTemp":null,"BeerSet": 20.00,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 20.00,"FridgeAnn":null,"State":0}
2019-05-26 08:41:24 Notification: New day, creating new JSON file.
 
2019-05-25 23:30:38 Found BrewPi v0.2.4, running commit 00000000 on port socket://192.168.0.106:23
So that's the problem. The script is not picking up the board and shield type (or the chamber either). It should look something like this:
Code:
Found BrewPi v0.2.12 build f51818b, running on an Arduino Uno with an I2C shield on port /dev/chamber1.
If you have the knowledge to be able to get a terminal connection to the Arduino, issuing the "n" command should give you the JSON containing the version strings which the script parses to complete that info. It should look something like this:
Code:
N:{"v":"0.2.12","n":"f51818b","s":5,"y":0,"b":"s","l":"3"}
The best I can tell is it's the version compatibility. If you edit brewpi.py around line 100 and change:
Code:
compatibleHwVersion = "0.2.10"
to
Code:
compatibleHwVersion = "0.2.4"
... I think it may get past that.

The Dev branch should not have this issue. I changed it back to 0.2.4 after verifying there were no incompatible changes.
 
Last edited:
Thanks again, Lee.
I'm a bit out of my depth here...
I've re-installed BPR and got it working on a UNO very easily, flashed with 0.2.11 via serial. (Just to rule out the nano). It then won't perform via esp link and the D1 mini. So I'm going to check the D1 side of things.
 
I've re-installed BPR and got it working on a UNO very easily, flashed with 0.2.11 via serial. (Just to rule out the nano). It then won't perform via esp link and the D1 mini. So I'm going to check the D1 side of things.
If you have the Uno upgraded to 0.2.11 that will get rid of the previous issue.

esp-link has a terminal built in. If you go to the µC Console (best to do this with the script not running) you will see something like this:

Capture.PNG


Change the baud rate to 57,600 and you should be able to communicate with the Uno directly. Issue the "n" command and you will get your version info as shown. If that works then things should be good.
 
Thanks so much again, Lee.
I've had the original brewpi running for years on old laptops, and recently updated to your BPR to get over the end of php5 issue with Stretch, and it's a breeze to install. I'm new to ESPs, and I'm not sure I've got the ESP and arduino wired up correctly. Much of the ESP info is based on earlier modules, while the D1 mini has usb serial and 5v to 3v reg on board. I'm using a voltage divider for arduino tx to D1 rx, but still not sure of what pins have to be connected to what. I've got the ESP connected to the network but I'm doing something wrong, because the uC console is not showing anything. I think it's something simple in the wiring maybe. Cheers.
 
@CadiBrewer was kind enough to help me with a new shield design for the I2C release and I have been musing on the same thing ... the "BTOOTH" header could/should easily be used as a connection for an ESP8266 bridge.

You must have had it right at one point, because in the log you got responses back from the Arduino. Have you changed anything physically since then?
 
Anyone have any tips for resetting the rpi password?

I've tried adding "init=/bin/sh" to the cmdline file but the su account is asking for a password as well, and I do not see the "/etc/shadow file". Please note that I am attempting to do this headless.
 

Attachments

  • pipass.png
    pipass.png
    79.3 KB · Views: 38
Last edited:
Anyone have any tips for resetting the rpi password?

I've tried adding "init=/bin/sh" to the cmdline file but the su account is asking for a password as well, and I do not see the "/etc/shadow file". Please note that I am attempting to do this headless.
This may be a case of printed word not conveying intent clearly ... but if you are wanting to change your pi account password, while logged in as pi issue the command:
Code:
passwd
If you are trying to change another account's password, use the command:
Code:
sudo passwd {username}
If that's not what you mean, I need some additional information about what it is you are trying to accomplish.

I should note: Current versions of BPR prompt the user to change the pi account password when it detects the default. It also uses a password-less brewpi account for additional security.
 
Status
Not open for further replies.
Back
Top