I have been exper­i­ment­ing this week with cir­cuit design and pcb lay­out tools. My expe­ri­ence is with Altium but the price is rather hefty for my fair­ly sim­ple require­ments and while I have used Altium for a few years I nev­er actu­al­ly liked it, there are a lot of issues with the sys­tem. I con­sid­ered the var­i­ous online tools and Eagle before decid­ing to give KiCad a go.

KiCad is an open source bun­dle of tools which has been rapid­ly increas­ing in qual­i­ty over the last few years. CERN is pro­vid­ing pro­fes­sion­al devel­op­ment sup­port and they have recent­ly trans­ferred from a ‘build the source’ release struc­ture to stan­dard point releas­es.

I have played with KiCad for most of the week. It is good, I could do every­thing I need­ed to for the basic board I was doing, but some of it was a strug­gle. There are a lot of rough edges, how­ev­er the com­mu­ni­ty seems strong and most of the issues I encoun­tered are in the process of being fixed.

There are sev­er­al projects under the KiCad ban­ner which loose­ly inter­op­er­ate, it seems they have had vary­ing amounts of coor­di­na­tion over the years. Kicad itself is a project man­ag­er and appli­ca­tion lauch­er. Eeschema is the schemat­ic design soft­ware. Pcb­new does the PCB lay­out. There are oth­er tools I haven’t played with yet, such as a ger­ber view­er.

One of the issues is the coop­er­a­tion between these appli­ca­tions. For exam­ple the con­trols such as key­board short­cuts and mouse behav­iour are incon­sis­tent (This is flagged to be fixed by intro­duc­ing a glob­al short­cut man­ag­er). For a while (since fixed) pcb­new had pan­el­iza­tion fea­tures avail­able when launched stand­alone but not when launched from with­in kicad . These sort of prob­lems mean that it feels more like using sev­er­al dif­fer­ent pro­grams than a uni­fied suite.

Breaking news

I have pub­lished a write­up of the board I designed, at https://david.tulloh.id.au/grideye-usb/.

Eeschema

Eeschema screenshot

Eeschema is nice and famil­iar, you can place parts, con­nect wires, cre­ate named nets etc. I had a very sim­ple five com­po­nent board so had no need of the advanced fea­tures. How­ev­er there was obvi­ous func­tion­al­i­ty for bus­es and a fair bit of sup­port for nest­ed sheets. There is anno­ta­tion tool to name your parts and a basic rule check­er to catch mis­takes.

Bonus

A nice bonus for Eeschema is the abil­i­ty to have two names on a net. This is a bit con­tro­ver­sial, Altium for­bids it but I like it. Some times a line has two roles, such as being the MISO com­mu­ni­ca­tion line dur­ing pro­gram­ming and the I2C inter­rupt line dur­ing nor­mal oper­a­tion. I like being able to cre­ate a named net for each role and con­nect both to the pin of the chip. The PCB lay­out pro­gram needs a sin­gle name, Eeschema han­dles this by arbi­trar­i­ly pick­ing one of them.

Missing Feature

Altium has a fea­ture they call direc­tives. This allows a pair of wires to be iden­ti­fied to be rout­ed as a dif­fer­en­tial pair. You can also spec­i­fy net class­es, so as to spec­i­fy increased track widths for the pow­er rail or the required clear­ance on a high volt­age track. KiCad does allow this to be done in Pcb­new but I feel the schemat­ic, as the doc­u­men­ta­tion for the design, should con­tain this infor­ma­tion. This is par­tic­u­lar­ly impor­tant if the lay­out and design are per­formed by dif­fer­ent peo­ple.

Awkward

Eeschema’s use of drag­ging with the left mouse but­ton is odd. In most appli­ca­tions this would per­form a group select, in eeschema it selects and begins to move the com­po­nents. Copy/paste is done by hold­ing down shift before doing a selec­tion. The odd­ness and learn­ing curve aside, this doesn’t scale well. There is no way of select­ing a group of objects so you can’t do a group delete, you can’t change the prop­er­ties of a group or resize mul­ti­ple wires togeth­er. Using the copy/paste you can’t dou­ble check what you have select­ed before doing a copy, mul­ti­ple pastes require the full process to be run again and you can’t change sheets. The move is still the action regard­less of the tool select­ed, so drag­ging with the wire tool actu­al­ly does a select/move and plac­ing a box like a sub-sheet must be done with two clicks not a drag.

