Electronics > Projects, Designs, and Technical Stuff
Need help: INA193 in ngspice-30
(1/3) > >>
thinkfat:
Hi,

I'm trying to simulate an INA193 in ngspice-30. I got the pspice model from the TI website and tried to convert it to ngspice.

ngspice doesn't have TEMP so I added a .PARAM TEMP=27 at places where it was needed.
I also replaced VSWITCH with ASWITCH according to the ngspice user manual.

ngspice then complained about this construct:

VCCVS4_in   42 2

I found some posting on the TI E2E forum suggesting to add a '0' as the third parameter, which I did.

Lastly, the resistor model in ngspice is called "R" not "RES", I changed that, too.

Unfortunately, still no luck. The output is always 0V.

I've attached the modified INA193.LIB and a simple test netlist for ngspice.

Maybe someone more experienced can help me out?

SiliconWizard:
I took a look. First, your test circuit doesn't look right. Apparently you're loading the output of the INA193 with a 1 ohm resistor? It's not going to like that much. ;D
Then, the load supply (couldn't see it?) and load current source (seems weirdly connected), that doesn't look right. I see it's generated from KiCad, dunno if it's a problem with KiCad or with your schematic. You could maybe post a picture of it.

That said, I fixed the test circuit, and still get 0V exactly at the output. Can't figure out what's wrong with the model, but it clearly is borked. It's not 100% Spice compatible. We can see it's been designed for Tina, and frankly I have already run into TI models (especially the more recent ones) that I couldn't figure out how to use in ngspice or LTSpice... I did the same as you tried to fix them, and had no luck.

thinkfat:
Thanks for having a look. Yes, I noticed that the current source is upside down and also about the 1 ohm resistor, corrected netlist is attached. I also attached a screenshot of the circuit. It's really the most basic thing I could come up with.
thinkfat:
Small progress: I found out that ngspice has a "limit" function that is incompatible with pspice' "LIMIT"  >:(

replacing that with a compatible "ps_limit" gives me a constant 4mV out  :-DD
T3sl4co1l:
On a broader note; what are you trying to learn from the model?  Are you simulating the behavior of a larger circuit and only need this for its normal functionality (a high-CMRR amp of nominal gain and bandwidth)?  Or are you testing the part itself, for function under somewhat unusual conditions and would like to evaluate the model under these conditions?

Tim
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod