SPCoast
Railroading on the Southern Pacific Coast

IOShield

From SPCoast

Jump to: navigation, search

This is a work in progress

In particular, the board design is going through many revs because I want to experiment with many alternative layouts...

Contents

[edit] Introduction

A simple I2C based 32-pin Arduino I/O Shield with monitoring LEDs on each pin (Active-LOW inputs, LED is on when pin is grounded, writing a "1" to the port pulls it to ground). Up to 4 boards can be used together, for a total of 128 i/o points, though a larger (1A @ 9v) external power supply should be used to power the I2C expander/shield stack instead of relying on the Arduino's onboard supply.

[edit] Features

  • Stackable (up to 4 nodes, 128 I/O points)
  • Arduino Shield compatible

[edit] Cautions

The total current draw from "Vin" can become excessive if many LEDs are connected and driven - 256 LEDs * 5mA is 1.25A! Each board can be driven by an external DC power supply to address this issue.

Each IOShield has its own onboard regulators for IO Port power and onboard LED feedback power which are fed from the Vin Arduino shield pin or the onboard power jack.

[edit] Schematic

IOShield 1.7 schematic

[edit] PCB

IOShield v1.7 pcb


[edit] Specification

This shield is based on the 8574 I2C 8-bit IO Expander and a 74LS244 buffer/driver chip connected to a bank of LEDs that show the status of the I/O lines in real time. With 4 sets of chips on board, it provides a latched set of 32 IO points, with each point being software selectable to be either an input or an output. The individual points are reasonably protected from the environment, and can drive or sink 10 mA each. By using active low inputs and outputs, the effects of environmental noise are reduced - remote sensors only need to ground an I/O point to register activity.

[edit] Communication Protocol

Simple I2C Reads and Writes:

int I2Cextender::read8(int i2caddr) {
    int _data = -1;
    Wire.requestFrom(i2caddr, 1);
    if(Wire.available()) {
      _data = Wire.receive();
    }
    return _data;
}

void I2Cextender::write8(int i2caddr, int data)
{ 
    Wire.beginTransmission(i2caddr);
    Wire.send(0xff & data);
    Wire.endTransmission();  
}

[edit] Programming

See IOShield_Code

[edit] Hardware

[edit] Bill of Materials (BOM) /parts list

Part Value Package
C1-8 0.1uf C0805
C9-12 1uF 0805
D1-7 BAV99 SOT23
DZ1-9 WP934SB/4GD LXH434X
F1 PTCPTH PTC
J1-8 RJ6-6 520250-3
J13 DC2.1mm DCJ0202
JP1-6 0.1inch header 6x2
JP7,8 - 1X05-2MM
R37 4k7 0603-RES
R38 4k7 0603-RES
R40 1k8 R0603
R41 1k8 R0603
RN1-9 CTS742C083 CTS742C083
U1,2 PCF8574AT SO-16DW
U3,4 PCF8574DW SO-16DW
U5-8 74LS244DW SO20W
U9 ARDUINO_SHIELD DUEMILANOVE
VR1,2 V_REG_MC33269DT DPAK

[edit] Version Tracker

Revision Descriptions Release
v1.0a Initial prototype, used a non-Arduino form factor with a single IO expander per board, proved to be not high enough density IOShield v1.0a 8-bit pcb
v1.0b Initial prototype, used a non-Arduino form factor with a single IO expander per board, proved to be unstable when stacked more than 8 units high IOShield v1.0b 16-bit pcb
v1.1 Didn't validate package sizes -vs- available parts, boards were unusable IOShield v1.1 32-bit pcb
v1.2 Missing connection between 8574 and 74ls244, jumper pins impossible to reach when boards stacked IOShield 1.2 - note jumper wire
v1.3 Fixed layout, replaced diodes with SOT versions for easier assembly. N/A
v1.4 Combo board, stackable and chainable, LED display in 4x8-bit chunks. Much longer I2C signal path makes this version undesirable. IOShield 1.4
v1.5 Shield-only, cost reduced, LED display in chunks. Allows for daisy chained I2C/Power connections. Not Produced. IOShield 1.5
v1.6 Combo board, stackable and chainable, SMT LED display in 8-bit rows. Allows for daisy chained I2C/Power connections. Much harder to assemble IOShield 1.6
v1.7 Shield, stackable, PTH LED display in 8-bit rows. Allows for daisy chained I2C/Power connections. IOShield 1.7

[edit] Original Idea

This board was originally produced to help me build control panels for my model railroad - I needed to connect many different buttons, switches and lights to an Arduino, and also connect the Arduino to a communications bus (Ethernet, CAN or Loconet), and I couldn't find anything that had both high IO point density AND visual feedback.

[edit] Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under LGPL, see source code files for details. The Eagle CAD files are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License