Digital IO Expander Building Block Board — Part 1#

Today I started work on the next board in my building block board series: a digital IO expansion board.

The basic idea is to provide a small, reusable board that gives a microcontroller, FPGA board, or small embedded system 8 digital inputs and 8 digital outputs without consuming a large number of GPIO pins.

This is not an IO expander in the same sense as a dedicated I2C or SPI GPIO expander IC. It is a shift-register-based digital IO expansion board. That keeps the design simple, understandable, and useful for projects where the IO does not need to be especially fast or complex.

Digital IO Expander Building Block Board PCB render

Digital IO Expander Building Block Board

For the input side, I am using a 74HC165 parallel-in, serial-out shift register. This allows 8 logic-level inputs to be read back by a controller using only a small number of control lines.

For the output side, I am using a 74HC595 serial-in, parallel-out shift register. This allows 8 logic-level outputs to be controlled in the same way, again keeping the number of required controller pins low.

Each output also has an indicator LED driven through an AO3400 N-channel MOSFET. The intention here is to make the board easier to debug during development. Being able to see the output states directly on the board is useful when testing firmware, checking timing, or confirming that external wiring is behaving as expected.

I have also added 0 Ω links on the relevant power rails. These allow the input side, output side, output indicator LEDs, and 3.3 V power indicator LED to be disabled if required. That gives the board a little more flexibility, especially for battery-powered prototypes where there is no point powering parts of the circuit that are not being used.

Board Layout and Connections#

The board provides the control signals for both shift registers on a 12-pin header. This header is intended to connect back to the host controller, such as an MCU board, FPGA board, or another controller module.

The digital inputs and outputs are broken out separately onto screw terminal blocks on the opposite side of the board.

The current arrangement is:

  • 8 logic-level digital inputs
  • 8 logic-level digital outputs
  • 3.3 V and GND available at the terminal blocks
  • output indicator LEDs
  • 12-pin control header for the shift-register interface
  • 0 Ω links to selectively disable unused sections of the board

The screw terminals are intended to make the board easier to use in practical prototypes, especially where wires need to be connected, moved, or tested repeatedly.

This is not intended to replace a dedicated industrial IO module. It is a prototyping and development board first. The goal is to have a known-good digital IO building block that I can reuse across other projects.

Why Use Shift Registers?#

For small embedded projects, GPIO availability can disappear quickly.

A few buttons, sensors, indicator outputs, enable lines, and control signals can easily consume most of the available pins on a small MCU. Shift registers are a simple and well-understood way to expand digital IO without moving to a larger microcontroller or adding a more complex bus-based IO expander.

The 74HC165 handles the input side by latching the state of 8 input lines and then shifting those states back to the controller serially.

The 74HC595 works in the opposite direction. The controller shifts out 8 bits of output data, then latches that data onto the output pins.

This makes the board useful for projects where the IO does not need to be extremely fast, but where having extra digital inputs and outputs is useful. Examples might include simple control panels, keypad-style input scanning, test fixtures, status indication, or small automation projects.

Intended Use#

I can see this board being useful for several types of project:

  • simple control panels
  • keypad or button input scanning
  • status indicators
  • relay or MOSFET driver front-ends
  • digital input monitoring
  • small automation projects
  • test fixtures
  • sequencer-style control systems
  • embedded development experiments

It also fits into the longer-term direction of the building block board series.

Rather than redesigning the same small support circuits over and over again, I want to build up a set of tested modules that can be reused across larger designs. Once a circuit has been built, tested, documented, and understood, it becomes a useful reference point for future boards.

Design Notes#

At this stage, the design is still in the early prototype phase.

The main things I am thinking about are:

  • making the input and output wiring clear
  • keeping the controller header simple
  • making the LED behaviour obvious
  • keeping the board easy to test
  • avoiding unnecessary complexity
  • leaving enough flexibility for future projects
  • allowing unused sections of the board to be disabled where practical

The output LEDs are deliberately included because they make the board more useful during firmware development. A board like this is not just about the final circuit; it is also about making testing and debugging easier.

The 0 Ω links are included for similar reasons. They are not complex, but they give the board some useful configuration options. If I only need the input side, I can avoid powering the output side. If I do not need the LEDs, I can disable them. That could matter for low-power or battery-powered prototypes.

The use of screw terminals is also deliberate. Pin headers are fine for breadboards and short bench experiments, but screw terminals are more practical once wires start going to switches, external devices, or small test rigs.

Current Direction#

This board continues the same pattern as the earlier building block boards.

The purpose is not to create a complex product immediately. The purpose is to create a small, practical, reusable circuit that can be validated properly and then used as a known-good design in future work.

For now, this first version is about getting the basic circuit designed, laid out, and ready for prototype manufacture.

Once the boards are built, the next steps will be:

  1. inspect the assembled boards
  2. check for shorts and assembly issues
  3. bring the board up carefully with current-limited power
  4. test the 74HC165 input path
  5. test the 74HC595 output path
  6. verify the output LEDs and MOSFET drivers
  7. verify the 0 Ω link configuration options
  8. document any design changes needed for a second revision

As with the other boards in this series, the useful part is not just the finished PCB. The useful part is the process of taking a circuit from idea, to schematic, to layout, to manufacture, to testing, and then capturing what worked and what needs changing.

This is another small step towards building up a practical library of reusable hardware blocks.

RS485 Boards#

On another note, my RS485 boards have now been built by the board manufacturer and should hopefully be with me early next week.

I am trying to build a workflow where I have one board being manufactured, one board being tested, and one board being designed. The aim is to reduce idle time and keep momentum across the building block board series.


If you are looking for reusable open hardware modules to speed up your bench testing, or need support designing custom breakout circuits, check out our catalog at Protoworks (NI).