When I was asked whether I would be interested in learning PCB design for a Digilent product, I practically jumped out of my chair with a wide-eyed "YES!". Designing PCBs was something I saw myself doing down the road for projects I have had in mind since I started school. I am a super big guitar effects pedals nerd and intend on designing my own effects pedals within the coming year so this seemed like a great opportunity to break the ice and get some experience.
The design requirements I was given was that it would be a wearable badge (something you could pin to your shirt), an LED would be used as Turbo's antenna, the body and arms would be separate pieces that would be "popped out" of a main PCB, and that the LED would only light up if all the components and limbs were soldered on properly. The idea was that it could be a cool trade-show demo or soldering practice project for people inexperienced with soldering that gives them some neat finished product.
The first thing I realized was that I needed to design a circuit. Fair enough, right? I thought it would be a little cooler if I designed it such that the LED doesn't only light up, but it blinks when everything is properly soldered. Earlier in the year, I worked on a theremin project that introduced me to oscillators, so I thought I could implement something like that to get the LED to blink. However, since it was to be a wearable item, it would have to rely on only a 3V cell battery for power. So I had to design the circuit to operate with only a +3V supply and ground reference but my experience with ICs always had positive and negative power supplies. After some digging, I found a design that I modified using the trusty 'ol 555 chip and successfully got the LED to blink with those design limitations. Below is a schematic of the original I got from here. However, not all of the components in that circuit are needed for an oscillator.
I had the circuit, now I needed to move to the PCB design for real. I started with a great YouTube tutorial from DigiKey using KiCad PCB design software. The tutorial covered just about everything I needed to make the PCB minus a few details - we'll get to those soon. It starts with building a schematic. Okay, no prob, I've done that in simulation software like LTSpice. The schematic below takes into account that the circuit breaks open at Turbo's arms between the LED and the main circuit so that the user must solder the arms on correctly in order to complete the circuit.
Next, you need to assign what are called "footprints" to each part. That's basically what kind of shape/pinout the part needs to fit on the PCB and connect properly. I chose footprints that were already made for parts I knew we would be able to order, so I didn't actually have to create any footprints. The tutorial does spend some time on how to do that though.
Then you generate what's called a NetList for importing all that info into the PCB layout editor by simply clicking the NET button.
In the PCB layout editor, you arrange your components how you desire and draw what will be the copper traces connecting them all. This is not too difficult, as KiCad provides what's called a "rat's nest" when you import the NetList. This rat's nest shows the connections between components per your schematic design, so when you go to connect your parts, the correct path is taken care of. Below is an example of importing a NET list into the PCB layout editor. The connections show which parts are connected and how, but the traces are not drawn yet so you can lay out the components as you wish. If traces overlap, you can place it on the other side of the PCB or add more layers for more complex circuits.
After you're happy with the layout, you designate the perimeter of the board and make your copper fills for the etching process. Everything up to this point is covered well in the tutorial and didn't give me too much hassle.
I just want to get this out of the way: KICAD WILL NOT IMPORT DXF FILES UNLESS THEY ARE RENDERED AS POLYLINES. The images I was using for Turbo were curved and formatted with what are called splines or actual curves. KiCad can not make sense out of that type of file format. After weeks of trying different things and researching this roadblock (it's hard to troubleshoot something you don't really understand), a little clue surfaced and the person that was graciously working on the images for me figured this out. So, once the images were rendered as polylines, KiCad had no issues with them. I was able to place the components on Turbo's body and create the rectangular perimeter that Turbo would be popped out of. If you intend to make custom outlines for PCBs in KiCad, this is a necessary step you must take with your images.
The green lines are the top silk screen and the purple are the bottom silk screen. You can choose what designs, parts, and traces go on the top and the bottom.
Lastly, I had to decide how the small, perforated connections between Turbo's body parts and the main PCB were to be implemented. I got a second set of image files that extended the outline of the image and imported it with a 2mm thickness. I had to approximate the length of the connecting portion as well as the number of small holes, the diameter of said holes, and the distance between these holes so that Turbo would be secure during manufacturing but be able to be popped out of the main PCB for the project, a break-away PCB if you will. Using an example we had in the office, I took some approximate measurements and winged it.
Another great thing about using KiCad and OSH Park is that you don't have to worry about Gerber files. You can upload your KiCad project directly to OSH Park and they take care of it for you. OshPark accepted my design but when I got it back, they had added a few of these connecting sections and implemented them in a much more effective way. I'll have to spend some time on the next revision getting those perforated connections better. But hey, when I got the PCBs and put it all together, it worked! The first thing you should check when getting your PCB from a manufacturer is to put an ohmmeter on it and check to see if the power shorts to ground. If not, build the circuit! If the ohmmeter shows zero ohms, then don't waste time and components because something probably went wrong in design. Check your schematics then check your traces in the PCB layout editor. I have omitted many fine details to this process but you can get all the info you should need from the Digikey KiCad Tutorial on YouTube. Below are pictures of the finished PCBs and the soldered up Turbo. If you have any questions about my design or PCB design with KiCad, please comment below! Thanks!
Comments