Journal of my Pi build

I’m building and designing a system from the ground up with RaspberryPi. I know the are some out there but they won’t do what i want so I’m building and coding my own.

When done, it will control my mash/sparge water temps and boil. I’ll input the exact temp and volume of water. The will be countless with a flow valve turning the pump off at given volume. On running the mash to the boil kettle another flow valve will record my first and second running and total volume.

After the boil, while chilling with my IC another pump will active once below a set temp of 80-90° and will begin the whirlpool. Once the wort is chilled a third flow meter will record the volume to fermentor.

I’ll control from my Pi itself or any laptop or device. I’ll have the ability to put in my total grain with, mash ratio, grain temp and mash temp and all my volumes and temps for mash and sparge will be figured and entered.

Please feel free to give me any ideas to incorporate. This is a short video of proving the code properly operates the ssr.

1 Like

Tonight I got both SSR’s working and cycling of temp probed.I also have one flow meter installed and the code written and working. I still need to covert number of pulses to gallons. It’s conning along great!

2 Likes

Tonight I got the first working prototype of my dashboard up and running. I was able to access it from my phone and laptop. I can turn both heating elements on and off and my flow meter displays volume. I also have adjustment on my BK, once I have a good rolling boil I can cut the power back to adjust the vigor of the boil.

I also played around with names and coming up with a logo. I’m going with “Grain Brain”. Also got a brewery logo after many years.

Not sure if he remembers it or not, but probably 15+ years ago Denny came up with my motto. I was pretty new to brewing and had some hair brained idea that posted. I’ll never forget his reply to me. “It ain’t ideal but it doesn’t suck.” Been my brewery motto since.

1 Like

ive got a fully functioning dashboard today. Everything i have right now is fully functional. All controls, timers, etc… are working. I need to purchase a few more parts and then I can proceed with the clean, polished build in place of a rats nest of wires and bread boards.

Made a pretty big dent in Grain Brain tonight. Or, more accurately, I drank beer while figuring out how I’m eventually going to wire a ridiculous amount of stuff together.

I think I’ve finally got the entire low-voltage side planned out. Nothing actually got wired tonight. This was mostly figuring everything out on paper before I start connecting things and releasing the factory-installed smoke from the Raspberry Pi.

The Pi is going to monitor three flow meters, the mash temperature, and RTDs in both the HLT and boil kettle. The HLT and BK temps will use MAX31865 boards with 3-wire RTDs, and the mash tun gets a DS18B20. I’ve also got the GPIO assignments figured out for everything so hopefully I don’t discover halfway through that I’ve assigned one pin six different jobs.

The BrewZilla pumps are going to be controlled through 12V ice-cube relays. The Pi isn’t going to drive those directly. It’ll trigger a little 2N2222 transistor circuit, which will switch the relay coil. I install a diode across it because when the relay shuts off, the collapsing magnetic field can kick a voltage spike backward. The diode gives that spike somewhere harmless to go instead of beating the crap out of the transistor.

The heating-element SSRs will also be controlled through transistor circuits. The Pi supplies the 3.3V and 5V we need, and I bought a separate 12V power supply for the pump relays. I’m also going to fuse the 3.3V, 5V, and 12V feeds individually. Fuse holders cost basically nothing, and I’d rather replace a 50-cent fuse than explain to myself why I just murdered a Raspberry Pi.

I also finally settled on how I’m building the wiring inside the cabinet. DIN rail and terminal blocks for distribution, perfboard for the little transistor/resistor/diode circuits, screw terminals where it makes sense, ferrules, heat shrink, braided sleeving, and color-coded wire. Each sensor/device will basically have its own little harness so six months from now I don’t open the cabinet and discover a plate of spaghetti.

And because apparently I hate having money, I’ve ordered a pile of parts over the last few days: DIN rail and terminal blocks, MAX31865 boards, RTD probes, DS18B20 stuff, 2N2222 transistors, resistors, diodes, 12V relays, a 12V power supply, perfboard, screw terminals, wire, ferrules, sleeving, heat shrink, panel-mount USB/HDMI/power stuff, flow-meter hardware, switches, indicator lights, and enough miscellaneous electrical crap that Amazon probably thinks I’m building either a brewery controller or a poorly funded submarine.

Tomorrow I’ll probably start physically laying some of this stuff out.

Tonight, however, I’ve moved on to an Old Rasputin and have officially reached the point where Grain Brain electrical work has ceased for the evening.

Grain Brain

Better Than the Raccoon Toaster™

1 Like

Here’s a few things that Amazon has delivered so far.

Got a lot accomplished today, although from looking at the bench you’d think I mostly spent the day moving the same pile of parts around.

The big accomplishment was finally getting the basic layout and wiring plan sorted out. I built the DIN terminal blocks, worked out the power and data distribution, laid out the relays and SSRs, and figured out where most of this crap needs to live. Nothing is permanently mounted yet because I’m trying very hard not to drill first and think second. This is unusual behavior for me.

I’ve learned more about GPIO, transistors, resistors, relays, RTD boards, and Raspberry Pi wiring than I ever particularly wanted to know.

There was also an embarrassing amount of time spent wondering why my ferrule crimper sucked before discovering that the problem was the ■■■■■■■ holding it had been using the wrong size ferrules. Operator error remains Grain Brain’s most sophisticated safety system.

Still plenty left to do, but today was a good milestone. A week ago it was mostly a Raspberry Pi and a steadily growing collection of Amazon boxes. Now I can actually see how the whole controller is going to come together.

Next step is mocking everything up in the toolbox, getting the final component locations nailed down, and then the real wiring begins.

Three Taverns Brewery

It ain’t ideal but it doesn’t suck.

Grain Brain

Better than the Raccoon Toaster™.