Board layout opinions (redesign of existing board)

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,274
Hey everybody, I'm re-working my very first board layout. It's been in production for just over 3 years, mostly working well, but with two manageable problems:
  1. I didn't include reverse voltage protection for when it's wired wrong, so a few have been damaged (discussed in another thread)
  2. I used default Eagle 0402 resistor pad layouts which were totally wrong, making it difficult for our assembly house to place resistors.
I've also discovered since this first project that I hate Eagle, and I've totally fallen for DipTrace.

Based on all that, I'm re-designing the board from scratch in DipTrace. The basic concept works well for our needs. It's using analog Hall Effect sensors in conjunction with a comparator to detect a magnet in two potential "on" positions, effectively making a non-contact momentary on-off-on switch with ~5V outputs and indicator LEDs.

The only deliberate schematic changes are the addition of a reverse protection diode, which shorts the supply inputs if they're wired backwards (it's ok because the supply rail feeding this board is limited to 130mA max current,) and the addition of test points which can be used to access the analog Hall Effect signals.

I realize now with hindsight that the feedback resistors which are providing hysteresis can interact with each other, pushing the Vref voltage around more than might be desirable, but that's not an issue for us because: a) It's physically impossible for both outputs to be triggered at once unless something major is broken, and b) the Vref levels are already adjusted based on where the double-feedback arrangement sets the resting Vref voltage.

