Raspberry Pi A/B Header Board

This project is simply a header board, to enable easy connection of our modular I/O capability to a Raspberry Pi. To keep things simple and modular, we have standardised the way we expose digital inputs and outputs in our smart home components, so that we can re-use standard pieces of interfacing hardware in many applications and also re-use the software written to monitor and control things. This makes it very quick and easy to deploy and test new features.

The Raspberry Pi is just one example control processor we are using and all of the others re-use the same hardware modules, each being interfaced with their own header board.


Our header board connects using the GPIO 26-way IDC header header on the Raspberry Pi. It exposes all of the pins of interest to use, which are:

  • +5V
  • +3.3V
  • GND
  • 16 pins configurable as inputs or outputs
  • Two of these 16 pins expose the I2C interface
  • One of these 16 pins can also be used for Dallas 1-Wire devices

To maintain maximum protection and flexibility, we use optical isolators on all our input and output boards. This also means that very little power is taken via the GPIO pins on the Raspberry Pi.

10-Way Header

To keep things simple we grouped I/O capability into 'ports', each supporting 8 channels. This doesn't mean each I/O board and application needs to be fully populated with components but it makes things simpler from both a hardware and software perspective. We expose each 8-channel input or output port via a standard 10-way header.

This works well on the Raspberry Pi because the number of GPIO pins enables approximately 16 digital inputs and outputs. Typically, we are using it with 8 inputs and 8 outputs in all of our smart home applications but, in a few we are using all 16 pins as inputs.

Our design supports the connection of 8 GPIO pins, +3.3V and GND. We expose a 3.3V supply and not a 5V supply because the GPIO pins operate at 3.3V.

Some of the pins on the Raspberry Pi have dual uses:

  • Pin 3 - Is used for both general I/O and I2C.
  • Pin 5 - Is used for both general I/O and I2C.
  • Pin 7 - Is used by the O/S as the default pin for 1-Wire.

For these reasons we have added jumpers on the circuit board to enable these three pins to be isolated from the 10-way header if to be used for I2C or 1-Wire.


Header pins
Header pins designation. The inputs could equally as well be outputs.


There are many ways to use 1-Wire on the Raspberry Pi and this board supports the simplest method, requiring just one resistor and three wires off to a 1-Wire network segment. These are exposed using a single in-line header plug. With this approach up to 10 temperature sensors could be connected to the 1-Wire bus.


PCB layout
This is our PCB design, created using DesignSpark PCB.


10-way ribbon cable
We use standard 10-way ribbon cables to connect other boards to this header board.

To test header board outputs, we also built a simple 8-channel output board with 10 LEDs. Two of these are for the +V power line and the other 8 are for the exposed output pins. These are connected via 1KΩ resistors, to limit the current drawn from the pins.

To test the header board inputs we built an 8-channel 'input' board with 8 push-switches.


These are the first version of the boards (and hopefully the last!) from Ragworm. The five boards cost £33.81 (£6.76 each).

V1.0 PCB

This is the constructed board. It doesn't do anything particularly special. It exposes the GPIO pins of the Raspberry Pi in a consistent manner, so that we can easily connect a wide range of things to the RPi. This same set of things could equally be connected to another processor, using a similar board to expose the I/O capability in the same way.

Constructed board

On this board we haven't fitted the jumpers. That's because we are using pins 3 and 5 for I2C and we are using pin 7 for 1-Wire temperature sensors. The white connector has the three connections required to connect one or more Dallas DS1820 temperature sensors. The pins are:

  1. 1-Wire data
  2. +3.3V
  3. Ground


The use of a 'standard' header board to expose the I/O capability of the Raspberry Pi like this makes it much quicker and easier to experiment and build home automation projects. The headers make it very easy to connect test boards, optically isolated input boards, output boards, relay boards and high power transistor boards.

These boards basically standardise the way we connect and interface things to the Raspberry Pi in such a way that they could be swapped out with any other processor. The header board is basically the 'glue' between the Raspberry Pi and other things that we are doing in the smart home space.

We use enough of these within our smart home to have justified designing the PCB layout and getting boards professionally manufactured. These boards are now part of the foundations of our current smart home.

Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest