Just wanted to share my thoughts.
Please share your comments, advice and suggestions.
Arduino PCB Shield Design Tips
January 10, 2014
There are a lot of “Proto” Shields available. Proto Shields are useful for prototyping many different circuits but not very useful for creating a custom PCB Shield for a specific, dedicated purpose. Proto Shields are flexible, by design, and support a variety of uses. The same flexibility that is a strength for a Proto Shield is a weakness for a specific purpose, dedicated Shield.
If you are designing your own Shield to accomplish a specific dedicated purpose, these are the tips, thought of to date, in order of priority:
I. Shield Tips
A. Verify your circuit design and arduino sketch with breadboards before you design a Shield! Use more than one breadboard if needed. Finalize your software and test your circuit design with the actual items your circuit is interfacing with.
B. Hire a professional (like Dr. Liu at Inmojo.com) to design your Shield, based upon your requirements. You will end up saving time and money without a painful, learning curve.
C. If you start your shield design with the sparkfun mega shield file, make sure you move the bottom left mounting hole 0.05 inches to the left to make it 3.25 inches to the left of the bottom right mounting hole. Arduino team went from 3.20 inches for MEGA1280 (sparkfun designed it) to the 3.25 inches for MEGA2560 (Arduino team designed it - ? -). Check for board revisions as well; e.g. UNO R3
D. Place a power block on your Shield to power the Arduino; this could be used for a hardwired connection to your Arduino / Shield in case the Arduino power jack is covered or in some cases, just for convenience. Your Shield could also have an inline fuse.
E. Proto Shields typically have strips of 5V pins and ground pins. If the devices on your circuit are using a lot of power; consider powering your devices with a separate power supply and provide a separate power path on your Shield for your devices. Sharing a ground is usually a good idea. Allow for another power block or use an additional female power plug similar to the Arduino. Don’t exceed the recommended power rating of your Arduino.
F. Don’t place Shield connections near the Arduino’s USB connector, power connector. You can add the dimensions of the USB connector and power jack (and other stuff you want to avoid) to the “keepout” layer (as polygons) in EAGLE to remind yourself to avoid these locations. This works very well if you want to hang parts below your shield design to save space (not recommended – especially near male header pins e.g. ICSP).
G. Place mounting holes in your Shield that correspond with the location and size of the mounting holes in your Arduino. Use the outer most four holes; if you can’t place holes in all of the Arduino’s mounting hole positions. Use nylon (plastic) mounting hardware to avoid contacting metal to your Shield or metal to your Arduino.
H. Make your Shield larger than your arduino and place your device connections on the outer edges. It is easy to place male pins DOWN from your Shield into your Arduino and then to solder these DOWN pins. These DOWN pins will be perfectly aligned. It is more difficult to use long pin, female headers. The long pin, female headers need to be held in place (upside down) to solder and it is difficult to assure the pins align with the Arduino. The long pin female headers use flat pins instead of the square pins on male headers and don’t “fit” as snugly as the male pins. One set of Arduino pins to consider for a long pin, female header is the Arduino header with VIN, GND, 5V, 3V3, RES. On the MEGA R3; this would be an 8 position, long pin, female header. One way to stabilize female headers with long pins (for soldering) is to stack another shield above the female headers you want to solder.
I. Place shrouded or short pin, female headers on the top of your Shield for your device connections. Your devices would then use male pins that are inserted into these female headers.
J. Provide a reset button on your Shield.
K. Provide an ICSP header on your Shield. Place a text dot at pin 1 on your Shield just like the dot on your Arduino’s ICSP header.
L. If your circuit has a lot of resistors, capacitors or other components soldered directly to the Shield, try to place devices with the same value near each other, so that there is less possibility of mixing up values.
M. Avoid using specialized Arduino pins - if at all possible. For example: if your Arduino application can use pins 8 and 9 instead of 0 and 1, it is better to avoid using pins 0 and 1. Examples of specialized pins abound on the Arduino: Serial pins, Analog pins, Interrupt pins, ICSP pins, SS, or other pins that official Arduino shields and popular shields use such as pin 4 and 10 for SD card and Ethernet/wifi chip select (or 10 for SD select for adafruit and 8 sparkfun shields) and 7 for Arduino wifi shield handshake etc. (e.g. if other pins are available; don’t use the MOSI pin to drive a LED).
II Wiring Tips
A. Use pre-crimped wires and connectors (like those available from Pololu.com) to connect your devices to your Shield. This is assuming your devices can not be soldered directly to your Shield. These wires and connectors are not polarized but do fit snugly onto or into generic Arduino connectors.
B. Use prefabricated cables (like those available from Digikey.com) with polarized connectors and use different number of positions for different connectors. For example: if three of your devices are three differently colored LEDs with two wires each; contrast 3 two positions connectors versus 1 six position connector. The 1 six position connector is more likely to be disconnected and reconnected properly as compared to 3 identical two position connectors. If each of your devices has a different number of positions; there is less confusion when disconnecting and reconnecting. It is ok to use an eight position connector and to only utilize six positions; if that helps avoid confusion.
C. If your Shield does use identical, non-polarized connectors: use a paint marker pen to color code one end of each connection. Mark both the male and female connector and/or place a colored paint dot on your Shield’s PCB. Use different colors for different connectors. The color coding will aid in distinguishing one connection from another and by simply lining up the “painted” ends, polarity can be maintained.
III Other
A. If your Shield has room; bring up every unused pin to headers. For example if pins 0 through 7 are not used in your application. Use male headers DOWN from your Shield into your Arduino for those pins. On your Shield; bring UP a short pinned, female header for those same pins, on the edge of your Shield. In this example; you could use 1 two position UP header for pins 0 and 1 and 1 six position UP header for pins 2 through 7.
B. If your Shield has room; locate a header of grounds. And if there is even more room; locate a couple of power headers (5V & 3.3V)
C. Limit your Shield size to common PCB sizes e.g 5cm x 5cm; 10cm, etc. Check with your PCB manufacturer for size / price breaks.