Help Center
  • FAQ
    browse most common questions
  • Live Chat
    talk with our online service
  • Email
    contact your dedicated sales:
  • Call Us
    9:00 - 18:00, Mon.- Fri. (GMT+8)
0

To make a PCB with KiCad

Published on 2/9/2017 10:06:30 AM

Description

<style>.e_editor{font:14px/24px Arial,'microsoft yahei','Times New Roman','b8bf53';}.e_editor div,e_editor p,e_editor td,e_editor th,e_editor li{font-weight:inherit;font-size:inherit;font-style:inherit;font-family:inherit;}.e_editor ul{margin:-10px 0 20px;}.e_editor li{padding:5px 0;}.e_table{width:96%;border-collapse:collapse;empty-cells:show;}.e_table th,.e_table td{padding:5px;border:2px solid #eee;}.e_img{padding:10px 0;text-align:center;}.e_p{line-height:20px;padding:0 0 20px;text-indent:0em;}</style><p> This is the continuation of a series where I create a PCB in every software suite imaginable. Last week, I took a look at KiCad, made the schematic representation for a component, and made a schematic for the standard reference PCB I’ve been using for these tutorials. Now it’s time to take that schematic, assign footprints to parts, and design a circuit board. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182730839.png" title="" alt="" width="600" height="322" align=""/> </p><p>The completed schematic for our board </p><p> All PCB design tools have different methods of associating the schematic view of a component with how it will be represented on the finished board. Eagle uses libraries that contain both a schematic view and PCB view of a component. In the prehistory of <a href="https://www.allpcb.com/software/" target="_blank">PCB design software</a>, Autotrax simply ignored the schematic view. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182731669.png"/> </p><p>Click this button to run PCBnew </p><p> KiCad has a clear separation between a symbol (the schematic view) and a footprint (the PCB view). If we were to take our schematic and create a new PCB by running PCBnew, nothing would happen – our symbols aren’t associated with any footprints. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182732022.png"/> </p><p>Click this button to run CvPCB </p><p> To associate symbols with footprints, we need to run CvPCB. This sub-program tucked inside KiCad gives us the ability to associate footprints with our schematic symbols. </p><p><img src="https://jpfile1.oss-cn-shenzhen.aliyuncs.com/allpcb/web/image/20190604/6369526438495881743900355.png" alt="hackadaycomc20170227182732358.png"/></p><p>CvPCB, with another window open allowing you to view the footprints </p><h3> It’s like the cloud, only not completely worthless </h3><p> CvPCB is a new feature for KiCad 4.0. Instead of every other PCB design tool we’ve taken a look at so far, KiCad effectively stores all of the footprints in Github. In the Github repo for KiCad, you’ll find a bunch of files with a .pretty file name. These are the footprints for nearly every component you can imagine. If you’re running a fresh install of KiCad, everything shows up in CvPCB automagically – there’s nothing you need to worry about, and footprintsjust happen. </p><p> There’s a subtle brilliance about this implementation. It’slikethe cloud, only it’s completely verifiable, and if a part doesn’t work, you can fix it and submit a pull request. Already, this is phenomenally better than the Eagle paradigm, where millions of footprints are available in thousands of different libraries scattered around the Internet. If you’re reading through this series in order, take note: this ‘Github as the cloud’ will be a major point of comparison when we get to other cloud-based PCB design tools. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182734238.png"/> </p><p>With that said, we need to associate footprints with the symbols on our schematic. To do that, go down the list in the center of the CvPCB window that contains a list of all the components in our schematic and associate a footprint with each part. Footprints are on the right, libraries (or categories) are on the left. To view the selected footprint in a new window, click the ‘view selected footprint’ button. </p><p><img src="https://jpfile1.oss-cn-shenzhen.aliyuncs.com/allpcb/web/image/20190604/6369526400215226399327486.png" alt="hackadaycomc20170227182734419.png" width="427" height="94" style="width: 427px; height: 94px;"/></p><p>Selecting a footprint for the USB port </p><h3> Getting Libraries In Order </h3><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182738897.png" width="354" height="153" style="width: 354px; height: 153px;"/> </p><p> The footprint editor window </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182741445.png" width="347" height="122" style="width: 347px; height: 122px;"/> </p><p> The footprint editor, found in the launcher </p><p> This project is using (mostly) all through-hole parts, and as such, I could easily select a DIP8 footprint for the ATtiny85 and be done with the whole thing.This is a tutorial, though, and I need to demonstrate how to make a part – schematic and PCB view – from scratch. </p><p> To make a footprint, KiCad offers a Footprint Editor. This can be accessed from either PCBnew or the launcher. Click on that, select File -&gt; New Footprint, enter a name for this footprint (‘ATtiny85’ will do), the name of the footprint and a reference designator is placed onto the footprint editing window. </p><p> </p><p><strong><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182742657.png" width="314" height="175" style="width: 314px; height: 175px;"/></strong> </p><p><strong>Libraries are important</strong>, and since KiCad is now running on ‘not-worthless cloud technology’, we have to create a library for this project that won’t be saved along with our copies of the standard Github libraries. Select File -&gt; Save Footprint In New Library,savethis library wherever the rest of the files are for this project, and give the library a name. </p><p> We have just created a new library, but that doesn’t mean KiCad knows what library we’re working with. In the Footprint Editor, select Preferences -&gt; Footprint Libraries Manager, and click on the ‘Project Specific Libraries’ tab. Hit the ‘Append Library’ button, and drop the path to the library we just created in the ‘Library Path’ field. That’s more KiCad weirdness, but once we’re done we can finally create a footprint. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182743079.png" title="" alt="" width="600" height="206" align=""/> </p><h3> Making The Footprint </h3><p> Now that we have the Footprint Editor open, a part name and a reference for the footprint, and the library all set up, it’s time to actually put some pads down. There are a few relevant buttons on the screen: </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182743712.png"/> </p><p> Add a pad </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182743907.png"/> </p><p> Add a line </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182744101.png"/> </p><p> Add an arc </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182744295.png"/> </p><p> Add a circle </p><p> The most important, obviously, is the ‘Add a pad’ button. Click that and drop some pads down where they should be. This is a standard DIP8, or two rows of four pins 0.3″ apart. The default grid, as you may have noticed, is 50mils. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182744486.png" width="400" height="321"/> </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182746380.png" width="400" height="298"/> </p><p> After placing the pads, use the hotkey ‘E’ to edit the properties of each pad. Here, you can change a through-hole part to an SMD, change the dimensions of the pad, hole, and shape of everything. Importantly, the Pad Properties window allows you to change thenumberof the pad. The number of the pad is how KiCad connects the schematic representation of a part with the footprint. Get this right, or else nothing will work. </p><p> Add a few lines to the footprint, save your work in the project library, and go back to the schematic. You’re done. That’s how you make a footprint. </p><h3> From Schematic To Board </h3><p> Now that the schematic has footprints associated to everything, it’s time to open up PCBnew, move parts around, and put some traces between parts. Do that. Oh, nothing shows up. Why is that?You need to generate a netlist in the schematic view, and import it in PCBnew. There’s a button with ‘NET’ written on it in both programs. Click those. Now, what do we get when the netlist is successfully imported into PCBnew? The worst mess you’ve ever seen in any sort of design program: </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182748435.png" title="" alt="" width="544" height="404" align="" style="width: 544px; height: 404px;"/> </p><p>I desperately want to see someone import a netlist for a large project in KiCad. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182749691.png"/> </p><p>We end up with a gigantic mess on our hands. No worries, ‘M’ is the hotkey to move the parts around. You can also use the ‘Move Footprint’ mode to automagically place these parts. Reference the PCB we designed for the introduction to this series and move some parts around until we get something resembling the board below. The relevant hokeys are ‘M’ for move and ‘R’ for rotate. As always, there’s the ‘?’ hotkey that tells you everything you need to know. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182750174.png" title="" alt="" width="518" height="178" align="" style="width: 518px; height: 178px;"/> </p><p> That’s close, but it looks horrible. Deselect Footprint mode, use your cursor, and move all those labels and references around. We don’t need “CONN-01×04” on the board, and it’s really helpful to have the values of resistors inside their own footprint. With a little bit of work and deleting those labels, you’ll have something that looks like this: </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182751517.png" title="" alt="" width="540" height="160" align="" style="width: 540px; height: 160px;"/> </p><p> Holy crap, that actually looks like something. All the resistors and diodes are labeled with their value, all the superfluous references are gone, and thisactually looks good.You can’t do this in Eagle easily. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182753670.png" width="116" height="335" style="width: 116px; height: 335px;"/> </p><p>With the layoutpretty muchfigured out, it’s time to finally draw some traces. This requires a description of the layers. </p><ul class=" list-paddingleft-2"><li><p><strong>F.Cu</strong> and <strong>B.Cu</strong> are the top and bottom copper layers. The hotkeys for these layers are PgUp and PgDn </p></li><li><p><strong>Edge.Cuts</strong> is the equivalent of the ‘Milling’ layer in Eagle. This is the outline of your board. </p></li><li><p><strong>F.SilkS</strong> and <strong>B.SilkS</strong> is the silkscreen – the text and outlines of your components. </p></li><li><p><strong>F.Mask</strong> and <strong>B.Mask</strong> is the soldermask. It’s usually green, or purple from OSHPark. </p></li><li><p><strong>F.Adhes</strong> and <strong>B.Adhes</strong> is glue applied to SMD components. </p></li><li><p><strong>F.Paste</strong> and <strong>B.Paste</strong>is where solder paste will be applied. </p></li></ul><p> For a simple board that won’t be sent off to an assembly house, the only layers you need to worry about are the copper layers, the <strong>Edge.Cuts</strong>, and the silkscreen. </p><p> The first thing to do to complete the board is to draw the ‘edge’ or milling layer. Select the ‘Add a graphic line’ button on the right hand toolbar, and draw a rectangle around all our parts. That’s simple enough. </p><p> Now it’s time to actually put some traces down. You can select which copper layer to use in the top toolbar, and the relevant hotkey is ‘X’. Hit ‘X’, click on a few airwires, and route them just like the reference PCB. Don’t worry about power or ground traces – we’re going to do those with copper fills. When you’re done, you should have something like this: </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182754096.png" title="" alt="" width="415" height="170" align="" style="width: 415px; height: 170px;"/> </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182755813.png"/> </p><p>That’s pretty much all there is to it, save for the copper fills. To do that, we need to add a ‘filled zone’ or ‘copper pour’ or a ‘polygon’. By any other name, it’s just a big area of copper that is connected to a single net in the schematic. </p><p> Click on the ‘Add filled zones’ button, and a ‘Copper Zone Properties’ window will show up. Here, you can assign a layer of copper to a specific signal. Our board puts +5V on the back copper, and GND on the front copper. In the Copper Zone Properties, select the B.Cu layer, the +5V net, hit Ok, and trace around the edge of the board. Do the same with the F.Cu layer and the GND net. When those fills become hatches around the edges of the board, hit the ‘B’ hotkey to render the copper fills. </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182756006.png" width="250" height="114"/> </p><p><img src="https://file.allpcb.com/bbs/p/hackadaycom/hackadaycomc20170227182757117.png" width="250" height="212"/> </p><p> That’s it. We aretechnicallydone. If you save and drag the.kicad_pcbfile onto the OSHPark web page you’ll get a pretty purple PCB in a week or two. That’s not to say this PCB actually works – I screwed up the USB signals in the schematic, and that propagated over to the PCB. No matter, because no one is actually going to build one of these boards. </p><p> This just about concludes the ‘Creating A PCB in Everything’ tutorial for KiCad. If you’ve been reading along for the last five thousand words, you have an excellent introduction to KiCad, and should at least be able to build a breakout board. This doesn’t mean I’m done with KiCad quite yet – there are a few more tricks to go over including DRC and ERC, a demo ofhow freakin’ awesomethe routing in KiCad is, and I need to put a keepout on the decoupling cap in on the board, anyway. Creating a PCB in Everything: KiCad Part 3 (the optional part) will be out sometime next week. </p><h3> Thoughts on KiCad </h3><p> This series of posts serves two purposes. First, it is a quick tutorial for various PCB design tools. After reading these posts, you should be able to guess your way through a PCB design tool and build a simple PCB. Second, each of these tutorials serves as a pseudo-review of each PCB design tool. Each of these posts serves to illuminate the quirks of a PCB design tool, and serves as a notice that I still have an unclaimed bounty for the first person to create a part for an ATtiny85from scratchin Fritzing. Don’t use Fritzing, it sucks. </p><p> Coming from Eagle, KiCad is downright weird. That’s not to say it’s difficult, though – it’s generally the same as any other PCB design tool. The interface, like nearly every Open Source project, is obtuse, and there are five non-obvious ways to complete any task. There is zero reason why parts imported from a netlist into a board are squished together. Custom libraries can and should be automatically imported. The KiCad community especially rancorous. The UI suffers from an intangible wrongness about it, although that seems to lessen after working with it for a few hours. In a sense, KiCad is exactly what you would expect from an Open Source project that is decades old, very mature, and has features packed to the gills: it’s very powerful, but not friendly to the beginner. </p><p> Although the KiCad beginner will struggle to wrap their heads around the interface, it will be one of the most powerful PCB design tools I’ll use in this series of posts. No other free (beer) program will give you 32 copper layers and unlimited routing space. Nothing else uses the cloud/GitHub like KiCad. It’s brilliant. </p><p> A few months ago, if someone asked me to suggest a PCB design tool, I’d give Eagle or KiCad as suggestions. Eagle is easy enough to learn, and will be getting better since the Autodesk acquisition. KiCad is robust, and even in the best case of Eagle development, Autodesk may only ever reach parity with what KiCad can do. </p><p> Now, KiCad is growing on me. I have a secret project where I need to build and manufacture a thousand relatively complex boards. My previous go-to was Eagle, but I think I’m going to do this board in KiCad. </p>

37

comment

All comments

Unknown

7782

0

37

Go to Order My Own PCB

Rules about cashback: 1. Valid time: ALLPCB cashback activity will end on April 1st. 2. Capped amount: The capped amount of cashback for each account is $5,000. Each order can get a maximum of $2,000 cashback. That means every author can get $5,000 max. 3. Cashback range: The cashback activity only covers the corresponding PCB order. The order amount for other combined payment products will be invalid. 4. Clicking your own promotional link will be invalid. The same email address, shipping address, contact information, and phone number are all recognized as the same account. 5. ALLPCB has the final interpretation right of the cashback activity.

ALLPCB will donate 2% to the author for this promotion link.

Other Projects

Home / Industrial Automation low Cost with Arduino an ESP01

2450

0

314

Alternate Text josemarjr