PCB Design & EasyEDA Part 2: PCB Design - MobiFlight/mobiflight-templates GitHub Wiki

Disclaimer

I know nothing about this stuff really, apart from learning by trial and error.

So if you have experience in pcb design and want to share some best practices / useful tips, please do so. You can for example file an issue on this repository and write your improvements there.

Let's get started!

Now that our schema from the first part of this tutorial is ready, save your work, and do Design > Convert Schematic to PCB. It is a good idea to "Check nets" first, as this will catch any unconnected wires. It will also notice your unused pins on the Arduino, so you might want to place some more "unconnected" X's on those pins, and click the "refresh" arrow on the Nets exclamation marks on the left side. Once all unused pins are marked, the list should contain only your actual wires. If there are still exlamation marks, check that all wires connect to the pins on both ends, sometimes they might not.

Then convert to pcb again, and set the size of the board to our 120.45mm x 34.60mm. Click Apply and we are greeted with this lovely masterpiece of a Rat's Nest:

image

But it's a great start. We can see our components in a grid, with blue wires connecting the pins as they should be.

At this point I usually load up the panel design as a reference to the "Document" layer of EasyEDA. EasyEDA seems to have trouble with layered SVG's, so what I usually do is select everything in the panel, open a new Inkscape document, and paste and group everything together into the page. Then set the page size to match selection (File -> Document Properties -> Resize page to content) and save as Desktop Cutting Plotter (AutoCAD DXF R14) - NOTE: Set base unit to millimeters.

Then on EasyEDA do File > Import > DXF and set the layer to Document, so it does not become part of the actual pcboard design, but rather a reference. Check that the size is correct and that the panel looks more or less correct in the import preview, and place the imported panels PCB outline to match the purple panel outline rectangle as close as you can.

Placing components

Now becomes the fun part - first lets place the tactile pushbuttons as close as we can to the centers of the square buttons. It can be a bit tricky, but just try to match the solder pad holes to the button cutout edges. There is a grid in EasyEDA, and you can try to use it, but I found its accurate enough to just place them as close as you can by hand. They will be behind the panel anyway.

image

Then the leds need to be very close but slightly outside the button leg pins like so - rearrange labels if needed to make things look a bit more clear and hide the Document layer if its too much of a mess to see anything. The labels will be printed in the pcb silkscreen and let you see what is what when soldering.

image

We place the resistors somewhere nicely, and then ponder where to place the arduino.

Placing the Arduino

The arduino goes to the back, so select it, and select "Bottom Layer" on the right side "Component Attributes" panel. You can press space to rotate the arduino (or any other selected component) by 90 degrees at a time, to make layouts easier. Since the Arduino has the usb connector on the end near the TX0 and RX0 pins, we rotate and place it on the side of the panel so that there is some space for the usb cable to be attached and secured (we might want to do a pair of holes for a zip tie for example, so we don't accidentally rip out the usb connector for example (do not ask me why I know)..

So we end up with something like this:

image

We enable the document layer again and place 3.2mm or so holes on the corners of our pcb, and then run the Route -> AutoRouter and Magic happens! Our creation suddenly looks way more professional than we ever expected. Alternate (and often better) than autorouting, there are also tools to draw the wires yourself, using the blue connecting lines as a reference. But for simple panels, the autorouter also usually works fine.

image

image

We should then verify that everything looks correct and check the 3D and 2D view buttons on the toolbar to have a closer look that everything works as expected. But we have just created our first PCB.