Need some (A lot) of guidance building R Pi controller with Craftbrew 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.

marjen

Well-Known Member
Joined
Feb 9, 2017
Messages
755
Reaction score
189
So I am hoping to set up a controller for my eBrewery I am working on. I am looking to control the following:

1 240v heating element
2 temp probes
2 pumps

I am going to have a BK/HLT and going to heat the wort via counterflow chiller connected to the mash tun. I have never built a Raspberry Pi before so this is all new to me. I am really trying to get a handle on what components I will need. I believe I will get a
RASPBERRY PI 3 MODEL B+ kit from amazon with the power supply and 32 gb
Micro SD Card. I am going to look into the either an official Craftbrew Pi board or the
Terragady one. I don't really know the difference yet.

After that I am lost. I need to know what other components are needed to control and get feedback from the above items. I think I need one of these for the heating element and maybe the pumps?
Mager SSRs
https://www.amazon.com/gp/product/B076H12C3J/?tag=skimlinks_replacement-20

What do I need too interface with temp control and power supply for heating element and pumps etc? Do I still need some type of box to put all this in?

Any help or if you could point me to a good clear primer would be awesome. Thanks
 
Last edited by a moderator:
I and many others here have built Craftbeerpi systems. Search the forum and you'll find some builds.

Not to toot my own horn - because I recommend you do a better job than I did building mine..... I just know where these threads are.
https://www.homebrewtalk.com/forum/...plete-biab-craftbeerpi-system-testing.642047/
https://www.homebrewtalk.com/forum/...iab-craftbeerpi-system-some-questions.639645/
https://www.homebrewtalk.com/forum/threads/craftbeerpi-controller-box-questions.637194/
https://www.homebrewtalk.com/forum/threads/spa-panel-supply-power-question.636997/
https://www.homebrewtalk.com/forum/threads/help-with-the-terragady-4-2-pcb-and-craftbeerpi.601161/
https://www.homebrewtalk.com/forum/threads/are-waterproof-ds18b20-sensors-really-waterproof.619391/

Remember, please check out other people's builds.

The big Craftbeerpi thread is located here:
https://www.homebrewtalk.com/forum/threads/craftbeerpi-raspberry-pi-software.569497/

I know it's painful, but going through that entire thread will teach you a lot.

And, there's a lot of great info at the craftbeerpi website. Check out the Installation and Doc link and the Github pages.
http://web.craftbeerpi.com/
 
Worthy of mention - make sure you buy a quality micro SD card (like SanDisk) for your PI's hard drive. LOTS of issues raised by using a PI is due to a corrupt SD card that can't handle having the power being unplugged/plugged in. ALSO make sure you have a good process to back it up AND restore it. Hopefully it won't fail on you. If it does then your ready vs having to rebuild everything. You did write down all of your modifications, right?
 
I would restate the "due to a corrupt SD card that can't handle having the power being unplugged/plugged in" to "never unplug a running RPi as you risk corrupting the SD card".
Unplugging a running machine is a root cause for failure, not the card itself, regardless of quality.

In any case, if one values his/her time above minimum wage he/she will learn how to clone a working card as it takes far, far less time than building a new image from scratch, and if you're running Jessie or Stretch the SD Card Copier program is already sitting in the menu...

Cheers!
 
Ok so jumping back into this. Yes I did do a search and really only found a lot of people having issues. It was hard to find clear cut list of working components for the various functions.

I did just order my RP1 3b+ with power supply and ordered the Samsung 32GB EVO Plus Class 10 Micro SDHC with Adapter 80mb/s (MB-MC32DA/AM) card.

First step will be to try and get that setup with basic O/S and then load the Craftbrew software.

For hardware components I need some help. Looking for quality parts as I am really looking for a reliable setup. For now I am going to focus on the boil, will maybe look to adding my fermentation h/c later.

I plan on controlling 2 pumps. 2 thermometers and 1 heating element. What do I need for that hardware wise? I believe I need an SSR for each? Do I also need a hardware piece to plug the items into that connects to the enclosure and board?

Is an additional board needed or just recommended? What is the advantage to using the Craftbrew Pi board or the
Terragady one?

Thanks
 
Last edited by a moderator:
I don't know if this will be any help or add to your confusion but I was kind of in the same boat as you. I wanted to convert over to electric brewing and have experience doing electrical work but know nothing about the various systems people were using for control panels builds like BCS, Arduino, and the Raspberry Pi. I read through years of posts here trying to figure out how the various systems work (a great member here, GParkins actually sent me the schematics of his BruControl build to give me some ideas) and I also looked at a number of kit and pre-built systems. Being retired and on a tight budget, I decided I wanted to try basing my panel on the Raspberry Pi, at least initially, but I wanted to make my panel somewhat future proof, IE able to be upgraded if needed to BCS, or ultimately BruControl when my budget allows. I ended up purchasing the build manual offered by Electric Brewing Supply, as it seemed to be a solid design and very detailed, to give me something to go by. Since their design is based on the BCS rather than the Pi and because the enclosure I bought really isn't as big as it should be, I've had to make some changes and rearrange a few of the components but what I've ended up with seems fairly clean and functional. That being said, I'm just in the process of wiring everything up and the truth is that I have no idea if I can get CraftbeerPi and the Raspberry to act as a substitute for the BCS.

