CraftBeerPi - Raspberry Pi Software

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.
It's also possible to get variable voltage output using the pi's PWM and a very basic circuit.

Yes, that'd work, although I'm personally planning on using the PWM output with my Topsflo speed controlled pump, and I want to control the output of two elements (kettle and RIMS).
 
Yes, that'd work, although I'm personally planning on using the PWM output with my Topsflo speed controlled pump, and I want to control the output of two elements (kettle and RIMS).
By this I take it you plan on doing hardware PWM only, running high frequencies similar to switching power supplies - is that correct? Because I don't believe hardware PWM is implemented in CBPi through any current plugin (not to say that couldn't be done... but I also wouldn't recommend anybody spend time developing new plugins based on the development status of the underlying project). If you are not limiting yourself to hardware PWM, you're not really limited in how many GPIO that are running software PWM.

If you do think you need hardware PWM, and you can do a bit of programming you may find the pi-blaster library useful: https://github.com/sarfata/pi-blaster
 
I'm not sure about what PWM is exactly required for the TD5 pump with PWM input. I think it's between 100 Hz and 1 kHz, so a bit beyond what CBPi3 can do with GPIO.

Anyway, I've found various current rating 0-5V controlled SSVRs on AliExpress - e.g. 40A SSVR, so I'm willing to give that a go for whichever software project.

It doesn't look hard at all to get the 0-5V DAC chip from Adafruit to work in CBPi (I do some hardware interfacing Python development on Raspberry Pis for my day job) - pretty much copy the MAX38165 method for interfacing over I2C and set up an actor similar to the various PWM ones. Or on whichever other software project.
 
I'm making a new pi system to run a fermenter. I'm attempting to install version 3. I've run into a problem installing the software. The script seems to hang up on the version of Python I have. Here is the message:

gitdb requires Python '>=3.4' but the running Python is 2.7.16

In googling the install of higher levels of Python it seems like I might mess up some other things by installing a new Python. I'm in the "knows only enough to be dangerous" level of understanding of Raspberry Pi and Python, etc.

I've re-installed both Noobs and CraftbeerPi3 a few times. I also tried installing the CraftbeerPi2.2 version. It seemed to install ok, but I wasn't able to get it open in the Chromium browser. For that I got the message "Site Can't Be Reached".

I have another CraftbeerPi3 that is running my brewhouse. I have successfully done this a few times over the years. Any help or advise would be appreciated.
 
CraftBeerPi3 only works with Python 2.7. The python3_migration branch does not work (although I do have a fixed version that at least runs. But few of the plugins have python3 versions. And the license does not permit me to distribute it).
 
If it is of any help, here is the last few lines before the error message.

Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/dist-packages (from requests==2.20.0->-r requirements.txt (line 10)) (2.6)
Collecting gitdb2>=2.0.0 (from GitPython==2.1.3->-r requirements.txt (line 14))
Using cached https://files.pythonhosted.org/pack...003c153312c8bfa825ba27b89/gitdb2-4.0.2.tar.gz
Collecting gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.3->-r requirements.txt (line 14))
Using cached https://www.piwheels.org/simple/gitdb/gitdb-4.0.1-py2.py3-none-any.whl

gitdb requires Python '>=3.4' but the running Python is 2.7.16
 
Thanks for the reply. Am I using the wrong CBP installer? If it works with 2.7 why is it asking for 3.4 for installation?
It looks like GitDB on PyPI has recently jumped to version 4.0.x that works with Python 3.4 and greater from 0.6.x versions that worked with Python 2.7 only. The github page for it has a number of intermediate major versions. The recent releases seem to have broken all the dependencies etc.

Doing
Code:
pip install gitdb2==2.0.5

should get you something that works with Python 2.7. The version running on my Pi (which I set up a week or so ago) is 2.0.5
 
It looks like GitDB on PyPI has recently jumped to version 4.0.x that works with Python 3.4 and greater from 0.6.x versions that worked with Python 2.7 only. The github page for it has a number of intermediate major versions. The recent releases seem to have broken all the dependencies etc.