I sus­pect the select behav­iour will be changed in the same batch of work as the short­cut improve­ments.

Ugly

I should open by say­ing I couldn’t real­ly get my head around the schemat­ic libraries. My under­stand­ing is that a library file can hold mul­ti­ple com­po­nents but I couldn’t fig­ure out how to put a sec­ond com­po­nent into a library file. I did see notes sug­gest­ing that you merge two libraries by edit­ing them by hand.

Sev­er­al peo­ple have cre­at­ed their own tools to try and assist man­ag­ing libraries. The exis­tence of these tools indi­cates that many oth­ers have also encoun­tered prob­lems.

There is hid­den mag­ic behind the library process. For exam­ple to cre­ate a pow­er com­po­nent, basi­cal­ly a pow­er net flag, the pin must be hid­den. The pin still gets a wire con­nect­ed to it but if it is not hid­den it doesn’t con­nect to the pow­er net and you get uncon­nect­ed errors when run­ning the rule check. This isn’t doc­u­ment­ed, the nice folks in the IRC chan­nel explained it to me.

There is also doc­u­ment­ed hid­den mag­ic where some parts, for­tu­nate­ly none I used, have hid­den VCC pins so they mag­i­cal­ly get the pow­er rail with­out clut­ter­ing your schemat­ic. Which is not so use­ful in the mod­ern envi­ron­ment of mul­ti­ple sig­nal lev­els.

The devel­op­ers are well aware of all of these issues, half the roadmap entries for eeschema are relat­ed to com­po­nent edit­ing. The plan seems to be to migrate the back­end of the schemat­ic library to the pcb library file for­mat and work. Then build bet­ter edit­ing tools on top. The PCB library tool is a sig­nif­i­cant step for­ward.

Pcbnew

Eeschema screenshot

It took me a while to realise that there are actu­al­ly three dif­fer­ent PCB pro­grams bun­dled into Pcb­new. They are list­ed in the view menu as three dif­fer­ent dis­play modes: default, OpenGL, and Cairo. This is not, as you might expect, just a dif­fer­ent dis­play engine. Some fea­tures are not avail­able in all modes and some fea­tures work dif­fer­ent­ly depend­ing which mode you are in. I found Cairo ran very slow­ly on my poor ancient lap­top so I just used default and OpenGL.

Dif­fer­en­tial rout­ing is a rel­a­tive­ly new fea­ture and is only imple­ment­ed in OpenGL. In the default view the fea­ture on the menu is sim­ply dis­abled, grayed out, no feed­back is pro­vid­ed as to how to enable it.

There are oth­er, less­er issues:

  • In GL mode the scroll bar arrows don’t work, drag­ging does.
  • Rub­ber band drag mode only works in default mode.
  • In nor­mal mode delet­ing a track deletes the attached via, in GL mode it does not.
  • In nor­mal mode the start track short­cut starts a track imme­di­ate­ly, in GL mode it waits for a click.

There is a 3D mod­el fea­ture which uses VRML world files for each part. How­ev­er it only sup­ports the sub­set gen­er­at­ed by wings3d, more com­plex files silent­ly fail. Extend­ing this to oth­er mod­el types is on the roadmap.

Some oth­er stuff feels a bit incom­plete:

  • Hid­ing a cop­per lay­er still shows the pads.
  • There is a “Hide all cop­per lay­ers but active” option for sin­gle sided work but it doesn’t hide the oth­er side’s silkscreen.
  • The rule-check doesn’t enforce track width.

Final­ly the library man­age­ment is bet­ter than Eescheema’s but still needs a lot of work.

  • Rel­a­tive paths require man­u­al­ly using an envi­ron­ment vari­able, which was list­ed in the Eeschema library man­ag­er but not Pcbnew’s.
  • There is a plu­g­in to add github based repos­i­to­ries, but the option is list­ed even if the plu­g­in is not installed.
  • There is a plu­g­in to add github based repos­i­to­ries, not git based, it uses a github web­page URL.
  • Adding a library doesn’t check that the library exists, works or is valid. An error is shown lat­er when you try and use it.