CMOS Analog Switch & Test Plan
I built two voltage-controlled analog switches from CD4007 CMOS transistors. Then I wrote a test plan to measure how far each one is from an ideal switch.
3.026 kΩon-resistance
329 MΩoff-resistance
9.1 nAoff-state leakage
−0.3 to 5.3 Vallowed signal range
The two switches
- Switch 1: a CMOS transmission gate plus an inverter. It passes V1 to the output when the control is 0 V and blocks it at 5 V.
- Switch 2: two transmission gates on a second CD4007. They route one input to output A or output B depending on the control voltage.
I designed both in LTspice first, then built them with a 470 kΩ load, a 3 V input and a 5 V supply.
Test plan
The plan covered four ways a real switch differs from an ideal one:
- On-resistance: the voltage across the switch, measured with a C1 − C2 math channel, divided by the load current.
- Off-resistance and leakage: the same measurement with the switch open.
- Signal range: a 0–5 V ramp at 500 Hz, checked against the CD4007 datasheet limits of VSS − 0.3 V to VDD + 0.3 V.
- Bidirectionality: on-resistance re-measured with the input and output swapped.
Results
- Switch 1: 3.026 kΩ on, 329 MΩ off, 9.1 nA leakage. With the input and output swapped, on-resistance was 2.680 kΩ, so it conducts both ways with similar resistance.
- Switch 2: 3.02 kΩ and 3.06 kΩ on-resistance for the two paths, about 73 MΩ off, and 40.9 nA leakage.
The report also compared the trade-offs of the two designs: complexity, pin-voltage limits, and part cost of about $0.40–0.90 per CD4007.