Making PCBs
I’ve designed dozens of small yet interesting electronics circuits over the years, progressing from hand-drawn schematics to ones designed on computer. I’ve always wanted to transfer these designs to PCB, yet up until now have restricted myself to breadboard and stripboard as I considered the process to be complicated for various reasons.
Historically making a PCB was a messy and manual process involving etching and drilling. This instructables guide gives you a good idea of what is involved. Of course, these days one can also design PCBs on a computer and send the files to PCB manufacturers to get them fabricated. That comes with its own complications, the main one being learning how to generate the required files in the CAD software.
So I decided a few weeks ago to take the plunge, and took my first steps into this fascinating realm using KiCad, an open-source PCB design software, and JLCPCB, a popular PCB manufacturer based in Shenzhen, China.
Creating the Schematic
The first step in creating a PCB is drafting the schematic diagram.
Up until this point I’d been using Fritzing to design schematics as its layout designer includes breadboard routing. This was primarly so that I could produce pretty graphics for my blog. I’d decided to switch to KiCad as it looked like it had better support for third-party components, which will come up later.
The first obstacle was getting used to the KiCad user interface. It wasn’t particularly intuitive to start off with, with little things like the default trackpad option being zoom, and having to press Shift and Cmd to scroll vertically and horizontally. That may well be a standard in the CAD world but frankly did my head in.
Thankfully this behaviour can be changed in the settings; with the following settings I can scroll in both directions using the trackpad, and zoom using the trackpad plus Cmd.
Anyhows, there are are plenty of tutorials out there that helped me understand the UI and best practice and, after a short while, editing the schematic became almost second nature.
Unfortunately there seemed to be no straightforward way to import the schematic into KiCad from Fritzing. Thankfully the Pico-mposite is a pretty straightforward design so it didn’t take too long to recreate it in KiCad ready for routing.
Component Placement and Routing
Once the schematic was complete, I moved on to the next phase – component placement and routing in KiCad’s PCB layout editor.
The editor is used to place the components defined in the schematic onto a representation of the PCB and then route the connections between them. You can go back and make changes to the schematic but I find it easier to finalise the schematic before moving onto this stage of the process.
As this layout reflects the physical board it is important that the correct component dimensions are used so that the PCB board footprints (the bits you solder onto) are in the correct place. Silly things can catch you out at this point, like using the wrong size of resistor.
There is an auto-routing feature, and it is possible to route on one or multiple layers. For this PCB I decided to go with a simple double-layered board (front and back) and to manually route.
To switch a track between layers, you use vias. These are two small pads on different layers of the PCB that are electrically connected to each other. They are often required for more complicated boards, for example to route tracks across other tracks or components. I didn’t need to use them for this board, but did for the colour version. The easiest way to do this in KiCad is whilst drawing the track is to press V to add a through via.
Once routing is done, you can fill the rest of the PCB. In the above image you can see that the tracks have a black outline on the board. That outline is what will be etched away. Without the fill, the entire board would be black (etched away) with just the blue traces showing. The outline is useful electrically too – on the rear of the board I’ve set it to be the ground plane, so any component that needs a ground connection is just connected directly to it. I found it best to leave the fills till the end.
Library Management
One of the significant advantages of KiCad is the extensive library of components available, both built-in and online. Learning to navigate and customize the library to suit my project’s requirements was an essential part of the process. The ability to create and edit components ensured flexibility in designing circuits beyond the pre-existing library.
For this project I had to import the Pico and composite video connector. Thankfully these were readily available online.
The libraries include the schematic symbol, the footprint (pad layout and outline), and often a 3D model that is used in the 3D renderer.
Validation
Before shipping the resultant files to the manufacturer, the design needs to be validated.
I did this in three stages:
- Visual: Using the 3D PCB viewer to check the board looks okay
- Physical: Printed the PCB off on a regular printer onto an A4 sheet of paper to check the components align with the footprint.
- Automated: Using the built-in KiCad design checker to confirm that the PCB conforms to its standard
The 3D viewer relies upon the 3D models imported with the components in the library, but with care, you can get something that more or less accurately reflects the finished product.
Manufacturing with JLCPCB
After completing the design, the next exciting step was to bring the PCB to life. I opted to use JLCPCB for the manufacturing process. JLCPCB’s user-friendly online platform allowed me to upload my Gerber files directly from KiCad. The instant online quote and order process made the manufacturing step seamless, even for a first-timer.
They do offer a good guide on generating the files required from KiCad, which was invaluable.
I was amazed by the price – it was just short of £5 including shipping from China for 5 boards. I think the postage from Heathrow alone must have cost that.
It only took a couple of weeks for the finished boards to be shipped to me, which was pretty impressive. I was not asked to pay any extra import duties for the boards – that appeared to have been factored in at point of purchase for shipping to mainland UK. And their website kept me updated every step of the way from acceptance to shipping. Opening the box to see a physical PCB of something I’d designed was quite a thrill.
I test fitted a couple of the more challenging components, namely the Pico and the video connector. All seems good.
Challenges and Lessons Learned
Like any learning experience, my first PCB design journey came with its share of challenges. Overcoming issues related to footprint selection, trace width, and understanding design rule checks required patience and perseverance. However, each challenge presented an opportunity to enhance my skills and gain a deeper understanding of PCB design principles.
I did also make a rookie error on the first PCB produced – I filled the back of the PCB but forgot to fill the front. This resulted in more of the PCB being etched away than was required, but does not affect the PCB in any meaningful way.
Conclusion
Designing my first PCB with KiCad was a gratifying experience that provided valuable insights into the world of electronics. The open-source nature of KiCad, coupled with its user-friendly interface, made the learning curve enjoyable. Whether you’re a hobbyist or aspiring electronics enthusiast, diving into PCB design with KiCad and partnering with manufacturing services like JLCPCB is a rewarding endeavor that opens doors to endless possibilities in the world of electronics.