Ron Fredericks writes: Today is Robert Norton Noyce’s birthday (born 12/12/1927) – co-inventor of the integrated circuit (IC). So I thought I would take a few minutes and document my work modeling the CD4066 quad bilateral switch with the LTspice simulator.
In this post I describe how flexible LTspice can be as a general SPICE circuit simulator, and how accurate its behavior can be in comparing LTspice test results with the physical IC’s datasheet. In this example I use the CD4066B as the IC to model. I test the model using its characteristic “on” resistance curves under various voltage and current operating conditions. I conclude by using a standard CD4066 datasheet to verify the accuracy of the model.
Meanwhile this is the last IC I need to simulate the analog section of the digital volume control circuit using LTspice I mentioned in two of my previous blog entries:
- Digital volume control’s heart beat: Simulating the 555 IC with LTspice and
- Digital volume control’s logic: Introducing 74HC193 Simulation to LTspice.
Define one of four bilateral switches on CD4066 for LTspice
To get the CD4066 IC into my circuit simulation, I first created a symbol for one of the four bilateral switches in this package, and defined a SPICE subcircuit definition for the switch using existing SPICE CD4007 gate models as the starting point.
Symbol for one of four bilateral switches on the CD4066 IC
LTspice Subcircuit Definition for CD4066
Note the LTspice implementation of the SPICE language is highlighted (below) using my own GeSHi language highlighter library with key sections of the language (.model and .subcircuit) hyper-linked into SPICE language definitions that I have created on the contributor pages of this website. SPICE is a difficult language to highlight using GeSHi because many of the SPICE language constructs are so short that they overlap with longer language constructs. I plan to add more language definitions in the future as my circuit models need them, and I continue to find unique look-up algorithms to match GeSHi language highlighter categories.
-
-
* CD4066 Analog Switch
-
* SYM=CD4066
-
* Transistor models are from LTspice group member kcin_melnick
-
* See message number 16897, http://tech.groups.yahoo.com/group/LTspice/
-
* Analog Switch Control In Out Vdd Vss
-
.SUBCKT CD4066 2 11 4 10 7
-
X1 2 6 10 7 INVERT
-
X2 6 1 10 7 INVERT
-
M1 14 6 7 7 CD4007N
-
M7 11 6 14 10 CD4007P
-
M3 11 1 14 14 CD4007N
-
M4 11 1 4 14 CD4007N
-
M8 11 6 4 10 CD4007P
-
.SUBCKT INVERT 1 2 3 4
-
* Inverter In Out Vcc Vss
-
M1 2 1 3 3 CD4007P
-
M2 2 1 4 4 CD4007N
-
.ENDS
-
.MODEL CD4007N NMOS (
-
+ LEVEL=1 VTO=1.44 KP=320u L=10u W=30u GAMMA=0 PHI=.6 LAMBDA=10m
-
+ RD=23.2 RS=90.1 IS=16.64p CBD=2.0p CBS=2.0p CGSO=0.1p CGDO=0.1p
-
+ PB=.8 TOX=1200n)
-
-
.MODEL CD4007P PMOS (
-
+ LEVEL=1 VTO=-1.2 KP=110u L=10U W=60U GAMMA=0 PHI=.6 LAMBDA=40m
-
+ RD=21.2 RS=62.2 IS=16.64P CBD=4.0P CBS=4.0P CGSO=0.2P CGDO=0.2P
-
+ PB=.8 TOX=1200N)
-
.ENDS
Testing the CD4066 Circuit in LTspice
Finally, I dragged the symbol with subcircuit models into my LTspice program and ran a series of tests to demonstrate the “on” resistance characteristics associated with the switch at various voltage and current values. Note the multicolored graph showing the resistance curves at various VI levels.
Get these files from LTspice Yahoo Group
The 4 main files used to create this demo circuit can be obtained from LTspice Yahoo Group. Special thanks to Helmut Sennewald
See the figure below…
Comparison of LTspice circuit simulation with datasheet
The TI datasheet compares favorably with my simulations. The LTspice “on” resistance curves and values are nearly exactly the same as those shown in figures 2,3, and 4 of TI’s datasheet (page 6) for the range I tested.
At this stage of development in simulating the analog path for my automatic volume control circuit, I see that the “on” resistance curve may create an unstable signal path under normal audio conditions unless the operating voltage (Vcc ) is much higher than the original circuit’s proposed 5 VDC power supply.
References
Linear Technologies LTspice Landing Page
Texas Instruments datasheet for the CD4066B
What’s All This CD4007 Stuff, Anyhow?
Bob Pease | ED Online ID #6073 | April 5, 1999
http://electronicdesign.com/Articles/ArticleID/6073/6073.html
Fault in CD4066 Model
kcin_melnick | LTspice Yahoo Tech Group Message #16897 | June 24, 2007
http://tech.groups.yahoo.com/group/LTspice/message/16897
Technorati Claim Tag
SH66YHJAPDBA