The one other thing I know is odd is that there are holes incredibly close to pads at D1 and D2, but that is exactly as drawn in the datasheet for the LEDs (they're reverse-mount, projecting through holes in the PCB down to the bottom side.)

With these known oddities out of the way, do you all see anything else I should be concerned about?
(EDIT: just realized the comparator number isn't listed in the schematic; it's an MCP6542.)
Hall-Comp_Schematic-Clip.png
Hall-2018_layers-combo.png
 

wayneh

Joined Sep 9, 2010
16,399
I don't have the chops to offer much, but I do see an issue at the bottom of R1. It looks awfully close to overlapping that thru-hole and it might be vulnerable to a solder bridge.

I don't like the looks of the trace path above U2 either. Could be smoother.

The only other comment is that I like fat traces when they're possible. I mean, depending on the production process, why not leave as much copper as possible?
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,274
Good call on R1. It passed DRC, with a gap of just over 0.31mm or ~12mil, but why risk it. The only reason it got scooted so close was some silkscreen stuff on the back. I've moved the via away from the pad. Easy fix.

Not sure which trace above U2 you're unhappy with, but I'll take a closer look at that area in general. I did move the via just below the 5V power trace down so that I could straighten out the hitch in that trace. Not sure if that's what you were referring to, but I certainly like it better now.

As for trace thickness - yeah, I could probably fatten most of them up some. There are only a few spaces under U3 where I'm squeezing things in tight. I've bumped up all the others to 0.5mm now (up from 0.33mm.) That said, I'm already using thicker traces here than in any of the other boards we have made (several of which were designed by real EEs, not me,) so I feel pretty comfortable that we're well within the capabilities of our board and assembly houses on the trace width issue. (To be clear, power and ground traces are appropriately fat where needed in all the designs I was referring to, but signal traces on the boards we get professional help with are always skinnier than I expect!)

Thanks for your insights. Here are my first revisions:
Hall-2018_layers-combo.png
 

ebp

Joined Feb 8, 2018
2,332
Generally I think your board looks fine.

Unless traces are carrying significant current or you are concerned with microvolt drops due to resistance, 0.33 mm is generous and would cause no board house any problem at all, even with heavy copper (for copper of 4 ounce/5.6 mils/0.14mm or thicker, check with the board house for what they recommend for minimum trace/space; narrow tracks can require that the entire approach is changed). For ordinary copper weights any decent board house will very easily do 0.25 mm (10 mil) trace & space. I would make power tracks a bit wider than 0.33 mm, but chances are you don't need to in terms of current carrying ability for this particular board.

If your copper is thick or the legend text is small, try to place the text on either solid copper or bare board, if you can. If it is partly on copper and partly on bare board, it often doesn't print very sharply. SMD can be a real pain if component density is high because there is no place to put the ident. I have sometimes resorted to making little "tables" of labels somewhere rather remote from the parts. I generate a rather elaborate set of drawings as layered PDFs. One layer has the ident as actual searchable text and centred on the part, one has the value done the same way. I find them very useful during prototype work and for troubleshooting. I do it all with programs I've written - I've never seen a commercial PCB CAD package that can do it.

Be aware of the potential for components skewing during reflow. R6, for example, might tend to skew a bit because one end has the trace exiting from the end and the other from the side. Usually if the solder mask clearance isn't excessive this will not be a problem.

I always like to have some place I can conveniently attach the ground lead for an oscilloscope.

Unplated holes very close to pads are just a fact of life for those reverse mounting LEDs. It does mean that the holes will very likely have to be drilled after the board has been etched, which may cost a bit more. Holes that are to be unplated are sometimes plugged with little silicone rubber stoppers, but this is also time consuming for the board house. Unplated holes can sometimes be "tented" when film type photoresist is used (the rule rather than the exception these days). Ask your board house. My experience is that board houses will do anything you ask them to if it is within their capabilities, but it may cost you more than necessary and they aren't very good about communicating that info.

Lots of CAD packages will let you mess with the solder paste apertures. The assembly houses I've used prefer to procure the stencil and like to get solder paste Gerbers with the apertures exactly matching the pads. They will then tweak them as they prefer for their process (e.g. some house like "home plate" shape for some pads).

Don't forget to include fiducials for optical pick and place systems. Often board houses will add some for you in the breakaway. If you have your boards routed without breakaway, you should include them according to advice from the assembly house. Extra fiducials can be useful for them for fine-pitch SMD ICs. For your board, they could probably use vias as fiducials, provided they aren't covered with solder mask.

I have a strong preference for putting the origin of symmetrical parts in the geometric centre rather than on one pad. If your CAD package picks the part by the origin, this can make rotation a little more pleasant when doing placement. It can also somewhat simplify placement programming for the assembly house.

In my schematic libraries I would estimate maybe 5% of symbols are used as they came with the CAD package. For PCB libraries it would be something just barely above zero. It isn't unusual for me to have to create some some new symbols or footprints every time I do a new design - but I do weird stuff.

When a reference voltage comes from a voltage divider, adding a decoupling capacitor to ground is anywhere for a good idea to absolutely necessary, depending on the circuit. In your case, since the divider resistors play a role in setting hysteresis, you can't. I don't think I would call if Vref, since it isn't constant.

I don't like pin numbers for things like resistors, caps, diodes, etc. to appear on the final schematic. I regard it as useless litter.

I like to name many of the nets. I find it sometimes quite helpful when routing and very helpful in writing documentation. With digital signals, I like to use H or L as a suffix to indicated the level at which the signal is asserted e.g. SAMPLE.L, or SAMPLE_L or SAMPLE(L) (underscores often tend to merge with the "wire" they sit on on a schematic; I like parentheses, but they have their issues to) for a signal that controls some sampling function and is active-low.

I like to give boards names, often two or three letters and two or three numerals. But I've used odd names like "SAM", "JODY", "SMUX". I've threatened clients with naming boards after their kids if they didn't come up with a sensible name. Naming boards serves the same purpose as naming people and pets.
 
Last edited:

ebp

Joined Feb 8, 2018
2,332
Forgot to mention:

For parts with small pads, laser cut solder paste stencils may not work very well because the paste does not reliably release cleanly from the rather rough essentially vertical walls of the apertures. It depends in part on the solder paste used. This can mean that a more expensive stencil is required. I ran into this with a board with 0402s and other small parts. My assembly house told me that they had found very dramatic reduction in problems and the need for rework by going to the more expensive stencils. I can't remember the price difference, but I think it was somewhere between $100 & $200 extra. The stencil was a bit thinner and almost pure nickel rather than stainless steel.
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,274
Generally I think your board looks fine.

Unless traces are carrying significant current or you are concerned with microvolt drops due to resistance, 0.33 mm is generous and would cause no board house any problem at all, even with heavy copper (for copper of 4 ounce/5.6 mils/0.14mm or thicker, check with the board house for what they recommend for minimum trace/space; narrow tracks can require that the entire approach is changed). For ordinary copper weights any decent board house will very easily do 0.25 mm (10 mil) trace & space. I would make power tracks a bit wider than 0.33 mm, but chances are you don't need to in terms of current carrying ability for this particular board.

If your copper is thick or the legend text is small, try to place the text on either solid copper or bare board, if you can. If it is partly on copper and partly on bare board, it often doesn't print very sharply. SMD can be a real pain if component density is high because there is no place to put the ident. I have sometimes resorted to making little "tables" of labels somewhere rather remote from the parts. I generate a rather elaborate set of drawings as layered PDFs. One layer has the ident as actual searchable text and centred on the part, one has the value done the same way. I find them very useful during prototype work and for troubleshooting. I do it all with programs I've written - I've never seen a commercial PCB CAD package that can do it.

Be aware of the potential for components skewing during reflow. R6, for example, might tend to skew a bit because one end has the trace exiting from the end and the other from the side. Usually if the solder mask clearance isn't excessive this will not be a problem.

I always like to have some place I can conveniently attach the ground lead for an oscilloscope.

Unplated holes very close to pads are just a fact of life for those reverse mounting LEDs. It does mean that the holes will very likely have to be drilled after the board has been etched, which may cost a bit more. Holes that are to be unplated are sometimes plugged with little silicone rubber stoppers, but this is also time consuming for the board house. Unplated holes can sometimes be "tented" when film type photoresist is used (the rule rather than the exception these days). Ask your board house. My experience is that board houses will do anything you ask them to if it is within their capabilities, but it may cost you more than necessary and they aren't very good about communicating that info.

Lots of CAD packages will let you mess with the solder paste apertures. The assembly houses I've used prefer to procure the stencil and like to get solder paste Gerbers with the apertures exactly matching the pads. They will then tweak them as they prefer for their process (e.g. some house like "home plate" shape for some pads).

Don't forget to include fiducials for optical pick and place systems. Often board houses will add some for you in the breakaway. If you have your boards routed without breakaway, you should include them according to advice from the assembly house. Extra fiducials can be useful for them for fine-pitch SMD ICs. For your board, they could probably use vias as fiducials, provided they aren't covered with solder mask.

I have a strong preference for putting the origin of symmetrical parts in the geometric centre rather than on one pad. If your CAD package picks the part by the origin, this can make rotation a little more pleasant when doing placement. It can also somewhat simplify placement programming for the assembly house.

In my schematic libraries I would estimate maybe 5% of symbols are used as they came with the CAD package. For PCB libraries it would be something just barely above zero. It isn't unusual for me to have to create some some new symbols or footprints every time I do a new design - but I do weird stuff.

When a reference voltage comes from a voltage divider, adding a decoupling capacitor to ground is anywhere for a good idea to absolutely necessary, depending on the circuit. In your case, since the divider resistors play a role in setting hysteresis, you can't. I don't think I would call if Vref, since it isn't constant.

I don't like pin numbers for things like resistors, caps, diodes, etc. to appear on the final schematic. I regard it as useless litter.

I like to name many of the nets. I find it sometimes quite helpful when routing and very helpful in writing documentation. With digital signals, I like to use H or L as a suffix to indicated the level at which the signal is asserted e.g. SAMPLE.L, or SAMPLE_L or SAMPLE(L) (underscores often tend to merge with the "wire" they sit on on a schematic; I like parentheses, but they have their issues to) for a signal that controls some sampling function and is active-low.

I like to give boards names, often two or three letters and two or three numerals. But I've used odd names like "SAM", "JODY", "SMUX". I've threatened clients with naming boards after their kids if they didn't come up with a sensible name. Naming boards serves the same purpose as naming people and pets.
Wow! Lots of great stuff in there. Thanks! I may email this to myself, bookmark the page, etc. cause there are a lot of good workflow ideas in there that I'll want in my back pocket as I start whatever my next project is.

I'll rename Vref to something else to avoid any confusion since it's not a fixed reference. I hadn't thought of it that way, but it makes a lot of sense.

I had heard the term a few times before in an electronics context, but didn't actually know what "fiducials" were until your message made me look it up. On the few board designs I've done in between my first one and this redesign project, no one has ever mentioned fiducials to me. I also haven't been handling the panelization - the board house has been doing that. Maybe they're adding fiducials in the border areas, or maybe they're using vias (none of ours are tented.) Anyway, I'm glad that I at least know what it is now.

If I were going to add my own fiducials to this, or any future project, is there anything special I should know? What I've found so far makes it sound like just exposing a 1-2mm dot of copper at two opposite corners of the board provides a decent reference for the p&p machines. Do those marks need to get any special marking in the assembly files, fab notes, etc? Do they need to be dimensioned on any drawings I provide, or do they get what they need from the gerbers?

As for using PCB footprint libraries, I've learned the hard way on that one. A few of the included components are ok (more in DipTrace than in Eagle, at least,) but I've had to generate my own footprints for more parts than not on each of the 5 or so PCB designs I've done. Sometimes it's because the part I need isn't in the generic libraries, but quite often it's because when I examine the included footprint, it doesn't match any datasheet recommendations I can find. I've seen a few where I'll find 5 different datasheets with 5 different recommended footprints (usually pretty similar to one another,) and then the included footprint is nothing at all like the 5 datasheet versions. So then I make my own that sort of splits the difference between the most trustworthy seeming datasheets. Honestly, it's still a bit of a guessing game for me, but even with my uncertainty, I'm fairly confident that I'm closer with my best guesses than with what the included footprints offer!

Anyway, thank you very much for all of your insights. I appreciate the help!
 

ebp

Joined Feb 8, 2018
2,332
You're welcome. I'm glad to help!

I really recommend thinking about process and trying to develop consistent methods, regardless of what you're doing. You do need to be willing to be self-critical and re-evaluate and change the process. I often say that it takes me three tries to get stuff right - a thoughtful first attempt, moderate fixes of that, then some fine tuning.
A lot of this stuff isn't difficult, but it is complex. There are just many steps you have to go through.

Fiducials: A round foil dot with some clearance in the solder mask and nothing too close by is usually quite sufficient. Place two as you suggested. Add a third in another corner if you can. If you do happen to do boards with fine pitch ICs like quad flatpacks or QFNs, try to get one somewhere nearer where those parts are.
Normally, you don't need to provide the assembly house with drawings with regard to the fiducials. I provide lists (actually part of one giant page of a spreadsheet) with component coordinates and include the fiducials as if they were parts, but as long as they know they are there they will find them. Assembly houses are like PCB manufacturers - they'll deal with what you supply, but you can save money (and make them like you better, which sometimes is worth quite a lot) if you make their job easier and less prone to error.

The other thing I forgot to mention is tooling holes in the breakaway. Board houses usually will add these for you without being asked. They are used for registration pins for printing solder paste. It is possible to get by without in many cases, but it's best to have them.

I had an assembly house tell me I should get panels of a very small board V-groove scored. I'd never had it done before and let the pcb house use their standard method. It turned out that the assembly house didn't have a separator machine (kind of a high-tech wheel-type pizza cutter), so I got the boards back as panels. There were parts, including easy-break ceramic caps, right up to the edges of the board and parts on both sides. It was a nightmare getting the boards separated. (kind of a cool circuit - packaged in a sealed tube with an SMA connector on each end; a narrow pulse of about 350-450 V and 7-9 A from a remote instrument was shoved up the output SMA, propagated around the amplifier by a 1N4148-type diode and into an ultrasonic transducer; return signal of 10 -15 MHz, depending on xducer, amplified and send back on the same coax to the instrument; phantom powered from the instrument end - used in ultrasonic weld inspection for pipelines)

There are some strange parts out there when it comes to footprints. A friend recently ran across one where the pins were numbered going clockwise around the part, instead of the usual CCW.
I once had an assembly house call me to ask where the flat on the through-hole LEDs should go. Whaaaa? I wondered. "Well, to match the flat on the silkscreen outline" I said. "But it's on the side of the package." I even saw a batch of LEDs with the flat on the anode lead.

Best wishes!
 
Top