Go Down

Topic: Arduino PCB Shield Design Tips (Read 16309 times) previous topic - next topic

CarlW

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.

CrossRoads

CarlW, what shields have you had developed that you are basing your tips on?
Some are good, some are just okay, some could be considered flat out wrong:
"Sharing a ground is usually a good idea."
A common ground is mandatory unless ALL signals wll be optoisolated.
And some seem contradictory:
" Avoid using specialized Arduino pins" vs "bring up every unused pin to headers."

I do agree with this
"Hire a professional to design your Shield, based upon your requirements."
however this will not help your learning as much as struggling thru a design yourself, discussing it here in the forum, even if you don't end up using that particular design.
Hiring a pro is good way to save on this step:
"Verify your circuit design and arduino sketch with breadboards before you design a Shield!"  A pro can take your design, ask smart questions and correct errors, then proceed to crank out a design that will work the first time.   Your software may still need tweaking, but the hardware will be correct.
For example, this card, and the other cards here, are one pass designs.
Sometimes a 2nd pass with minor changes is needed to solve something that comes up during additional testing, or for a change in requirements or a part becoming unavailable.
http://www.crossroadsfencing.com/BobuinoRev17/
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CarlW

Thanks Crossroads,

I thought I spent a lot of time searching for tips on how to design a PCB shield for an Arduino on this site and other sites and didn't really find much information; I thought this might be the appropriate forum and do appreciate your feed back.

Any other tips?

To answer your question, I have not designed any PCB shields. I commissioned a few.

CrossRoads

Sparkfun has a series of Eagle tutorials, there's a good list of do's & don'ts there for the PCB implementation - not on the actual circuit design tho.
Outside of that, it comes down to experience - first in electronic circuit design, then in actually laying out a board.  A poor design will have problems, a poorly layed out and routed board will have problems, a poorly assembled board will have problems.
An EE degree and then experience designing stuff comes in handy 8)
Outside of that, practice practice practice, and learn from mistakes.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

Quote
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.

Quote
I have not designed any PCB shields. I commissioned a few.

Huh.  Can you go into more details on how this worked, and how much it cost?  I mean, it's not "bad" advice, but in my experience "higher a professional" is usually MUCH more expensive than most Arduino-class users expect, unless you can somehow convince them to do it "for the good of the open source community" or something.

Quote
C.   If you start your shield design with the sparkfun mega shield file, make sure you move...

Maybe you should just find a starting point that isn't broken.

Quote
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.

The "normal" Arduino shield size (about 55x70mm) is a bit unfortunate in that respect!


graynomad

Quote
Hire a professional

I second that, given that I'm one of those professionals :)

Trouble is everyone seems to think because electronics is fun the "professional" should design the Steve Jobs wannabe's project for the love of it.

If I'm going to work for naff all I'll work on my own dream.

_______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

CarlW


Quote
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.

Quote
I have not designed any PCB shields. I commissioned a few.

Huh.  Can you go into more details on how this worked, and how much it cost?  I mean, it's not "bad" advice, but in my experience "higher a professional" is usually MUCH more expensive than most Arduino-class users expect, unless you can somehow convince them to do it "for the good of the open source community" or something.

Quote
C.   If you start your shield design with the sparkfun mega shield file, make sure you move...

Maybe you should just find a starting point that isn't broken.

Quote
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.

The "normal" Arduino shield size (about 55x70mm) is a bit unfortunate in that respect!




Thanks for the tips and for reading!

I can share more information. I commissioned a shield for the MEGA. Not incredibly complicated. I'd attach a picture but the upload folder is full?

Hiring a professional - $300. Revisions because MY original circuit didn't work as intended. $200.
Compared to buying the hobby version of Eagle @ $169 and learning that software and lots of trial and error.

I did search before posting this thread to try and find tips on designing a shield PCB for the Arduino. My comment about the sparkfun shield is based upon issues with mounting hole alignment. Again, I didn't design my shield. Just noted that it's worthwhile to check for the appropriate board revision.

I still think it's a good tip but really am hoping for MORE TIPS.  :)
If one does go to a professional? What is the best way to get the most bang for the dollar? In my case, my breadboard circuit had flaws. I tested it with what I thought was a realistic scenario but should have used the ACTUAL devices I was trying to interface with. I know that doesn't make much sense.

My PCBs were purchased from Seeedstudio.com and their price breaks are based upon 5 cm increments. I definitely could have stated that more clearly. Other PCB manufacturers base their pricing differently.

CarlW


Quote
Hire a professional

I second that, given that I'm one of those professionals :)

Trouble is everyone seems to think because electronics is fun the "professional" should design the Steve Jobs wannabe's project for the love of it.

If I'm going to work for naff all I'll work on my own dream.

_______
Rob




I'd enjoy reading your tips! If I came to you for a shield, what could I do that would help you? What experiences have you had with Arduino PCB shields that you can share? Is there somewhere on this site (or elsewhere) where one can contact professionals for their services?

CrossRoads

I design boards all the time for folks as well. If one has a working prototype, then minimal time is needed. If I am working out parts of the design, chasing down connectors, making decisions on components, etc. that takes longer. I am pretty flexible. You can see some of my designs here
http://www.crossroadsfencing.com/BobuinoRev17/
As for tips, it's hard to express years of design experience as tips, when so many things I do I just without thinking about it too much anymore.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

You can post in the Gigs & Collaborations sections, guys like me will find your post.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

graynomad

Quote
what could I do that would help you?

What Bob (Crossroads) said really.

Fully working schematic. If it's not in Altium format then I will have to re enter it.

Full BOM with exact part numbers and package type for each component. It can take 30 minutes just to find the right resistor and that's probably one of 100 components. Admittedly though most components are easy to find and not critical so your 470R LED current-limiting resistor does not need to be fully spec'd, but a 500R across a 4-20mA current loop being read by a 16-bit ADC does.

Exact specs for the board size/shape, location of mounting holes etc. If it's a shield then that's normally a given.

Laying out a PCB is not normally a huge task unless it has to be very small for the number of components. I've done some that get to the state where it can take an hour or more to run a single trace. So if you want to pack 10 pounds of shit into a 5-pound bag then that will cost a lot more.

This



is a section of a board I'm working on right now, try and get another trace through that lot :) Plus even though it may look like there are some spaces they are often left to allow ground planes to squeeze through and the planes are turned off in this pic. I've done worse but this is all I can find now, 6mil traces and 4 layers, I was tempted to go to 6 layers but that's usually an overkill.

And this



is an ATmega1284 Arduino-style/compatible board, 21x48mm in size with  a lot of constraints due to the 30-odd connections that cannot be moved. That turns a few-hour job into a whole-day job or more.

If you have a typical Arduino shield (which is huge) and only 3 components (which is typical) of course life will be a lot easier.

Quote
Is there somewhere on this site (or elsewhere) where one can contact professionals for their services?

Try these as well as the Gigs board.

http://jobs.arduinoexperts.com/
http://www.themicrohive.com/the-hive-team

Neither are very active though AFAIK.

______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

I try and stay with 2 layer boards, prices jump up for 4 layer cards.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

Quote
Compared to buying the hobby version of Eagle @ $169

The freeware or "lite" ($49) versions are usually sufficient for "hobbyist shields."

CrossRoads

Yes, you can do quite a lot on an 80x100mm board.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

graynomad

Quote
80x100mm board

That's essentially a football field these days :)

Yes 4 layers does drive the cost up, but it makes life a lot easier (even possible) with small boards.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up