# Brew Control
To actuate the brew control relays are required for both the pump and the solenoid valve. This could be done with either 2 relays or a dual relay and could be either mechanical or solid state (SSR). To save space a Crydom dual SSR was used, found on eBay for £23 delivered (although if buying new at £70+ it would be quite expensive).
# Components
- Crydom D2425D Dual Solid State Relay [datasheet]
- Control voltage range 4-15 VDC (better to use Arduino than Raspberry Pi)
- Output voltage range 24-280 VAC
- Output maximum load 25 A (Plenty)
# Installation
The relay is installed adjacent to the manual brew control to avoid any additional wiring changes. It is fixed by M3 machine screws to the body, requiring 2 3.5mm holes to be drilled.




# Wiring
The Arduino controls the relay which requires >4V input (raspberry pi is 3.3V). A 10kΩ pull-down resistor is used to ensure the relay input is at 0V when the output in not high. The raspberry pi detects the switch operation via a GPIO pin. This does not require a pull up/down resistor as they are built in.

# Software
# Raspberry pi interrupt
The raspberry pi gpiozero Button class is used to detect switch operation which then communicates to the Arduino over I2C via Celery asyncrhonus tasks.
from gpiozero import Button
button_brew = Button(27)
button_brew.when_pressed = trigger_brew_start
button_brew.when_released = trigger_brew_stop
The python interrupt file is registered as a django management command:
$ python manage.py raspi_interrupt
# Arduino relay control
A generic relay control class was used to operate the relays through the standard Arduino interface with the relevant on()
method being:
void RelayOutput::on() {
status_ = true;
digitalWrite(pin_, HIGH);
};