I just finished my first PCB design. I basically just took the designs from a couple different boards and put them together on one board. It’s designed to be like the Moteino with an accelerometer and LiPo charger on board. I’d appreciate any pointers on what I’ve done wrong! In some cases, I opted for long traces instead of added vias because I’ve heard that vias are not ideal, but I’d be interested to hear your comments. Thanks in advance for your time!
Schematic:
Pull up resistor on RESET is not connect to positive. Hold alt and drag it over to attach it to the net.
I would use 4.7K for the I2C pull-ups, but 10K should work fine.
Board:
Related to above: Need to run trace for reset…
The tiny lettering prolly won’t be printed as it’s too small for most houses.
No need to put values on board since they are mainly used on the schematic to generate a BOM.
Anything 90 degrees or below may cause acid traps. Traces should have 45 only. Also when a trace touches a pad should be at 90 deg. I usually have the traces come in on a corner of a square pad.
Still looking through it as the above is minor except for RESET.
I agree with Codlink, though I think that 90 degree junctions are OK. However, I have concerns about your schematic. Parts should be on a 0.1" grid. It looks like most of your parts are on a 0.05" grid, but some of the parts aren’t on that grid either. The reset resistor is an example of this. I am really puzzled about the voltage regulators. It looks like the output of IC1 (3.3v in, ??v out) is connected to the output of U2 (4.2v ?? out) which is a battery charger chip. This net is labeled “PWR”. What should the voltage be at this point? And is this board supposed to be powered by the USB port or via the SPI port?
codlink:
Schematic:Pull up resistor on RESET is not connect to positive. Hold alt and drag it over to attach it to the net.
Well, crap. I should’ve seen that one. Thank you!
codlink:
The tiny lettering prolly won’t be printed as it’s too small for most houses.
So what’s a rule of thumb for typical screen print letter sizes?
codlink:
I usually have the traces come in on a corner of a square pad.
What do you mean by this? Are you saying you come of the pad at an angle, instead of straight off the edge?
So are acid traps a problem for junctions only, or any turn on a trace? Also, do this usually come up during the manufacture of the PCB or during assembly?
Also, any guidance on standard trace widths?
Thanks, codlink!
davep238:
Parts should be on a 0.1" grid. It looks like most of your parts are on a 0.05" grid, but some of the parts aren’t on that grid either.
Thanks for taking a look, davep. I guess I wasn’t too concerned about having my parts or schematic aligned to a grid, so long as they passed the DRC. Is that a requirement by some fab houses? I assumed it was critical to maintain a minimum trace/part/pad separation, but I didn’t think that keeping a grid would be that important.
davep238:
I am really puzzled about the voltage regulators. It looks like the output of IC1 (3.3v in, ??v out) is connected to the output of U2 (4.2v ?? out) which is a battery charger chip. This net is labeled “PWR”. What should the voltage be at this point? And is this board supposed to be powered by the USB port or via the SPI port?
Well, crap, it looks like my regulator is backwards. The PWR net should be the input of the regulator, which is also connected to a battery, which is also connected to the output of the battery charger. The board should be powered by battery or USB, not SPI.
Here are the boards that I cobbled together for this design:
https://github.com/LowPowerLab/Moteino/tree/master/R4
What is SP1 for? as I see only 1 track on it.
mattylad:
What is SP1 for? as I see only 1 track on it.
It’s my understanding that I can program the Arduino bootloader using SPI and another Arduino.
mattyland is talking about SP[one]. I think matt is just using it for power…
davep238:
Parts should be on a 0.1" grid. It looks like most of your parts are on a 0.05" grid, but some of the parts aren’t on that grid either.
mattmunee:
Thanks for taking a look, davep. I guess I wasn’t too concerned about having my parts or schematic aligned to a grid, so long as they passed the DRC. Is that a requirement by some fab houses? I assumed it was critical to maintain a minimum trace/part/pad separation, but I didn’t think that keeping a grid would be that important.
The schematic is not used by fab houses, only the Gerber output files are. However, if parts aren’t on a grid, sometimes they won’t connect.
davep238:
I am really puzzled about the voltage regulators. It looks like the output of IC1 (3.3v in, ??v out) is connected to the output of U2 (4.2v ?? out) which is a battery charger chip. This net is labeled “PWR”. What should the voltage be at this point? And is this board supposed to be powered by the USB port or via the SPI port?
mattmunee:
Well, crap, it looks like my regulator is backwards. The PWR net should be the input of the regulator, which is also connected to a battery, which is also connected to the output of the battery charger. The board should be powered by battery or USB, not SPI.
According to the schematic, the VCC pin of the SPI connector is connected to 3.3v. This pin can not supply 3.3v if the board also supplies it. Also, be aware that inputs are shown on the left and outputs are shown on the right on schematics. The 3.3v output of the regulator should be shown on the right of the part (as it is currently shown). So don’t just reverse the regulator when fixing the schematic. You may need to have a battery connected to the charger chip for the circuit to work. I don’t think that the charger chip will supply much current without a battery. Talk to Sparkfun about their 10217 charger board to see what happens in that situation.
mattmunee:
Here are the boards that I cobbled together for this design:https://github.com/LowPowerLab/Moteino/tree/master/R4
All,
Thanks a lot for the previous notes. I’ve tried attached a redesign with a few changes.
-
I’ve tried to hold to a 45-degree trace angle as well as I can. On the fine pitch parts, that’s not always possible.
-
I’ve added “load sharing” capability to the charger circuit. When the USB is attached, the battery is disconnected from the main circuit. (See http://blog.zakkemble.co.uk/a-lithium-b … d-sharing/)
-
I’ve added a few more ground vias to help with noise.
-
I’ve changed all my text to a more readable size and vector font
-
I’ve double checked that all of the parts on the schematic are actually connected!!!
Questions: I get a few “solder mask” errors in Eagle. How would/should I correct these?
Any major red flags? I really appreciate everyone who takes the time to review my design!
You don’t need Gerbers when dealing OSH Park and Eagle. Just upload the brd file.
There are 2 dimension errors concerning ink over lapping solder mask
The other dimension error is half the word “USB” is over lapping a solder pad.
When you run the DRC, double click on an error and it will take you to it.
Also, make sure you do your DRC with the DRU file for the fab that you are using. You can download the OSH dru at https://oshpark.com/guidelines.
Yep, I ran it through both Sparkfun and OSH Park DRUs.
You may want to also post pdf versions of the schematic and board here; not everyone is an Eagle person…
/mike
I’ve attached PDFs, and also modified Eagle files, based on some suggestions I’ve received. One question I have in particular, is concerning the “Stop Mask” errors when I run the Sparkfun DRU (which I’ve included in the Eagle Files zip). Yes, I know that double-clicking will show me where the error is, but I don’t understand how to interpret the error or fix it. They appear beside the Atmel chip, at a single resistor, and at a 2-pin header. Can anyone explain if/how I should fix these?
A few quick notes…
Schematic:
-
Missing bypass caps on processor (one on Avcc. one or two on Vcc, placed right next to the chip)
-
Recommend standard pinout on ISP header
-
Recommend adding ground to headers that don’t have it
-
Add headers for other I/O? ADC6 and ADC7 are only ADC, not GPIO
-
Stylistic - it’s better not to have 4-way junctions on a schematic; makes it easy to miss one where the traces should connect but don’t or vice versa. Better to do two 3-way junctions instead
PCB:
-
Footprint for USB connector should have the outer mounting pads extending past the left and right edge of the connector and should have vias tying the pads to the board for mechanical strength. Too easy to rip the connector off the board without them. Same for the LIPO connector.
-
There’s very little clearance between the LIPO connector ahd the 4-pin header; will you be able to get the plug in? Does the plug fit flush to the board? Mught be better to rotate the connector 90 degrees clockwise.
-
Check clearance betwen trace connecting C2 and C3; looks like it comes very close to the other pad of the caps
-
Is the resonator footprint on the right side of the board? It’s blue on the topside picture, and shows up on the bottom side, shorting to the trace from R7 to D1
-
PWR and VCC traces look quite thin. Should be wide for lower impedance.
-
Any restrictions about via, pour, or traces beneath the radio? At least tent the vias on the bottom side so as not to short out to vias or pads on the bottom of the radio PCB
/mike
Mike,
Thank you so much for the detailed response. This was the type of feedback I was hoping to receive. It will take a little while for me to digest and implement your suggestions, but I’ll post a revised design ASAP!
-Addtional notes-
Schematic:
-
You have several pins that have a net associated with them, but don’t connect to anything. (i.e. D4). This shows up as an ERC error: “Only one pin on net D4”.
-
Fix your ERC errors, or at least, approve them.
-
ADC6 & 7 are inputs, but aren’t connected to anything. Should they be grounded, pulled up, pulled down, etc? This also generates an ERC error.
-
some of the text (i.e. “SPI programming Pins”) runs into other text or parts.
Board:
-
you have tStop errors for the “IO” connector because the silk screen overlaps the stop mask. The only way to fix this is to fix the library part. While in the schematic editor, run the ULP “exp-lbrs”. This will produce libraries that only contain parts that are used on your design. Once the library is fixed, in the board editor, click on Library->Update (choosing the newly created libraries).
-
I don’t see the point of silk “D9” that’s below the “ARD” LED. There isn’t a D9 in the schematic.
-
You don’t always need to connect to SMD parts at the corner of pads. For example, if you make a straight trace run between R4 and the “ARD” LED, then the ground plane would flow between U2/“CHRG” and R4/ARD"
-
traces should not come out of connector pads at an angle. A trace should only come out of the long end of the pad, or out of the side of the pad. Angled traces would be OK if the pads were round, instead of oval.
-
the silk for U3 has unneeded lines near pins 10, 20, & 30. Fix this in the library.
-
the antenna pad should be labeled with silk (i.e. ANT)
-
the radio’s VDD pad is so close to pin 1 of the IO connector that it would be easy to short out.
-
the “-” symbol for the LIP connector overlaps a pad of C8. Move C8. C8 may be in the way of the connector or the cable from the battery.
-
I don’t see an outline for U1, so I don’t know if there is enough space between U1 and other parts.
-
The “CHG” and “B+” silk is too close together.
BTW
-
contrary to another poster, I see that the resonator is on the top layer and is not interfering with any other part.
-
I find it helpful to print out the board actual size and then lay parts on the paper to see if everything fits right.
Thanks for all the help, everyone. I implemented most of the suggestions, and I just ordered parts and boards, so I’ll give it a go soon. One pressing question that I have from this is concerning the “45-degree rule”. Is that still a hard-and-fast rule these days? Also, on a related note, that is why I tried to come off the pads at the corners, to eliminate all the 90-degree copper intersections. How is a 90-degree bend in a trace different from a 90-degree trace/pad intersection? Isn’t there still potential for acid traps? Anyone have a solid reference for good practices for PCB design (with explanations)?
The concern that 90 degree bends and 90 degree junctions caused acid traps may have been true in the old days, but they are no longer a concern. Go ahead and use them.