The following information may have errors; It is not permissible to be read by anyone who has ever met a lawyer. Use is confined to Engineers with more than 370 course hours of electronic engineering for theoretical studies.

ph +1(785) 841 3089 Email inform@xtronics.com

Eeschema

From Transwiki

Jump to: navigation, search

Contents

[edit] eeschema

[edit] Related kicad pages

  • EE CAD Terminology
  • kicad Navigator - the kicad project Manager
  • eeschema - the schematic editor
  • cvpcb - the component to module (AKA foot-print) editor
  • pcbnew - the PCB layout program
  • Gerbview - the Gerber file viewer
  • Bitmap2Component Converts bitmap images to filled polygons
  • wings3d - 3d view - good way to waste a lot of time..

[edit] eschema

After you run through the tutorial - the next thing to do is learn how the libraries work. Libraries are processed with the subprogram called libedit.

[edit] Default Hot-key-list

  •  ? Brings up this list - or yours that you customized - but you can't leave the window up and edit - hence this page.
  • Space-bar zero relative coordinates to cursor position
  • Ctrl-Z Undo
  • Ctrl-Y Redo
  • F1 Zoomin (why hot keys - the scroll wheel works for this?)
  • F2 Zoom Out
  • F3 Redraw
  • F4 Center at current zoom
  • F5 Next search
  • Delete Remove item
  • Insert - repeat last item - (increments labels - very useful for buses etc.)
  • Tab Switch Move-block to drag-block
  • M move component
  • G drag component
  • A Add component
  • R Rotate component
  • X Mirror over the x axis
  • Y Mirror over the y axis
  • N return part to Normal orientation.
  • V Edit Component Value (Value is defined in Kicad as the part name)
  • F Edit foot-print
  • W begin wire

[edit] libedit

If you are learning to use kicad, it is important to realize at step one that you will need to be able to make your own library parts (I can' think of a project where it wouldn't be true). The first thing you need to do is understand how the library parts are created, modified and extended. Libedit is where eeschema's library files (.lib) are edited. Once a part is edited you need to save it twice - into the current RAM and again to the library (not sure of the why for this?).

[edit] Managing Libraries

There are quite a few libraries that come with kicad and the temptation is use them just as they are, but the best practice is to create your own library and copy the ones you want to use over. Then if you make changes or adjustments you won't lose them the next time you update the software.


[edit] Change name of part in library

In libedit select part to rename, Select edit part properties and select the fields tab. In the "Field to edit" section, choose the "Value/Chip Name" radio button. While the "Value" radio button is selected, edit the "Field Text" to the new part name. Save the library. Select the delete icon and delete the original part name.

[edit] Create New Parts Library

From in EESchema select click-on go_to_library-editor" icon. Then select "New Component" icon ... go through the process of creating a part or open an existing one it by clicking on the 'Select a component to edit' icon.

Once you've have a part, use the "Create a new library and save current part into" icon. Then select a filename (ends in '.lib').

After saving - close out libedit. Next, form in EESchema add the new library to library list. You do this in "Preferences/Libs_and_Dir > ADD (button)" - browse and find the library you just created and it will be added to the selection list.

[edit] Copy part between libraries

From in EESchema select click-on go_to_library-editor" icon. From within libedit click on the 'Select the working library' icon - select the lib you want to copy from and then click on the 'Select a component to edit' icon and select the part you want to copy.

Now, click on the 'Select the working library' icon again and then the 'save current loaded library on disk' icon.

[edit] Define Field names for parts Library

Once you understand how the library works, the next thing you should do is to decide on a default set of fields that you want associated with your parts - this allows you to have the information where it is needed and helps you generate useful BOMs.

There are only a couple of field names (of course the field itself is editable) that can't be changed. These are Ref, Value/Chip Name, Footprint, and Sheet,

Ref (F0)
this is the reference number - its default value will be the reference prefix - R for resistor C for Cap etc
Value/Chip Name (F1)
(the part-name ie 2N2222 (the default name here is confusing!!)),
Footprint (F2)
the name of the circuit board decal that the part points to. If the part can have more than one foot print leave it blank and use Footprint filtering to enter a list of possible footprint.
Datasheet (F3)
(not used? )

