Using KiCad

Preamble

Using KiCad…. for the first time. Here we are using it to create Veroboard/Stripboard layouts – without first laying out the schematic. My reason for this is that I had already used EagleCAD to draw up the schematic, and then, like most people, realised that the board size was too limited, in the freeware version (100 x 80 mm (4″ x 3.2″)), to allow all of the components to be placed.

Note that this article applies to version 4.0.7. Version 5 should be released soon, see When will Kicad 5 be available? – Software – KiCad.info Forums, and should have a much better user experience, as well as being able to import EagleCAD files.

Veroboard sizes

  • 65 x 95 mm (2.5″ x 3.75″)  => 24 strips x 37 holes
  • 65 x 145 mm (2.5″ x 5.75″) => 24 strips x 56 holes

See also

Installing

In the KiCad-4.0.7.dmg, moving the KiCAD folder into a local user’s apps folder (i.e. a folder in the user directory) is fine. However moving the associated kicad “support folder” to ‘~/Library/Application\ Support‘ does not work – when trying to load a footprint, you receive the following error:

KiCad module load error
KiCad module load error

In fp-lib-table, which comes with the KiCad-extras-4.0.7.dmg and is placed in ~/Library/Preferences, an environment variable is used: $KISYSMOD, and this points to ‘/Library/Application Support/kicad/modules

(fp_lib_table
 (lib (name Battery_Holders)(type KiCad)(uri ${KISYSMOD}/Battery_Holders.pretty)(options "")(descr "Batteries and battery holders"))
 (lib (name Buttons_Switches_SMD)(type KiCad)(uri ${KISYSMOD}/Buttons_Switches_SMD.pretty)(options "")(descr "Buttons and switches, surface mount"))
 (lib (name Buttons_Switches_THT)(type KiCad)(uri ${KISYSMOD}/Buttons_Switches_THT.pretty)(options "")(descr "Buttons and switches, through hole"))
...
)

blah…

To fix you could either:

  • try to modify KISYSMOD (probably the best idea, go to the Preferences->Footprint Library Manager menu, and it is item 3 – However, the path field is not editable), or;
  • edit fp-lib-table, and replace all occurrences of ${KISYSMOD} with ~/Library/Application Support/kicad/modules.

You can do the latter either using “sed” or in textedit. Actually you can’t use “~” as it is a shell variable. The full path must be used, so in my case I used “/Volumes/Home/Users/user/Library/Application Support/kicad/modules“. However, this did not work, as there is then a problem with the space character in “Application Support” and using “Application\ Support” did not work either. You get a parse error

KiCad gobal footprint library table parse error
KiCad gobal footprint library table parse error

Trying to enclose the path in single or double quotes doesn’t help either.

I am not sure what the answer is – apart from storing the modules folder, on the KiCad-extras-4.0.7.dmg in the place that it is actually expected, i.e. in /Library/Application Support/kicad/modules, rather than in the ~/Library.

Actually using KiCad

A note about track layers

By convention, the tracks are shown in green and any front side “jumpers” are shown in red. This follows the B.Cu (green) and F.Cu (red) layers (Back copper and Front Copper respectively). Whilst in the line drawing tool, pressing the V key will switch layers. If you make a mistake and end up having your tracks in red and jumpers in green, there is no need to delete each segment and redraw in the correct layer – even though in the Default view there appears to be no way of changing a track segment’s layer ( and hence colour). From Move part of track to another layer, rather bizarrely, you have to switch to Open GL mode, menu View -> Switch Canvas to OpenGL, and once there, select the track segment (or hover the mouse over the track segment) and hit the E key. From the resulting Track & Via Properties dialog, the segment’s desired layer can then be selected:

Track & Via Properties dialog
Track & Via Properties dialog

Getting Started

