Switch symbol kivar plugin

I’ve implemented variants in one project using kivar plugin. I think it is very useful and does not cost much to understand how it works.

For the moment, the only doubt I have is how to switch a symbol and I haven’t been able to find an example with this feature.

In my case I would like to switch D17. For the variant A it would be a unidirectional TVS and for the variant B a bidirectional one as shown.

Does anyone know if this is possible?

I’m working on a project currently that has 5 variants so this subject is important for me at the moment . . . I’ve not looked at KiVar before today . . .

Couldn’t you simply use the command line interface option to set one device to DNP, etc and the other to be populated ?

OK, so you don’t need to used the Command line tool . . .

You can simply add a “Var” field to each of those components then in that field add TVS-Type Bidirectional(+!) for D17 and TVS-Type Unidirectional(+!) for D16

Update the PCB (F8) then run the KiVar tool . . .

image

and you should have a drop down with two options, Bidirectional and Unidirectional.

Well, actually I need to switch the symbol only for D17. That is to say:

Variant A: D17 (show a Unidirectional TVS)
Variant B: D17 (show a Bidirectional TVS)

1 Like

Ah, I thought you were trying to switch between the Uni and Bidirectional TVS devices shown, D16 and D17.

Why not just simply have D17 and a new D18 (Unidirectional) with their footprints overlapping, then enable one or the other ?

Good idea but this will surely lead to a confusion for the EMS company. They won’t understand two overlapped footprint with the same P&P coordinates. Their heads will literally explode :exploding_head:

I would suggest the same method as @RaptorUK suggested.
In fact, this is very similar to what I recommended in the real-world examples section for the older KiVar release 0.1.2 (when switching between instances of components was the only way of switching full sets of custom field data … a restriction that does not apply anymore): older example incl. custom DRC rule.

You could try using the same refdes for both instances, if you like (I’m not sure if this is better or worse style, tbh, and I cannot test whether ERC/DRC will complain, because I don’t have KiCad around atm, due to vacation).

Your assembly house should not care, because the ! property will also remove the component from the PnP list and from the BoM for the DNP cases.
They may still see overlapping copper pads and component info in the Gerbers (cannot test this right now), but this doesn’t have to be a problem.

If I understand your initial intention correctly, you wanted to switch the symbol library reference to either a uni- or bidirectional symbol. This is not possible with KiVar, and not what KiVar is intended for.

Okay thank you both of you RaptorUK and markh-de for the suggestion. It seems to be the best way to do it.

The feature I was looking for is the Alternate Part variation implemented in Altium

but I understand that kivar can’t solve it. Maybe by implementing Variants in a next KiCad release? I don’t know if it planned in the roadmap.

1 Like

Variants have been on the roadmap for a very, very long time, please upvote this GitLab “issue”

Well, having a single base design (schematic, if that’s what the Altium text is referring to) with different PCB assembly variants (BoM , PnP) is exactly what KiVar is about.

However, what you are trying to do, specifically, is exchanging the schematic symbol depending on the assembly variants. This is indeed beyond KiVar’s scope, but can be worked around with the method suggested above. And I think there is even an advantage in having both symbols in parallel (mutually fitted, that is), because it visualizes the alternate part directly in the schematic, instead of (“magically”) replacing it with a different symbol.

Just out of curiosity: Have you tried using the same refdes for both diodes? Do ERC/DRC accept that? If DRC does not, could a custom DRC rule help?

Edit: Sorry for the gibberish in the first version of this post. I seem to have accidentally sent it from my phone during editing.

Well, if it solves the variants management, that’s fine with me. I’m not able to go much further…

Personally, I like the Altium Alternate Part feature. The symbol can be present, not present (DNP) or even different. It doesn’t seem to me something ‘magical’. But I insist, the Kivar plugin works for me and I am very happy with it.

I’ve set two different refdes. One for each kind of TVS and I’ve not had any error.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.