Skip to main content
8 of 9
edited body

The “default” LTspice transistor is idealized. Real ones aren’t that good :)

Bipolar transistors are called “switches” but they are not literal switches like a toggle switch is – they are not mechanical contacts.

Perhaps inadvertently, you have set up the transistor as a common-base switch, and that has a chance of working acceptably – you just need some load, the output can’t float.

schematic

simulate this circuit – Schematic created using CircuitLab

The component values do depend on the parameters of the transistor, and have to be adjusted in practice. It's not the best way to implement a switch, but it certainly works well enough to be useful for something.

The general idea for common-base switches is having ample amplitude of base drive. Ideally, the base drive would be a current source.

Below are the input, output and control waveforms of the circuit above. The control waveform's amplitude is scaled down 50% to make it fit better in the plot.

Plot of I/O waveforms, and the control waveform

The non-linear distortion is about 0.5%. The input, output and distortion residue waveforms are plotted below.

Plot of the I/O waveforms and the distortion residue while the switch is on

The output isolation at 1kHz in the off state is beyond the fidelity of CircuitLab, presumably better than -70dB - this can depend a lot on the transistor used as well.


Another way to achieve a switching action would be to short a high-impedance source.

For example:

schematic

simulate this circuit

The output swings to 0V when it's turned off:

Output waveform of the "shorting" switch

The isolation when OFF is about -66dB, or about 1-in-2000.

OFF-state output from the switch


A more dependable way to implement a bipolar switch would be to convert the input signal to a current, then switch the current between two resistors, and take the output from one resistor only.

schematic

simulate this circuit

The switching action is clean:

The output voltage waveform as the switch switches

The distortion residuals are <0.1%:

The waveform of distortion residuals


A practical realization of the switch circuit requires a voltage-current converter (V🠖I), and a source of bias currents, shown below.

schematic

simulate this circuit

The various currents are derived from a 100uA reference. An LM334 could generate this current, for example. Another option would be REF200, but it costs an order of magnitude more.

The V🠖I converter maintains 3V at the emitter of Q23, and uses R8 to load input voltage using 3V as the reference. The current passes through Q23.

The current then gets subtracted from the 300uA reference, and enters the Q1-Q2 current steering pair. When the switch is turned on, Q2 conducts and passes the current through the output load resistor R5.

The voltage gain of the switch is about 0.983. Both the input and output impedance are 10 kOhm.

The switching action waveforms are below.

The complete switch's input and output waveforms, and a part of the control waveform

Distortion is under 0.1%. As shown below, it is about 0.06% at 1kHz.

The distortion residual of the complete switch

OFF isolation at 1kHz is -90dB according to CircuitLab. In practice I'd expect -80dB at least with careful layout.

Given the relatively high output impedance, the output would need a buffer stage.

Lower distortion can be achieved by running the switch at a lower gain, say 0.2, and having the buffer stage add the gain back.

The V-I converter could be done with an op-amp Howland current pump, but that would take good resistors and a good op-amp to be better than the discrete circuit. At 30kHz, you'd need an op-amp with GBW to 10MHz to maintain reasonable distortion, if you care about that.

An op-amp could provide the gain and buffering of the switch output, of course.