Main product image for DI16ac I2C-HAT
Product image 1 for DI16ac I2C-HAT
Product image 2 for DI16ac I2C-HAT
Product image 3 for DI16ac I2C-HAT
Raspberry Pi HAT, 16 isolated digital inputs (3-30V). Built-in pulse counters, instant change alerts, stackable up to 16x
Raspberry Pi
Home automation
Robotics

What is it?

The DI16ac I2C-HAT is an add-on board for the Raspberry Pi that adds 16 isolated digital inputs, read over the I2C bus. It lets your Pi safely monitor real-world signals like pushbuttons, switches, PIR sensors, door contacts and 24V industrial sensors, using detachable screw terminals and with an LED indicator for every input channel.

Why did you make it?

The Raspberry Pi's GPIO pins are 3.3V only and directly connected to the processor, so wiring them to real-world signals is risky: one wrong wire and the Pi is dead. I wanted an input board that behaves like proper industrial I/O, with isolated channels that accept anything from 3V logic up to 30V, so the Pi stays protected no matter what it is connected to. 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?

Every input channel doubles as a pulse counter, with two dedicated 32-bit counters per channel (rising and falling edges), perfect for flow meters, rotary encoders or event logging without any extra code on the Pi. Instead of constantly polling the board, all 16 channels can also raise an interrupt on a Raspberry Pi GPIO pin the moment something changes, so your application reacts instantly while the I2C bus stays quiet. A dual watchdog (system and communication) keeps the board supervised at all times, and the onboard isolation means whatever you wire to the inputs can never reach your Pi.

Stacking

Need more inputs? You can stack up to 16 of these HATs on a single Raspberry Pi for up to 256 digital inputs, with no extra hardware required. Each board gets its own I2C address via the onboard address jumpers, starting from the base address 0x40 up to 0x4F. Since every board draws at most 50mA, even a full 16-unit stack stays well within the Pi's power budget.

Features and specifications

  • 16 isolated digital input channels, sink and source wiring supported
  • On voltage level: +3 to +30V, off voltage level: +1V max
  • 32 pulse counters (16 rising, 16 falling), 32-bit, max 100Hz, min pulse width 5ms
  • Interrupt request (IRQ) output to a Pi GPIO pin (default GPIO21, reassignable)
  • LED indicator for every input channel
  • Detachable screw terminals (3.81mm pitch)
  • I2C interface @ 100 Kbps, 5V supply, 0.25W max power consumption
  • System and communication watchdog
  • Stackable up to 16x via address jumpers

Software

The board is supported by the open source raspihats Python library (pip install raspihats), with Node.js and Node-RED packages available too. A Robot Framework integration is also available for test automation setups. A quick start guide is available on the product page at raspihats.com.

Install the library:

pip install raspihats

Get started with just 3 lines of code:

from raspihats.i2c_hats import DI16ac
hat = DI16ac(address=0x40)

# Read all digital input channels (returns a bitmask, e.g. 0x3F if all ON)
print(hat.di.value)

# Read a single channel - True if ON, False if OFF
print(hat.di.channels[0])

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.

DI16ac I2C-HAT

Sold by Raspihats

$55.64

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.