Author Topic: First PCB Design, Critique welcome  (Read 7616 times)

0 Members and 1 Guest are viewing this topic.

Offline mheckmanTopic starter

  • Newbie
  • Posts: 4
First PCB Design, Critique welcome
« on: August 18, 2014, 03:09:57 am »
EDIT:  Hey - I posted a new board design below!  I removed the old design as I made an error in the L293D connections.

This is my first PCB design, I'm getting ready to send it off for fabrication, and was hoping I could get some feedback before doing so.

I'm posting it and the code up on GitHub as well (https://github.com/mike-heckman/RPiSecure)

This board is designed to "glue" parts to a Raspberry Pi for an RFID door lock.

It attaches on top of the the Pi using the stacking header and uses an L293D
half-H motor driver and an MCP23017 digital IO expander so the other (optional)
components don't take up all the Raspbery Pi's GPIO pins.

If the board is fully populated, it provides the following:

   Two bi-directional motor drivers with either coupled or independent power.
   Connections for two switches, intended for door position (hall-effect sensor\
) and deadbolt position (tactile momentary switch depressed by the deadbolt).
   Connections for one or two DHT-22 temperature and humidity sensors.
   Connections for up to four LEDs (one is hardwired for power, the other three\
 are on IO ports).
   A connection for a speaker.
   8 additional IO ports addressed through the MCP23017.

The board is designed to use the minimum number of pins on the Raspberry Pi.
To use the second motor driver you have to jumper the MTR2 pins, or tie them
to other pins on the Raspberry Pi breakout.

Also the INTB pins can be jumpered if you want interrupt access to the second
bank of GPIO on the MCP23017 - you don't have to unless you want the interrupt
to go to GPIO pin 4.

You also need to set three jumpers for the MCP23017 3 low id bits.

The board intentionally doesn't draw power from the Pi as it will be powered by
DC/DC power converters from a common 12v source.  There's a pin header near the
upper left corner that provides a +5V and GND power to optionally power the Pi.

The board should work for either the model B or B+ Raspberry Pis.

Datasheets are available for most parts:

L293D Motor Driver:  http://www.farnell.com/datasheets/1804890.pdf
MCP21037 Digital IO: http://www.farnell.com/datasheets/12179.pdf

Standard Traces are 10 mil with 12 mil isolation, the traces for the motor
power in out and to the L293D are larger as it can switch motors up to 36V.
The top and bottom ground planes have been maximized around the chips to allow
them to sink heat into the board.

Thanks!

-Mike
« Last Edit: September 07, 2014, 08:15:10 am by mheckman »
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 32027
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: First PCB Design, Critique welcome
« Reply #1 on: August 18, 2014, 03:24:44 am »
I don't see any power rail decoupling caps near the IC's?

Suggest you always use a square pad for IC's pin 1 and for polarized components.
Avid Rabid Hobbyist
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: First PCB Design, Critique welcome
« Reply #2 on: August 18, 2014, 03:28:58 am »
Yup, decoupling. It's a motor driver, you'll have heavy switching currents. You should have a big capacitor on the motor power input, and a bunch of smaller ones directly at the points where the power is drawn.

Also, check your via size - looks like the annular ring is kind of tight.

Standard Traces are 10 mil with 12 mil isolation, the traces for the motor
power in out and to the L293D are larger as it can switch motors up to 36V.

The trace thickness isn't set by the voltage, but by the current - which tends to be lower at high voltages (V * I = power, so higher V, equal power = lower I). And they look too thin to me. Make them as thick as you can comfortably fit them - even if they're "good enough", thicker ones will lose less power.
« Last Edit: August 18, 2014, 03:30:40 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline void_error

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: ro
Re: First PCB Design, Critique welcome
« Reply #3 on: August 18, 2014, 08:28:18 am »
Stick with 90&45 degree trace orientation, it looks more professional.

For mostly through-hole stuff I usually start with a 0.10-0.05 inch grid then I set a smaller grid when required. As far as I know minimum trace width is 0.4mm/A, but it's generally a good practice to make them as thick as possible to reduce the losses caused by trace resistance.
I can transistor...
 

Offline mheckmanTopic starter

  • Newbie
  • Posts: 4
