johntwomey

At Emutex, we create and sell great software to professional companies building solutions. From time to time, we also build proofs of concept, prototypes and demos. We do this to educate, to promote awareness, to enable hobbyists and to demonstrate what we can achieve.

 

John Twomey - CEO.

 

We have designed and produced the Emutex 56-pin GPIO Expander Shield.

 

1. Introduction

The GPIO expander is based on a pair of MAX9657 GPIO expander chips from Maxim Integrated. It takes the form of a standard Arduino Uno shield, and plugs directly onto an Intel® Galileo or a number of Arduino base boards.  A 4-wire SPI interface is used for communication between the main board and the shield.  Using a standard Arduino sketch application, the user can toggle any or all of the output pins on the expander on and off.  Since only 4 of the 20 pins on the Arduino shield interface are needed to control the shield, 16 pins are available for use as GPIO thus allowing a combined total of 72 GPIO pins. This allows for a versatile set of uses, such as controlling an 8x8x8 LED cube.

2. The Hardware

The expander shield was designed in-house at Emutex using the excellent FreePCB application.  The board is a 2-layer PCB, with the following features:

  • 2 MAX9657 ICs (36-pin SSOP package) connected in a daisy-chain configuration
  • Standard Arduino Uno shield pin layout, allowing the shield to plug directly onto an Intel Galileo or Arduino Uno or any other Arduino-style board with this interface
  • 2 banks of double-row 0.1"-spaced pin headers for the GPIO outputs, conveniently designed to allow standard ribbon cables to be used to connect the GPIO outputs to an external board. (Hint: this a great use for old IDE hard-drive cables)
  • selectable 3.3V or 5V voltage source. This allows it to be connected to 3.3V or 5V Arduino boards, and also allows the user to choose to have 3.3V or 5V logic voltage levels on the GPIO outputs

2.1 PCB Layout source file

The PCB design is available to download from here:
https://github.com/emutex/Emutex_MAX6957_Library/blob/master/PCB/gpio-expand-shield.fpc

3. The Software

An Arduino software library was created to simplify the usage of the GPIO Expander Shield.  Designed to be imported easily into the Arduino IDE, and written to work with the Intel Galileo or any standard Arduino board, the library allows the user to get up and running with the shield in minutes.

The source code is made freely available by Emutex on GitHub:
https://github.com/emutex/Emutex_MAX6957_Library

Some notable features of the library include:

  • An option to set each pin immediately, or defer to allow batching of pin updates to maximise efficiency
  • Support for either of the 2 output driver modes available on the MAX6957, which are:
    • GPIO Output mode
    • Constant-Current LED Display Driver mode
  • Allows the user to disable the MAX6957 outputs when not in use, to reduce power consumption

Support for GPIO Input modes is not currently included in the library.  However, the API is designed to accommodate this easily in the future, if needed.

4. Bringing it together

A small volume batch of initial PCBs were created using the excellent OSH Park PCB manufacturing service. Two MAX6957s were hand-soldered to the PCB in our lab at Emutex, along with the other passive components required. The full Bill-Of-Materials is as follows:

 Item  Quantity  Source
 Emutex 56-Pin GPIO Expander PCB  1  Emutex / OSH Park
 MAX6957 SSOP-36 package  2  Mouser
 47nF ceramic capacitor (through-hole)  2 Maplin
 39k 0.25W resistor (through-hole)  2 Maplin
 Arduino stackable header kit  1 Sparkfun
 40-pin break-away headers  2 Sparkfun

As part of the initial testing, two PCB design issues were found:

  1. One of the GPIO outputs from the MAX6957’s was left unconnected.  We soldered a wire on the board to join up that output to the corresponding header pin.
  2. Two trace lines were intersecting.  We cut one of these and re-routed with a wire on the board.
  3. Also, it was observed that using the IOREF pin would be a more optimal choice to provide the source voltage for the board, to avoid possible mismatch in the configuration of the main board and the shield.

All of these points have been addressed in the final PCB design version shown earlier.

 

5. Conclusion

This expander board was developed as a proof-of-concept for a particular application we were working on.  Depending on the level of interest in this particular board, the following enhancements may be considered for a future revision:

  • Extend the Arduino library to support GPIO input modes
  • Optimise performance of the library for faster GPIO toggle rates
  • Create a stackable design to allow multiple GPIO expanders to be stacked for even more I/Os
  • Improve the PCB layout to re-order the output pins in a linear arrangement according to pin number

The PCB design and the Arduino library are made available under an open source license.  Please feel free to use them and enhance them.  If you find them useful, please let us know - we’d love to hear from you!

 

Go To Top