64 I/O Expander Shield for max 1024 I/O

Hi to all, for my home automation project i would like to use lots of MCP23017 expander for increase digital I/O pins of arduino (in my case Yun).
As i wrote in this discussion Some problems with centipede Library - Arduino Yún - Arduino Forum i bought a centipede shield clone (only one available in europe) but, as you can read in topic pcb was wrong because chip3 had the same address of chip0.
So now, i would like to build a new shield (only for digital I/O, no Analog I/O) that can be like for some things better than this bad copy and (i hope) a little better than centipede (http://macetech.com/store/index.php?main_page=product_info&cPath=4&products_id=23), that can be use it only until 128 I/O (2 boards).

With this new shield, you can use until 16 boards, for a total of 1024 I/O ! :smiling_imp:

With the big big help of "ShapeShifter", this is where we are until now. :stuck_out_tongue:

There is three things that i would like to say:

  • First one, components are fit for don't stay above RJ45 and USB of Arduino Yun
  • Pin out schema of every MCP23017 has VCC and GND at bottom
  • I would like to use SMD only for MCP23017 and 74*85, because i want that solder components will be easy

Nothing to say more, if not that I accept every type of comment, suggestion or criticism (only if for improve).
I'm not an expert! I think that there is always to learn, from everyone, so i hope that many of you can help me to build a shield that, first of all, will work! :stuck_out_tongue_closed_eyes:

Topic read 50 times, nobody answers.. maybe i wrong the section? :confused:

Curious... I figured it would get good exposure here. :neutral_face:

Me too... :roll_eyes:

so.. Do we consider the schematic as right? :stuck_out_tongue:

I'll try to build the layout..

I think you may have trouble getting the board routed with that placement - you have a lot of signals to drop from the chips down to the connectors. You may have to lengthen the board left-to-right to make room. Or try rotating the chips 90 degrees.

Thanks for your suggestion, i'll give it a try! :wink:

Some comments about schematic?

I don't see anything needing changes.

CrossRoads:
I don't see anything needing changes.

Thanks!
So now layout time! :grin:

CrossRoads:
I think you may have trouble getting the board routed with that placement - you have a lot of signals to drop from the chips down to the connectors.

Yes, it's tight, but I think it can be done. I've just done up a quick proof of concept, and I think it will work. See the attached.

I was originally having trouble with the capacitor, so I moved it. Then I ran into an impasse where the control bus signals couldn't be routed through the data lines because there were already top and bottom traces.

So I spun the chips 180 degrees, and the connectors 180 degrees. The data lines fit, and don't interfere with the control bus. I now see there is room for the bypass cap in the original place, but I didn't bother updating the drawing.

It will take some care, but I think it will fit.

CrossRoads:
I don't see anything needing changes.

I've made all my comments in that other thread, so I have nothing further.

layout.png

ShapeShifter:
Yes, it's tight, but I think it can be done. I've just done up a quick proof of concept, and I think it will work. See the attached.

I was originally having trouble with the capacitor, so I moved it. Then I ran into an impasse where the control bus signals couldn't be routed through the data lines because there were already top and bottom traces.

So I spun the chips 180 degrees, and the connectors 180 degrees. The data lines fit, and don't interfere with the control bus. I now see there is room for the bypass cap in the original place, but I didn't bother updating the drawing.

It will take some care, but I think it will fit.
I've made all my comments in that other thread, so I have nothing further.

Can you tell me widths of wire and via that you use? :slight_smile:

This is what I've done until now.
I didn't use autoroute, i prefered to do it manually.

The problem is that DRC tells me that i've too little space between wires, too little width of wires and too little drill size. :sob:

Some help?

What is the min size of wires and vias for no DRC errors?

10 mil (0.010 inch) traces on 25 mil (0.025 inch) centers with 13 mil (0.013 inch ) vias. (I'll leave it to you to figure the metric equivalents.)

Well within the abilities of a board house like OSHpark without hitting the limits (except for vias which are right at the limit - I prefer vias a little bigger at 20 mil, but they take up more room and don't fit between 25 mil trace spacing.)

You will, of course, need to use minimum sizes that correlate to your board house's abilities, but there is at least one house out there that can handle it.

leen15:
This is what I've done until now.

A good start! I like how you used the heavy traces for power. But you need to keep them heavy between the connectors as well. Also, use heavier traces to power the chips, especially between the bypass caps and the chips. It's going to be tough to get power and ground to the connector power pins, because those parallel top and bottom traces act as impenetrable barriers (unless you go to four layers and add power and ground planes.) it would be better to put the power pins on the other end of the connectors, that way you can run a heavy bus right down the row.

Sometimes, you can't do the perfect pin ordering on connectors, and sometimes you could but it's not worth the effort. If you put the power pins on the opposite end, it may not line up directly with a relay board: bit 0 goes to 7, 1 to 6, 2 to 5, and so on. Not ideal, but you can work around that in software with a pin translation lookup table. (Or just put stickers on the relay board with the correct logical PIN number!)

Another thing to watch out for are "acid traps" which is where a trace intersection forms a tight acute angle. Take a look at how the SCL trace leaves the header pad. It forms a tight narrow corner that can trap acid during the etching process and eat away too much of the trace (or something like that, I don't know the details, just that it's a bad idea.) compare it to the SDA trace, and toy can see where that little bit of vertical offset has it leaving the pad almost perpendicularly. Oval pads can make soldering easier, especially on long leads, but I prefer round or octagonal pads because you don't have to worry about departure angle so much.

I didn't use autoroute, i prefered to do it manually.

Autoroute is horrible, you are wise to stay away from it. I clicked it once to see what it would do with a simple layout, and it was really ugly. I'm sure it won't handle this board, it would just lay out a bunch of meandering random traces, and then give up, leaving you no room to do the rest.

Besides, I like manually routing: I find it relaxing and a fun puzzle to solve.

The problem is that DRC tells me that i've too little space between wires, too little width of wires and too little drill size. :sob:

Are you using the default DRC rules? The minimum sizes and spaces they use are pretty big. You need to choose the board house that will make the boards, and get the minimum parameters from them. Things like minimum trace width, trace spacing, via sizes, clearances, etc. Many board houses will have Eagle rules files you can download and load directly, others you will have to enter manually (and if that's the case, make sure to save then to a settings file for later use.)

What is the min size of wires and vias for no DRC errors?

It depends. The better the board house and the processes they use, the finer work they can do, and the smaller values you can use. Go cheap, and their limits will often be bigger. If you plan on etching the board yourself, then you probably want to increase the size of the default limits. (This board is complex enough that I don't think home etching is going to be practical.)

This is already too much typing to do on a tablet. I'll take another look at this when I get to my computer and see if I see anything else.

I use the DRC and CAM files from iteadstudio.
Signal traces: 10 mil wide, 10 mil clearance, 12 mil drills.
Set the routing grid to 2 or 1 mil.
I have no issues with the Eagle autorouter in general. It does a decent job, and if it's struggling that's a good sign your placement needs work. You'll have to go thru and clean up right angles and do some trace placement adjusting to get some of the grounds connected sometimes.

Select Edit:Net Classes to define the signal widths.
You could set Default as noted: 10 mil wide, 10 mil clearance, 12 mil drills
And then add Power with the width you used, 10 mil clearance, and width +2 or +4 for drills.

Could also go SMD for the other caps, the resistors, the diode, and use DPAK regulator package. Select one with IN-GND-OUT for leads so the tab can be soldered to the ground plane for cooling.

I just redraw the board and used 8mil for clearance and 0.254 for wire width.. should i use 10mil for clearance? i have to increase a lot the width of entire board for use 10mil of clearance.. :confused:

I would like to use no SMD components for what i can.. only chips in smd.

You're already SMD for the chips and some caps, so you're going to need a stencil no matter what - bit the bullet and place a few more SMD components and have most of the board all done in one reflow pass. I use stencils from pololu.com. Select 3 mil mylar so the chips don't get too much paste.

8 mil clearance should be fine with those few parts. Be sure to have solder mask applied or bridging could be an issue with the chip legs.

I never solder SMD components, but as i saw here at minute 18:20:

i can use soldering flux that is available in europe and it's easy to use for what i can see.

For now i used only SMD for chips. Caps and other components are normal :slight_smile:

I'm back... Bringing up the layout on a larger screen lets me see more details. A couple more observations...

I see you're running a ground bus. Usually, I ignore the ground signals while routing, and then at the end I use a pour to fill in all of the empty space with copper, and name them as GND, top and bottom. This acts as a giant ground plane, and usually makes the routing easier. You can type in the "ratsnest ! gnd" command to turn off the ground airwires so they don't get in your way. Or you can get the properties of one of the ground signals in the board layout and check the "Airwires Hidden" check box at the bottom of the dialog.

Looking at ground, you've got a nice thick trace all the way to the first IO connector. Then it becomes a thin trace that snakes through the grounded pins on the chips, and cascading through to all of the other chips and connectors. There are thick traces between the ground pins on the connectors, but that isn't accomplishing much. Any current drawn by the board plugged into the last IO connector will need to draw through all of those skinny traces, and will affect the ground reference for every chip and IO connector leading up to it. This can cause noise and unwanted operation.

A large ground plane can help with that. But with such a crowded layout, you have to make sure it isn't breaking up the ground plane too much and there are still places for the current to flow. Often times, it necessary to scatter vias around that have no traces on them, but which stitch the upper and lower ground planes together That can help the current flow past a long trace bisecting the board, or give it a path to an island that would otherwise be isolated. Having the power pins at the bottom of the IO connectors will help in that regard, since the heaviest draws (the connectors) will have a short almost direct connection to the shield ground pin. Of course, the same thing can be said about power -- keep those thick through the whole run. As it is now, it has the same limitations as ground.

I try to keep traces as straight as possible. It's mostly cosmetic, but it doesn't hurt to minimize the trace length, especially on higher current traces. Take the power line fro your 3 pin select jumper. It goes over to the resistors, then up to the connector. On the way to the connector it makes a 90 degree bend and a couple 45 degree bends. If you got rid of the 90, and extended that short angled section towards the resistors, it would shorten the trace. But, if instead you jogged over a little from the select jumper, and brought it straight up the side of the connector, it would be even shorter. Then, you could run a trace through the DIP switch pins and go straight horizontally to the thick trace. That can be a skinny trace, as that part of the circuit will draw a maximum of 2 mA with all switches on (and none with them all off.)

I see you have plenty of acid traps, for example on the outside of IC5 pin 4, the bottom of pin 8, and the Y connection on the inside of pin 3.

You've got some long runs of address lines between the IO pins and the decoder on the far left, and they are running through prime real estate. You could shorten those lines considerably by putting the address logic in the middle of the board, and shoving IC3 and 4 over to the left. (Oh, wait... that will make them interfere with the Ethernet and USB ports on a Yun, won't it?)

These are just some comments and observations, but I am in no way an expert. It would be nice to get some feedback from some who are more experienced in good board layout.

From earlier comments, I get the idea that you are pretty new to this. Well, if that's the case, it doesn't show. It looks pretty good! MUCH better than the layout of that kickstarter board you began with.

As for stencils, it does make life easier. But for limited runs, hand soldering a few chips is not a show stopper, especially the "bigger" chips like these. But you definitely do want soldermask! Where I work, we do all of the prototype boards by hand, even the big boards and the really tiny parts. About the only parts that get sent out to a fabricator for assembly are BGA chips, and then we do the rest of the board when it comes back. (The setup costs for sending the whole prototype board out for assembly are too high when you're talking just 3 to 6 boards.)

leen15:
https://www.youtube.com/watch?v=z7Tu8NXu5UA&feature=youtu.be

That's a good informative video. He makes it look so easy! Of course, it's a lot of practice to get to that point. :smiling_imp: One of these days I hope to be able to solder that well.

I then looked at the video he links to, where Mike is showing some parts placement tips. Man, he talks so fast and jitters his hands so fast, I have a headache after watching it. :confused:

In my last post, I mentioned how it would be nice to have more feedback from people. I don't know how, but I completely missed all of the great posts and tips from Crossroads, all I saw when I made my last post was his last one about stencils. I'm sorry if my comment made it sound like I was ignoring or dismissing those posts, it wasn't my intent.