April 3, 2015

Trying out KiCAD

by Mikhail Karpenko

 

Introduction

curverd

Teardrops in KiCAD

We, at Elphel, are currently using proprietary software for schematic and PCB development and thus are not able to provide our customers with the “real” source files of our designs – pdf and gerber files only. Being free software and open hardware oriented company we would like to replace this software with open source analogues but were not able to accomplish this due to various limitations and inconveniences in design work-flow. We follow the progress in such projects as gEDA and KiCAD and made another attempt to use one them in our work. KiCAD seems to be the most promising design suite considering recent CERN contribution and active community support. I tried to design a simple element, a flexible printed circuit cable, using KiCAD and found out that the PCB design program lacks such useful feature as teardrops.

What are teardrops

Teardrops are often used to create mechanically stronger connections between tracks and pads/vias to prevent drill breakout during board manufacturing. This is particularly valuable when the design objects are small, as it was in my case. The figures below explain the problem:

1

Fig. 1

2

Fig. 2

3

Fig. 3

4

Fig. 4

Fig. 1 shows perfectly aligned drill hole but the final result (as on Fig. 2) can be far from perfect because of drill tool wandering or board stack misalignment during manufacturing. Relaxing specification or allowing drill breakout along the hole perimeter, as on Fig. 4, is not always possible. Adding teardrops (Fig. 3) in such cases is a good option.
The images below show misaligned drill holes on manufactured PCBs:

electronic circuit board
16513351487_5ef602a50e_z

Adding new feature

The great advantage of any open source project is the possibility to add any required feature or fix bugs on your our. I cloned KiCAD repository and dived into the source code trying to add mock up implementation of teardrops. It took some time to get acquainted with class hierarchies and internal structures. Finally, I added new option to “Tools” menu which adds teardrops to currently selected track. Two types of teardrops are implemented by the moment: curved (github link) and straight (github link). The process of selection and results are shown on the screenshots:

selection

curverd
straight

The straight teardrops are composed of two segments connecting tracks and vias. The curved teardrops are actually approximated with several short segments as KiCAD does not allow to place arcs on copper layers. There are several intentional limitations in current implementation:

  • teardrops are created for vias only
  • DRC rules are not taken into consideration during calculations
  • the ends of selected track must coincide with via center
  • no user adjustable settings

These limitations are caused by test nature of my source code and at the same time they define the fields of further development. The result obtained is good enough to be used in real applications.

Links:

https://www.flickr.com/photos/andresrueda/
https://www.flickr.com/photos/creative_stock/
https://git.elphel.com/Elphel/kicad-source-mirror


11 responses to “Trying out KiCAD”

  1. firewalker says:

    Hello! I just tried your patch and would like to give you some feedback.

    I noticed that your patch only works properly when in GAL mode. Most of the time in normal view kicad will segfault.

    Maybe the option should be made available only in GAL mode?

    Thanks you.

  2. Mikhail Karpenko says:

    Thank you for the feedback! Yes, this patch is intended for GAL mode only. I sent a fix to KiCAD mailing list which disables the menu entry in legacy mode. You can find it here: https://lists.launchpad.net/kicad-developers/msg18245.html

  3. firewalker says:

    Thanks you for your response.

    It would be nice to “tag” your git with the bzr version of kicad, as a reference.

    Are you going to pull the latest kicad commits soon?

  4. Mikhail Karpenko says:

    I tried to keep the repository in sync with upstream during this work so I didn’t actually need to tag it, but it’s a good idea and I’ll bear it in mind for the future. Currently, my priorities at work have changed and I paused the work on teardrops, so any updates to the repository are unlikely to happen in the nearest future.

  5. con-f-use says:

    I’m missing another related feature in KiCad. Imagine a three way cross-section where one trace joins the other at a right angle (aka. T-joint). You don’t want acute angles at the edges of the joint but rather rounded corners. There should be an option in KiCad to do that automatically.

    Here is what I mean: http://www.msarnoff.org/pcb/tjoint.png

  6. Mikhail Karpenko says:

    Initially I intended to implement such a feature but I refused of it later on due to lack of time. It is still on my to-do list.

  7. Jacek says:

    Could you please submit matches to the master branch? Teardrops are very useful feature and I’m sure they would be accepted without much hesitations.

  8. Do you know if this was ever merged upstream?

  9. Mikhail Karpenko says:

    No, it was not. Developers did not expressed much interest in the patch and now I have no time to work on and keep it in sync with upstream.

  10. sachin says:

    Is there a way i could have it working over my windows machine ?
    some kind of a patch i could add to my existing KiCad installation
    Thank You

  11. Mikhail Karpenko says:

    We never tried to build KiCad for Windows as we do not use this OS on our computers, but generally it should be possible to apply the patch and build it on Windows machine. The problem is that I have not kept the patch in sync with upstream for a long time and I doubt it can be cleanly applied on current version of KiCad. As for now, I have no time to check this or update the patch.

Leave a Reply

Your email address will not be published. Required fields are marked *


one × = 5