A Raspberry Pi HAT I/O board specifically designed for use with Crydom style SIP PCB mounted solid state relays (SSRs).
This project is an evolution of previous I/O & relay interface boards we have created primarily for home automation purposes. We saw a need for a low cost high current capacity solid state relay control board for switching inductive loads such as motorised blinds, without the need for costly extra hardware such as SSR modules or contactors. CTRL HAT is ideally suited to automation or industrial control applications requiring high-speed switching, or switching of loads not suitable for regular mechanical relays, such as motors, power supplies, or noise sensitive equipment such as amplifiers.
- Support 4 Industry Standard SIP type Solid State Relays per CTRL HAT
- Easy to use interactive web GUI
- Stackable. Up-to eight CTRL HATs can be used with a single Raspberry Pi
- 16-port GPIO expander
- 5V / 3.3V GPIO voltage selection via jumper
- Supports range of SSR control voltages
- Can be used with any MCP23017 compatible host device
- Built-in user programmable ID EEPROM
- Support for multiple connector types
- Conforms to Raspberry Pi HAT Specifications
- Enormous range of applications
Why Solid State Relays?
- Low Power – Up-to 32 SSRs using 8 CTRL HATs on a single Raspberry Pi, with a single power supply!
- Low Noise – SSRs generate minimal electrical noise compared to mechanical relays
- High Speed – SSRs typically switch around 100 times faster than mechanical relays with no contact bounce
- Reliability – High resistance to shock & vibration makes SSRs suitable for use in demanding environments
- Opto-Isolated – Typical opto-osolation of > 4000VAC
- Zero Sparks – SSRs do not generate electrical arcs or sparks like mechanical relays
- Zero Noise – No moving parts means completely silent switching operation
- Life Expectancy – Increased operational cycles compared to mechanical relays
- High speed and frequent switching operations
- Applications in high vibration environments
- Applications near sensitive electronic components
- Dusty or humid environments
- Hazardous locations
Interactive Web GUI
Once installed on your Raspberry Pi, this interactive GUI allows quick & easy control of your CTRL HAT without the need for any coding. It is designed to be both a user guide & quick reference to the CTRL HAT pinout. The GUI is fully responsive and adapts to any screen size.
Check-out the Live Demo.
Built-in GPIO Expander
Featuring the well-documented MCP23017 16 channel GPIO expander, CTRL HAT is easy to setup and control via I²C. Channels 0-4 (Group A) are utilised for the solid state relays, giving you an extra 12 GPIOs for each CTRL HAT you have.
Not Just Raspberry Pi
We built CTRL HAT to work with any device featuring an I²C bus, the 2-wire connection makes it easy to connect to your preferred device. It can be used with either 3.3V devices (eg, Raspberry Pi) or 5V devices (eg, Arduino); by selecting the appropriate jumper (see device compatibility).
We believe the Raspberry Pi HAT specification is the perfect footprint. Compact yet familiar, with 4x mounting holes, the option to stack with other Raspberry Pi HATs / pHATs and of course a wide range of compatible cases to choose from.
Known Compatible Solid State Relays
Any solid state relay which physically fits onto CTRL HAT and is suited to a control voltage of 5VDC will work. CTRL HAT can also be configured to accept relays with other DC control voltages by using a dedicated power supply (see isolating the relays).
Zero Cross Turn On (Resistive Loads)
- Opto 22 MP240D4 - 4A 24-280Vrms
- Kudom KSD240D5-W - 5A 48-280Vrms
- Multicomp MCKSD380D5-W(037) - 5A 24-440Vrms
- Crydom CX240D5 - 5A 12-280Vrms
- Crydom PowerFin PF240D25 - 25A 12-280Vrms - (see maximum ratings)
Random Turn On (Inductive Loads)
- Kudom KSD240D5R-W - 5A 48-280Vrms
- Crydom CX240D5R - 5A 12-280Vrms
- Crydom PowerFin PF240D25R - 25A 12-280Vrms - (see maximum ratings)
MOSFET (DC Loads)
- Opto 22 DC60MP - 3A 0-60VDC
- Crydom CMX60D10 - 10A 0-60VDC
- Crydom CMX100D10 - 10A 0-100VDC
- Crydom CMX200D3 - 3A 0-200VDC
- Multicomp MCKSL60D20-L - 20A 0-60VDC - (see maximum ratings)
- 10A @ 250V (ambient temperature)
- 16A @ 250V (forced air cooling recommended, ~30° temperature rise)
Exceeding these limits may overload the PCB.
Isolating the Relays
Removing the LINK jumper from CTRL HAT disconnects 5V power to the solid state relays. This allows you to power the relays independently, but also gives you the option to use solid state relays with other DC control voltages (up to 30V). This opens up a huge range of additional compatible solid state relays for use with your project.
Using a decent power supply, such as the official Raspberry Pi adaptor, you can expect to pull around 1.5A from the 5V pins on a Raspberry Pi. You can use up to 8 CTRL HATs with a single Raspberry Pi. That's up to 32 solid state relays, 32 LEDs and 8 GPIO expanders which all need power. It's easy to see how quickly we can go over the limit, especially if the GPIO expanders are used to drive other devices. Back-powering can solve this.
The easiest way to back-power CTRL HAT is using the 5V power pins. However there are some other options.
Use one of the 5.08mm pitch terminal blocks in-place of relay channel 3. You must also solder the BACK-PWR jumper on the underside of the board for this to work.
Alternatively, solder directly to the supplementary power-in pads as shown above, but DO NOT solder the BACK-PWR jumper!
CTRL HAT is fully compatible out of the box with most Raspberry Pi models and clones.
|Raspberry Pi Model A||
Requires 26-way adaptor
|Raspberry Pi Model B||
Requires 26-way adaptor
|Raspberry Pi 1 Model A+|
|Raspberry Pi 1 Model B|
|Raspberry Pi 1 Model B+|
|Raspberry Pi 2 Model B|
|Raspberry Pi 3 Model B & 3+|
|Raspberry Pi 4|
|Raspberry Pi Zero|
|Asus Tinker Board|
To use with Arduino or any other 5V device the 3V3 jumper must be moved to 5V. Use the SDA & SDL breakout pins for I²C communication.
Known Compatible Cases
- ModMyPi Modular RPi 2/3 Case
There are countless cases compatible with CTRL HAT, limited only by the height of the solid state relays used.
Web GUI Installation
Raspberry Pi with Raspian: https://www.raspberrypi.org/downloads/raspbian/
I recommend a clean Raspian install before proceeding.
apt-get update apt-get upgrade
Install Apache components
apt-get install apache2 php5 libapache2-mod-php5
apt-get install git-core -y
git clone git://git.drogon.net/wiringPi
cd wiringPi git pull origin ./build
Before proceeding, check WiringPi is working correctly.
gpio -v gpio readall
apt-get install subversion
Clone Repo Contents
Empty default Apache files
rm -rf *
svn checkout https://github.com/plasmadancom/CTRL-HAT/trunk/gui .
Be sure to set file permissions to 755 in the web directory.
chmod -R 755 /var/www
Apache requires sudo permission to use WiringPi. Note: If your Raspberry Pi is on a shared network you may want to find a more secure method than this.
echo "www-data ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Optional: install vsftpd for easier file editing
apt-get install vsftpd -y
Change user for vsftpd
chown -R pi /var/www
Uncomment the following line:
Add the following line:
service vsftpd restart
There are various configuration options in the config file :
You can customise the I²C address, GPIO setup, or disable any solid state relay channels you don't need.
MIT © Dan Jones - PlasmaDan.com