Brewery build pt 2: control panel internals

So you want to build a brewery control panel? Perhaps nobody has told you how long the wiring takes. It’s not difficult, but it is time consuming.

Let’s pick up from part 1 of my build log. Recall we had installed all receptacles, and left a bunch of excess wire in the control panel for future me to take care of. 

The first step was to decide on locations of the major components. For me, this meant 7 rather large solid state relays, a DPDT relay for master power, at least one terminal bar, a raspberry pi, and a prototyping board that connects to my raspberry pi…

Here we see the layout coming together… I thought something like this would work well.




I ended up shifting the solid state relays even further to the side, to leave more room for the Raspberry Pi. Here’s the major components secured… I used screws rather than bolts to attach components because removing and reinstalling the back panel to move components around is a pain. This works plenty well. Decide on a layout, drill mounting holes, and use appropriately sized self taping screws.




Before going further, take a look at the process of “daisy chaining” the XLR ports (8 in total) for my temperature probes.






Originally I had planned on using terminal bars to collect the XLR port leads, but I decided that would take up too much of the precious space inside of my panel.

The next step saw management of a lot of the major wiring, installation of a 5VDC power adapter, and installation of a terminal bar to help organize some of the panel’s 120VAC circuits.






Getting quite close now, we can turn our attention to the finer details: button wiring and Raspberry Pi wiring.

I decided to use LED buttons for the following: master power, element power, and two manual shut offs for pumps. These LED buttons required 5-6 volts, so hooking them up directly to the Raspberry Pi GPIO is not an option… More on that later.

The master power button acts as a switch for a 120VAC circuit through the coil in my lDPDT relay. When voltage is applied to the relay coil, the relay closes, in turn powering to the entire panel. The master power button lights up when the 5VDC adapter receives power.

The other buttons were wired as follows: power was connected between all LEDs, and each LED was then connected to the normally open terminal on each switch. The common terminal on each switch would then connect to corresponding solid state relay, which would then connect to the Raspberry Pi. So, when the switch was closed, the LED light would indicate the duty as determined by the Raspberry Pi. Specifically, the element LED will cycle in synchrony with power to the boil kettle element. Element duty, of course, is determined with a proportional-integral-derivative algorithm in Strange Brew Elsinore software. The pump LEDs will be on when the pump “switches” are activated in Strange Brew Elsinore. Again, I wanted the option to manually control the pumps, while still having the ability to program some automated pump operation with Strange Brew Elsinore. Please ask for further details on this if you are interested or need help with your own panel!




In the picture above, note that the black/white wires are for controlling the master power DPDT relay. Green wires are connected to a 5VDC power source, and jumper the LEDs to the normally open switch terminals. Yellow wires return to either the solid state relays, or GND on the Raspberry Pi in case of the master power switch.

Recall I had mentioned that the LED buttons required 5-6VDC. Raspberry Pi GPIO only provide 3.3VDC when in an active state. Additionally, some folks comment that 3.3VDC is inadequate to control these sort of solid state relays, even though they generally specify anything between 3-32VDC will work. Lastly, controlling a solid state relay, and an large LED may push the amperage draw near the designed maximum of the Raspberry Pi GPIO. One strategy for this is to use transistors. Transistors can be used to amplify voltage. These two youtube videos helped me greatly in figuring out how to wire these things.


Using Transistors with the Raspberry Pi (Part 1 of 2)
Watch this video on YouTube.

Using Transistors with the Raspberry Pi (Part 2 of 2)
Watch this video on YouTube.


Resistance calculations are necessary to determine exactly how to properly amplify voltage with a transistor. The above videos detail this for those interested.

I used a total of 7 transistors to provide roughly 5VDV to my solid state relays and LEDs. These transistors are activated by only a very small current (roughly 0.07mA) from the raspberry pi at 3.3VDV. If you want some more specifics on the transistor circuits, feel free to ask in the comments or an email.

Before creating connections to any specific GPIO, ensure that they are in a low state at boot by default! I found out the hard way that GPIO 5 and GPIO 6 were in the active high state at boot. This meant I had to make adjustments to my prototyping board after everything else had been installed into my panel… and there’s not a lot of room for a soldering iron after everything’s in there.

I also wired up a circuit for the one wire temperature sensors (DS18B20 sensors). One wire temperature sensors have the following leads: VCC (3.3VDV power supply), DQ (data), and GND (ground). These sensors can be “daisy chained” such that data from a large number of sensors can be read by a single GPIO pin on the Raspberry Pi (GPIO 4 by default). We do this by parallelizing all sensors, and using a single 4k7 ohm pull up resistor on the data lead. That is, we connect the DQ and VCC leads with this single resistor. Super easy. These temperature sensors are very cheap to boot.

Here is what all of that looks like on a prototyping board. The green wires all connect to one of the GPIO. I was able to catch some issues before installation of the prototyping board. I had burnt out one transistor, and I mixed up on the transistor wiring (emitter and collector leads were reversed). If you are going this route, I’d heartily recommend testing everything you can with your Raspberry Pi before installing it into your panel.






You’ll see that I put a DC barrel jack right on the prototyping board. This is an alternative to powering the Raspberry Pi from a USB cable. It’s easy to fry your device if you wire this incorrectly – careful!

So now all that is left is to physically install the Raspberry Pi into the control panel, and to connect it all up.






For a dry run I wasn’t too concerned about the organization of the wiring. I wanted to make sure everything was correct before I spent the time on making it look nice. The following picture hurts a little to look at…




When I connected it up for the first time, I was relieved that nothing had exploded, nor had I died. I did find that I wired the solid state relays in reverse though. A quick fix.




Now to clean everything up…




Much better!






That’s all for now! The next post will be shorter, and will provide some detail on the software side of things.


  14 comments for “Brewery build pt 2: control panel internals

        Leave a Reply

        Your email address will not be published. Required fields are marked *