Close

Matching against CPL

A project log for Kit Space

An site to share buildable kits

kaspar-emanuelKaspar Emanuel 11/01/2016 at 17:130 Comments

In trying to spread the word about the site we have been getting in touch with project creators that have published their work on GitHub. The goal is often to try and determine the bill of materials for a design and put it into our standard 1-click-bom.tsv format. As you might expect it can be a bit of a tedious process as there is no standard way to present the information and often the designers never put up their exact part selection!

But the good thing about going through this is that it motivates me to work on automation to make this work easier.

One of the most tiresome things is selecting generic SMD resistors and capacitors as often these won't be exactly defined but you won't care which exact part or manufacturer is selected. The solution I came up with is to match descriptions in the bill of materials against the Common Parts Library in the 1-click BOM extension. This is what that looks like in practice.


This works by:

  1. Checking if the references are Rs or Cs, if so, extract the important parameters from the description and match against the Common Parts Library resistors and capacitors.
  2. If not Rs or Cs or nothing is found from the CPL, search Octopart and Findchips and select the first result.

I am planning on adding more CPL matching for LEDs, ICs and through hole parts. I have also started work on searching retailer sites direct. Octopart and Findchips are really great and let the extension search a lot of different retailers with a little bit of code but they are sometimes a bit out of date and won't let me filter quite the way I want to.

Discussions