Latest version of KiCost: Faster! Custom Pricing!

if you move:
Board Qty:
Total Cost:
Unit Cost:

1 or 2 fields to the left it should work

not sure why its needed though

Thanks. I didn’t move anything, I just changed the BoardQty number from 100 to 1 and quantities changed from 0 to the correct numbers.

Then I changed it back from 1 to 100 and it updated correctly the sheet. Not sure what happened, seems like some issue during the first startup.

1 Like

If all else fails you can do the same with private messages on this forum. Works like posting in a thread, can have attachments/images… :wink:

1 Like

ok I think I got a little bit smarter, when using variants it still adds the component to the xslx sheet but leaves out the manf#.
I thought it would completely leave out the component.
is there and option to do this?

It’s not just multi-user access that creates a slow down in SQLite. When I used it about 10-15 years ago, the locking and back off strategy employed by SQLite killed performance in an application surprisingly similar: multiple http download threads poplulating a central database. Unless you have a local cache for each thread feeding info to a common “database” thread, perhaps another library might be more appropriate.

Anyone have any more recent and/or different experience?

1 Like

I got the same error when I used your XML file. The cause of the error is complicated and irrelevant. I think the way of specifying variants is overly complex and it should remove the items from the spreadsheet, rather than just zeroing their cost. (I’ve never used variants, that was just some feature somebody else wanted.)

I’ve got a version of KiCost that uses an XML field called ‘variant’ or ‘version’ which skips any component not matching the current variant. I’ll let you know when it’s available to test. Are you able to install KiCost from Github? Or does it have to come from Pypi?

2 Likes

I believe that version is exactly what I want! I dont think installing from Git should be and issue. Also I would be happy to test it out

It sounds good. In particular I’m keen to remove a bunch of items from the bom, like tespoints and unpopulated connectors that I usually mark with a field called “Exclude from BOM” set to 1. I can’t get the -fields argument to work, I guess it doesn’r like the blank spaces.

1 Like

I pushed a new version of KiCost to Github. You can install it using

pip install -U git+https://github.com/xesscorp/KiCost

The new features are:

  1. You can specify the variant for a component by creating a field for it called variant or version or kicost:variant or kicost:version.
  2. Place a string in the variant field with the name of the part’s variant or a list of variants the part is a member of such as ‘V1, V2, V3’. The allowed delimiters for a variant list are comma (,), semicolon (; ), slash (/), or space ( ).
  3. Any part without a variant field (or with an empty variant field) will be included in the KiCost spreadsheet. Any part with a variant that matches the variant given with the KiCost --variant option will be included in the KiCost spreadsheet. All other parts will be excluded from the spreadsheet.
  4. You can specify a part as ‘do not populate’ by creating a field for it called dnp or nopop or kicost:dnp or kicost:nopop.
  5. A part with a dnp field containing any string or a non-zero number will be excluded from the spreadsheet. A part without a dnp field or with a dnp field containing the number 0 or 0.0 will not be excluded from the spreadsheet.
2 Likes

I tried your XML file. No problems opening the generated .xlsx file using LibreOffice Calc.

I have seen the problem you’ve reported. It seems to be something related to recalculation in the spreadsheet. I never found the root cause or a way to reliably repeat the problem. Changing the value in the Qty field typically fixes it by forcing a recalc.

1 Like

@devbisme sounds perfect! Ill give it a go monday :slight_smile:

@devbisme Hey Dave I tried the new version, I added a field called kicost:variant which has “BAT_BACKUP” inside.
regenated the XML, and ran the following “kicost -i Aeronav_R.xml --overwrite” but the component still shows up on the list.
am I doing something wrong?

Although this is an older thread it recently appeared at the top of my page due to new activity. Having finally got around to reading it I was flabbergasted by one of the posts I read. Since this is off-topic I hesitate to reply but I post this for any future readers. I also apologize for the long post.

Now this advise might not be that bad if it was in the context of audio signals but the author was also talking about BGAs so I am assuming it was intended for digital applications. No reasonably competent EE would ever give such advise but worse still is that not only did no one question this but there were additional posts agreeing with this advise.

There was not a single objection to the above advise which goes against everything ever written in any book or manufacturer’s application notes. Rather perplexing!!

A capacitor’s parasitic inductance (ESL) is primarily a function of the package geometry as well as it’s internal construction. While the ESL will vary slightly between manufacturers this variation is not that significant. The values below are obtained from measurements made by AVX.

ESL for MLCC

1206 1200pH
0805  800pH
0603  700pH

SRF for 1uF MLCC

1206  4.6MHz
0805  5.6MHz
0603  6.0MHz

ESL for LICC (Low Inductance Ceramic Capacitor also known as Reverse Geometry Capacitor)

0612 170pH
0508 130pH
0306 105pH

SRF for 1uF LICC

0612  12.2MHz
0508  14.0MHz
0306  15.5MHz

SRFs for other capacitance values

100nF 0603 MLCC =  19.0MHz
 10nF 0603 MLCC =  60.2MHz
  1nF 0603 MLCC = 190.2MHz

100nF 0306 LICC =  49.1MHz
 10nF 0306 LICC = 155.3MHz
  1nF 0306 LICC = 491.2MHz

Lower values of ESL are available with inter-digitated capacitors around 50pH in an 0508 package and LICA (Low Inductance Chip Array) capacitors getting down to 25pH.

Of course non of this matters if the PCB hasn’t been laid out to minimize inductance in places where it matters anyway.

When it comes to high speed digital designs you probably shouldn’t be using capacitance values of 100n or even 10n for decoupling anyways. The days of the “one size fits all” 100n decoupling capacitor are long gone.

2 Likes

The way KiCost variants work is that parts with no assigned variant always show up, parts assigned a variant show up if it matches the --variant option, and every part shows up if no --variant option is used.

The way to get what you want is to use something like --variant production (or any other string that doesn’t match any variant name used in your design). Then, every part not assigned to a specific variant will show up, and the parts assigned to the BAT_BACKUP variant will be screened out (because they don’t match with production).

This behavior is not obvious. This behavior may not even be correct from a UI standpoint. But it’s the way KiCost has behaved since that feature was first implemented.

2 Likes

@devbisme that sounds like the problem but it doesnt seem to behave still :confused:
tried: “kicost -i Aeronav_R.xml --overwrite --variant lala” which would still include my U22 component which has the kicost:variant field

Send me the XML file that you are using. What is the variant assigned to U22? Is U22 included or excluded from the spreadsheet generated when you used --variant lala?

Sending it over PR, Variant is BAT_BACKUP and its always included.

Try renaming the field variant. The kicost:variant field isn’t working like I expected.

1 Like

using variant instead of kicost:variant did the trick :slight_smile:
thanks for your help :slight_smile: gonna save me a lot of manual labor :slight_smile:

1 Like

That post was a mistake from posting in the middle of the night, withdrawn now. The best decoupling at UHF and above is from the smaller packages and 1nF or less, with direct device lead and plane connections