The rest of the fields are user fields that default to field1, field2,...field8 and can be changed to anything you want.

I recommend creating a part called 'template' that has the fields you normally use and save it. Then when you create a new part open this 'template-part' and edit it into the new part. I suggest the following fields to use:

  • Value (not to be confused with the Value/Chip Name) This field can be used with resistors, capacitors etc and have the resistance value.
  • Description - a brief string that describes the part ie 256K Eprom, 1/4 watt resistor, edge connector.
  • Manu1 - First manufacturer
  • manu1# - First manufacturer's part number
  • Manu2 - First manufacturer
  • manu2# - First manufacturer's part number
  • Vendors - Who distributes this part
  • Pricing - I put info like $.002 in 10,000s
[edit] Part Properties

While in lib edit you can click on the 'Edit component Properties icon to bring up a tabbed dialog box. This lets you change the details of the component.

[edit] Options Tab
As Convert 
This is for logic gates - the convert is the De'Morgan's equivalent of the main part.
Show Pin Num and Show Pin Name
Makes Pin names and numbers visible. Normally checked for chips, but would be cleared for resistors and diodes.
Pin Name inside
Normally checked - it is the norm for chips.
Number of Units
How many op-amps in the quad package? 5 - 4 op-amps + one power part
Skew
Distance from the pin end to the pin name text - for name inside only.
Power Symbol
Parts are locked
[edit] Doc Tab
Doc 
A text string that is displayed in various menus in displayed lists of libraries.
keywords 
key words allow you to search in a selective way for a component according to specific selection criteria

(function, technological family.)

DocFileName 
Points to the documentation file for the component - a PDF or schematic.
Copy Doc
Browse DocFiles
[edit] Alias Tab
Alias

An alias is another name corresponding to the same component in the library. Components with similar pinout and representation can then be represented by only one component, having several aliases (ex: 7400 with alias 74LS00, 74HC00, 74LS37. ).

Add
Add a new Alias
Delete and Delete all
Remove one or all Alias
[edit] Fields Tab
Field to Edit
Click radio button to work with a selected field
Show Text
Makes the selected field's text visible when in eescheema
Vertical
Select to rotate the text side ways.
Field Name 
name of the field - see #Define Field names for parts Library
Field Text 
The text the Field holds.
Size - Posx - PosY
How large the text and what offset the text is at from part the part origin or anchor point
Horizontal and vertical Justify 
Sets the justification of the text - left, centered, or right.
[edit] Footprint Filter Tab
Footprints
Enter a list of allowed footprints for the component. This list acts as a filter used by CVPCB to display the allowed footprints only. Wild cards are allowed. S014* allows CVPCB to show all the footprints with a name starting by SO14 For a resistor, R? shows all the footprints with a 2 letters name starting by R
Add
Delete and Delete all 
[edit] Schematic Parts creation