Doing
Code:
pip install gitdb2==2.0.5

should get you something that works with Python 2.7. The version running on my Pi (which I set up a week or so ago) is 2.0.5
When was that update? I installed from Raspbian Sketch last week and was ok
 
Anyway, I made my first CBPi3 plugin - an actor that wraps another actor, and rescales the power level to be between two limits. Useful if you want to limit the maximum power to a heater, or set a minimum power level for something like a pump that stalls at low power levels.

https://github.com/PaulKGrimes/cbpi-RescaledActor

You'll have to install in manually though, because I have requested that it be added to the index of plugins yet.

It's really a test for starting to code up a plugin that applies a power calibration curve to an actor - the SSVRs I'm planning on using for heater control have a fairly non-linear response. Although the response is fairly linear between 2 V and 4 V input.
 
I have a few questions about craftbeerpi. I'm trying to get an induction based rig up and running and the roadblocks are many. I have a manual 240v (well, 208v that works fine at 240) induction unit that I should be able to control with some sort of mash controller. The caveat is that the controller cannot rapid cycle the power output in an attempt to simulate lower power.

I have an Auber cube, but there's no way to keep it from pulsing power output. I need either full-on or off that is controlled by the temp probe feedback.

I'm wondering if craftbeerpi might be the answer. Does it do the rapid power output pulsing or is it a more simple "Temp is low, I'm on, temp is on or above, I'm off" type controller?
 
Can’t answer your specific question. Check out the “Hendi” plugin on the GitHub repository. There is a power and pid plugin. The description or code might answer your question.
 
Software is only one part of the induction burner temp control path. Most of those induction burners may require the addition of some sort of opto-isolated DAC GPIO circuit as well.
 
Software is only one part of the induction burner temp control path. Most of those induction burners may require the addition of some sort of opto-isolated DAC GPIO circuit as well.

I don't plan to control the temp of the induction burner directly. I just want the ability to cycle the power to it on/off based on a temperature reading. It's a manual unit, so if you disconnect power and then reconnect, it's on a heating at the same level it was when power was removed.

I really just need binary control of a 240v outlet:
If temp < set temp
turn 240v power output on
else
turn 240v power output off

I think you could power a 120v coil relay with an inkbird in a pinch, but I'd rather have a less...kludgy....solution.
 
Won't the standard built-in PWM logic in CraftbeerPi work? That's what I use for my 5500W kettle element.
When watching it run, the light that shows power to the element flickers fast or slow, depending on the PWM signal.

That's fine for a standard heating element, but an induction unit doesn't like having its power rapidly cycled.
 
That's fine for a standard heating element, but an induction unit doesn't like having its power rapidly cycled.

I don’t have access to my CraftbeerPi right now to look, but several of the PWM algorithms allow you to set the duration of the cycle.

I think the hysterisis setting is a simple on off like you are looking for. I’m not sure about that.
 
I don’t have access to my CraftbeerPi right now to look, but several of the PWM algorithms allow you to set the duration of the cycle.

I think the hysterisis setting is a simple on off like you are looking for. I’m not sure about that.

