Free of charge software for EDA Electronic Design Automation

Hand tools, soldering irons, scopes, multimeters. Talk about em HERE!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
john2
 
Posts: 4
Joined: Fri May 12, 2017 12:24 pm

Free of charge software for EDA Electronic Design Automation

Post by john2 »

Any recommendation for software that can do OP Amp and passive filter circuit design, analysis and stimulation?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Free of charge software for EDA Electronic Design Automa

Post by adafruit_support_mike »

The general tool for the job is called SPICE, and was originally developed at UCal Berkeley. There are many variants of it by now. Most of the major chip makers have their own version, and it isn't really the simulation engine that's important: it's the device models.

Basic SPICE has mathematical models for all the normal components, but they're ideal models. A simulation built using a generic NPN transistor won't behave the same way as a circuit using a 2n3904 or PN2222. To make the simulation match your hardware, you need models that describe a 2n3904 or PN2222 accurately. That problem scales up as you get into devices like op amps, which contain dozens of transistors and any number of parasitic terms.

If you don't want to spend a month characterizing a certain kind of transistor (or op amp, or whatever), building models, and running sims until you're satisfied they match well enough, you have to get your models from the companies that make the devices.

There are two categories of models: decent ones that companies give away for free as a form of technical marketing, and really good ones that require payment and an NDA. The company-specific SPICE variants come bundled with a library of devices the company wants you to consider when you design circuits, and there tend to be update packs with promo models for new products.

SPICE models should transfer fairly well from one company-specific program to another, but there are no guarantees. Each company has the freedom to tweak the math engine to use their own parameters.

In general, SPICE simulation is a good way to get a feel for how circuits behave in general, and how sensitive a circuit is to various component values. There was a trend in the 1990s to 2000s to say that that all design could be done digitally, but the people who actually tried it proved otherwise. It's normal for designs that work perfectly in simulation to fail when you actually build it. The problem is that real circuits have parasitic terms like trace resistance and capacitive coupling that you can't build into a simulation until you know the exact layout of the board.

User avatar
john2
 
Posts: 4
Joined: Fri May 12, 2017 12:24 pm

Re: Free of charge software for EDA Electronic Design Automa

Post by john2 »

Many thanks for the reply. I have specific questions as:

Question 1
The Max4477 Op Amp factory support page has TWO spice models.
Which one should I use? What are the difference?
They call it
a) PSpice_Marcro_Model and
b) Macro_Model
Attached file is merged of these TWO files.
https://www.maximintegrated.com/en/prod ... ml/tb_tab2

Question 2
I have installed Tina TI V9, free of charge from TI and packaged with TI chip models
How can I import the Max4477 so that the TINA TI software can work with the Maxium chip?



Code: Select all


========= 
this is merged of Two .FAM files. Maxim refers to
a) pspice_marco_model   6/2008
b) macro_model   5/2004

===================== PSpice_Macro_Model=======================

* MAX4477 MACROMODEL
* ------------------------------
* Revision 1, 6/2008
* ------------------------------
* The MAX4477 Wide-band, low-noise, low-distortion operatinal amplifiers offer rail-rail outputs and single supply operation down to 2.7V. These devices are ideal for the applications that require low distrotion and low noise.
* ------------------------------
* Connections
*      1  = OUTA
*      2  = INA-
*      3  = INA+
*      4  = VSS
*      5  = INB+
*      6  = INB-
*      7  = OUTB
*      8  = VDD
****************
.subckt MAX4477 1 2 3 4 5 6 7 8
Xamp1 8 4 3 2 1 MAX4477_AMP
Xamp2 8 4 5 6 7 MAX4477_AMP
.ends MAX4477	
****************

****************
.subckt MAX4477_AMP VDD VSS IN+ IN- OUT

