Part 1 - Relay Board

This page provides an Overview for the project

A 8 port relay board is central to controlling power within the brew controller.
There are plenty on ebay 5v 8 relay board arduino, the relay board will be hooked up to an intermediate I2C MCP23017 chip which avoids using up GPIO pins on the Raspberry Pi.
A downside of the Arduino based relay boards is that they are active low, I've put a set of NPN transistors to take a logic-high from the MCP23017 in order to switch ground. The logic-signal from the MCP23017 is taken via an illuminated switch which is the reason for using the transistors so that the MCP23017 stays logic-high is ON, logic-low is OFF. A 10k resistor is placed between base of the transistor and the output of the switch.


1x Raspberry Pi - £30
1x 8 Relay Board - £ 4.71
1x MCP23017 - £ 2.45
8x Transistors - £1.00
8x 10k Resistors - £1.00
8x Illuminated Switches - £7.92
1x Solderless prototype board - £3
1x selection of jumper wires - £2
Total cost - £52.08


The software can enable/disable power to sockets based upon setting a logic-high/logic-low. The status of the socket will be shown via the illuminated switch, which can be used to force a socket off.

The relays on these boards are only good for 10A, this design really was based on a few parts that I already had, and evolved a little. In hindsight I might have just put optocouplers in front of the right kind of relays. As it is for the HLT and Boil zone these little relays act as a control circuit for some bigger 30A relays, there is also an SSR involved for these circuits.

Hooking it together

The Raspberry Pi is the slave RPi.

- Pins (28-21) A7,A6,A5,A4,A3,A2,A1 and A0 are connected to the +Ve supply of 8 illuminated switches.
- Pins 18, 15 and 9 are connected to 5V
- Pin 17, 16 and 10 is connected to ground.
- Pin 12 is connected to Pin 3 of the slave raspberry pi
- Pin 13 is connected to Pin 5 of the slave raspberry pi.

Each of the 8 switches.
- The ACCessory leg of each of the switches is connected via a 10kohm resistor to the base of 8 individual transistors (BC548C - NPN)
- Each of the 8 switches is grounded for it's illumination led

Each of the 8 transistors.
- The collector of each transistor is tied to ground.

The relay board
 - Input pins 1-8 are tied to the emitter of the 8 individual transistors.
 - VSS is tied to ground
 - VDD is tied to 5V.


Popular Posts