











Smart Relays with Universal Inputs 8-Layer Stackable HAT for Raspberry Pi
10A/240V Relays with load current sense; 5V/10-24V power; Analog and digital inputs; RS485/MODBUS.
COMING SOON: SMART RELAYS WITH CURRENT SENSING AND ANALOG/DIGITAL INPUTS HAT
FEATURES
- HALL effect sensors on all four relays: Measure AC/DC current up to 10A
- Monitor load failure, compute load power, limit load current
- Four Analog inputs reading temperature from 10K thermistors, or
- Four Digital inputs reading dry contact or 24V opto-isolated signals
- Transition counters to 4kHz on all inputs
- Input counters with cumulative or PPS (pulse per second) reading up to 4kHz
- 2 x Quadrature encoder inputs reading up to 4000 PPS
- PWM inputs on each channel, reading both the fill factor and the frequency
- Enhanced 24V power supply delivering up to 5A at 5V to Raspberry Pi
- Switch loads of 10A and 250V on all four outputs
- Hardware watchdog power cycles the Pi on software lockup
- NO and NC contacts on all relays
- Status LEDs on inputs and outputs
- Switch loads of up to 10A and 240VAC/24VDC
- Enhanced 24V power supply delivering up to 5A at 5V to Raspberry Pi
- Eight layer stackable to 32 relays and 32 inputs
- RS485/MODBUS port
- Raspberry Pi reset push button
- Pluggable Connectors 30-16 AWG wires
- Uses only I2C port (address 0x15..0x0e), all GPIO pins available
- Works with any Raspberry Pi from ZERO to 5
- ECCN Code EAR99
- Command Line
- Python Drivers
- Node-Red Nodes
- OpenPLC module
- Arduino Library
- HomeAssitant Integration
DESCRIPTION
The Smart Relays HAT is ideal solution for mission critical projects where you have to be 100% sure that your system works as expected. HALL effect sensors on relay outputs monitor the load current in real time. Not only you can be sure that your loads operate within specified parameters, but you can also measure the load power and you can limit the load current to any value from 1 to 10A.
Four universal inputs can read temperatures from 10K thermistors, dry contact or opto-isolated 0-24V signals.
Stackable to 8 layers, the Smart Relays card can add up to 32 relays and 32 analog/digital inputs to each Raspberry Pi in a very compact form factor.
Pluggable connectors make the card easy to use when multiple cards are stacked up. All relays have Normal Open and Normal Close contacts and can switch up to 10A/240VAC.
COMPATIBILITY
The Smart 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 card operates from 5V or 10-24V power supply. In both cases it provides 5V and up to 5A to Raspberry Pi. The relay coils are also powered from the 5V. The card draws less than 50mA with all relays off. Each relay needs about 80 mA to turn on.
STACKING MULTIPLE CARDS
Up to eight cards can be stacked on your Raspberry Pi. Three positions of the configuration DIP Switch labeled ID0, ID1, ID2 are used to select the stack level. Cards can be stacked in any order.
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 read by the local processor, which can be programmed to signal the Raspberry Pi by setting low pin 37 of the Raspberry Pi GPIO connector (GPIO26). You can also read the status of the pushbutton from the I2C interface. You need to write a script which monitors this pin, and if pressed for more than a desired time, issues the shut-down command.
CARD LAYOUT

ELECTRICAL SPECIFICATIONS
- Power Supply: 5V/8A pluggable connector with reverse polarity protection
- On board resettable fuse: 3A
- Opto-isolated Digital Inputs:
- Input Forward Current: Typical 5 mA, maximum 50 mA
- Low Voltage Input Series Resistor: 2.2K
- High Voltage Input Series Resistor: 120K
- Isolation Resistance: Minimum 1012 Ω
- Relays: NO/NC contacts, 8A/240 VAC-24 VDC
MECHANICAL SPECIFICATIONS

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.
RS485/MODBUS port
A standard RS485 transceiver permits the Raspberry Pi to communicate using any protocol including MODBUS, PROFIBUS, camera PTZ control, etc. The transceiver can be driven either from the Raspberry Pi serial port, or directly from the local processor. Install the jumpers 485-TX and 485-RX on connector J3 to drive the port from Raspberry Pi. Install the terminator jumper 485-TERM if the card is last on the RS485 chain.
EXTENDED FUNCTIONS OF THE INPUT PORTS
- Transition counters to 4kHz on all inputs
- Input counters with cumulative or PPS (pulse per second) reading up to 4kHz
- 2 x Quadrature encoder inputs reading up to 4000 PPS
- PWM inputs on each channel, reading both the fill factor and the frequency
- 1% resolution on PWM inputs up to 100Hz, 5% resolution up to 500Hz.
DOWNLOADS
SMART RELAYS WITH UNIVERSAL INPUTS 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 also provided.
ACCESSORIES
DIN-RAIL MOUNTING
The 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 card you will receive the following items:
1. Smart Relays with Universal Inputs card

2. Mounting hardware
- Four M2.5x18mm male-female brass standoffs
- Four M2.5x5mm brass screws
- Four M2.5 brass nuts

4. Mating connector plugs

QUICK START
- Plug your card on top of your Raspberry Pi and power up the system.
- Enable I2C communication on Raspberry Pi using raspi-config.
- Install the card software from github.com:
- ~$ git clone https://github.com/SequentMicrosystems/4rel4in-rpi.git
- ~$ cd /home/pi/4rel4in-rpi
- ~/4rel4in-rpi$ sudo make install
- ~/4rel4in-rpi$ 4rel4in
The program will respond with a list of available commands.