Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

how to import INA126 spice model into multisim

Hi Felipe,

 

If the gain is dependent on the gain pins (RG1/RG2) then you won't see the correct results for the gain. These pins are not modeled in the macromodel (you can see this in the model data by looking at the comments - the lines denoted with '*'). You would need to find a macromodel with these pins modeled unfortunately if you want accurate results while using those pins.

 

There's an INA126 model in the database that you may want to try that has these pins modeled, however, it's not supplied by TI directly, so you'll have to take the results with a grain of salt. They're in the Analog > Special Function family.

 

I would perhaps use both in conjunction with one another.

 

Natasha


Natasha Baker
R&D Engineer
National Instruments

Join the NI Circuit Design Community
Follow Multisim on Twitter!
0 Kudos
Message 11 of 20
(3,647 Views)

Hi Felipe,

 

There might be a way to get this model to behave as you want it to, actually. The text file as provided isn't really in the format that Multisim can work with it properly. Multisim components require a single ".model" or ".subckt". This file has three. It looks like the 3rd .subckt is a combination of the first two, and models all 8 pins.

 

So, here's the trick in this case: You need to either adjust the three subcircuits so that the correct one comes first (and preferably nest the other two inside it - that will be important if you want to use more than one of the component in a circuit), or just wrap all three .subckt statements in a larger statement. The extra .ENDS in the original file almost suggests that it could have been wrapped already, and that a .subckt is missing.

 

Easiest thing to do in this case will be to take the original file, and add

 

.SUBCKT INA126P 1 2 3 4 5 6 7 8 

x1 1 2 3 4 5 6 7 8 INA126P

 

