Giving Back to KiCad

Posted by: Dave Vandenbout 4 years, 10 months ago

(2 comments)

I switched over to KiCad a while ago, mainly because paying fees for Eagle upgrades that didn't have much "up" in them seemed pretty stupid. In exchange for providing a free tool, the KiCad open-source developers get a lot of grief, mostly about the GUI and library management. That's to be expected: all EDA software, like unhappy families, sucks in its own unique way. A lot of these are bike-shed issues that are easy to understand so people form opinions they're not shy about expressing. But it's not a big problem to me as long as the right wires end up in the right places. It's fine to voice your concerns so the developers get some feedback; then put on your big-boy pants and make do with what you've got.

And I've gotten a lot out of KiCad: well-documented ASCII design files, Python scripting, push-and-shove length-matched differential routing, etc. And I paid nothing to get it!

It's possible to donate money to KiCad, mostly to support the CERN team that's working on it. A lot of great work is being done for a pittance. But, to be frank, I have too many people in my life who really need money to be sending it away to strangers in foreign lands.

What I do have is time and energy. (Well, as much energy as I have left at 59.) So I've started building open-source point-tools to surround KiCad with features I want. The first two of these are KiCost and KiPart.

KiCost is a back-end tool to automate the most-hated portion of electronic design: finding the cost of the components and placing an order. It takes the bill-of-materials from KiCad and gets the current, quantity-adjusted price and availability for each component from a set of online distributors (Digi-Key, Mouser and Newark/Farnell are currently supported). It places all of this information into a pretty spreadsheet:

KiCost Spreadsheet.

With the spreadsheet, you can see who has parts and what they'll cost for the quantities you need. Then (and this is the big time-saver for me), it makes lists of the parts you select in a format that can be cut-and-pasted into the online order forms of each distributor. Just press "Submit" and your parts are on the way. Here's a video that demonstrates what KiCost does:

While KiCost helps on the back-end of a design, KiPart is oriented toward another hated task at the front-end: building schematic symbols. When you're confronted with a high pin-count microcontroller or FPGA, KiCad (like Eagle) makes you use a cumbersome, GUI-based schematic symbol editor to enter the pins one ... by ... one. It's slow, tedious and error-prone but, other than that, it's just great. (See, even I get in on the act of bashing the KiCad GUI.) That's avoided with KiPart because it lets me enter the device pin descriptions into a spreadsheet that's automatically processed into a schematic symbol library. The spreadsheet really speeds-up data entry and makes it easy to spot errors (like setting a pin to be an input instead of bidirectional). Plus, all my parts look consistent because I'm not manually drawing them. KiPart speeds up symbol creation 3x-4x, even for simple parts. And it's a thousand times faster if the device manufacturer already provides the pin information as CSV files (as many FPGA companies do). Here's a symbol KiPart created almost instantly for one of the smaller 256-pin FPGAs (if you think you want to do this manually, wait until you get one of those 2000-pin behemoths...):

256-pin FPGA Symbol Generated by KiPart.

And here's another video that shows how to use KiPart:

In addition to being offered as open source tools to the KiCad community, KiCost and KiPart let me contribute in other ways. For example, I've been releasing schematic symbols generated by KiPart on GitHub. So far there are libraries for the Xilinx Virtex-6, Spartan-6 and 7-Series FPGAs (a total of 166 different devices) and for the Cypress PSoC5LP microcontrollers (awww, only 8 devices). More libraries are planned: I'm currently working my way through the Lattice iCE FPGAs.

It's easy to get started with KiPart and KiCost:

pip install kipart
pip install kicost

Then go to readthedocs.org to read the documentation.

Let me know if you have any suggestions for improvements. Of course - since it's open source - I have the right to say "Hell no! I won't be doing that!" and you can reply "OK, I'll just fork it and do it myself." That's the free part of FOSS that I really like.

Current rating: 5


Comments

  • pete 4 years, 6 months ago

    Very nice. I wrote perl automation scripts that did the same thing for Mentor ViewDraw (DxDesigner) then they changed the format of their symbols to binary and I lost all that.

    Sheez, there is a lot of duplication of work in this industry.

    Link / Reply
  • Tim Miner 4 years, 5 months ago

    I LOVE THIS!!!
    One question: When you bundle the power pins like VccA, does the resulting library component leave all but one "hanging" such that they are not connected except on the part? ... Said another way, does the resulting KiPart component leave the 2nd, 3rd and 4th VccA pins (assuming 4 total) unused by a KiCad PCB designer?

    Link / Reply

New Comment

required
required (not published)
optional

Recent Posts

Archive

2016
2015
2014
2013
2012
2011

Categories

Authors

Feeds

RSS / Atom