• 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.
doUpdate is sort of like rebooting a Windows server. Always a good idea to run it when you have issues.

So you’ve got it running at least?
 
I have flashed my Uno manually now to modify the brewpi-remix settings.
There's an alpha build in the devel branch of firmware that has this glycol support. Be sure to grab the right one for your shield, you'll have to flash manually for now:

0.2.13 (alpha)

Do not use this in production, it is an alpha commit only. The glycol variant may burn up your compressor if you use it on a standard refrigerator setup.

This change enables compiler macros to set parameters suitable for glycol use. This means there are two new firmware versions; a "glycol" variant for both I2C and RevC. When using the glycol, zero out the PID values (`Kp`, `Ki`, `Kd`) in order to make "Fridge setpoint" equal to "Beer setpoint." Use only the beer sensor, the refrigerator temperature will get its value internally from the beer sensor. If you wish to monitor the glycol temperature, use the "room" sensor. Control the pump as "cool" via the relay.

Features
  • Add support for Glycol control

Enhancements
  • Update to atmelavr 1.15.0 from 1.14.0.

Incidentally, someone else reported the exact error you were having flashing the firmware so I'm going to push a fix for that as soon as I get my dev Pi working again.

LBussy, thank you so much for your work on this...

I am having an issue with the relay firing upon cooling call.

I don't think the call for cooling is happening. I have successfully flashed my unit and updates my brewpi-remix. I have set the PID ( KP, KI, KD ) values to "0". I have the devices setup as shown here:
upload_2019-9-27_14-31-22.png


I have the device 1 temp probe in ice water for testing... the device 0 "beer temp probe" is in ambient air.

I have the brewpi-remix set to beer constant with a temp setting of 50.0 F

But I do not get a cooling cycle...

If I invert the pin type of the device I do get the correct relay to fire so it is wired correctly.
 
Did you stop the script first? If not, do that please. Sorry if I did not mention that.
No I didn't so I stopped the script and run the commands again:

pi@brewpi:~ $ sudo cat /etc/udev/rules.d/99-arduino.rules
SUBSYSTEM=="tty", ATTRS{serial}=="757353530383518120F0", SYMLINK+="left"

pi@brewpi:~ $ ls -al /dev/left
lrwxrwxrwx 1 root root 7 Sep 26 20:20 /dev/left -> ttyACM0

pi@brewpi:~ $ sudo /home/brewpi/left/utils/terminal.py

Using default config path ./settings/config.cfg, to override use:
/home/brewpi/left/utils/terminal.py <config file full path>

******** BrewPi Terminal *******
This simple Python script lets you send commands to the controller. It
also echoes everything the controller returns. On known debug ID's in
JSON format, it expands the messages to the full message.

Press 's' to send a string to the controller, press 'q' to quit
2019-09-27 22:29:13 Opening serial port.
Type the string you want to send to the controller: n
Sending: n
Debug message received: WARNING 2: Temperature sensor disconnected pin 14, address 28AAC5124F1401A5.

And the latest version of the logfiles are uploaded.

Is there a problem with the Temperature sensor address 28AAC5124F1401A5?
Did not had the time to check which sensor this is.
 

Attachments

  • stderr.txt
    321.9 KB
  • stdout.txt
    18.8 KB
Debug message received: WARNING 2: Temperature sensor disconnected pin 14, address 28AAC5124F1401A5

Is there a problem with the Temperature sensor address 28AAC5124F1401A5?
Did not had the time to check which sensor this is.
It does look like there may be a loose connection there. On the other hand, it's not completely out of the blue for a sensor to sporadically not reply in time which generates that output. All in all, not a comprehensive data set.