Thanks. I have an older pi that I'm going to install craftbeerpi on this weekend just to see what it's like. If it looks viable, I may just buy a newer model, a touchscreen and case. Then I'll tie the GPIO to the ssr that's in my auber cube and run the temp probe directly from the pi. I can still use the dspr320 as a second temp measurement (I'll do one in the recirc flow and one in the kettle). Finally, I'll plug the pi into one of the aux outlets on the cube so that I can power it up with the switch on the cube.

I think that should all work and make a pretty nice package...not sure how to power down the pi gracefully, but I'm sure that won't be a big deal...just need to learn.
 
Hi,
I have 3 of these stainless temp probes from Amazon.
They are all 3 tied together via an expansion board with one 4.7K across them between 5v and ground. I assume that installation is OK from what I have read.

At first they all measured within .5 F of each other... now they jump all around and are not consitent. Even when one of them measures 2 degrees below the real temp and I adjust for it, the probe starts measuring 4 degrees below temp....
https://www.amazon.com/gp/product/B01MY8U394/ref=ppx_yo_dt_b_asin_image_o06_s00?ie=UTF8&psc=1

I am running a rims tube and need an accurate temp probe.
Any suggestions on probes?

thanks haeffnkr
 
Raspberry pi input is 3.3v logic. The pullup (between Vcc and Data wire ) is better to be 3k3 to 3V. It could be even lower if the wires are long, down to 820 ohms ( 4mA on logic low output )

Hi,
I have 3 of these stainless temp probes from Amazon.
They are all 3 tied together via an expansion board with one 4.7K across them between 5v and ground. I assume that installation is OK from what I have read.

At first they all measured within .5 F of each other... now they jump all around and are not consitent. Even when one of them measures 2 degrees below the real temp and I adjust for it, the probe starts measuring 4 degrees below temp....
https://www.amazon.com/gp/product/B01MY8U394/ref=ppx_yo_dt_b_asin_image_o06_s00?ie=UTF8&psc=1

I am running a rims tube and need an accurate temp probe.
Any suggestions on probes?

thanks haeffnkr
 
Raspberry pi input is 3.3v logic. The pullup (between Vcc and Data wire ) is better to be 3k3 to 3V. It could be even lower if the wires are long, down to 820 ohms ( 4mA on logic low output )

Hi Lalo_uy
If the wire is 1.5 meters what should the resistor be between the gpio pin and 3v?
 
For a single 1-1/2 meter ds18b20 on 3.3V even a 4.7Kohm pull up resistor should work fine.
That's not a very challenging configuration.

fwiw, I have three RPIs with five three meter ds18b20s each on 3.3V and use 2.2Kohm pull-ups with zero issues...

Cheers!
 
For a single 1-1/2 meter ds18b20 on 3.3V even a 4.7Kohm pull up resistor should work fine.
That's not a very challenging configuration.

fwiw, I have three RPIs with five three meter ds18b20s each on 3.3V and use 2.2Kohm pull-ups with zero issues...

Cheers!

???
So if I keep all 3 of the above temp sensors in parallel and the wires currently are about 3 meter wires and connect then to a 3.3 supply, what size resistor should I use?
How do I calculate the correct resistance and pull up value?

thanks for your help!
Sorry for the questions, this new information is not what the instructions I previously read said to do.

haeffnkr
 
I would like to try to create a plugin for Fermentation Controller so that the target beer temperature changes with the gravity change provided by iSpindel or Tilt. I haven't done any programming in a very long time, I don't know python but I am willing to learn (steep learning curve but not much stuff to do now with the Corona thing).
Looking at the "Extended CraftBeerPi" page there are a few sections about Custom Kettle Controller and Custom Brew Step but nothing about Fermentation Controller so can somebody confirm that it's possible to create this plug-in and can you give me a hint or two where to start?
 
I would like to try to create a plugin for Fermentation Controller so that the target beer temperature changes with the gravity change provided by iSpindel or Tilt. I haven't done any programming in a very long time, I don't know python but I am willing to learn (steep learning curve but not much stuff to do now with the Corona thing).
Looking at the "Extended CraftBeerPi" page there are a few sections about Custom Kettle Controller and Custom Brew Step but nothing about Fermentation Controller so can somebody confirm that it's possible to create this plug-in and can you give me a hint or two where to start?

More than a Fermentation Controller, you need a Fermentation Step, that instead of looking for the temp, go looking for the gravity.
But the Fermentation Steps are into the fermenter module, and there is no prevision for having different ones, as in Brewing.
 
More than a Fermentation Controller, you need a Fermentation Step, that instead of looking for the temp, go looking for the gravity.
But the Fermentation Steps are into the fermenter module, and there is no prevision for having different ones, as in Brewing.
That's what I'm trying to figure out, if it can be changed and where can I start. This is an example of a lager profile I used in BrewPiLess, where the temperature changes from primary to diacetyl rest to cold crash based on condition on time or SG, time and stable SG.
Capture.JPG
 
Last edited:
Hi!
I need help...
I have my CraftBeerPi brew controller and am using an RTD probe (because mistakes were made) since finding out that it is not supported by default I bought and soldered in a max31865 board as an amplifier.
Question: can i connect some of the soda makers (like that - https://www.bestadvisers.co.uk/soda-makers) to the my CraftBeerPi to automize this process?
 
3K3 will be ok. For long I mean 10m plus

I removed one sensor, cut down the wires to 1.5 meters, moved the supply voltage from 5 to 3.3v input and used a 3.9K pullup resistor. The sensors were MUCH more consistent. I had to add a 2F offset to get them to read the same as my 2 trusted thermometers. That was easy. Consistent readings from 70 to 212 F now for both sensors.

Thanks GUYS!!
 
What logic is preferred for RIMS tube control?
Is there a better faster more precise "logic" control plugin?
I found I had to have the input sensor have a 2.3 F offset before it kicked on the ssr to keep the mash at step temp. ie Dont heat up until the rims tube was 2 degrees cooler than the mash temp. Otherwise with no offset the mash was getting hotter than the set temp.

Is there a way to have the logic poll faster than every 5 seconds before making heat adjustments?

thanks in advance!
 

Attachments

  • Screenshot 2020-03-28 at 10.20.20 PM.png
    Screenshot 2020-03-28 at 10.20.20 PM.png
    50.6 KB · Views: 49
  • Screenshot 2020-03-28 at 10.11.51 PM.png
    Screenshot 2020-03-28 at 10.11.51 PM.png
    70 KB · Views: 46
  • Screenshot 2020-03-28 at 10.08.43 PM.png
    Screenshot 2020-03-28 at 10.08.43 PM.png
    99 KB · Views: 49
  • Screenshot 2020-03-27 at 1.15.08 PM.png
    Screenshot 2020-03-27 at 1.15.08 PM.png
    83.9 KB · Views: 52
Use a PID for your RIMS temperature, not hysteresis.

You can set custom update intervals for you temp sensors using OneWireAdvanced plugin
https://github.com/jangevaare/cbpi-OneWireAdvanced

There are a lot of options in the PIDs included in the CascadeControl plugin. I don't recommend the Cascade PID in there though, most have extreme difficulty tuning such that it just isn't worth it.
https://github.com/jangevaare/cbpi-CascadeControl

Thanks for the suggestions.

Do I use the MT sensor or the RIMS sensor with the PID? The MT sensor provides the best overall average but the RIMS tube sensor will ensure the wort does not get scorched.

thanks haeffnkr
 
Thanks for the suggestions.

Do I use the MT sensor or the RIMS sensor with the PID? The MT sensor provides the best overall average but the RIMS tube sensor will ensure the wort does not get scorched.

thanks haeffnkr

Definitely use the RIMS tube sensor. If you get the output of the RIMS tube to return the the mash tun at the right temp it will hold the tun at your fixed temp. If you try to control off the MT it will respond very slowly. For instance, when it is too cool, the RIMS will keep heating up until the sensor reaches setpoint. In the mean time the RIMS tube might be heating your wort way above setpoint, maybe even hot enough to start denaturing enzymes.

If you use the RIMS tube you should never heat up the wort in the tube more than a degree or two above setpoint.
 
Put your RIMs tube temp sensor as close as you can to the heating element. Even touching it slightly is OK.
 
I measure and control RIMS output from the MT sensor using hysteresis. System works very well and has produced award winning beers.

NeoBrew makes a fair point regarding high temps in the tube. Though, I believe that element size (wattage) and power settings are a factor. My system has a 2000w element running at 100%. Using a standard temp gauge in the RIMS tube, I see a 4-5 degree offset between RIMS and MT on average. So ramping to 154 as an example, would cause the RIMS to raise to 159. still below 168. This temp differential is controllable on my system through the use of a inline valve on the RIMS return line. If I see the RIMS temp getting to high, I just open the valve.

Admittedly, temp overshoot could easily occur with 2500-3000 watts elements running at 100% In that case, I would probably opt for the sensor in the RIMS.
 
Back
Top