Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Altium: multi Part component with spice simulation and shared Pins for each symbol

Status
Not open for further replies.

cupiii

Newbie level 4
Joined
Feb 5, 2019
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
71
Hi!

I'm trying to create a component for a personal library in Altium. The component is a simple OpAmp like a TL072 - Two In+, Two IN-, Two Out, V+ and V-. I have added the Footprints for SMT and THT without any problems, but the library should also contain simulation models for each component. Now i'm facing a problem, which I could not solve for some days now:

I have designed 3 Symbols for the TL072:
* OpAmp 1 (with Pins In1+, In1- and Out1)
* OpAmp 2 (with Pins In2+, In2- and Out2)
* Power Symbol (with Pins V+ and V-)

When i try to assign a spice File to the Symbols, i get a pin count error - Of Course: The Spice Model has 5 Inputs for each OpAmp: In+, In-, Out, V+ and V-.

If i add the two power pins to the first two Symbols and make them invisible, the Spice Sim Model can be assigned, but i get a "visibility mismatch error" when saving the library since the visibility for the power pins is different for Symbols 1 and 2 compared to symbol 3.

I also tried to assign the Power Pins to Symbol 0 (like stated in the manual), but that did not solve it, but makes it worse: When i hide a pin, I also hide it in Symbol 3.

So i could just add visible Pins to OpAmp 1 and 2, bit i think that i would get an error, possibly connecting two different nets to the same pin.


I have searched the Internet for the problem and could not find a solution for it. I think I have read all manuals and tutorials from altium, and i have seen every Video about multi parts and spice on YT. I just dont know how i can accomplish to have:
One Component with:
* 3 Symbols (2xOpAmp (without power connectors), 1 Power Con)
* proper footprint
* proper spice models
* without errors. :)

I know tutorials which teach how to draw a component like the OpAmp - they teach: draw 3 Symbols, like I do.
I also know tutorials which assign spice sims to muilti-part components, but these tutorials are all multiple diodes or resistors without any shared pins. Everybody seems to avoid the problems that i have.
I know that there are other Programs that may be more useful to simulate a circuit, but I would just love to do this right in Altium.


I hope that anybody tried it - and was successful - but even if not - let me know, please!
 

Perhaps not the best approach, and I'm not sure whether you would have issues on doing this way or not, but you could consider extending the pinout in the spice model, which means that instead of having there just one OpAmp model, you would have 2 identical models, but now each one reflecting the pinning of the component.
 

The Problem is not that i have too many pins, for the model, but too less.

If I understand you correctly, you suggest writing a wrapper Spice model which calls two single models. If not, i dont understand what you want to suggest.

If I make one Symbol with two op amps and the power pins and cvonnect the two spice models via the said "wrapper subchkt", the model just works fine, but my schematics look ugly because the two OpAmps and the power Pins were glued together
 

If I make one Symbol with two op amps and the power pins and cvonnect the two spice models via the said "wrapper subchkt", the model just works fine, but my schematics look ugly because the two OpAmps and the power Pins were glued together

What I meant was to edit the Spice library, making the numbering of the pins of the simulation model correspond to the pins of the electric drawing. Altium Designer allows each part of your IC (1 of 2 and 2 of 2) to be drawn with a different symbol, but all of them may perfectly belong to the same spice model. In this case, its schematic component would have in the case of TL072 pins 1,2,3 and 7,6,5 represented by the same model in spice, although in only one of these you would insert Vcc and GND (which could even be drawn in a separate symbol) and it would be necessary to have just one node in the spice model for Vcc and Gnd shared among both subcircuits.

Anyway, as a good practice, it is advisable to insert the unused parts of the component into the electric drawing by assigning (in the case of Altium Designer) the primitive NoERC, and at the end, your electric drawing would match the pinout of the simulation model.
 

Maybe i dont understand you correctly.

I make a multipart component with 3 symbols:
multipart.PNG

You can see, i have made part a with 3 pins (1, 2, 3), part 2 with 3 pins (5, 6, 7) and part 3 with 2 pins (8 and 4).

From there i try to add a simulation model to the library:
addmodel.PNG

In the following dialog i try to add my ckt file:
spice.PNG

and i get the following error.
error.PNG


This is my ckt-file:

Code:
.SUBCKT TL072ALL  1 2 3 4 5 6 7 8
X1 3 2 8 4 1 TL072SINGLE
X2 5 6 8 4 7 TL072SINGLE
.ENDS

* TL072 OPERATIONAL AMPLIFIER "MACROMODEL" SUBCIRCUIT
* CONNECTIONS:       NON-INVERTING INPUT
*                    | INVERTING INPUT
*                    | | POSITIVE POWER SUPPLY
*                    | | | NEGATIVE POWER SUPPLY
*                    | | | | OUTPUT
*                    | | | | |
.SUBCKT TL072SINGLE  1 2 3 4 5
*
....

I just cant add the simulation model to the component, because altium does not let me. I also cannot reduce the simulation to three pins, since v+ and v- are part of the simulation and do reflect the maximum output (+-0.7V).


I really hope, i just dont understand you and you have a clue for me.
 

I understood the problem, and you did exactly what was suggested, and actually followed the sequence that was supposed to work; there is no apparent impediment. Maybe it's an issue related to the syntax of the model. It is worth testing this model in some other simulation tool (e.g LTSpice) just to validate it and make sure that the problem is not on the Altium Designer side.
 
  • Like
Reactions: cupiii

    cupiii

    Points: 2
    Helpful Answer Positive Rating
OK, thanks for claryfiing.

Yeah, i did test the circuit in KiCad - And it works. It seems to me, that if i could include the spice file with 8 pins, i could circumvent the problem. So maybe i add the Spice file and delete the pins after that. Realy strange...

Thanks for helping, Andre!

- - - Updated - - -

The trick really seems to work. I will test this again tomorrow.
So you
1. add a part with all 8 pins and
2. add the Spice File, then
3. you delete the part again
and the rest of the parts still have the spice file attached.

I guess you should assign the pins between step 2 and 3, because you are not allowed to open the spice window again, since it wont let you say OK. :) - Thats what i forgot, so i could not test it yet.
 
Actually, I tested the trick, and it really worked (in Altium Designer 17).

So here is how:
1. Add all the parts, you want to have in your component.
2. Add another part (now called helper part) with exactly the same amount of Pins as the real chip
3. add the spice model which has exactly the same amount of pins as the helper part and the real chip
4. Assign the pins of all parts to the spice model (that means: assign each pin twice, once in your parts, once in the helper part)
5. save (saving is allowed, since pin numer matches the last part)
6. delete the last part

success. No error Messages, no double or unconnected pins in the schematic. Simulation of schematic symbols works out of the box without additional configuration.

If anybody has an even better solution for it, please let me know.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top