I've attached a hex file here (in a zip) which has been compiled with verbose logging. You can drop it in Pi's home and issue the following command:
Code:
/usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P /dev/left -U flash:w:"/home/pi/brewpi-arduino-uno-i2c-0.2.13.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf
(assuming I have not typo'd)

It will blow up your devices so those will need to be re-set. This might give you more information. Also, make the following change within brewpi.py on what should be line 245:
Code:
-    sys.stdout = open(logPath + 'stdout.txt', 'w', 0)
+    sys.stdout = open(logPath + 'stdout.txt', 'a', 0)
(change the 'w' to an 'a')

This will prevent overwriting the stdout.txt when the script restarts.

Let that run a bit and let's see what happens.
 

Attachments

  • brewpi-arduino-uno-i2c-0.2.13.hex.zip
    29.3 KB
fwiw, when a ds18b20 returns "85°C" (185°F) it's because it hasn't completed its internal power-on sequence.
Thus, getting those errant readings on a running system typically indicates a power problem...

Cheers!
 
Would you please post your stddout.txt and stderr.txt?
I woul be happy to... Working from my phone at the moment but I can vpn in... Is there a good way to do that from the interface or only ssh? If so can you explain, please pardon my ignorance.
 
LBussy, thank you so much for your work on this...

I am having an issue with the relay firing upon cooling call.

I don't think the call for cooling is happening. I have successfully flashed my unit and updates my brewpi-remix. I have set the PID ( KP, KI, KD ) values to "0". I have the devices setup as shown here:
View attachment 645907

I have the device 1 temp probe in ice water for testing... the device 0 "beer temp probe" is in ambient air.

I have the brewpi-remix set to beer constant with a temp setting of 50.0 F

But I do not get a cooling cycle...

If I invert the pin type of the device I do get the correct relay to fire so it is wired correctly.

You need a chamber temp sensor. I only see a beer sensor and a room sensor...

Edited to add: Unless Lee changed the control, the room temp sensor does nothing for the control algorithm. And if you are running in anything other than Beer Constant, you have to have a chamber and Beer Sensor.

Edit 2: Sorry, I missed that you are running in Beer constant. If I were you, I'd reassign the Room Temp as your chamber temp and test that way. (to rule out not having a chamber temp as a problem)
 
You need a chamber temp sensor. I only see a beer sensor and a room sensor...

Yes that is true, I am using a new "alpha" glycol firmware as discussed earlier in this thread.

This configuration is appropriate for that seanario.
 
I woul be happy to... Working from my phone at the moment but I can vpn in... Is there a good way to do that from the interface or only ssh? If so can you explain, please pardon my ignorance.
To easily send logs, you can issue the following command
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
or
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
{you will probably see some warnings here}

The output will be a URL you can share like this one: http://paste.debian.net/1103085/
Best I can do with my phone quickly...
This *looks* okay so far, but I'd need to see the rest of the logs.
Edit 2: Sorry, I missed that you are running in Beer constant. If I were you, I'd reassign the Room Temp as your chamber temp and test that way. (to rule out not having a chamber temp as a problem)
That's a good idea - give that a shot as well.
 
To easily send logs, you can issue the following command
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
or
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
{you will probably see some warnings here}

The output will be a URL you can share like this one: http://paste.debian.net/1103085/

This *looks* okay so far, but I'd need to see the rest of the logs.

That's a good idea - give that a shot as well.

Sorry no additional logs yet...

But I did try changing it to chamber mode... Same result.
 
To easily send logs, you can issue the following command
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
or
Code:
$ cat /home/brewpi/logs/stdout.txt | pastebinit
{you will probably see some warnings here}

The output will be a URL you can share like this one: http://paste.debian.net/1103085/

This *looks* okay so far, but I'd need to see the rest of the logs.


That's a good idea - give that a shot as well.



my sdtout.txt

http://paste.debian.net/1103089/

my sdterr.txt
http://paste.debian.net/1103090/


Thank you for your assistance....
 
Not quite - he said change your "room" temp (which is your glycol) back to a "chamber" temp device.


Ok, I changed the "room" temp device to "chamber temp" and I had cooling for a second...

upload_2019-9-27_21-15-32.png

but, as you can see here...
upload_2019-9-27_21-25-15.png


while the device list reads:
upload_2019-9-27_21-26-7.png


I do not get cooling when the beer set point goes below the 50 degree I have set on the beer constant.
 
Yeah gonna have to do some digging on that. Long story short - it's not working like I thought I had it. :)

As a physical workaround, put the chamber sensor wherever the beer sensor is and see if you can get some love.
 
Yeah gonna have to do some digging on that. Long story short - it's not working like I thought I had it. :)

As a physical workaround, put the chamber sensor wherever the beer sensor is and see if you can get some love.


I have played with a couple of scenarios... without much success.

Here is the graph of the last day or so... as you can see I can get some cooling to happen but certainly not how I would expect it to work. I currently have the second temp sensor back to "room" rather than chamber. I only get cooling if the temp sensor device is set to chamber. But then only if they are very similar... I can't quite figure out what the logic is trying to do.


upload_2019-9-28_13-37-57.png
 
Well, my approach was to follow anecdotal information from others who did this and that seems to not have been enough. Final try: Go with a configured “chamber temp sensor” and put that in the fermenter. Try “Fridge Constant” and see what you get.

I need a little time to get back in that code and see what’s going on it seems. Time is not something that’s been in heavy supply lately. Fingers crossed!
 
Well, my approach was to follow anecdotal information from others who did this and that seems to not have been enough. Final try: Go with a configured “chamber temp sensor” and put that in the fermenter. Try “Fridge Constant” and see what you get.

I need a little time to get back in that code and see what’s going on it seems. Time is not something that’s been in heavy supply lately. Fingers crossed!


I have just made the changes you requested I believe. Still no call for cooling...


In my test setup I now have the following:

temp sensor device 0 "beer temp" - currently in ambient air for my test
temp sensor device 1 "chamber temp" - currently in ice water for my test

System set to Fridge Constant

Pics, hopefully for more clarification
upload_2019-9-28_17-30-53.png

upload_2019-9-28_17-31-28.png

:
 
The problem in this case is the Chamber temperature (~42°F) is already below the Set Point (50°F) so BrewPi is unlikely to try to drive the Chamber temperature lower. Try changing the Set Point to below the existing Chamber Temperature by at least a couple/few degrees and BrewPi should then call for Cooling...

Cheers!
 
The problem in this case is the Chamber temperature (~42°F) is already below the Set Point (50°F) so BrewPi is unlikely to try to drive the Chamber temperature lower. Try changing the Set Point to below the existing Chamber Temperature by at least a couple/few degrees and BrewPi should then call for Cooling...

Cheers!

Changing the Fridge Constant to 38 F did cause the cooling to come on:
upload_2019-9-28_18-20-45.png


putting the Beer temp probe into the same temp water bath, to simulate beer reaching the set temp causes this:
upload_2019-9-28_18-26-20.png


I presume that this has to do with overshoot estimates... I will make some changes to those numbers.

It would seem in this configuration the "cooling" follows the temp set on the chamber temp probe, the beer temp probe does not seem to have any effect to the cooling function.
 

Attachments

  • upload_2019-9-28_18-20-38.png
    upload_2019-9-28_18-20-38.png
    8.5 KB
fwiw, when a ds18b20 returns "85°C" (185°F) it's because it hasn't completed its internal power-on sequence.
Thus, getting those errant readings on a running system typically indicates a power problem...

Cheers!

The sensors are powered through the Arduino and the Arduino gets his power from the RPI through the USB cable.
Because I don't have much time to do some tests and I would like to start my next brew tomorrow I will replace this USB cable first.
Maybe I can setup a new brewPi Remix with the spare parts I have when I have some more time later this week.
 
Last edited:
I presume that this has to do with overshoot estimates... I will make some changes to those numbers.
Correct, it needs to "learn" the inertia in the system in the beginning.
It would seem in this configuration the "cooling" follows the temp set on the chamber temp probe, the beer temp probe does not seem to have any effect to the cooling function.
Correct. as a matter of fact, you do not need a Beer temp probe when using Fridge Constant.

We'll get there.
The sensors are powered through the Arduino and the Arduino gets his power from the RPI through the USB cable.
Because I don't have much time to do some tests and I would like to start my next brew tomorrow I will replace this USB cable first.
Maybe I can setup a new brewPi Remix with the spare parts I have when I have some more time later this week.
When I've had this issue it's been bad connections to the board from the sensors.
 
Correct, it needs to "learn" the inertia in the system in the beginning.

Correct. as a matter of fact, you do not need a Beer temp probe when using Fridge Constant.

We'll get there.

When I've had this issue it's been bad connections to the board from the sensors.

thank you Lee, for your input.

I believe that I can make the system work in a "fridge constant" mode. For my desired outcome... I am sure minor issues to follow.

Is there a way to change the monikers "beer", "fridge" on the LCD / web UI Display? I can certainly just know that the "Fridge" temp is the temp of my unitank probe, and that another probe, beer, room, or other is my glycol but I certainly would like the ability to have the display relate to my reality if possible.

E.g. if using Fridge Constant, where the actual temp probe controlling the cooling is the "Fridge" temp probe, I would like that to read "beer" or "Fermenter #" or "Tank #". I would also like to have probe for "Glycol". "Room" ( ambient ) exists so no issue there I don't think.

I don't know if that interferes with some "hard code", I am ignorant to how these systems are built and what the precedence's are in place that have to be overcome.
 
Status
Not open for further replies.
Back
Top