My way is to always start with my template part (you could have several templates made from the first one.) So instead of selecting the New component' icon use the select component to edit icon and change the Value/Chip Name field and save the part. Then start editing.


  • Saving to current loaded (RAM) library updates schematic. Don't forget to save to the Library
  • Pin names with an over-bar (active low) can be made by starting the name with a '`' tilde..
  • Skew setting is the distance between text and pin end.
  • Over-lines for logic notation can be accomplished in pin names using the tilde ('~") character. For example:
    • Enter read/~write to display read/write or ~write~/read would appear as write/read

For fast, efficient pin name entry there is a nice web tool that creates a part for you from your input. http://kicad.rohrbacher.net/quicklib.php

Once you download the automatically created part you should:

  • Copy it to your custom library location
  • Add the library in Preferences -> Library
  • Open the component in LibEdit to put the pins where you want them
  • Resave. You may want to add the component to an existing library or leave it as a stand-alone single component library.

Some things in Libedit are difficult to get to, such as changing the font size of the component name. Like all KiCad files, you can always just open the component .lib file in a text editor and make changes. Many fields are obvious, but the definitive reference is in your KiCad installation at ProgramFiles -> KiCad -> doc -> help -> file_formats

[edit] libbrowse

Associate schematic decal pins with footprint pins?

[edit] ERC

Electrical Rule Check helps check your schematic for errors.


[edit] eschema How-to do things

[edit] Update a part with one newly modified in the library

Make sure you save both to the lib and RAM before leaving libedit


[edit] Placing multiple components of the same type

Select the component, R-click and from the pop-up menu, "copy-component". If you need to duplicate a block of components, hold shift, L-click and drag a box around them, drag and release.


[edit] Copy of a block of schematic from one sheet to another

Select the block with the mouse, right-click and select "Save block" Then go to the other sheet and click the "Paste" button in the tool-bar.

[edit] Copying from project to project

You can do this by adding the old schematic to the new as a hierarchical sheet and the copying between them.
  1. Copy the old schematic file to the same directory as your new schematic file.
  2. Select the "Add hierarchical Symbol" icon (Right tool bar) and place one on the new schematic.
  3. Enter the file name of the old schematic you copied into the directory including the file name extension. Leave the sheet name blank.
  4. Open the old schematic via the "schematic hierarchy navigator" icon (Top tool bar) or double click on the symbol.
  5. Select the block you want to copy and pick "Save Block" from the context menu.
  6. Open the new schematic via the "schematic hierarchy navigator" icon (Top tool bar).
  7. Select the "Paste" icon and paste the block in the new schematic.
  8. Repeat as required.
  9. Delete the old schematics hierarchical Symbol from the new schematic.
  10. Delete the old schematic file if you want.

[edit] Printing to a web viewable file

A better solution than postscript printing is to use Plot/Plot SVG command to write scheme in SVG file format.
    • The only drawback is width of the lines - there is a script that only changes stroke-width:1 to stroke-width:10 in SVG file and it can be found at http://www.japina.eu/blog

[edit] Block move

Proceed as follows:

  1. Hold down Ctrl
  2. Press and hold down the left mouse button to begin selecting
  3. You can release Ctrl any time from now
  4. Move to the opposite corner of the selection box and release the left mouse button
  5. Move the items to the desired place and left-click to put them there
    • If anything goes wrong, right-click and select "Cancel block".


[edit] Notes

  • For multi-part components with more than one component type, do not forget to check (in library editor) the "Parts are Locked" option for these components. With this option, Eeschema does not change the part selection when annotates the schematic.
  • The locate dialog has a search for markers - these markers refer to those produced by ERC.


[edit] KiCad Hierarchy

[edit] Power Flags and Power Symbols

The behavior of power nets follows the rules of all other nets, there is nothing magic. GND, 5V, 12V etc are examples of power nets.

All power nets are created with pins identified as "power input", including the Power Symbols you put all over the place. If they were "power output" then Kicad would complain, because there was more than one. So the Power Flag, is the ONE power output per power net, that makes the ERC happy.

A Power Symbol is really just a component with an invisible power pin. Like any component with invisible power pins, it connects to all pins of the same name. And any net you connect to it then is connected to that net.

The Power Flag can be used to connect power across sheets, but it can also be used on a single page schematic to provide the Power Output for a power net. If you want a GND net and a GND_EARTH net, you need two symbols. The GND symbol has an invisible pin named GND, and the GND_EARTH symbol has an invisible pin named GND_EARTH. Each ground net should have one PWR_FLAG connected to it.

  • A Power Symbol (VCC, V3P3, etc.) gives the net its name and is used on each page to tie to the global power net. It is a special component not listed in the BOM.
  • A Power Flag (PWR_FLAG) symbol which gives the net its global characteristics - connecting power nets between sheets.

[edit] Power Symbol

[edit] Using

  • The Power Symbol is placed on any sheet as often as needed where ever you need to connect to that power rail (compare this to the Power Flag)

[edit] Creating a Power Symbol from scratch

  • Under the edit pin dialog pin properties
    • Pin name should be set to power net you are creating. The pin name gives the net its name.
    • The pin Electrical type should be set to Power Input. (If you make it a Power Output it will produce an error against the Power Flag which is a Power Output)
    • Be sure the Visible box is unchecked. This makes the pin invisible, (and length zero) and makes this pin connect to all other invisible pins of the same name, across the page.
  • Under the Fields Dialog
    • Set symbol Ref Designator to #<name> The name isn't important, but the # tells KiCad not to annotate the symbol or add to the BOM
    • Set the Value to the same net name as the pin name for readability.
  • Power Symbol box is checked under Component Properties/Options Dialog. When this flag is set:
    • One cannot edit the symbol name in eeschema.
    • The symbol is automatically re-annotated when an ERC or a netlist is made.

[edit] Creating a Power Symbol by using another symbol as template

  • Load the model.
  • Edit the pin name (which then takes the name of new power port).
  • Edit the Value field to match the pin name (which is the net name)
  • Reference may be left as is (it does not get used because it starts with "#"))
  • Save the new component.

