I/O Expansion Board Rev0 for the Raspberry Pi

Figure 1. IO Expansion board attached to the RPi

Figure 1. IO Expansion board attached to the RPi

When the Raspberry Pi was first released, I felt that the on-board I/O capabilities were not adequate for my needs. So I decided to build my own I/O expansion board.  I decided to include:

  • MCP23017 that adds two 8-pin general purpose input/output (GPIO) ports,
  • PCA9685 that adds 16 12-bit pulse width modulation (PWM) channels with variable PWM Frequency (20-1000Hz), and
  • MCP3008 that adds an 8-channel 200Ksps analog to digital converter (ADC).

The first two are attached to the I2C bus while the last is attached to the SPI bus. I designed the board layout using the Eagle PCB layout tool in the Fall of 2012. I even ordered some bare PCBs at the time,  but I didn’t have the time /equipment to populate the board. So I put it on the back burner and conveniently forgot about it. The emergence of many other I/O expansion boards such as the awesome Gertboard and Piface further reduced my incentive to continue with this project.

Recently however I decided to revive this project…..at the very least as a PCB layout design & soldering exercise. So I dug out the PCBs & populated them with the necessary parts and did some pre-eliminary testing. So far everything seems to be functional (all power connections are fine, the “i2cdetect” also detects the device addresses of all i2c devices) but I’ve yet to run any major programs on it.

 

Figure 2. Populated I/O expansion board for the Raspberry Pi ver 0

Figure 2. Populated I/O expansion board for the Raspberry Pi ver 0

One of my main objectives for this I/O expansion board was to make it as low cost as possible to manufacture…..perhaps under $15 if mass produced. The three chips chosen cost about $1-2 each in unit quantities and are sure to cost significantly less in larger quantities.

The board can also be powered from either the Raspberry Pi header or another power source (selectable by a switch), which is for now just a 2 pin male header. It also brings out all 16 PWM channels, 16 GPIOs, 8 ADC channels, the I2C bus pins, the SPI bus pins & UART pins. I consciously decided not to bring out the Raspberry PI’s native GPIO pins due to space limitations. Besides…using the MCP23017 GPIOs instead, reduces the risk of damaging the Raspberry PI’s GPIO pins.

Other modifications that I’m considering for the Rev 1 board:

  • Use a stacking header to enable the board to plug into the RPi….right now it connects to the 2×13 RPi header with a 2×13 IDC terminated ribbon cable.
  • Resize the board dimensions to exactly match those of the Raspberry Pi.
  • Create matching mounting holes to those on the Rev 2 Raspberry Pi so that the Expansion board can be solidly attached to the Raspberry Pi Board.
  • Create additional “shields” or “cape” boards (perhaps with an Arduino shield form factor) that can be attached to the expansion board e.g. Character LCD shield, Graphic LCD shield, 16- channel servo shield, dual h-Bridge shield, 4 – relay shield and so forth.
  • For the second power source, add a DC adapter barrel connector instead of a simple 2 pin header (space pending)
  • Come up with a funky name for the board!!!!!
Figure 3. I/O Expansion Board Top Silkcreen

Figure 3. I/O expansion Board top silkcreen

Figure 4. I/O expansion board bottom silkscreen

Figure 4. I/O expansion board bottom silkscreen

This entry was posted in ADC, GPIO, I2C, PWM, Raspberry Pi, Raspberry Pi Peripherals, SPI. Bookmark the permalink.

6 Responses to I/O Expansion Board Rev0 for the Raspberry Pi

  1. nelson says:

    Move the decoupling caps to near the pins you want to decouple or they get to be almost useless (path of least resistance and all), avoid 90º angles on the tracks, people tend to throw a tantrum over that

    • halherta says:

      Nelson,
      Thanks for the hints! I realized my erroneous use of decoupling caps just after I had sent the board out for fabrication. I will fix it in the next rev and use smaller smt caps. I will also avoid the right angle traces.

  2. nelson says:

    Looks like you are gearing up for lots of IO, cool board

  3. halherta says:

    Thanks Nelson! I’m hoping to have revision 1 completed by Christmas/New years!

  4. Audumla says:

    Your board looks more useful than the Piface and Gert for people who are just wanting to expand the IO capacity especially for PWM. If you could have a revision with a pair of open collectors like the ULN2803AP on the MCP23027, then we could even do away with needing relays for for lots of projects.
    Do you have any idea of when you might have this available? I would be interested in getting hold of few.
    Cheers

    • halherta says:

      Audumla,
      Thanks for the feedback. I was originally planning to at least post the schematics/layout for rev1 for the board in early January, but unfortunately I didn’t receive enough interest and the project got put on the back burner. I’m planning to take a second look at the board in the spring and perhaps make some available for sale by the summer…we’ll see. As for the ULN2803′s, yes they would make an excellent addition, I’ll consider it….heck maybe even add a second MCP23017 with two ULN2803′s……But I’ll have to think about it as it will increase the complexity of the board.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>