at the top of it. This will make the first subcircuit in the text a subcircuit named INA126P, ending with the "extra" .ENDS. Since it will be the first thing in the listing, Multisim will see an 8 pin subcircuit, which just uses the 8-pin INA126P defined below (which in turn uses the other two op-amp subcircuits). With the pins defined like that you can just use the comment at the bottom of the file (just above the nested INA126P subcircuit to figure out which pin maps to which model node (since the wrapper defined the pins exactly the same).

 

 

The main point is to have the subcircuit that you want the component to use directly as the top .subckt in the component, and any subcircuits used by it nested inside.

 

If you have any questions, let us know!

Christopher Lansing
Software Developer
National Instruments
0 Kudos
Message 12 of 20
(3,634 Views)

Hi Christopher,

 

Thanks for your reply.

I tried your suggestion but I'm still getting the same problem: no model behaviour.

I'm attaching the model file I've used with the suggested changes.

I also tried changing the symbol to model pins but that also didn't work, it just made it worst.

Any other suggestions?

 

Best Regards,

 

Felipe

0 Kudos
Message 13 of 20
(3,627 Views)

Hey Felipe,

 

It looks like the model is actually okay now. The issue is actually with the differences between the symbol that you used as the template for the INA126 and the expected symbol.

 

If you show the pin names on the schematic (in the Display tab of the component properties) you'll be able to see the differences. The REF pin on your symbol is actually pin 1, but the INA126 has REF on pin 5, and you (naturally) wired pin 5 to ground (as expected). But pin 5 on your symbol is actually RG1 (where the INA126 has RG1 on pin 1). So effectively, one of the RG pins is always grounded when you're simulating, and the REF is attached to your RG resistor.

 

If you swap the wires on pins 1 and 5, you'll probably get the simulation results you expect, but then of course the wiring is wrong. I would suggest that the easiest way to get the pin setup as expected is to create the component using the INA126 in the master database as the starting symbol since it has the pin names and numbers matching the INA126 data sheet, just with a different model. (just curious - which component did you start from before?). Basically do the same thing you did when creating the component the first time, but just with a different starting symbol, and of course using the fixed up model that you have.

 

Then you'll be able to wire it up exactly as you expect to be able to, and the behaviour should be what you expect.

 

Hope that helps,

Christopher Lansing
Software Developer
National Instruments
0 Kudos
Message 14 of 20
(3,614 Views)

Hi Christopher,

 

I tried your suggestions and it didn't work. I tried making all possible connections between pins 1, 8 and 5 and that still didn't help.

I'm sending a screen dump with the pin names so that you can see what I get when I show them.

It might be a little difficult to see them but you should be able to see them.

I'm also sending my file so you can also have a look.

I created the INA126 from the master database using the INA326 which was the one with the right number of pins. In my master database I don't have the INA126 it goes from INA105 and then jumps to INA133.

I think I'm going to ask the IT support here at my university to reinstall the software.

Just out of curiosity, have you been able to simulate(AC analysis) the INA126 in your PC? did you get a gain variation  when changing the gain resistance?

I really appreciate all your help and patience with me. I'm starting to think that there's an instalation problem with my software and maybe that's what's causing the problem now.

So tomorrow I'll get it reinstalled and try your suggestions again and I'll get back to you.

 

Best Regards,

 

Felipe

Download All
0 Kudos
Message 15 of 20
(3,606 Views)

Hey Felipe,

 

Sorry about that. I must have accidentally modified the symbol without noticing when I was picking it apart to find the problem.

 

Using the file that you just attached, the wiring looks okay, the pins all look correct. If I change R35, I do see a little bit of a change, but not a lot. I get a more obvious change if I increase the VS+ and VS-. Once those are around the +/- 15-20V range, I start seeing some pretty significant differences with changes to R35 (using at least values of 80000, 5333, 842, 80 and ohms (to try to match the G values in the datasheet examples).

 

I'm afraid I don't know enough about the component in question to say whether or not there should be much difference at lower voltages, such as the 2V VS+ in your circuit, so I can't say if it's accurate, but at very least R35 is having an effect on the gain now.

 

Do you see anything if you zoom right in to the graph, or if you use larger VS+/- values?

 

By the way, if it helps at all, I'm comparing by doing a parameter sweep over the resistor value (using the values mentioned above). The parameter sweep is performing AC analysis from 100Hz to 1MHz to get all the different resistor values on a single output/frequency graph (I'm not sure off hand which approach you've been using to compare).

Christopher Lansing
Software Developer
National Instruments
0 Kudos
Message 16 of 20
(3,602 Views)

Hey Felipe,

 

Just checked one more thing that I forgot to test - even at low voltages it seem to work okay, as long as I supply the same magnitude VS+/-. That looks like the only problem with the last circuit you posted. VS- is grounded - try setting it to -2V to match the +2 on the other rail.

Christopher Lansing
Software Developer
National Instruments
0 Kudos
Message 17 of 20
(3,595 Views)

Hey Christopher,

 

Thank you so much for all your help.

I guess that because I wanted to isolate the problem I designed the most simple circuit as possible and forgot to pay attention to a few details like having the reference pin connected to a midway voltage between the power rails.

Now everything is working well and I can carry on with my simulations.

Once again thank you.

 

Best Regards,

 

Felipe

0 Kudos
Message 18 of 20
(3,573 Views)

Hello all Mulstim users. I'm tryng to use this component as you created, but is not simulating, the gain is not changing. I using INA without no resistor of Gain, that gives me the minimum gain of 5 as datasheet of INA says.

 

I have also created another component, but not wroking also.

 

I want to Power INA126 +15, -15V. Could you give me some help tryng to Make this model work ?

 

The gain that i Should have with no resistor applyng 2V at the imput terminal should be 10V and so on, Gain 5, if I apply 1V, should be 5 and so on...

 

Regards and thanks in adavnce.

 

 

Download All
0 Kudos
Message 19 of 20
(2,680 Views)

Respected sir,

               

               we would like to get the spice model for the INA333  instrumental amplifier. please attach the file details as early as possible.

 

Thanks & Regards,

sandeep

 

 

0 Kudos
Message 20 of 20
(2,505 Views)