Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to PCB design

Seth Wahle
September 01, 2016

Intro to PCB design

A primer to designing you own hacking tools. Defcon 24 workshop

Seth Wahle

September 01, 2016
Tweet

More Decks by Seth Wahle

Other Decks in Education

Transcript

  1. Required tools: Mouse with scroll wheel: Required to use the

    programs zoom in/out and pan features. Eagle CAD: http://www.cadsoftusa.com/download-eagle/ Course Files: https://github.com/osteth/Intro_to_pcb (Note: Files are locally available via Demonsaw 192.168.1.30:80 )
  2. Getting started: 1. Install Eagle CAD and Part Libraries. 2.

    Place the contents of the libraries folder into <install-path>/Eagle-7.4.0/lbr 3. Run the Eagle CAD Program. 4. Run as freeware. 5. If prompted about a directory not existing click yes to create the directory.
  3. Freeware Note: The Freeware version of Eagle CAD is identical

    to the paid version except you are limited to a 4in. x 4in. Board. This causes a strange error when trying to place parts outside the 4x4 area. I highly encourage moving to the pro version if you are able because it makes things much easier when laying out your board file.
  4. Group Tool Used to select multiple parts in order to

    use another tool against the group Worst Tool in Eagle CAD! You will constantly have to use it! You will Constantly hate using it! How to use: 1. Click and drag, or hold CTRL and select multiple items. 2. Select another tool. 3. Right Click one of the previously selected Items. 4. Click the Move:<Second Tool> option in the dropdown
  5. Change Tool Allows you to modify a specific property of

    each part you click. Basically a worthless tool that you will likely never use. If you ever use it, you really messed something up and are way too far in, to start over now! Using this tool is a good sign you are not building things modularly, and you should likely revise your workflow.
  6. Paste Tool Pastes a copied part Is automatically flipped to

    after copying. This button could basically be removed and just retain the background function but I won’t rant because someone will assuredly tell me why I am wrong.
  7. ADD and Delete SUPER USEFUL! Add: allows for the placement

    of new parts Delete: removes items from the canvas
  8. Junction Tool Connects crossing Wires together. Crossing wires does not

    connect them automatically. If a connection is required at a wire crossing a junction must be placed. This eliminates line-hop confusion.
  9. Eagle CAD allows for command line entry of all commands.

    The command line is VERY powerful and is your friend! Learning how to use it makes everything a lot faster and easier to do. For a list of all Eagle commands visit: http://web.mit.edu/xavid/arch/i386_rhel4/help/
  10. Cheat sheet That’s enough to get us going. Other tools

    are either self explanatory or not regularly used at the hobbyist level. Navigation Hatred of life / obscure functions Add/ remove Woops! Documentation Advanced Design Functionality Basic Design Flow Control Error Checking Information
  11. (Guided Practice) Component footprints - What they are, how to

    make them, how to use them. Footprints are the shapes that are etched into the copper of printed circuit board that allow for the connection of components to the board. It is imperative to design each footprint to be designed properly for the component. Improperly designed footprints can cause components to improperly solder to the circuit, or simply not fit at all. In circuit design software footprints are subassemblies that are wired together to create the entire circuit. In this section, we will go over how to create a footprint based upon component manufacturer specifications, as well as discussing online footprint repositories that can be used to expedite design and simplify development for beginners. We will also go over how to import footprints from online repositories into the Eagle CAD software so that they can be used.
  12. (Guided Practice) Design a basic LAN tap. In this section,

    we will re-design the throwing star LAN tap (from Great Scott Gadgets). This is a simple to design yet highly practical hacking tool that is a great example of how even basic PCB design knowledge can be very powerful for creating effective hacking tools. We will use a basic wiring diagram to create a proper schematic for the PCB. From the schematic, we will then build a rough version of the final board design.
  13. Tips and tricks: avoiding common design errors After having some

    time to explore the software and attempt a board design, most people quickly realize that laying out the traces or signal lines is a very difficult task. This is because it is an NP-Hard task, it is actually very similar to the traveling salesman problem (one of the Clay Institute Millennium Problems that warrant a $1M bounty to anyone who can find a solution). In this section we will cover common design errors and tips on how to avoid making these common errors such as: • How to route the circuit without drawing yourself into a corner. • How to apply a pull-back to compensate for machining inaccuracies. • How to save time and money by designing manufacturing ready prototypes. • How to avoid a redesign by checking component obsolescence. • How to ease production and casing by adding notes, fiducials, and mounting options.
  14. Routing Tips: 1. The board has two side, it’s OK

    to use them both! 2. Place components in ways that ease routing. 3. (common technique) North/South on one side, East/West on the other. 4. Group common signals 5. (common technique) Power plane on one side, ground plane on the other. 6. Build in small chunks, then link them together. 7. Stacking small boards can be less costly than making one large one (just watch your connector costs) 8. Don’t be afraid to start over. It is common to re-route chunks several times. 9. Leave the computer and draw it out on paper, the added time it takes can really help with being efficient and creative. 10. Take Chances, fail quickly, try again!
  15. This is the exact same circuit routed three different ways.

    Not all routing solutions are created equally, be sure to take your time. Remember: “Software comes and goes, but hardware is FOREVER.” -Donna, Halt and Catch Fire, season 1
  16. Building Production Ready Prototypes By taking a little extra time

    in our design process we can add elements that will save us a lot of time and energy should we ever take the design to mass production. Some of these types of elements include: • Labels and additional info that aid in the construction or identification of the part. • Fiducials (points used by production machinery to align the board via image recognition) • Ground pour (To reduce noise) • Mounting holes • A pull-back from the board's edge to compensate for machining tolerances. Fiducial Mounting Hole Ground Pour Pull-back Labels and additional info Defined Board Edge (commonly forgotten by beginners)
  17. Apply a Pull-back When Using the polygon tool to create

    a ground pour, be sure the set the spacing. This will ensure that the ground pour will not extend out where it can be damage in machining. This is a pull-back
  18. (Hands On) Refining the LAN tap design. In this section,

    we will refine our designs by applying the techniques learned in the previous section to enhance our rough draft design.
  19. How to improve performance by reducing noise. In this section,

    we will go over electrical noise, how it affects a circuit, and how to mitigate its effects to improve circuit performance. This section will include: • A brief discussion of the physics behind electronics and how it can break you or be harnessed to do the impossible. Engineering is essentially applied physics if you would like to learn more about physics check out the DoctorPyhsicsA youtube channel. • What is cross-talk? • The actual speed of electricity - why your assumptions are wrong, and why it matters. • Isolating power and data. • Grounding, ground pours, and via’s. How to use them to control noise. • Choosing the proper substrate. What are the options, their differences, and why it matters?
  20. Speed of Electricity Please note that this is NOT instant

    and is slower that the speed of light. This travel time can cause timing issues when working with gates, cpu’s and several other types of components. Signals can travel about 6″ per 1ns or 165 ps/inch on PCB.
  21. Impedance the effective resistance of an electric circuit or component

    to alternating current, arising from the combined effects of ohmic resistance and reactance.
  22. PCB Stack-up To protect yourself from being stuck with the

    cost of manufacturing flaws, It is also important to specify the stack-up when ordering services from a contract manufacture. If you have specified the stack-up and tolerances when ordering, you have the right to refusal on boards that are delivered which do not meet the specification. This chart shows a typical stack-up. Note the Dielectric constant and thickness of layers. These values are needed in many calculation related to PCB design and the Physics which control it. The PCB Stackup is the composition of the individual layers of the PCB. When building projects which require controlled impedance (such as wireless communications), controlling the stack-up is very important.
  23. Cross Talk Cross talk is when signals bleed over to

    adjacent wires or traces. This can become a serious signal integrity problem especially in high speed communications projects. (examples PCIE, USB 2.0+, HDMI). You may not encounter this for a while but it’s good to know that it exists so you can plan your builds accordingly. For a more in depth look at cross talk check out: https://www.youtube.com/watch?v=j0KCjwTqHFU
  24. Separating power and signal Power is generally a very dirty

    and noisy transmission until it is cleaned up just before going into the primary circuit. Signal lines are generally very clean and quiet. Electromagnetic interference such as crosstalk can inject unwanted noise or signals into your circuit and cause all sorts of strange problems. Because of this separating signal and power is a very common and useful practice. Common techniques for reducing EMI: • Grouping power and signal components apart from each other. • Applying a ground pour to break up the board with ground plane. • Applying a wall of ground around sensitive groups of components. • Stitching the board with ground via’s. • Adding a shield over sensitive groups of components.
  25. Types of PCB substrate and when to use them •

    FR4 - the most common, cheapest, general purpose substrate. • Rodgers - Has a very small and consistent dielectric constant, used for higher frequency applications. • Flexible - used in situations where the PCB must conform to the product design. Is often used for connections between assemblies. • Aluminum - Largest thermal mass, can act as a heat sink for projects such has high powered LED circuits.
  26. (Hands on) Applying noise reduction techniques to LAN tap design.

    In this section, we will apply what we learned in the last section to our LAN tap design to produce a final design that is optimized for the task and fully production ready.
  27. (Guided Practice) Generating manufacturing documentation. It isn’t fun, it isn’t

    glamorous, but the electronics manufacturing industry is completely driven by documentation. After several years working at an engineering and contract manufacturing company, I have a foolproof method for generating all of the documentation that is needed to take a design all the way to mass production. Because a contract manufacturer builds exactly what is documented, it is imperative to have complete and accurate documentation that leaves nothing to the imagination. Extremely complex designs require specifying the type of solder, reflow profile, and tools and processes that should be used in the manufacturing. While this is not entirely necessary for simple builds, adding these specifications to the documentation eliminates ambiguity in the process and allows us to demand and expect perfection as well as providing us with the tools to troubleshoot manufacturing problems and hold contract manufacturers accountable for any inconsistencies in the build process. Many different vendors request or require documentation to be in a specific format. We will use EagleCAD to generate a package that contains every bit of information that any of these vendors could possibly ask for. This gives us the ability to easily submit our design to several vendors to shop around and get the best price without causing additional work for ourselves.
  28. Tips and tricks for getting hardware manufactured, And getting it

    done for cheap! In this section, we will wrap up the workshop by covering some of the tools, services, and vendors that I used to get my own prototypes and final designs produced. This includes: • How to get low-cost, high-quality boards by using pooled manufacturing. • How to get all your prototyping components for free by knowing who and how to ask for engineering samples. • How to communicate effectively with Chinese suppliers without speaking their language. • Discussion on casing options. Why cases are so expensive and some little-known methods for getting high-quality, low-cost cases.
  29. Pooled Manufacturing OSH park - Best Value, submitting your design

    to their ordering system is a great way to check if your board is going to build properly. This is a great tool to check your design before submitting for manufacturing. All boards are purple! (oshstencils.com is their solder paste stencil ordering service) Pcb-pool - Best Quality, a little more expensive but boards are great quality and come with a free solder paste stencil, 3D rendering, and 3D printer file. Offer several other great services as well. EuroCircuits - Offer Flexible, RF (rodgers 400 with gold plating), and aluminum circuit boards at pooled prices. Alberta Printed Circuits - terrible quality, difficult ordering system but offer rock bottom prices with lightning fast turn time. (really only worth it for quick turn prototypes)
  30. Speeding up low volume manufacturing In order to ramp up

    to mass manufacturing, it is often useful to build a small to medium lot of boards in-house. This allows you to keep costs down and build revenue from your new products that can be used for expansion or further development. Using surface mount components, solder stencils, pick and place assistance equipment and small reflow ovens you can significantly speed up the process of making small batch production runs. Designing your project using only SMT (surface mount technology) components is the first step in this process and is a good habit to get into even in the prototyping and development phases.
  31. Get free prototyping tools, parts, and equipment. Developing new hardware

    can get very expensive, very quickly. One trick to cutting down on the cost is to request free samples of products directly from the manufacture. I suggest registering a company and getting an EIN that you can use as “proof” that you are a legitimate development company. Developing your personal projects under the guise of a registered company gives you extra leverage when requesting free samples of parts. You can often get the large component manufactures to actually send out a representative to meet with you to discuss problems you are having with your design and suggest solutions. The rep will often bring you large kits with samples of all of that company's products so that you can test them out and implement them into your design. For them it is a sales scheme that is budgeted for marketing, don’t be afraid to play the system to your advantage. Especially when starting out. Key words to drop when asking for parts include: design kit, engineering samples, development kit or pack. You can also ask local design companies for “lab time” this is a good way to get them to allow you into their facility to use their expensive testing equipment. Their engineers will generally be in the labs and you can get their help fixing problems with your design for free by doing this.
  32. Communicating with Chinese manufacturing. It is extremely useful to make

    a friend over in Shenzhen China. China controls the vast majority of the contract manufacturing industry. Shenzhen also has an electronics superstore where you can purchase anything from basic components, to assembled task specific modules, all the way to ready for market products. A friend who can stop by this radio shack on steroids and ship you parts is extremely useful. I promise you, not everything is listed on ebay or amazon. It can be difficult to communicate effectively through the language barrier and time difference. Some tips for effective communication include: • Communicate over WeChat, literally everyone in china uses it! • Send pictures! • Send documents as PDF format to avoid differences in software. • Don’t talk down, make fun of, or insult people's intelligence. They are having just as hard a time figuring out what you're babbling about as you are reading their responses. • Be Courteous! They will never jump straight into working conversation with you, It is common to ask about how the other person is doing as well as discussing family, holidays, etc. before getting down to business.
  33. Finding cases for your project. The worst part about making

    your own electronics is making a case to hold it in. The case is often 50-75% of the cost in low volume products. This goes down to almost nothing with volume due to the low cost of injection moulded cases. Finding a company that is willing to do low volume injection moulding can be an amazing cost reduction, but you will often have to drop $5000 on tooling to get the first set made. Some other options include: • Standardized cases • 3D printing • Laser Cut stack-up or interlocking cases. • DIY injection moulding
  34. Standardized Cases Buying standard cases and forcing your project into

    them is generally the lowest cost/work solution. They can be purchased through vendors such as MCelectronics for cheap and you only have to cut out holes for your ports. In low volume production a benchtop CNC machine can make short work of cutting out holes for ports. (I highly recommend picking up a cheap 3020 or 6040 model CNC machine from China. They are worth their weight in gold once you learn to use them! (and their pretty easy to use)
  35. 3D printing 3D printing is a very useful prototyping tool,

    especially if you plan to move to an injection moulded case in the future. However it’s definitely not the silver bullet everyone thinks it is. 3D printing is very expensive and let’s be honest it generally looks like crap! If you have a printer use it. if you want to 3D print but don’t have the gear, check out your local maker space! They generally will have 3D printers, CNC routers, lasers cutters, and a ton of other tools that you can use for free or a nominal monthly fee. There is also people at maker spaces that know how to run the machines and are generally just happy to play with cool stuff so if you need help they are a great source for it.
  36. Laser Cut Cases Making a laser cut case is one

    of my favorite methods for prototypes. The materials are super cheap and readily available at the hardware store.(or online) Designing the case is much easier than other methods and there are plenty of tools to help such as: • http://makeabox.io/ • http://www.makercase.com/ • http://www.sketchup.com/ • http://www.123dapp.com/
  37. DIY injection Molding The tools and materials to do DIY

    injection moulding are just starting to get some popularity. If you are interested in this method the guys over at https://preciousplastic.com have a really cool project were they are putting out opensource plans for building the necessary equiptment.
  38. Great Resources Component footprints/libraries: • https://www.snapeda.com/ • http://www.opencircuits.com/PCB_Footprints • https://www.element14.com/community/community/cadsoft_eagle/blog/2015/0

    1/15/the-10-most-popular-cadsoft-eagle-libraries • https://github.com/sparkfun/SparkFun-Eagle-Libraries 3D files: • https://www.thingiverse.com/ • https://grabcad.com/ Open Hardware projects • https://en.wikipedia.org/wiki/List_of_open-source_hardware_projects