Re: First PCB Design, Critique welcome
« Reply #4 on: September 07, 2014, 08:13:48 am »
Thank you everybody for your feedback - I do appreciate it. 

I've made a number of changes, mostly based on your previous suggestions.  I've added decoupling capacitors to the ICs, some larger smoothing capacitors for the power connections and additional capacitors for the switch and sensor connectors. 

I also created a separate ground plane for the L293D with discrete connections to the primary ground plane.

I'm still very interested in any further thoughts or critiques of the board.

Thanks again!
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 32027
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: First PCB Design, Critique welcome
« Reply #5 on: September 07, 2014, 09:16:11 am »
Very good.
Suggestions.
Pin 1 on IC's, change to rectangle.
Don't track into a multi-pinned device @ 450, clearances become small and tricky, especially if unmasked and hand soldered.
In the absence of an overlay add a +, K, VDD, GND, 3.3V etc.etc in the copper as small text.
There are SMD components very close to other components and in an orientation that will be difficult to hand solder or re-work.
Eg. R15-R17, R18, R19, R23. You get the idea.
The area around and including C6 & C7 could be improved, it looks crammed.

As you gain more experience you will be more demanding of you efforts and address little things like the thin top layer track that runs past and also connects to R8.
Run it past and then drop a track at right angles to R8.
Do something similar around C9.
Maybe neck-down VDD's as it gets to the end if it's run?

Print it on paper, lay a few components on for final physical checks of clearances etc.

And when you think you have it as good as you can get it, build it and you will find much you could have done better.   |O

There are a few more "bits & bobs", but I think you should have enough clues now to make it quite tidy.  :-+
Avid Rabid Hobbyist
 

Tac Eht Xilef

  • Guest
Re: First PCB Design, Critique welcome
« Reply #6 on: September 07, 2014, 09:17:58 am »
I'm still very interested in any further thoughts or critiques of the board.

Vias in pads (R1, R2, etc) are generally best avoided unless you need them e.g. BGA or thermal relief.

(edit: to be clear, it looks like you're trying to have vias in those pads and Eagle's [rightly, IMO] rejecting them. Either place the vias off to one side and manually route to them, or redo your layout so the tracks to those pads are on the same board side. Checking for DRC/ERC errors would've shown that up.)

Personally I'd make my signal traces heavier (what are they now; 10-12mils max? I'd make them 16mils minimum unless necessary) simply to minimise the chances of manufacturing faults, and probably aim to make it single-sided - but that's just me.
« Last Edit: September 07, 2014, 09:39:03 am by Tac Eht Xilef »
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: First PCB Design, Critique welcome
« Reply #7 on: September 07, 2014, 01:36:22 pm »
You should avoid trace angles that are <90 degrees, see my highlighted areas - apparently it causes issues with acid traps during manufacture.  As someone's already said, much better to make right angle approaches to everything and put 45 degree miters on the bends.
« Last Edit: September 07, 2014, 01:38:05 pm by Gandalf_Sr »
If at first you don't succeed, get a bigger hammer
 

Offline mheckmanTopic starter

  • Newbie
  • Posts: 4
Re: First PCB Design, Critique welcome
« Reply #8 on: September 08, 2014, 02:22:17 am »
Thanks tautech, tggzzz, Gandalf Sr and Tac Eht Xilef for your advice!

Suggestions.
Pin 1 on IC's, change to rectangle.

I haven't been able to figure out how to do this in Eagle v6.6 and either my google-fu has betrayed me or there isn't a good explanation online.

Here's the latest revision. More space, thicker traces (16 mil minimum, power traces are 24 & 30 mil).  Gave everything more room and squared off all approaches.
 

Offline salbayeng

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: au
Re: First PCB Design, Critique welcome
« Reply #9 on: September 08, 2014, 04:23:21 am »
Great checklist tggzz! I'll bookmark that.

Two more points
(a) I'm assuming this is for automotive locks? They have motors, c.f. domestic door strikes have 24V solenoids.
(b) If it's for automotive, then the power input stage needs to be designed to run at 15v continous and survive 60v transients
(c) I'd add a PTC in series with the DC power in, in case the motors stay stalled for longer than expected, or Murphy intervenes.

Otherwise the PCB looks pretty good , I generally use a 0.025" grid , and use 0.015" tracks as defaults, that gives you 0.010" gap when things get squeezy.

