USB Charger: Layout


Layout

Now that you have your USB charger designed and parts picked out, you can start the layout right? Not so fast! There are a couple more things to consider.

Reviewing component footprints

Do you have a footprint for everything? If you haven’t already done so, from the schematic you’ll need to map every symbol to a physical footprint that matches the physical part you chose. Usually most footprints you run across will be standardized ones that are in the KiCAD library already. However, in the off chance you have some somewhat special part that doesn’t already exist, you’ll need to make your own just like how custom symbols are made. We've made a tutorial on how to do this here.

While we didn't really think of this during the component selection process, it's important to keep in mind the size of all the parts and the final PCB. Does everything fit on the board, where you want them to go?

Optional: A fun exercise in making custom footprints would be to make this switch. It's relatively complicated dimensionally, and if you can make this you can probably make any footprint. Land pattern on the right, from the datasheet.


switch land pattern and footprint

Board Setup

Design Rule review

Is everything okay for standard manufacturing? The board manufacturer that sponsors this class is Bay Area Circuits, and as a result, we need to follow their manufacturing capabilities for our boards to be made. In KiCad we can set up the rules that our design must follow under File > Board Setup. Then click on Design Rules > Constraints, and then fill in the values according to this table of capabilities. There is also a subcategory under Design Rules called Net Classes, and you can set different rules for different types of nets (e.g. power should have a thicker minimum width).

For your convenience, under Pre-defined Sizes, you should add some standard track widths and via sizes so during actual routing you can quickly switch between your values. Some “normal” widths would be like 6 mils, 8 mils, 10 mils, 12 mils, 15 mils, 20 mils, and 25 mils. Similarly for vias, set up some nice round numbers from the minimum via size upwards (making sure the size is 2x the drill).

While we encourage you to try filling out the constraints from Bay Area Circuits yourself, you can also just make sure your Design Rules match the values in the red boxes below. You should try to understand where these values come from:

Design Rule Constraints

Mechanical constraints

Imagine another engineer has asked you to design your PCB so that it fits into a battery case like the one pictured below.


3AA battery holder

The other engineer has given you a dimensioned drawing of the shape of your PCB. You should draw the board outline in the Edge.Cuts layer so that your PCB conforms to these dimensions.

Note 1: The 0.063" dimension is for the thickness of the PCB. This should be the default thickness that the PCB editor is set to. If you want, you can change the thickness of your PCB by going to the Board Setup window in the PCB Editor.

Note 2: There is a hole in the middle of the board. You can imagine that this hole might be required so that a mounting post or screw can pass through the PCB, or for another engineering reason.

Dimensions of the PCB. The PCB should be a rectangle 1.25 inches by 2.00 inches, with a 0.25 radius fillet on the lower right and lower left corners. Additionally, there is a 0.25 inch diameter hole at the middle of the board. The entire board should by 0.063 inches thick.
Board dimensions. 

What's in a layout?

Now you have all your parts and their footprints imported into an outline you've drawn, it's time to begin putting all the parts in reasonable places and begin routing.

Some suggestions:

  • USB port needs to be accessible: should probably be on the edge if it is a horizontal receptacle
  • Group together parts like in your block diagram before routing
  • Route ground with a plane
  • Don't forget you have two sides to route on

Optional: You can output the board as a 3D model file (a .step). Does it match up to a 3D modeled enclosure?

Glossary

  • net
    Schematic representation of a circuit node

  • net class
    Group of nets with similar characteristics or functions. Used in KiCad to set different design rule constraints for different nets

  • power net
    Net dedicated to carrying power, such as GND, 5V...

  • via
    A hole drilled into the board, then electroplated, to enable connections
    between layers in a PCB

  • thermal vias
    A via used primarily for its thermal conduction properties to carry away
    excess heat from a circuit device

  • filled zone/copper pour
    a polygon shape of copper. typically used for power distribution

Checkoff

For the actual checkoff:

  • Have correct design rule set up
  • Have a fully routed layout that fits in one of the above outlines
    • Not just 0 unrouted, but everything is routed well (using planes, no wild loops, etc).
    • In the 3D view the height of the design is within specified limits
  • Run DRC and show your design passes

Optional: If you wanted to get this board actually made, you will need to export something called Gerbers. Gerbers are set of files that the manufacturer can read for fabrication. Under File > Fabrication Outputs > Gerbers (.gbr), you'll get a window to output Gerbers. The exact format to use will depend on manufacturer, but you need to export all the relevant layers and drill files. Bay Area Circuits has a handy online serivce to check your Gerbers are within their design capabilities here.

Gerber export. Click "Plot" first, then click "Generate Drill Files"