Quantcast
Channel: Embedded Components and Tools Blog Center » Component Technology
Viewing all articles
Browse latest Browse all 8

Simulating the CD4066 Quad Bilateral Switch With LTspice

$
0
0


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:

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 symbol for one of four bilateral switches on cd4066 (click to enlarge)

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.

 

code=ltspice
  1.  
  2. * CD4066 Analog Switch
  3. * SYM=CD4066
  4. * Transistor models are from LTspice group member kcin_melnick
  5. * See message number 16897, http://tech.groups.yahoo.com/group/LTspice/
  6. * Analog Switch Control In Out Vdd Vss
  7. .SUBCKT CD4066 2 11 4 10 7
  8. X1 2 6 10 7 INVERT
  9. X2 6 1 10 7 INVERT
  10. M1 14 6 7 7 CD4007N
  11. M7 11 6 14 10 CD4007P
  12. M3 11 1 14 14 CD4007N
  13. M4 11 1 4 14 CD4007N
  14. M8 11 6 4 10 CD4007P
  15. .SUBCKT INVERT 1 2 3 4
  16. * Inverter In Out Vcc Vss
  17. M1 2 1 3 3 CD4007P
  18. M2 2 1 4 4 CD4007N
  19. .ENDS
  20. .MODEL CD4007N NMOS (
  21. + LEVEL=1 VTO=1.44 KP=320u L=10u W=30u GAMMA=0 PHI=.6 LAMBDA=10m
  22. + RD=23.2 RS=90.1 IS=16.64p CBD=2.0p CBS=2.0p CGSO=0.1p CGDO=0.1p
  23. + PB=.8 TOX=1200n)
  24.  
  25. .MODEL CD4007P PMOS (
  26. + LEVEL=1 VTO=-1.2 KP=110u L=10U W=60U GAMMA=0 PHI=.6 LAMBDA=40m
  27. + RD=21.2 RS=62.2 IS=16.64P CBD=4.0P CBS=4.0P CGSO=0.2P CGDO=0.2P
  28. + PB=.8 TOX=1200N)
  29. .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.

 

VI curves and circuit schematic for cd4066 bilateral switch under test (click to enlarge)

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…

LTspice Yahoo Group File List (click to enlarge)

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

Technorati Tags: , , , , ,


Viewing all articles
Browse latest Browse all 8

Trending Articles