Go Down

Topic: Stackable shields (Read 4 times) previous topic - next topic

aballen

If this has been touched on, please point me to the thread.

I was wondering if there has been any though on stackable shields.  What I mean is I can see there being conflicts on shields and pins if one wants to stack more than one shield on a arduino.  There are not a lot of shields out yet, but I can see this becoming a problem in the future.

I was thinking jumpers on a shield could sort out this problem, letting the user set a jumper to decide which pin on the arduino actually connects to io on the shield.  The jumper would have to do 2 things.  connect the io and short the pin so it does not pass through to the next shield.

Seems like that would increase the cost of a shield, but not by much, but it may take up a bit of space.

The other option I though of was designating a set of pins for certain purposes... lots of problems with this idea,  how many for what... etc...

A combination of the two could work too, say pins 2-8 for sensors(input) a few pins on the shield decide, and all other pass through the next shield.... pins 9-12 for output, again with pins, analog io on analog 0-5 again with a few pins...

For the user it seems like a simpler option than having multiple arduinos for multiple shields... not that I'm trying to turn these into legos... I'm curious to hear your thoughts on this... cause I'm a newb, and I'm probably over simplifying.

mellis

It would certainly be nice to make it easy for people to stack shields, but I don't know if it's clear the best way to do that.  A lot of shields have specific requirements about which pins they use (e.g. the PWM outputs), and many use all or almost all of the pins.  Also, it can be expensive just to use the long pin header that allow you to physically stack the shields.  Still, I'd love to hear more thoughts on this, it could be good to come up with some guidelines.

ladyada

ive got some stacky headers in the shop if people are interested in playing with them
i haven't had a good reason to stack stuff (yet) but i figure people have been asking about it ...
http://www.adafruit.com/index.php?main_page=product_info&cPath=17_21&products_id=85

kg4wsv

I haven't tried this yet, but I was thinking about those long pin headers being hard to find.  A workaround would be to have two rows of through-holes for each bank of headers, offset by the same distance (this bit is critical).  One set of holes (e.g. the lower set) would be for standard male headers to plug into the lower board; the other set of holes would be for standard female sockets for the next board up.  One could flip-flop which set of holes got used for which (e.g. lower set male on one, then lower set female on the next) so you get a zig-zag effect instead of the leaning tower of Pisa.

Maybe not as neat/pretty/compact as the wire-wrap headers, but it would use standard parts.

-j


aballen

#4
Feb 18, 2008, 09:47 pm Last Edit: Feb 18, 2008, 09:48 pm by aballen Reason: 1
ladyada, your new motor controller board actually got me thinking about this.  

I can easily see a small autonomous vehicle using an arduino, your motor/stepper/servo board on top... but anything autonomous will need sensors too... so another shield with a few bump sensors, a pir, maybe an ultrasound.... while I'm at it why not another board for gps, or wireless so it can report back on its scouting.... I'm sure I've run out of pins by now, but you get the idea

There are probably a lot of reasons to stack shields.  

Maybe the best(and cheapest) option is to just make pins selectable via jumpers to help avoid a conflict?  Then if someone wants to stack boards its up to them to use stacky headers where needed?

A different solution could be a protocol?  I've seen one that was pretty clever, you configured each device(in this case a shield) to listen to pin x as device 0, 1, 10, etc... then rest of the byte was the command.... then you just share the pin.... that saves a lot of output pins.


Kg, your idea totally works, but what about two shields needing the same pin... thats the part where I think jumpers would be helpful.

Go Up