Sunday, 18 May 2014

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.

Saturday, 17 May 2014

Brew Controller - Specification

The aim for the new brew controller is to control the brew day. This could be built to varying budgets (probably around £200 in what I'm building) primarily determined by the power rating. I am of the view two elements is better than one but haven't actually specified the elements for the boiler yet- the HLT elements are standard kettle elements ~ 11amps each. I'm taking a view that things which can't easily be replaced should aim for 20A - but to keep control on the cost intiially some easily replaced switches are only good for 15A.

In the garage I'm likely to have 1 x 30amp feed and 1 x 13amp feed, two 15A zones is an improvement over the current ATC800+ based temperature controller which is only good for a single 13A zone.


  • 2 x Diverse - Power Zones
  • Control of HLT for heating the mash water, and sparge water. 
  • Control of Boil control
  • Control of fermentation (to replace existing ATC800+), and provide graph of fermentation temperature
  • Automatic control of extractor fan
  • Manual control of 1 Pump
  • Ability to drive the functions from the brew controller, with (perhaps) of remote triggering of functions over a network interface.
  • Base settings for a given receipes should be set from a network interface to avoid manually setting values
  • Ability for real-time status to be seen over the network (web interface, android app) 
  • Allow future expansion to RIMS/HERMS
    • Hardware wise additional pumps may be required and control would move to software

Basic Equipment

  • RaspberryPi for control. 
    • In the previous temperature controller there was stability issues with running two DS18B20 probes. In hindsight this may have been a hardware wiring issue. Since I have a spare RPi two will be used to spread the load. (Testing will determine if refactoring onto a single RPi has any downsides).
  • DS18B20 probes for temperature control
  • HD44780 20x4 LCD screen 
    • previously used a 16x2 which was a little too limiting
  • SSR's for controlling element (1 per zone)
  • Mechanical Relays to protect element sockets 
  • Mechanical Relays to control low-power devices (fridge, heater, extractor fan, pump).
  • Lot's of switches, buttons, wire, sockets and plugs, resistors, transistors
  • MCP23017 I2C switch for providing extra GPIO ports.
  • Old computer case to house it all in.

Parts gathered so far