Mini Tutorial - KiCad

  • Published on

  • View

  • Download

Embed Size (px)


<p>Mini tutorial - KiCad</p> <p></p> <p>From KiCadesky Deutsch English Espaol Franais Polski Portugus </p> <p>English KiCad homepage About KiCad News Docs Mini_tutorial FAQ Download Mailing lists Yahoo users group ( Yahoo developers group ( Launchpad Developers Group ( KiCad SVN notification list ( Resources Bug tracker ( Wish list Building KiCad Developers Links Russian WikiPedia about KiCad ( Russian KiCad docs at WikiBooks ( KiCad libraries ( Forum (Russian) ( Site of KiCad author (</p> <p>This mini-tutorial introduces the use of the KiCad system. It walks you through the steps of creating a simple circuit design, from schematic entry through printed circuit artwork. Along the way it introduces you to various KiCad features, and suggests efficient ways to accomplish various tasks. The KiCad manuals contain much information beyond what is presented in this tutorial. Consult them to learn more about using KiCad. The example circuit is a simple RS232 interface. Tutorial has images from a Fedora Core 3 (Linux) version. I updated this tutorial using Maxim Max232A 16 pin DIP ( .</p> <p>1 KiCad Mini-Tutorial Scope 2 Creating the KiCad project. 3 Drawing the Schematic with EeSchema 3.1 The Add Components Tool 3.2 Panning and Zooming 3.3 The Add Powers tool 3.4 The "Selection" tool 3.5 The "Add Wires" tool 3.6 Net/Bus Names 3.7 The "Electrical Rule Check" feature 3.7.1 The "Add noconnect flag" tool 3.7.2 Errors on power nets - PWR_FLAG 3.8 Editing component values 3.9 The Netlist Generator 4 Assigning package types with Cvpcb.</p> <p>1 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>5 Laying out the circuit board with Pcbnew. 5.1 Reading in the netlist 5.2 Defining board size 5.3 Spreading out the modules 5.4 Placement aids 5.4.1 Ratsnests and Airwires 5.4.2 Net highlighting 5.4.3 Design Rules Check 5.5 Auto-routing 5.6 Manual layout 5.6.1 Deleting tracks 5.6.2 Drawing tracks 5.7 Two-sided boards 5.8 Multilayer boards 5.9 Board outline 5.10 Zone Fills 6 Viewing the board with 3D Viewer 7 Generating files for PCB fabrication. 8 Tutorial Omissions 9 Acknowledgments</p> <p>It's best to use a separate directory for each project; things can get confusing if you have files for different projects in the same directory. Perform the following steps: 1. Create a directory (folder) named "RS232". 2. Start the KiCad program. 3. Create the project In the KiCad toolbar, select the leftmost icon, whose tooltip is Create new project descriptor (or use the menu entry Projects &gt; New Project Descr). In the Create Project files dialog, enter the name RS232, and use the Browse for other folders control to choose the RS232 folder that you have just created. Click the Save button. A file named will be added to your directory. That file contains settings for this project.</p> <p>2 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>There are four large buttons in the pane at right of the KiCad window. From left to right, they are : EeSchema (Schematic Editor) Cvpcb (Components to modules) Pcbnew (Board editor) GerbView (Gerber viewer) Each button activates a separate program. We will use those programs in the order listed during this tutorial (except we won't use GerbView).</p> <p>Start the schematic editor - in the KiCad window, click on the large EeSchema button. When EeSchema first starts with a new project, it displays an alert dialog saying that the schematic file doesn't exist. Just click OK. The main tools that you use to draw schematics are on the vertical toolbar at the right edge of the window. Those tools let you select objects, place components, draw wires, etc.</p> <p>3 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>When you are finished using a tool, you can either select another tool from the right toolbar, or you can go back to the "selection" tool quickly by right-clicking and choosing End Tool from the pop-up menu.</p> <p>The Add Components ToolActivate the Add components tool - Click on the Place Component tool in the right vertical toolbar (its icon looks like an AND-gate). The cursor should change from an arrow selection tool to a pencil. Click in the drawing window to begin placing a component. A Component Selection dialog will appear, giving you several ways to choose a component: 1. If you know the exact name of the component, just enter it in the Name: field and hit Enter or click OK. 2. If you know the approximate name, enter a search pattern (for example *C*) in Name: and hit Enter or click OK. You'll get a Selection window that lists all the matching components. 3. You can search by keyword by entering the keyword in the Name: field and clicking Search Keyword. You'll get a selection window. At present, many of the library components do not have keywords, so this feature is only marginally useful. 4. You can select a component that you have used recently from the History list: 5. The ListAll button brings up dialog from which you can select first the library, then a component within that library. 6. The By Lib Browser button brings up the Library Browser, which lets you explore the libraries and view their symbols. When you have chosen the one you want, use the Insert component in schematic (in previous versions Export to Schematic) button at the right side of the library browser toolbar. You can also bring up the library browser from the Go To Library Browser button on EeSchema's horizontal toolbar, but in that mode, there is no Insert component in schematic button.</p> <p>For now, click on By Lib Browser. In the left pane, select the library conn (connectors). In the adjacent pane, scroll down and select the DB9 component. A drawing of that component will appear in the right pane. In the toolbar, click on the Insert component in schematic button (it's on the right, in previous versions was called Export to Schematic).</p> <p>4 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>Back in the drawing window, the component symbol will follow the mouse until you left-click to place it (you can reposition it later if necessary). Flip the component left-to-right as follows: Put the cursor over the component Right-click, choose Orient Component &gt; Mirror || (Y). The connection pins should now be coming out the right side. Place the polarized electrolytic capacitors - With the Place Component tool still active, left-click in the drawing window to get the component selection dialog back. This time try the List All button. In the Select Lib dialog, select the Device library (double-click or use OK button). In the Select Part dialog, select CP (double-click or use OK button). Left-click in the drawing window to place the component. Place the other four capacitors as shown in the figure. You can do it easily by double-clicking in the History list: of the Component Selection: dialog.</p> <p>Add the other components listed below, using the techniques you've just learned.</p> <p>5 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>2x 1x 1x</p> <p>3-pin connectors (CONN_3 in the "conn" library) 4-pin connector (CONN_4 in the "conn" library) MAX232 chip (MAX232 in the "interface" library) (there's an identical copy in the "special" library)</p> <p>Panning and ZoomingBy the way, while you are working the drawing window, you can pan and zoom in several different ways : The scrollbars at the bottom and right let you pan. Just move your mouse pointer into it. There are zoom buttons in the top (horizontal) toolbar. The right-click pop-up menu has zoom and centering functions. Finally, and perhaps most conveniently, if you have a wheel mouse you can zoom by rolling the wheel. The mouse wheel recenters the display around the current position of the mouse. Also, if you just click on the mouse wheel, the display will recenter around the current mouse position. Ctrl+mouse wheel will pan horizontally, and shift+mouse wheel will pan vertically.</p> <p>The Add Powers toolEeSchema has "components" for power and ground connections. They aren't quite the same as other components, because they don't correspond directly to real parts with pins, but they do appear as symbols in the "power" library. You can add those components with the regular "Add Components" tool, but there's an easier way. Activate the "Add Powers" tool from the right toolbar. It looks like a ground symbol. It works like "Add components", but it restricts the list of choices to just the "power" library. Add the power components listed below to your drawing.1x 2x 2x +5V GND PWR_FLAG</p> <p>The "Selection" toolActivate the "Selection" tool - it's the arrow icon at the top of the right toolbar. It's the "default" tool, so you can get back to it from other tools by hitting Esc, or by right-clicking "End Tool". The cursor shape is an arrow when the selection tool is active. In selection mode, you can perform various operations (move, reorient, copy, etc) on components by right-clicking with the cursor over the component. In fact, you can also do those things in "Add component" mode, again by right-clicking over the component. The main difference between selection mode and the various "add" modes is what happens when you left-click. Left-clicking in an "add" mode adds the corresponding item (component, wire, etc), whereas left-clicking in selection mode lets you drag-select a rectangular region that can contain multiple objects. Release the left mouse button at the end of a drag-select highlights the selected objects. If you then move the mouse, the selection will move. To do something else with the selection, right-click. The popup menu has several options, including Zoom, Place, Save, Copy, Drag, and Delete. "Place" is the same as just moving the selection and left-clicking again, without ever right-clicking. "Save" copies the selection into a buffer from which it can later be pasted with the top toolbar's "Paste" button. "Copy" makes a new copy of all the selected items, so you are now moving the copy instead of the originals. "Drag" is like moving, except that wire ends that are outside the selection region will remain connected as the selection moves. As an alternative to choosing the selection operation by right-clicking, you can use the Ctrl and Shift keys while you're dragging out the selection rectangle. Look at the popup menu to see which keys do what. It doesn't work to use Ctrl and Shift after you have dragged out the rectangle; they must be down during the initial left-down that begins the rectangle. You can cancel a move by hitting Esc.</p> <p>6 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>Arrange the components as shown in the figure below using the techniques described above. Figure describes all parts placed but not wired together</p> <p>7 di 25</p> <p>18.09.2010 01:35</p> <p>Mini tutorial - KiCad</p> <p></p> <p>Now set the values of the capacitors to "0.1 uF" in accordance with MAXIM's spec sheet. To do that,right-click over each capacitor, choose "Edit Component&gt;Value" and change "CP" to "0.1 uF". If you have a lot of components with the same value, you can save time by adding one of them, changing its value, then using "Copy Component" (from the right-click menu) to duplicate the component including the new value. If you prefer, you can set a component value immediately after adding the component - the right-click menu is available in "Add Component" mode. In this design, the only components that need to have values set are the capacitors. For the other components, the value field contains the part number. The value field is generally used to distinguish between the variations of a generic component with a given function and pinout. Such variations can include resistance, capacitance, frequency, speed grade, etc. "Edit Component&gt;Edit" brings up a property sheet whereby you can change many different aspects of the component. We won't need that in this tutorial. Assign reference designators - numbers like C1, C2, and U1 that identify the specific instance of each component. You could set them manually with right-click "Edit Component&gt;Reference", but it's easier to let EeSchema do it automatically. To do it automatically, click the "Schematic Annotation" button in the top toolbar (near the right end). You'll get a dialog that lets you choose the extent of the annotation (this sheet or all sheets, unannotated components only or redo everything). Annotating replaces "?" characters in the reference designators with integers that are unique for each prefix, e.g. C1, C2, C3, U1, U2, etc. There's no particular reason why annotation has to be at exactly this point - it could be done earlier, or deferred until after wiring up the components, but it must be done before Electrical Rules Check or Netlist Generation.</p> <p>The "Add Wires" toolActivate the "Add wires" tool from the right toolbar. To connect two pins with a wire, left-click on the first pin and drag the mouse to extend the wire from that point. Each left-click will complete a line segment and you can drag a new segment from there. Clicking on another pin will connect the segment to it and stop the process. If you are still dragging a segment after clicking on pin, it isn't really connected. (This can happen if the component is off grid, or if you need to make one more right angle bend to get right onto the pin.) (You can draw wires at any angle - not just horizontal and vertical - by clicking on the "Draw lines at any direction" button at the bottom of the left vertical toolbar.) A tip is to hold down the ctrl key and move objects using the left mouse button. That way connections will follow in manner called rubberbanding or dragging. While you are drawing a wire, you can end it prematurely (i.e. without completing a connection to a pin) by rightclicking. You can cancel it by hitting Esc. Experiment with the various right-click menu options to see how they work. The ends of dangling wires are marked with little squares. Keep an eye out for such markers to make sure that your connections really are connected. When wires cross or make a "tee", if they are connected, the connection will be shown with a "junction" symbol (a filled square). If there is no junction symbol, it means they aren't connected. E...</p>