Input on first(second) PCB design. - Page 1
Forum section: electronics / projects

author: KaptenFrans
author_rank: Contributor
timestamp: January 09, 2015, 11:59:50 pm
content: Hello everyone!A couple of weeks ago I ordered my first PCB from seeedstudio. Tonight I finally had a few hours of free time, and decided to populate it only to find out that horrible, irreparable, mistakes were made.I've designed a couple of boards for home etching in the past, where a faulty design meant an hour of extra work.However, I sat down and re-routed my design (Took the extra time to skip the autorouter, and I'm much more pleased with my result).Before I order a new batch, I'd be grateful if someone could take a quick look on my design to see if I've made any huge mistakes or any stupid/illmannered design choices.The project is a Binary Clock based on WS2812B and an ATMEGA328 which when successful will be released as OSH and OSS. Unfortunately a RTC didn't make it into this design, but might do in the next version.Also, I need a micro usb connector that's mounted perpendicularly to the board. Anyone who knows if such a thing exists?Gerbers and schematic are found here:https://www.dropbox.com/sh/hphrzamex0ec9ic/AACcUNm_hTSDfG8fjy3sb6upa?dl=0Thanks in advance, bedtime (01AM up here)!Take care!(First post in the forums! O0 Woop!)Edit: Added pictures of top and bottom layer and both combined as well.I was thinking about the unused I/O on the MCU, should I just ground them or let them be as is?

author: pyrohaz
author_rank: Regular Contributor
timestamp: January 10, 2015, 02:28:42 am
content: I've never actually had a problem with this myself but you might want to mitre some of your right angle corners as I remember reading that these sharp corners can home acid traps and get etched more so than expected.On the other hand, with modern PCB manufacturers, I believe this is less of a problem.With your tactile switches, I generally add a capacitor in parallel with switches to help with debouncing. I should really put a schmitt trigger in but through a bit of software, I can get with of nearly all switch glitches.You should also add decoupling capacitors to your regulator too. An unstable power supply can be really annoying to debug at times! I had a really annoying power supply problem with loads of high frequency noise being coupled into the ground plane. Turned out, I had routed the ground plane under the switching terminal of my buck converter! All my audio section sounded terrible on that prototype. Obviously your using a linear regulator but still. Also, if you're driving all your LEDs at 20mA and your using a surface mount regulator, watch out for the heat dissipation! There is only a small patch for the tab to attach to.

author: rx8pilot
author_rank: Super Contributor
timestamp: January 10, 2015, 03:53:47 am
content: My suggestion would be to attach view-able files to the your post so that we don't have to hunt down your files, download, use a gerber viewer etc. The less work required, the more actionable help you will likely get.I am viewing this on a tablet and have only a few minutes available - if I could see, I may have a few nuggets of help to offer.

author: KaptenFrans
author_rank: Contributor
timestamp: January 10, 2015, 07:58:42 am
content: Quote from: pyrohaz on January 10, 2015, 02:28:42 amAh, okay! I knew to minimize the amount of right angle corners, but I thought it was about signal integrity in high speed applications and I didn't think it would matter for my purpose. I will change as many as I can!About the debouncing cap, do you have any suggestion of values? If so, where do these values come from?Ah, totally spaced on the decoupling. Yeah, I've kind of worried about the heat. The design will be mounted in a milled aluminum block, would it be a good idea to create a thermal connection between the capsule of the regulator and the case?Thanks for your input!Quote from: rx8pilot on January 10, 2015, 03:53:47 amOh, sorry about that. I've added attached pictures of the top, the bottom and both combined as well as a zip file with the gerbers. Thanks for the tip!

author: rexxar
author_rank: Frequent Contributor
timestamp: January 10, 2015, 08:53:25 am
content: For the unused IO, what I've been told is to just leave the pins unconnected and set internal pullups. You also want to make sure your ground fill a) connects to every point and b) doesn't get too narrow for the amount of current it's carrying. It might not be a bad idea to stick a via or two under each LED considering you've filled the whole bottom layer with ground. In fact, it looks like LEDs 3, 8, 9, and 16 don't actually connect to ground. Did you do a design or electrical rule check in PCB software? Are the Vcc traces for the LEDs thick enough to carry the required current?Button debouncing can be done easily in software, but 1uf caps work for me. I picked that value mostly because I had about 8 other 1uf caps on the boardThat regulator could definitely do with some heatsinking. Since the bottom of your board is empty, what I would do is place a small rectangular fill on the top side of the board connected to the tab, and a bigger one on the bottom. Stitch together with a bunch of vias and you're good.You should put the bypass caps physically closer to the chip, especially since your traces are so thin. The whole point is to account for inductance in the traces, so you want to keep the traces to the caps as short as you can. You've got plenty of room for it. You'resupposedto use a decoupling cap for each pin, but in my current mega328 design, I just used one for pins 4 and 6 since they're so close together.As for USB ports:http://www.mouser.com/ProductDetail/Molex/105133-0001/?qs=sGAEpiMZZMulM8LPOQ%252bykw6hrf%2fTgEK7uCJf5qM3AwQ%3dMouser has a few other varieties as well.

