The DQ5rly I2C-HAT is an add-on board for the Raspberry Pi that adds 5 power relay outputs, controlled over the I2C bus. It lets your Pi switch real-world loads like pumps, lights, heaters, motors and valves, using detachable screw terminals and with LED indicators for every relay.
The Raspberry Pi is a great brain for automation projects, but its GPIO pins cannot switch real-world loads, and most hobby relay boards are not built for serious, always-on use. I wanted a relay HAT that behaves like proper industrial I/O and stays in a known, safe state even if something goes wrong. Because it talks over I2C instead of eating GPIO pins, it also leaves the rest of the header free for your project.
Need more than 5 relay outputs? You can stack up to 16x DQ5rly I2C-HATs on a single Raspberry Pi using the onboard I2C address jumpers - no extra hardware required. Every device on an I2C bus needs a unique address, so before stacking multiple boards, set each one’s address jumpers to a different value.
The default (unjumpered) address is 0x50, which is also the address used in the Quick Start example below. Because the relays are PWM-driven rather than continuously energized, average power draw per board stays low - that’s what keeps a full 16-unit stack within a single Raspberry Pi’s power budget.
Fully supported by the open source raspihats Python library, install it with pip install raspihats and control a relay in just 3 lines of code. A Robot Framework integration is also available for test automation setups.
Install the library:
pip install raspihats
Get started with just 3 lines of code:
from raspihats.i2c_hats import DQ5rly
hat = DQ5rly(address=0x50)
# Set all relays at once using a bitmask (0x01 = only relay 0 ON)
hat.do.value = 0x01
# Set a single relay - True to energize, False to release
hat.do.channels[0] = True
Datasheet and CE Declaration of Conformity are available for download on the product page at raspihats.com.
Orders ship twice a week, and you will receive a notification with tracking as soon as your parcel is on its way. Delivery takes a few days if you are located in the EU, it will take more if you are outside the EU. Our main shipping partner is FedEx.
Buyers outside the EU may have to pay customs duties or import taxes. These charges depend on your country's import laws and are the buyer's responsibility.