Following on from this answer to Design a veroboard/stripboard layout from an Eagle schematic:

  • Click pcbnew button the KiCad editor window, or run the pcbnew application
  • Before you start it is important to set the grid and tracks – as it doesn’t seem possible to universally change the widths of the tracks once they have been laid down (or at least I haven’t found a way – you have to right click each track and select Change Track Width)
    • Firstly set grid to 2.54 mm, using the popup menu in main window.
    • Secondly set track to 1.199 mm. To do this you have to change the Design Rules, go to menu Design Rules -> Design Rules Editor. In the dialog:
      • under Net Classes Editor, set Default/Track Width to 1.199

        KiCad - Net Classes Editor
        KiCad – Net Classes Editor
      • under Global Design Rules set Min Track Width (mm) to 1.199

        KiCad - Global Design Rules
        KiCad – Global Design Rules
  • If you are planning a large circuit, it is also a good idea to set the size of the strip board before you start to lay out components, so that everything fits well when it comes to actually populating the physical board. You don’t want to make a beautiful layout on the computer only to find that it will not fit!
  • Select green “Add tracks and vias” button on the right
  • Click somewhere top left and release
  • Double click somewhere to the right of that, to create a straight line. A red line is created
  • Double click anywhere within the line to make a red pad (although this isn’t the correct way, and can only be done in the middle of a track, not at the end. The correct way is to click on the Add footprints button and select the required component (it is probably better to use the device size/format, than try to find the actual component, i.e. TO-92 for a transistor, DO-35 for a diode, etc.)
  • Press “V” to switch to green layer, for drawing vertical “jumpers”
  • Zooming out and back in, with the mouse wheel, removes any “artifacts” ( that may have appeared, such as aborted block selection boxes, or aborted accidental and discarded tracks.

Issues

  • I have found that the delete is a bit hit and miss, or slow on a 2008 MacBook Pro
  • Adding a footprint, and bringing up the whole list is slow and often gives the spinning ball, at least on a “slow” MacBook Pro (circa 2008).
  • There is no preview of footprint, you have to place it to see what it is like, and if it is the correct part
  • There is no multiple placing of footprints, you have to re-select and rotate each component
  • Once a footprint is laid down, you can not draw a track up to it, or over it – If you are only using KiCad to give a visual layout of the veroboard, then you can click Disable design rule checking.

Disable design rule checking!!!

If you are trying to do something, especially lay a track and KiCad won’t seem to let you, make sure that you click Disable design rule checking. I often forget and then wonder why something isn’t working. See Help Lay track on kicad.

Likes

  • Good to have recently used footprints, however, these disappear when you close and re-open the application

Selecting and moving

Either:

  • block move, by selecting an area (click drag a yellow box) and then, when the mouse is released a pop up appears to check what is included in the group. Sometimes popup does not appear and the selection box needs to be drawn again. Then  move the mouse to the new area and then left click to move

or

  • Right click on a footprint and select  the footprint submenu and then select Move in the sub menu – make sure you select the entire foot print menu and not just a pad submenu – else you will only move a pad of the footprint.
  • Note that often when trying to move the end of a track, to extend or shorten it rather than displacing the entire track, you can hover over the end of the track and press the M key, move to the new location and double click to place it. However, this does not always work correctly, and either the segment will become very short (and become just from the original end point to the new location, or, actually move the track end but add an angled tail to the new point. Often it is quicker to just delete the segment and then redraw it. This is annoying. See Editing tracks. If it isn’t working for you, one thing to check, before you rip up the track segment, is to:
    1. Ensure that the pointer tool is selected, and not the track laying tool
    2. Make sure that you are actually at the end of the track segment, zooming in might help with this.

Block copy

Either

  • Select an area  and then, when the mouse is released a pop up appears to check what is included in the group. Then  move the mouse to the new area and then right click and select Copy Block

or

  • Right click on a footprint and select  the footprint submenu and then select Duplicate Footprint in the sub menu – make sure you select the entire foot print menu and not just a pad submenu – else you will only move a pad of the footprint.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s