A Raspberry Pi HAT I/O board for use with solid state power relays (SSRs). Designed for switching high power loads 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
- Easy to use interactive web GUI
- Based on the MCP23017 16-port GPIO expander
- Jumper selectable I2C address & GPIO voltage (3.3V / 5V)
- Huge range of compatible solid state relays (known list)
- Up to 10A @ 250V / 16A @ 250V (forced air cooled)
- Can be used with 3.3V or 5V I2C host devices (eg, Arduino)
- Built-in user programmable ID EEPROM
- Conforms to Raspberry Pi HAT Specifications
- Low Power – Up-to 32 SSRs using 8 CTRL HATs on a single Raspberry Pi, with a single USB 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-isolation 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
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.
Our easy installer takes care of the setup process automatically.
sudo wget https://git.plasmadan.com/install.sh
sudo sh install.sh
This script will automatically enable I2C, install the required packages and setup the Web GUI.
Alternatively, you can install manually. See our setup guide.
Featuring the well-documented MCP23017 16 channel GPIO expander, CTRL HAT is easy to setup and control via I2C. Channels 0-3 (Group A) are utilised for the solid state relays, giving you an extra 12 GPIOs for use with your project.
Easy integration with Home Assistant.
We built CTRL HAT to work with any device featuring an I2C bus. 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).
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).
Consider carefully the type of relay to use with your application. Be sure to consider inrush currents and keep in-mind the thermals during operation. More relays = more heat so may need to de-rate or use fewer relays (see thermal load tests). Proper thermal consideration, along with attention to the steady state current ratings, will result in trouble-free operation (read more).
Avoid generic solid state relays from China, they often state exaggerated ratings. They're cheap for a reason!
Note: The type of loads specified here may not apply to your application, read the datasheets!
- Opto 22 MP240D4 - 4A 24-280Vrms
- Kudom / i-Autoc 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 PCB ratings)
- Kudom / i-Autoc KSD240D5R-W - 5A 48-280Vrms
- Crydom CX240D5R - 5A 12-280Vrms
- Crydom PowerFin PF240D25R - 25A 12-280Vrms - (see maximum PCB ratings)
- 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 PCB ratings)
- 10A @ 250V (ambient temperature)
- 16A @ 250V (forced air cooling required, ~30°C temperature rise)
Exceeding these limits may overload the PCB.
We tested CTRL HAT at various loads to demonstrate real-world usage. Your results may differ.
Test conditions:
- 5 minute duration @ 240V AC constant load
- 20°C ambient temperature
Using four Kudom KSD240D5R-W.
Using one Kudom KSD240D5R-W.
Using one Crydom PowerFin PF240D25.
Using one Crydom PowerFin PF240D25, forced air cooled with an 80mm fan.
Mains voltage electricity is extremely dangerous. There is significant risk of death through electrocution, fire or explosion if not wired and fused correctly.
If using with mains voltages CTRL HAT must be installed in an electrically insulated enclosure by a qualified electrician and maintain at-least a 2mm air gap between all conductive parts of the Raspberry Pi (source). See PoE header.
Removing the LINK jumper from CTRL HAT will disconnect 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!
* Note: Back-powering is for CTRL HAT, not for Raspberry Pi. Remove the LINK jumper when back-powering to avoid damaging your Pi.
| Address | A2 | A1 | A0 |
|---|---|---|---|
| 0x20 | |||
| 0x21 | ⬛ | ||
| 0x22 | ⬛ | ||
| 0x23 | ⬛ | ⬛ | |
| 0x24 | ⬛ | ||
| 0x25 | ⬛ | ⬛ | |
| 0x26 | ⬛ | ⬛ | |
| 0x27 | ⬛ | ⬛ | ⬛ |
CTRL HAT is fully compatible with all 40-way Raspberry Pi models and clones.
| Device Model | Compatibility |
|---|---|
| Raspberry Pi 1 Model A+/B/B+ | ✔️ |
| Raspberry Pi 2 Model B | ✔️ |
| Raspberry Pi 3 Model B+ | ✔️ Note |
| Raspberry Pi 4 | ✔️ Note |
| Raspberry Pi Zero | ✔️ |
| Asus Tinker Board | ✔️ |
| Orange Pi | ✔️ |
| Odroid | ✔️ |
| ATMegaZero | ✔️ |
To use with Arduino or any other 5V device the 3V3 jumper must be moved to 5V. Use the SDA & SDL breakout pins for I2C communication.
While CTRL HAT is compatible with Raspberry Pi 3B+ & Raspberry Pi 4, care must be taken to maximise clearance from the 4-pin PoE header.
There are number of solutions:
- Separate CTRL HAT from Raspberry Pi, try our HAT RACK boards!
- Add a suitable insulating material over the PoE pins
- Use a PoE HAT with CTRL HAT
- Remove the PoE pins from the Raspberry Pi (not always ideal)
- Simply don't use relay CH0
- The Pi Hut Modular RPi 2/3 Case
- The Pi Hut Modular Raspberry Pi 4 Case
- The Pi Hut Cluster HAT Case v3.0
- Multicomp Raspberry Pi HAT Case
There are countless cases compatible with CTRL HAT, limited only by the height of the solid state relays used.
Integrating CTRL HAT with your own projects is easy, just follow any guide which uses the MCP23017 expander. We have provided some example Python scripts to get you started (see here).
Integration with Home Assistant is easy thanks to the MCP23017.
MIT © Dan Jones - PlasmaDan.com