I use a rule of thumb of 1mm (=0.040) per amp of thickness, this way you can connect to heat generating devices like diodes and transistors, If I can't fit that in, then I go calculate it.  There is a thinner rule of thumb out there , but it assumes reasonable ventilation, and the track is the only heatsource. Ideally your power tracks should be thick enough to be sucking heat away from other parts.

The L293D can get very hot  , I always use the L6205 but it costs $$

Edge connectors: Check the size of the holes for the pins , the hole diameter needs to be > 1.4 x width_of_square_pin,  make the hole fit the part you are buying, not whatever default came with the footprint.

Regarding pad shapes, I know this is a bit of personal style,  But I make pin 1 = square(rectangle) , I also try to make ground pins square , and use pin1 for ground on my connectors where possible. (Problem is that different manufacturers number left to right or vice versa aaargh) , after all almost every connector has one ground pin.
So parts wiith an obvious ground (negative) get a square pad (which is opposite to your caps and LED's) ,  and for the positive (of electros etc)  I like to use an octagon (so it looks like a + sign) .  What you have looks completely reversed to my PCB's (with all those not_earth square pads) , possibly it's just my personal style.

Do you really need the (square?) vias next to R14,15,16,17  the two pin header can be used as a via?
Also R14,R14,15,16,17 are missing connections to one pad?

Electro caps should be installed by default with them all facing the same way, (unless you get desperate), typically with + up and - down , C10 on your schematic is reversed to the others . I also add a small + sign on the overlay, visible after the part has been placed (if you put it diagonally, just oustide the circle, it won't increase the size of the bounding box).

There doesnt seem to be enough clearance where the blue G17 track squeezes between G15 and G18 pads on the central header,  you need to run the "design rules checker" , it should flag this and maybe some more problems.

Check you can actually buy 2.5mm screws and spacers, before assuming your mounting hole size, also check the distance across points on the 2.5mm hexagonal spacers if you plan to use them,  as the manufacturing burrs easily slice through the solder mask on the bottom of the pcb.  I use 3mm hardware, and the space needed for these is more than you might think.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 32027
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: First PCB Design, Critique welcome
« Reply #10 on: September 08, 2014, 06:20:37 am »
 :-+ much better and as you did it so quickly, there is now more to do.  >:D
It's certainly starting to look smart, but:
The area around R18 is "god awful" (excuse the french  ;)).
Shift M2_FW & BW up, also red +5 V and move R18 to supply IC1 pin 1 etc straight down the middle of the chip.
That should open opportunities to change around C14 & R20 for neatness.
Shift R19 closer to IC1 pin 2, then straighten trace that includes R22.
Rotate R14,15,16,17,19,20,22,23,24,25 for easier hand soldering/rework.

I could even be more anal and pick on more, but it would only matter if you where contracting for others and only appearance related.
Congrats you are nearly there, hope you have enjoyed the ride.  ;D

Take on all the advice offered, but often there are good reasons for a particular layout so only apply what you need.

« Last Edit: September 08, 2014, 10:07:40 am by tautech »
Avid Rabid Hobbyist
 

Offline RiverTown

  • Regular Contributor
  • *
  • Posts: 69
  • Country: hr
Re: First PCB Design, Critique welcome
« Reply #11 on: September 08, 2014, 10:02:16 am »
Suggestions.
Pin 1 on IC's, change to rectangle.
I haven't been able to figure out how to do this in Eagle v6.6 and either my google-fu has betrayed me or there isn't a good explanation online.
You have to edit part library.

There is one thing that others did not mentioned...
Check your silkscreen, some markings look very small and thin. Most manufacturers have min. size and thickness (often 6 mils) specs for text and other markings listed online.
 

Offline mheckmanTopic starter

  • Newbie
  • Posts: 4
Re: First PCB Design, Critique welcome
« Reply #12 on: September 08, 2014, 10:15:25 pm »
Suggestions.
Pin 1 on IC's, change to rectangle.
I haven't been able to figure out how to do this in Eagle v6.6 and either my google-fu has betrayed me or there isn't a good explanation online.
You have to edit part library.
When I'm in the package editor, the only options for the pad shape are: square, round, octagon, long and offset.  No rectangle, nor is there one in the DNC list for first pad, which should also work.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->