Author Topic: IO Expander Update  (Read 1032 times)

badcat89

  • Newbie
  • *
  • Posts: 8
IO Expander Update
« on: November 11, 2009, 01:30:18 PM »
Earlier this summer I started on a project to create an IO expander for use with the IO bridge.  It uses a serial interface to a  PIC16F88 micro to read or write to a much larger number of IO. 

Commands are sent to the micro via serial output on the IO-204.  The microprocessor interprets the command and reads inputs or changes outputs accordingly.

Expansion of the inputs is performed via an 8 to 1 analog mulitplexer, TI SN74HC4851.  This IC requires a 3 bit address to connect the desired input to the output.  This output is then read by one of the analog inputs of the 16F88, where the analog reading is converted to an ASCII representation of the A/D counts in decimal, and the result transmitted back over serial.  Use of this function requires the use of the serial smartboard, to receive the response.

Expansion of the digital outputs is via a'74HC595 shift register.  This IC has 8 outputs which are clocked in serially.  A clock, data, and latch signal are generated by the 16F88.
These ICs have the ability to be daisy chained, so the three lines from the 16F88 could allow a large number of chips for additional digital output capability, with no additional IO from the 16F88.

I've been developing different routines for the digital outputs.  The most basic allows a specific output to be toggled on or off.  I've also developed a routine that allows groups of four digital outpus from the shift register to produce the necessary pulse patterns and timing to control stepper motors.  Driving the motors requires additional hardware (transistors turned on by the shift register outputs).

The development and testing has been on a solderless breadboard, but I have also laid out and ordered a PCB that if can be used to produce as many and 32 analog inputs and 32 digital outputs.

Right now I don't have any specific projects in mind, but I wanted to create hardware to allow me to quickly setting up a project that might require numerous inputs and outputs.  Best of all, this only takes one of the four IO-204 channels, leaving the rest for other purposes.  I'm totally new to Javascript but have developed basic test programs to verify that I can controll the hardware.   I'll post again if I come up with any fantastic projects to use this on.  The IO expander could also be used for any number of other projects beside use with the IO-204, as any computer or micro with a serial interface can control it.

chrisjx

  • Newbie
  • *
  • Posts: 3
Re: IO Expander Update
« Reply #1 on: November 12, 2009, 08:24:20 PM »
BadCat,

I might have a use for your I/O Expander.  Please see my post:
Monitoring battery electrolyte levels

Basically it would require about 20 high/low inputs to be monitored.

Please let me know if what you're designing might work for this application.

Thanks,
Chris.

ohararp

  • Newbie
  • *
  • Posts: 34
    • OHARARP LLC
Re: IO Expander Update
« Reply #2 on: November 16, 2009, 10:19:47 AM »
Got any pictures?
--------------------
Ryan O'Hara
$25 SMT Stencils - www.ohararp.com/Stencils.html

badcat89

  • Newbie
  • *
  • Posts: 8
Re: IO Expander Update
« Reply #3 on: November 17, 2009, 01:28:37 AM »
I've included a picture of the breadboad version and a block diagram.

Here is a youtube video showing a demonstration of the board using 4 of the digital outputs to drive a stepper motor.  The setup is a bit of a rats nest in this video, but you can see the important parts.

http://www.youtube.com/watch?v=QCGwmjI4tzo
« Last Edit: November 17, 2009, 09:41:09 AM by badcat89 »

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: IO Expander Update
« Reply #4 on: November 17, 2009, 02:22:25 AM »
Really nice!

Thanks for posting the photo and video. Looks really good.
ioBridge Support
Community Team

ohararp

  • Newbie
  • *
  • Posts: 34
    • OHARARP LLC
Re: IO Expander Update
« Reply #5 on: November 17, 2009, 08:45:53 AM »
Good Stuff!
--------------------
Ryan O'Hara
$25 SMT Stencils - www.ohararp.com/Stencils.html