Compact IO Expansion
G McMurry
Posts: 134
Hi,
I am new to this board, but not new to STAMP Projects.
My basic use of the Basic Stamp has been to control my model railroad. I have been using distributed STAMP processing on my large O-Gauge Layout for many years.
I am currently building an actual model train that I can ride. The locomotive is powered by an 18HP Gas over Electric system and I want to build a BS2 control system for it.
I have used the 74HC595 / 74HC164 combination for expanding input / output on my Stamp modules before and it works pretty well. Recently, I noticed the DC-16 IO expansion board. I am wondering if the control chip on that device or something similar is available out there.
I want to get at least 8 input and 8 output lines using the smallest PCB footprint and the least number of Stamp IO pins.
I would also enjoy exchanging ideas with anyone else using the STAMP for model railroad control.
THANKS!
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
AUTOMATE EVERYTHING
http://www.trainyard.net
Post Edited (G McMurry) : 3/19/2009 2:46:20 PM GMT
I am new to this board, but not new to STAMP Projects.
My basic use of the Basic Stamp has been to control my model railroad. I have been using distributed STAMP processing on my large O-Gauge Layout for many years.
I am currently building an actual model train that I can ride. The locomotive is powered by an 18HP Gas over Electric system and I want to build a BS2 control system for it.
I have used the 74HC595 / 74HC164 combination for expanding input / output on my Stamp modules before and it works pretty well. Recently, I noticed the DC-16 IO expansion board. I am wondering if the control chip on that device or something similar is available out there.
I want to get at least 8 input and 8 output lines using the smallest PCB footprint and the least number of Stamp IO pins.
I would also enjoy exchanging ideas with anyone else using the STAMP for model railroad control.
THANKS!
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
AUTOMATE EVERYTHING
http://www.trainyard.net
Post Edited (G McMurry) : 3/19/2009 2:46:20 PM GMT
Comments
There are several I2C I/O Expander chips available with 8 or 16 I/O pins. These need only two Stamp I/O pins. They're convenient to use with the Stamp models that have the I2CIN and I2COUT statements (the BS2p models). You can have up to 8 of them on a pair of I/O pins (0/1 or 8/9). The PCA9554 is 8 bits and the PCA9555 is 16 bits.
Thanks!
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
AUTOMATE EVERYTHING
http://www.trainyard.net
My forte is mechanical and electronic, not software. I have done pretty well with most of my apps using the Basic Stamp interpreter so far. The examples in the Stampworks manual have gotten me through just about everything I have done.
Using i2c with this chip is going to be a challenge for me. Can anyone point me to some examples of using i2c to talk to these devices in Stamp Basic?
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
AUTOMATE EVERYTHING
http://www.trainyard.net
Post Edited (G McMurry) : 3/25/2009 2:29:35 PM GMT
I have a microcontroller-based system for my O-gauge pike that provides complete automatic control of multiple trains on the layout. Trains are identified by RFID and stopped/started/routed based on signals from conventional insulated rail sensors. The microcontroller also controls track signals showing the occupancy state of each block. Some day I will develop a web or touch-screen interface to allow for interactive display and control, but that is a little beyond my skills right now.
I started off using a Stamp and it was a great platform for learning about microcontrollers, but the system soon exceeded the Stamp's capabilities. So I turned to another microcontroller that offers BASIC programmability but has more speed, memory, serial ports, interrupts, etc.
www.awce.com/pak3.htm
I haven't used these myself but they look fun! They give you the ability to do almost everything you could do with the bs2's own I/O pins (HIGH, LOW, RCTIME, PULSIN/OUT, etc). Maybe a little over-kill for what you need, but it's an idea.
Another idea is to use one 74HC299 Serial<->parallel shift register in place of your 74HC595 and 74HC164. All of the 8 I/O lines have to all be input or output though--can't mix.
This would let you select what options you'd want and keep the cost very low.
An SX could do everything the overpriced Pak3 can do plus a bit more so it might be a good route to go.
I'd be willing to make one up custom if you'd like. PM me if interested.