author: Christopher
author_rank: Frequent Contributor
timestamp: January 10, 2015, 10:20:07 pm
content: Looking pretty good.I'd add a bottom ground plane and via stich them wellHoe about moving the decoupling cap closer to the pins? Generally you wanna route the power trace into the cap the out the other side

author: KaptenFrans
author_rank: Contributor
timestamp: January 10, 2015, 10:57:49 pm
content: Quote from: rexxar on January 10, 2015, 08:53:25 amThank you!I went over the ground connections, and as far as I could see, everything looks all right. To be on the safe side, I took your advice and now there's a via under every LED. I'd done both ERC and DRC, the ERC gives "a couple" of errors, but all of them are of the kind of "Output and supply pins mixed ... ". The problem seems to be my labeling, since all of them mention my net "+5V". My guess is that I've used labels wrong somehow. However, all of the connections looks all right anyway so I assume this won't be a problem in manufacturing.The VCC traces should be adequate, I usedhttp://circuitcalculator.com/wordpress/2006/01/31/pcb-trace-width-calculator/and according to that, 11.8 mil should manage to carry 1A. I've used 24, 16 and 12mil.I've added 1uF caps to the buttons, with parallell I assumed between +5V and input on the MCU.I moved the bypass caps much closer. O0I tried to apply your heatsinking scheme, which sounds like a perfect plan, without success. I cannot get eagle to create a copper polygon connected to +5V. If I create the polygon using rank1, it fills up but won't isolate from ground when connected to +5V, if I change the rank to 2, it won't fill at all. I feel I've tried everything, but I'm new to eagle so I'm probably missing something dead simple. Tried googling a number of terms, but all tutorials on polygon fill seem related to creating a ground plane. Anyone with a suggestion? See attached files polygonproblem.That USB connector seems to be right, but it will have to wait.Thank you!Quote from: Christopher on January 10, 2015, 10:20:07 pmThanks!I have a bottom ground plane, and now I have plenty of via stiches! Caps positions updated too!

author: Yansi
author_rank: Super Contributor
timestamp: January 10, 2015, 11:43:39 pm
content: 1A for a 12mil, that looks like more a fusing current, not bearable current.The hole in the left top corner is dangerous for you MCU, if you wanna put there screw, you will screw them both//edit: Oh, the hole now become replaced by decoupling caps. Good solution :-)//edit2: Add there even more vias. At leas each ground pad of a component must have is own via to the bottom groundplane. Now you have got there a lot of places with very long connections to actual ground.Do NOT connect caps directly in parallel! The will speed up destruction of the microswitches. You can leave there a cap, sure, but add about 100 ohms in series with the cap, to limit the carent when the button is shorting out the cap on press.Make the power traces more powerous, so lets say about 32mils to 50mils those main bus bars :-)Set the main ground floodfill polygon isolation spacing to 16 mils. I think now you have only 10. Am I right?

author: KaptenFrans
author_rank: Contributor
timestamp: January 11, 2015, 12:40:34 am
content: Quote from: Yansi on January 10, 2015, 11:43:39 pmAre you sure about that?Quote from: YansiQuote from: YansiI'll look over that. I see now that C2, C3 and C4 has unnecessarily long way to ground. Is there more?Quote from: YansiCheck!Quote from: YansiI think I'll reroute the entire +5V net tomorrow. I could probably utilize the space better. Allmost all my earlier designs have been single sided, much because it's a pain to etch double sided boards at home, but also because I think it looks neater. So I'm doing all I can to cram it all onto the top layer, using thin traces and weird routes.I should be more comfortable using the possibilities! On the top of my mind I'm thinking three fat vertical power traces, and vias up to the LEDs. Would that be a good idea or am I missing something?Yes, I'm using 10 mil isolation spacing. Why is that bad?Thank you very much!Bed time!

author: Yansi
author_rank: Super Contributor
timestamp: January 11, 2015, 12:46:42 am
content: 1A being too much for 12mil.. almost sure :-P Saturn PCB toolkit also told me while ago, that fusing current is about amp and half at 10 seconds. I just woudln't risk if it can hold, a lot of space on the board still available for thicker traces.Nothing wrong with 10 mils spacing, but it does not fit with the rest. If you try 16mils, you will see the polygon spacing is almost the same as between ur traces. That the whole goal. Making PCB is like an art with lot of rules.

author: KaptenFrans
author_rank: Contributor
timestamp: January 13, 2015, 01:19:40 am
content: Quote from: Yansi on January 11, 2015, 12:46:42 amSorry it took a while, had an exam to handle. O0I've rerouted the +5V net, and made some minor changes like minimizing right angles and moved the decoupling caps on the regulator slightly. I'm quite pleased with the layout at the moment. I tried 16mil spacing on the pour, did not like it. I will stick with 10, thanks though!Quote from: rexxar on January 10, 2015, 08:53:25 amI finally got this right (I think!). The problem was that my ground pour were rank 1, and my heatsinking fill where rank 2. This eagle didn't like. I changed the rank, so that the ground pour's rank is 6 and my heatsinking fill is rank 1 and that did the trick! The bottom fill for the small heat sink i around 8x11mm, which according to the data sheet seems to be all right even without a mounted heat sink, if I read the datasheet correctly.Thanks guys!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 13, 2015, 01:52:58 am
content: Stitch that ground pour!Tim