[edit] Power-Flag Symbol

[edit] Using

  • Place the Power Flag only once per unique power or ground net, and wire it to the associated Power Symbol

[edit] Creating

(should not be necessary - already exists in Power.lib)

  • Pin name is not important (but is typically "pwr") and pin is visible, length zero
  • By being visible, this pin does not, by itself, connect to other pins of the same name. Many of them on one page will not connect by default
  • Make the pin a Power Output
  • Set symbol Ref Designator to #<name> The name isn't important, but the # tells KiCad not to annotate the symbol
  • Power Symbol box is checked under Component Properties/Options Dialog


[edit] Power flag Behavior

Only the pin name is used. Invisible pins which have the Power In or Power Out electrical contact are automatically connected.

For connection, the name of the symbol is not used (From this point of view, if is only a comment).

As of version (2010-03-14) has a feature that lets one turn on invisible power pins in the Preferences/Options of the main menu or by using the icon on the options tool-bar found on the left side.

[edit] Connecting Power through a Passive (special use of Power Flag)

Sometimes a passive device (resistor or inductor) is placed between the Power rail and a component's Power pin. This causes ERC to report that the pin is not powered. (Pin connected to some other pins, but no pin to drive it) The Power Flag can be used to fix this.

  • Wire the net as intended, such as VCC -> Resistor -> power input
  • Connect a Power Flag (NOT a Power Symbol) to the component's power input

The Power Flag, as a power output, tells ERC that the component is powered, but it adds no actual component to the net.

This is substantially better than turning off the ERC check or remembering which errors to ignore (two bad practices).

[edit] Power-Pin Problems and Best Practices

Eeschema automatically connects invisible power pins, thus all invisible power pins of the same name are automatically interconnected without any effort on your part.

This presents some problems - if you want to keep the grounds separated, (lets say to control noise induced by ground currents) then you can make your own part versions with non-power-port pins (flag "Power Symbol" must be cleared (In libedit, Part Properties/Options).

Some parts call ground pins GND while others may have it as VSS - you can connect them with power symbols for these names. There is some other foot work needed with the use of a PWR_FLAG to prevent ERC from detecting them as unpowered.

Best Practice It is popular to not bring out the power pins on parts - and let power be automatic, this practice might save time, but at the cost of failing to communicate what is going on. A better way.

  1. Create separate power units for logic chips and opamps and put them and their associated bypass caps below the main circuit. This helps to show which bypass-cap is intended for which chip. It also suggests that the bypass needs to be close to the hip it is bypassing.
  2. Don't use invisible power pins. Current flowing on ground returns create voltages - seeing the power connections helps prevent noise problems.

[edit] Connecting Grounds at a Pavilion or Net-Tie

  • Pavilion Single Point ground pavilion, home-runs made easy.

[edit] Hierarchical sheet names and net-names

In the netlist file you will see global netnames appear with out any prefix. All other net names will have the sheet path as a prefix. Thus on the root schematic, the netname "mylabel" appears as /mylabel.

A label defined in the sheet mysheet, inside the sheet parentsheet, inside the root sheet is named /parentsheet/mysheet/mylabel. Global labels (like powers) are not prefixed because they are not defined in a specific sheet, and they are known in all sheets. They are named VCC, GND ...

Inside a complex hierarchy ( sheet used more than once) , for instance mysheet found in sheetOne ans sheetTwo, the label mylabel found in mysheet is named: /sheetOne/mysheet/mylabel and /sheetTwo/mysheet/mylabel because they are actually 2 different nets. (like 2 different files named myfile in two different directories)

Personal tools