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.
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.
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.
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.
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])
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.