E_MAX4477_EH         MAX4477_N10145575 VSS VINT MAX4477_N101463451 1E5
D_MAX4477_D3         MAX4477_VGBW MAX4477_N10146247 diodemacro_ideal 
R_MAX4477_Rcm         VSS MAX4477_N10146805  1Meg  
D_MAX4477_Ds1         MAX4477_VO MAX4477_N10149003 diodemacro_ideal 
R_MAX4477_Rc2         MAX4477_N10146533 VINT  1k  
V_MAX4477_Voff         MAX4477_N10146273 IN- -0.067mVdc
I_MAX4477_Ib-         IN- VSS DC 0.5pA  
D_MAX4477_D4         MAX4477_N10146141 MAX4477_VGBW diodemacro_ideal 
L_MAX4477_Lcm         MAX4477_N10147525 VSS  0.0143239pH  
R_MAX4477_Ri+         MAX4477_VCM IN+  500G  
X_MAX4477_Hs2    MAX4477_N101458490 MAX4477_VO MAX4477_N10148957
+  MAX4477_N10145951 MAX4477_MAX4477_Hs2 
V_MAX4477_VH         MAX4477_N101463451 VSS 5.5Vdc
D_MAX4477_Dst         MAX4477_N10146489 MAX4477_N10147475 diodemacro_ideal 
C_MAX4477_Cst         VSS MAX4477_N10146489  1n  
D_MAX4477_Ds2         MAX4477_N10148957 MAX4477_VO diodemacro_ideal 
G_MAX4477_Gcm1         MAX4477_N10145769 VSS MAX4477_N10146805 VSS -1.778279E-6
R_MAX4477_Rps2         VSS MAX4477_N10145721  1  
I_MAX4477_Ib+         IN+ VSS DC 1.5pA  
X_MAX4477_M1         MAX4477_VO MAX4477_N10146847 VSS VSS nmosmacro_str
G_MAX4477_Gcm2         MAX4477_VM VSS MAX4477_N10145769 VSS -1
I_MAX4477_Iq         VDD VSS DC 1.75mA  
C_MAX4477_Cpm         VSS MAX4477_N10147435  5.792766n  
D_MAX4477_D5         MAX4477_VSH MAX4477_N10146953 diodemacro_ideal 
L_MAX4477_Lps         MAX4477_N10145721 VSS  0.4mH  
E_MAX4477_EicH         MAX4477_N10146847 VSS MAX4477_VCM MAX4477_N101469231 1E8
E_MAX4477_Est1         MAX4477_N10147475 VSS VDD VSS 1
G_MAX4477_Gps1         MAX4477_N10146521 VSS VINT VSS -25E-3
D_MAX4477_D6         MAX4477_N10146887 MAX4477_VSH diodemacro_ideal 
X_MAX4477_M4         MAX4477_VO MAX4477_N10145575 VSS VSS nmosmacro_str
G_MAX4477_GQ         VDD VSS VINT VSS 1.5E-4
V_MAX4477_VicH         MAX4477_N101469231 VINT -1.6V
V_MAX4477_VL         MAX4477_N101462991 VSS 2.7Vdc
V_MAX4477_Vs2         MAX4477_N10145951 VSS 6.203442mV
R_MAX4477_Ro         VSS MAX4477_VO  1.284187k  
R_MAX4477_Rpm         VSS MAX4477_N10147435  1  
E_MAX4477_Est2         VINT VSS MAX4477_N10146489 VSS 1
I_MAX4477_Isr         MAX4477_N10146247 MAX4477_N10146141 DC 47.74648mA  
X_MAX4477_M2         MAX4477_VO MAX4477_N10146801 VSS VSS nmosmacro_str
G_MAX4477_Gst         MAX4477_N10146489 VSS VDD VSS -7.692308E-5
D_MAX4477_D7         MAX4477_N10147989 MAX4477_N10146953 diodemacro_ideal 
X_MAX4477_M5         MAX4477_N10146767 MAX4477_N10146273 MAX4477_N10147673
+  MAX4477_N10147673 nmosmacro_th
G_MAX4477_Gg         MAX4477_VM VSS MAX4477_N10146767 MAX4477_N10146533 -0.5
R_MAX4477_Rcm1         MAX4477_N10147525 MAX4477_N10145769  1  
D_MAX4477_D8         MAX4477_N10146887 MAX4477_N10147989 diodemacro_ideal 
G_MAX4477_Go         MAX4477_VO VSS MAX4477_N10147435 VSS -7.787031E-4
R_MAX4477_Rg         VSS MAX4477_VM  1.128419Meg  
G_MAX4477_Gps2         MAX4477_VM VSS MAX4477_N10146521 VSS -1
E_MAX4477_EicL         MAX4477_N10146801 VSS MAX4477_VCM MAX4477_N101467551
+  -5E6
X_MAX4477_M6         MAX4477_N10146533 IN+ MAX4477_N10147673 MAX4477_N10147673
+  nmosmacro_th
R_MAX4477_Rps1         MAX4477_N10145721 MAX4477_N10146521  40u  
G_MAX4477_Gpm         MAX4477_N10147435 VSS MAX4477_VGBW VSS -1
V_MAX4477_VicL         MAX4477_N101467551 VSS -0.2Vdc
C_MAX4477_Cgbw         VSS MAX4477_VGBW  15.91549n  
E_MAX4477_EL         MAX4477_N10145559 VSS VINT MAX4477_N101462991 -1E5
I_MAX4477_I1         MAX4477_N10147673 VSS DC 200uA  
V_MAX4477_Vs1         MAX4477_N101458230 MAX4477_N10149003 5.075808mV
D_MAX4477_D1         MAX4477_VM MAX4477_N10146247 diodemacro_ideal 
R_MAX4477_Ri-         IN- MAX4477_VCM  500G  
R_MAX4477_Rcm2         VSS MAX4477_N10147525  9  
X_MAX4477_M3         MAX4477_VO MAX4477_N10145559 VSS VSS nmosmacro_str
E_MAX4477_Ecm         MAX4477_N101456130 VSS MAX4477_VCM VSS 1
D_MAX4477_D2         MAX4477_N10146141 MAX4477_VM diodemacro_ideal 
X_MAX4477_Hs1    MAX4477_N101458490 MAX4477_VSH VINT MAX4477_N101458230
+  MAX4477_MAX4477_Hs1 
R_MAX4477_Rc1         MAX4477_N10146767 VINT  1k  
X_MAX4477_FLq    MAX4477_N10147989 OUT VSS VDD MAX4477_MAX4477_FLq 
C_MAX4477_Ccm         MAX4477_N101456130 MAX4477_N10146805  16m  
I_MAX4477_I2         MAX4477_N10146953 MAX4477_N10146887 DC 48mA  
******************
.model diodemacro_ideal d(n=0.001)
.ends MAX4477_AMP
******************
.subckt MAX4477_MAX4477_Hs2 1 2 3 4  
H_MAX4477_Hs2         3 4 VH_MAX4477_Hs2 15.24722
VH_MAX4477_Hs2         1 2 0V
.ends MAX4477_MAX4477_Hs2

.subckt MAX4477_MAX4477_Hs1 1 2 3 4  
H_MAX4477_Hs1         3 4 VH_MAX4477_Hs1 19.77587
VH_MAX4477_Hs1         1 2 0V
.ends MAX4477_MAX4477_Hs1

.subckt MAX4477_MAX4477_FLq 1 2 3 4  
F_MAX4477_FLq         3 4 VF_MAX4477_FLq -1
VF_MAX4477_FLq         1 2 0V
.ends MAX4477_MAX4477_FLq
******************
.subckt nmosmacro_th d g s b
m1 d g s b nmos
.model nmos nmos(VTO=0.5 KP=100E-6 w=200u l=1u KF=0.15E-27 AF=1) 
.ends
***********
.subckt nmosmacro_str d g s b
m1 d g s b nmos
.model nmos nmos(VTO=0.5 KP=100E-6 w=20u l=1u) 
.ends
******************
*Note:
**       Macro model is developed using the typical device parameters given in the data sheet with 5 volts power supply.  Model does not take care of the device non-linearity with temperature variations.  Model characteristics may not match actual device behavior at abnormal operating conditions.

**Parameters which are not modeled:
*1. Gain Margin
*2. Total Harmonic Distortion
*3. Input capacitance

* Copyright (c) 2003-2012 Maxim Integrated Products.  All Rights Reserved.

=======================================================================
==========================
==========================
=======================================================================
==========================
==========================
=======================================================================
==========================
==========================


* MAX4477 MACROMODEL
* ----------------------------
* Revision 0. 5/2004
* ----------------------------
* The MAX4477 wideband, low noise, low distortion opamps operates from single 
* +2.7V to 5.5V Supply, feature ground sensing inputs and rail to rail outputs
* and are unity gain stable
* ----------------------------
* Connections
*      1  = OUT1
*      2  = IN1-
*      3  = IN1+
*      4  = VSS 
*      5  = IN2+
*      6  = IN2-
*      7  = OUT2
*      8  = VDD
*-----------------------------

**************************************************
.SUBCKT MAX4477 1 2 3 4 5 6 7 8
 XOPAMP1 1 2 3 8 4 MAX4477_S
 XOPAMP2 7 6 5 8 4 MAX4477_S
.ENDS
**************************************************
.SUBCKT MAX4477_S 31 15 17 10 18
**************************************************
*    17 = IN+
*    18 = V-
*    15 = IN-
*    31 = OUT
*    10 = V+
***************
*INPUT STAGE
VS1 10 11 0V
IBIAS 11 12 45.25U 
M1 13 16 12 11 MOSFET
M2 14 15 12 11 MOSFET
VOS 17 16 70U
RD1 13 18 1K    
RD2 14 18 1K
C1 13 14 2.0P
CIN1 16 100 10P
CIN2 15 100 10P     
DIN1 16 11 DA
DIN2 18 16 DA
DIN3 15 11 DA
DIN4 18 15 DA
FSUP 18 10 VS1 1 
**************
*INPUT BIAS CURRENT 
IBIAS1 12 16 0.1P
IBIAS2 12 15 0.1P
RID 15 16 1000G 
**************
**************************************************
*GAIN STAGE 
GA 25 100 14 13 5.105M  
RO1 25 100 2.541K
GB 26 100 25 100 710M
RO2 26 100 1K
EF 27 100 26 100 1
CC 25 27 70P
EF2 29 100 28 100 1   
GC 100 28 26 100 52.16M
RO3 28 100 2.7K
CC2 25 29 77.3P
RO4 28 30 20
GCMPS 100 25 40 100 393.5U 
**************
*CURRENT LIMIT
DP3 26 38 DY
EP3 38 100 10 18 185M
DP4 39 26 DY
EP4 100 39 10 18 185M
**************
*INTERNAL GND
EG1 100 18 10 18 0.5
**************
*VOLTAGE LIMITING
VS2 30 31 0V
*****
DP1 30 32 DY 
HP1 34 32 VS2 17.72
EP1 34 36 10 18 0.5
VOFF1 100 36 12M
*****
DP2 33 30 DY
HP2 35 33 VS2 14.43
EP2 37 35 10 18 0.5
VOFF2 37 100 12.8M
***************
*CMRR
RRR 40 100 1
GCMR 40 100 12 18 23.07U
*PSRR
GPSR 100 40 10 18 24.5U
***************
*SUPPLY CURRENT
ISUP 10 18 2.5M
**************************************************
.MODEL DA D(IS=100E-14 RS=0.5k)
.MODEL MOSFET PMOS(VTO=-0.2 KP=22.1E-3 KF=4.0E-27 AF=0.8)
.MODEL DX D(IS=100E-14)
.MODEL DY D(IS=100E-14 N=10M)
**************************************************
.ENDS


* Copyright (c) 2003-2012 Maxim Integrated Products.  All Rights Reserved.
Last edited by adafruit_support_mike on Thu May 18, 2017 2:01 am, edited 1 time in total.
Reason: added CODE tags

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Free of charge software for EDA Electronic Design Automa

Post by adafruit_support_mike »

There are two ways to build device models in SPICE: subcircuit models and macro models.

A subcircuit model is pretty much what the name implies: the model contains descriptions for a circuit and components that match what's inside the device. For an op amp model, you'd have transistors for the input stage, gain stage, and output stage, plus all the current sources and resistors that make the op amp work, connected in ways comparable to what's inside an actual IC.

A macro model simply defines mathematical rules for the relationships between all the inputs and all the outputs. Those rules can be tweaked to make the simulation's behavior match the way a real circuit behaves under a given range of operating conditions. Macro models reduce the load on the math engine because they sidestep having to simulate a device component-by-component, but usually can't show how a device will behave outside the specified operating conditions.

As a rule of thumb, you use the macro model when you just want to get a general idea of how a circuit will behave, and then use the subcircuit model to see how a device will behave under specific conditions.

SPICE was originally written to work like a compiler, so the files containing device models would live in the same directory as the description of the circuit you wanted to simulate, or in a directory the math engine knows about. The details of importing models into different GUI-based applications will depend on the application, and you'll need to read through the documentation for the one you're using to see how it's done.

Locked
Please be positive and constructive with your questions and comments.

Return to “Tools Tools Tools”