Here's a few photos of where I'm at:
PiWire1.jpg
PanelWire2.jpg
PanelWire3.jpg
PiConnections1.jpg copy.jpg

The last photo is of a Darlington Array IC that according to a Raspberry Pi forum will allow me to trigger the SSR's and pump relays from a separate power supply and offers some protection to the Pi. Maybe some of the Pi experts here could chime in as to whether this will actually work.
The power connector, outlets for the elements and pumps, and heatsink for the SSR's are in the budget for June so I might see the panel finished in the next few weeks.
As I said at the top, I don't know if this will be any help. There seems to be any number of ways people are integrating the Pi into their brewing set ups with various levels of success. The direction I went may be overkill but I figured that if it proves unsuccessful with the Pi at the very least I can spend the extra money for a BCS-460 and have a working panel without having to start from scratch.
 
So I have taken the first steps to building my controller. I ordered my Pi 3b+ and got it all setup. Finding info was not too difficult, just a lot of googling. Some high-level tips for anyone thinking about this:

Order RBPi, power supply, sd card.
Raspberry Pi Steps
  1. Format SD card with software from sdcard.org
  2. copy noobs to sd card. Unzip it, copy folder contents to root directory of sd card. Call the card noobs.
  3. install raspian from the noobs interface.
  4. set and change your password
  5. enable wireless
  6. setup vnc and ssh
Once you get this far you basically have a working mini computer.
Next I installed craftbeerpi. Instructions are online and it went off without a hitch. I also installed a plugin so it can read from my tilt hydrometer. I ran into an issue there as the 3.0 master or CBPi has a bug with plugins so I changed to the latest master and it works great. I also installed some software called fementrack which also can read the tilt, trying them both out. Both can run at the same time.

Today I just ordered the Haneo expansion board. I got the board, the adapter for RTD sensors and 2 Max31865 for the sensors. They are going to solder the Max31865 on for me and send it all out. My next purchase with be a sensor, I just want to try and get one working as a first step.

So I am making some progress, still so many questions but this has been fun so far.

I am also trying to look at the code for CBPi, it looks like he must have used some kind of framework that I am not familiar with as I cant find any of the html files or css to edit. As a UX designer I would love to make a lot of changes to the dashboard etc. :D
 
Did you download from GitHub? I am looking at the Dashboard code now and its all there. HTML, CSS, etc... Its under brewapp|ui|static

I did. I followed this path craftbeerpi/modules/ui/static/

there is only one html file and it looks like a placeholder. Basically all the files are python.
 
There are two different GitHub projects. One is craftbeerpi the other is craftbeerpi3. It looks like you cloned craftbeerpi3 since you are refencing the "modules" folder. I think that is a complete Python rewrite of craftbeerpi.

By the way, I think craftbeerpi3 is using Flask to render the UI.
 
Last edited:
Yes I am using version 3 of CBPi so that is why I downloaded that version from GitHub. So it looks like v3 does not use standard html, but python and maybe like you suggest some other framework to render or piece together the ui. I wish it was just straight html with bootstrap :)
 
Ah, yea then Python is your only choice. Since V3 is in Beta I have not looked into it much, but Flask uses Blueprints and Views to render any UI elements on the backend and serve up HTML to the frontend. Not overly hard to understand, if familiar with Python, however it could look daunting to those not used to working on backend UI serving.
 
I believe 3.0 was released version and 3.1 got to beta and fixed some things. I believe I heard he is now working on version 4.0

I will pole around and look into Flask, but being a front end programmer used to dealing with HTML, not sure how far I will get. Its too bad. I was actually recently thinking of building something similar to this and then I found CBPi and its got all the hardware integration and backend heavy lifting done so figured I could try and make some front end improvements, but then ran into the Python issue. I am still working on some ideas I have for a more intuitive interface, maybe i will reach out to the dev once i get further.
 
get an extra pi to work on for testing
get several good SD cards
take awesome notes about your base install and keep them updated
learn how to do backups to another device such as your PC and do them often
read and read and read....
 
So I have taken the first steps to building my controller. I ordered my Pi 3b+ and got it all setup. Finding info was not too difficult, just a lot of googling. Some high-level tips for anyone thinking about this:

Order RBPi, power supply, sd card.
Raspberry Pi Steps
  1. Format SD card with software from sdcard.org
  2. copy noobs to sd card. Unzip it, copy folder contents to root directory of sd card. Call the card noobs.
  3. install raspian from the noobs interface.
  4. set and change your password
  5. enable wireless
  6. setup vnc and ssh
Once you get this far you basically have a working mini computer.
Next I installed craftbeerpi. Instructions are online and it went off without a hitch. I also installed a plugin so it can read from my tilt hydrometer. I ran into an issue there as the 3.0 master or CBPi has a bug with plugins so I changed to the latest master and it works great. I also installed some software called fementrack which also can read the tilt, trying them both out. Both can run at the same time.

