FEATURES
- 16 Relays 2A/24V 8-Layer Stackable HAT for Raspberry Pi
- All Relays with Status LEDs and NO contacts
- Eight layer stackable to 128 relays
- Pluggable Connectors 26-16 AWG wires
- 5V power supply with reverse polarity protection
- 24V/2A AC/DC on relay contacts
- On board hardware watchdog
- RS485 Port
- General purpose push-button
- 8 LEDs showing status of groups of 8 relays
- Software self-test
- Sixteen Relays for Raspberry Pi
- Uses only I2C port, all GPIO pins available
- Works with any Raspberry Pi from ZERO to 5
- ECCN Code EAR99
- Command Line
- Python Library
- Node-Red nodes
- OpenPLC module
- CODESYS Library
- Home Assistant Integration
DESCRIPTION
16 RELAYS for RASPBERRY Pi
Perfect add-on to your project when you have to control large number of loads. Stackable to 8 layers, the card can add up to 128 relays to each Raspberry Pi in a compact form factor.
Pluggable connectors make the 16 Relays card easy to use when multiple cards are stacked up. Relays have N.O. contacts and can switch 24V/2A AC/DC.
Bicolor LEDs conveniently grouped on one side of the board show when relays are on or off. A power LED shows when power is applied. A reset switch permits shutting down the Raspberry Pi without the use of a keyboard and monitor.
COMPATIBILITY
The 16 Relays card is compatible with all Raspberry Pi versions from Zero to 5. All stacked cards share the I2C bus using only two of the Raspberry Pi’s GPIO pins to manage all eight cards. This feature leaves the remaining 24 GPIOs available for the user.
POWER REQUIREMENTS
The 16 Relays card needs 5V to operate and can be powered from Raspberry Pi or from it's own 2 pin pluggable connector. The relay coils are also powered from the 5V. The card draws 10mA with all relays off. Each relay needs about 80 mA to turn on. If power is applied to the board's connector, no other power supply is needed for the Raspberry Pi.
LED INDICATORS
A power LED shows when power is applied to the board. Due to space limitations, bicolor LEDs are used to shows the status of groups of 8 relays.
DIP SWITCH CONFIGURATION
A six position DIP switch is used to select the source of the RS485 port and the position of the card in the stack, if multiple cards are used.
STACKING MULTIPLE CARDS
Up to eight 16 Relays cards can be stacked on your Raspberry Pi. The three left positions of the DIP Switch are used to select the stack level.
RS485/MODBUS PORT
The 16 Relays Card has an RS485 port which can be driven from the Raspberry Pi, or from the local processor. Leave the TX and RX switches in the OFF position to connect the port to the local processor. Set both to ON to connect to USART1 of the Raspberry Pi.
When DIP Switches are ON, Raspberry Pi can communicate with any device with an RS485 interface. In this configuration the card is a passive bridge which implements only the hardware levels required by the RS485 protocol. To use this configuration, you need to tell the local processor to release control of the RS485 bus:
~$ 16relind [0] rs485wr 0 0 0 0 0
When DIP Switches are OFF, the card operates as MODBUS slave and implements the MODBUS RTU protocol. Any MODBUS master can access all the card's inputs, and set all the outputs using standard MODBUS commands. A detailed list of commands implemented and parameters addresses can be found on GitHub:
In both configurations the local processor needs to be programmed to release (jumpers installed) or control (jumpers removed) the RS485 signals. See the command line online help for further information.
RS485 TERMINATOR
The last position on the DIP switch is the RS485 line terminator. Set it to ON if the card is last on the RS485 chain.
REVERSE POWER SUPPLY PROTECTION
The board is protected to accidental reverse power supply with a 5.8A, 39 mOhm MOSFET which breaks the ground line if reverse power is applied.
RESET PUSHBUTTON
Shutting down the Raspberry Pi by turning off the power can result in SD Card failure. To prevent this, a shutdown command needs to be used before power cut-off. But this requires a monitor, keyboard and mouse connected to the Pi.
A momentary on push button installed at the edge of the board provides a convenient way to shut down the Raspberry Pi. The button is routed to pin 37 (GPIO 26). You need to write a script which monitors this pin, and if pressed for more than a desired time, issues the shut-down command.
HARDWARE WATCHDOG
The card contains a built-in hardware watchdog which will guarantee that your mission-critical project will recover and continue running even if Raspberry Pi software hangs up. After power up the watchdog is disabled, and becomes active after it receives the first reset or first period set.
The default timeout is 120 seconds. Once activated, if it does not receive a subsequent reset from Raspberry Pi within 2 minutes, the watchdog cuts the power and restores it after 10 seconds.
Raspberry Pi needs to issue a reset command on the I2C port before the timer on the watchdog expires. The timer period after power up and the active timer period can be set from the command line. The number of resets is stored in flash and can be accessed or cleared from the command line. All the watchdog commands are described by the online help function.
CARD LAYOUT
ELECTRICAL SPECIFICATIONS
- Power Supply: 5V/8A pluggable connector with reverse polarity protection
- On board resettable fuse: 3A
- Relays: NO contacts, 2.5A/24 VAC/DC
- Electrical endurance: minim 105 cycles at 1,800 operations per hour, full load
- Mechanical endurance: minim 107 cycles at 18,000 operations per hour, no load
MECHANICAL SPECIFICATIONS
DOWNLOADS
SOFTWARE
SOFTWARE INTERFACES
You can write your own application using the Command Line or Python Libraries provided. No programming is required if you use the Node-Red nodes we supply. You can drag-and-drop the functional blocks to design your application. Examples are provided at GitHub.
RELAY SELF TEST
The card can be tested before installation by running a simple command from the command line. The card will cycle each relay on and off at 0.5 seconds interval. The clacking noise of the relays and the lighting of the LEDs will assure that all relays are functioning.
ACCESSORIES
DIN-RAIL MOUNTING
The 16-Relays Card can be installed parallel on a DIN-Rail using the DIN-Rail Kit Type 1, or perpendicular using the DIN-Rail Kit Type 2.
YOUR KIT
When you purchase the 16-Relays Card you will receive the following items:
1. 16-RELAYS HAT for Raspberry Pi
2. Mounting hardware
- Four M2.5x18mm male-female brass standoffs
- Four M2.5x5mm brass screws
- Four M2.5 brass nuts
QUICK START
- Plug your 16-RELAYS card on top of your Raspberry Pi and power up the system.
- Enable I2C communication on Raspberry Pi using raspi-config.
- Install the 16-RELAYS software from github.com:
-
- ~$ git clone https://github.com/SequentMicrosystems/16relind-rpi.git
- ~$ cd /home/pi/16relind-rpi
- ~/16relind-rpi$ sudo make install
- ~/16relind-rpi$ 16relind
The program will respond with a list of available commands.