Main product image for DQ5rly I2C-HAT
Product image 1 for DQ5rly I2C-HAT
Product image 2 for DQ5rly I2C-HAT
Product image 3 for DQ5rly I2C-HAT
Product image 4 for DQ5rly I2C-HAT
Raspberry Pi HAT, 5 relays (10A @ 250VAC). Cuts coil power use by 75%, stack up to 16 boards, fail-safe PowerOnValue and SafetyValue.
Raspberry Pi
Home automation
Robotics

What is it?

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.

Why did you make it?

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.

What makes it special?

  • PWM relay drive: the relays are PWM-driven instead of continuously energized, cutting average coil power consumption by up to 75%
  • Stackable: thanks to that low power draw, up to 16 boards can be stacked on a single Pi (address jumpers), for up to 80 relay outputs, no extra hardware needed
  • PowerOnValue: each relay has a configurable state it takes at startup
  • SafetyValue: each relay has a configurable fail-safe state it falls back to if the watchdog trips

Stacking

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.

Software

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.

Quick Start

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

Documentation

Datasheet and CE Declaration of Conformity are available for download on the product page at raspihats.com.

Links to code and documentation

Documentation (raspihats.com)

Code (github.com)

Shipping policy

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.

DQ5rly I2C-HAT

Sold by Raspihats

$52.15

No tax for United States [change]
Stock available: 3
Check
Original Design
This product was designed by Raspihats. By buying this product you support original hardware creators.

The seller

Raspihats

Raspihats logo

Alba Iulia, Alba, Romania
0 orders since Jul 1, 2026
Raspihats designs and manufactures industrial-grade HATs and accessories for the Raspberry Pi. Our lineup includes I2C I/O modules with digital inputs and relay outputs and a DIN-rail mountable case built to fit most HATs on the market.
Built for reliability in real-world deployments like, home automation, industrial control, and DIY projects that need to run unattended for years. Every board is designed with panel-mount and DIN-rail environments in mind, not just the hobby bench.
You can also find our full catalog, documentation, and blog at raspihats.com.