Today I just ordered the Haneo expansion board. I got the board, the adapter for RTD sensors and 2 Max31865 for the sensors. They are going to solder the Max31865 on for me and send it all out. My next purchase with be a sensor, I just want to try and get one working as a first step.

So I am making some progress, still so many questions but this has been fun so far.

I am also trying to look at the code for CBPi, it looks like he must have used some kind of framework that I am not familiar with as I cant find any of the html files or css to edit. As a UX designer I would love to make a lot of changes to the dashboard etc. :D


Can anyone explain what the advantage is of using RTD temp sensors as opposed to the DS1820?
 
Accuracy. RTDs are much more precise and steady.
Otherwise they're a bit of a pita compared to the one-wire sensors...

Cheers!
I think in a lab environment, that may be true.. but in actual use, I see little difference... I have NIST calibrated glass thermometers and started on a BCS with thermistors. I have used thermocouples and RTD's, and recently tried the DS1820B sensors, and am pretty impressed.
 
For beer brewing, any of the sensors are good. The only temp that really matters is mash temp. There are other trade-offs to consider besides accuracy like mount format, cost, speed, wire length/noise immunity, etc.
Thanks all. BrunDog, the trade-offs are what I'm most interested in. I assume the DS1280s are more susceptible to noise, and thus require a shorter wire.... but I haven't seen that documented anywhere... is that true? For mount format, I'm already planning on using the official cbpi board from Henao which I believe has expansion boards for rtd (pt100) sensors.
 
Actually, they use a digital signal, and are *less* susceptible to noise... remember analog cordless phones??

I have 10 on my system and have no issues.. and very happy

DigiKey:
5 genuine Dallas DS18B20+-ND - $2.72each $13.60
1 50' spool carol C2526C-50-ND wire $16.53
shipping $9.99​

eBay:

There you go, 5 sensors complete for $51.30, far less than adding 5 RTD's....
 
@Gravitysucks Your layout looks very well thought-out and organized. Clearly, you're taking some time to create a serviceable control enclosure. If you'd like, I'd be happy to look over your schematics and evaluate them from a safety standpoint. Your pics get a gold star for neatness, that's for sure!

@marjen I can't stress enough how important it is that you take the time to educate yourself about developing an automated control panel for brewing with electric heating elements. The use of potentially lethal electricity, coupled with scalding hot liquids and electrically conductive vessels is no place to take a half-assed approach. The unpredictability of untested and open source automation can compound the risk. Start reading as many threads as you can in this forum and in the electric brewing forum. You will very quickly identify a half-dozen or so folks that have relevant professional experience, and another hundred plus who will brook no argument that their klugey toolbox-mounted rig is as good as anybody else's rig, because they did it for $20 less than the other guy. Be realistic about the costs associated with building a safe, reliable rig. Don't be penny-wise and pound-foolish because you think you found a way to save $3 on a fuse.

Take the time to get your thoughts down on paper, and then ask some of the pros here on HBT to look them over. Get your design done and reviewed before you start buying parts! You cannot reasonably expect to be able to troubleshoot or repair your rig without an accurate schematic, and there is no reasonable expectation for one of the experienced guys here to be able to help you if you cannot provide a schematic diagram of what you have built.

Sorry for the doom and gloom, but you will be happier and more successful if you take a careful, thoughtful approach from the beginning!

[/confession]
My own enclosure was beginning to suffer from some "expedient" wiring during some minor debugging. This past weekend, I tore the meathouse down and essentially started over, erasing a lot of shortcuts along the way:
[/confession off]




IMG_1611.jpg
 
@Gravitysucks Your layout looks very well thought-out and organized. Clearly, you're taking some time to create a serviceable control enclosure. If you'd like, I'd be happy to look over your schematics and evaluate them from a safety standpoint. Your pics get a gold star for neatness, that's for sure!
Thanks again. You've been quite helpful in the past and I appreciate it. My panel has been on hold for a while, the usual "life happens" stuff but mostly because I apparently over tightened the set screws on several of my switches and my plastic box developed a bunch of cracks that I didn't think I could safely repair. I have a metal enclosure now and hope to get the time to get the remainder of the holes punched and redo the electrical layout soon. I'm debating on whether I want to use the already wired back-plane from the plastic box with some minor changes to assure the box is properly grounded or start from scratch using the metal back-plane that came with the box. As picky as I tend to be I think I'll probably just start over as I doubt I'll be happy with the results otherwise. Anyway, I may take you up on your offer to look things over when I get going again.
 
start from scratch using the metal back-plane that came with the box.

Definitely the better choice. The metal plate means you can ground all of your rail, and it makes it easy to use the green terminal blocks that make metal-to-metal contact with the rail.

Don't forget to run a ground jumper from the door to the ground stud inside the box. In many cases, the paint or the hinges leaves the door ungrounded. Use a meter to verify continuity.
 

Latest posts

Back
Top