Skip to content

plasmadancom/CTRL-HAT

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
img
 
 
 
 
 
 

CTRL HAT

CTRL HAT

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.

Features

Why Solid State Relays?

  • 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

Typical Applications

  • 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

CTRL HAT 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.

Easy Installer

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.

Built-in GPIO Expander

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.

Arduino Wiring

CTRL HAT Arduino

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).

Known Compatible Solid State Relays

CTRL HAT Animated

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!

Zero-Cross Turn-On (Resistive Loads)

Random Turn-On (Inductive Loads)

MOSFET (DC Loads)

Crydom SSR Mechanical Specifications

Maximum PCB Ratings

  • 10A @ 250V (ambient temperature)
  • 16A @ 250V (forced air cooling required, ~30°C temperature rise)

Exceeding these limits may overload the PCB.

Thermal Load Tests

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

5A Load Test

CTRL HAT 5A Load Test

Using four Kudom KSD240D5R-W.

5A Load Test - Low Profile

CTRL HAT 5A Load Test Low Profile

Using one Kudom KSD240D5R-W.

10A Load Test

CTRL HAT 10A Load Test

Using one Crydom PowerFin PF240D25.

16A Load Test

CTRL HAT 16A Load Test - Air Cooled

Using one Crydom PowerFin PF240D25, forced air cooled with an 80mm fan.

Electrical Safety

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.

Isolating the Relays

Link Jumper Animated

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.

Back-Powering *

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.

Back-Powering with Terminal

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.

Back-Powering Supplementary

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.

I2C Addressing

Address A2 A1 A0
0x20
0x21
0x22
0x23
0x24
0x25
0x26
0x27

Device Compatibility

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 ✔️

GPIO Voltage Jumper Animated

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.

PoE Header

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:

  1. Separate CTRL HAT from Raspberry Pi, try our HAT RACK boards!
  2. Add a suitable insulating material over the PoE pins
  3. Use a PoE HAT with CTRL HAT
  4. Remove the PoE pins from the Raspberry Pi (not always ideal)
  5. Simply don't use relay CH0

Dimensions

Mechanical Drawing

Known Compatible Cases

There are countless cases compatible with CTRL HAT, limited only by the height of the solid state relays used.

Where to Go From Here

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.

License

MIT © Dan Jones - PlasmaDan.com

About

Solid State Relay Module Raspberry Pi HAT - Industrial Control & Home Automation

Topics

Resources

License

Stars

Watchers

Forks

Languages