Relay HAT 1
This documentation includes hardware info, installation guidelines and sample code for your hardware.
Relay HAT gives you control to switch high-power devices. It has 4 channel 10 Amps mechanical relays. High current area of the board has been isolated from the control side with cutouts and photocouplers. Raspberry Pi or external power supply can power the relays according to your choice.
- V-Relay: Relay power selector.
- Host Power: Short left pin and 5V pin via jumper to use host device as a relay power supply.
- External Power: Connect 5V and GND to external 5V power supply.
- Power: Power output from host device (Raspberry Pi).
- I2C: SDA and SCL connections of the I2C bus. Directly connected to the host device's headers.
- UART: TX and RX connections of the UART0. Directly connected to the host device's headers.
- SPI: MOSI, MISO, SCLK, CS0, and CS1 connections of the SPI bus. Directly connected to the host device's headers.
- GPIO: GPIO05, 06, 12, 13, 16, and 26 connections.
- GND: Ground connection.
- COM: Main terminal of the relay.
- NO: Normally open (non-conductive) terminal of the relay.
- NC: Normally closed (conductive) terminal of the relay.
Relay HAT's specifications are as follows:
- 4x Relay: 4x Powerful AC240V 7A / AC125V 10A / DC28V 10A relays can switch devices on or off. These relays have 100.000 to 10.000.000 on - off life, according to the load.
- NO and NC Terminals: Normally open and normally closed pins of the relays are both connected to the terminals.
- External Connections: Host device's I2C, UART, SPI, 2x CS, GPIO 5, 6, 12, 13, 16, 26 pins and power outputs are shared to header terminal.
- Optical Isolation: Photocouplers between Raspberry Pi and relay control circuit protect your system from ripples.
- Selectable Power Supply: You can use internal or external power for relays. Raspberry Pi efficiently supplies the required power for relays, but you may wish to use external power for industrial applications.
- Cutout Isolation: There are cutouts on the PCB, isolating potential voltage spikes from the control circuit.
- Circuit Diagram: Small schematics behind the board explains how the system works.
To get maximum performance from your hardware, please make sure you'll meet the following requirements.
We designed Relay HAT to work with Raspberry Pi. Alternatively, you may wish to use any Raspberry Pi pin compatible device as host.
Relay HAT uses 5V 300mA power when all relays are on. Please use a power adapter that supplies required power to both host and Relay HAT. We recommend using Raspberry Pi's original adapter.
You can use Relay HAT with any operating system that supports GPIO control. We officially support Raspbian and Windows 10 IoT Core operating systems.
Relay HAT's Raspbian library supports Python. You can write Python code in any text editor.
On the other hand, Windows 10 IoT Core library of Relay HAT supports C#. You'll need to have:
- Development PC with Windows 10
- Developer mode activation on Windows 10
- Visual Studio with UWP support
- Network connection between development PC and Raspberry Pi
Select your operating system for set-up and programming guidelines.
If you're experiencing difficulties while working with your device, please try the following steps.
Problem: Host device reboots when relays are turning on. Cause: Your power adapter does not provide required energy for both host and the relays. Solution: If you are powering external hardware, like USB devices, remove the most energy-hungry ones. Alternatively, power the relays with external power supply.