Another blog about transistors. This time, I fancied looking at a circuit rather than the characteristics of a device, so I'm going to look a circuit known as the Schmitt trigger. This is named after O. H. Schmitt, though his original circuit was published in 1938 and predated transistors. It's not necessarily a very useful circuit any more in this particular transistor form, but it is interesting to look at it and understand what is going on - partly just for its own sake, but also because I'm gradually learning about the building blocks (the pieces of Lego, if you like) that I might use later to design my own circuits.


The circuit is a thresholder. When the input reaches a particular threshold voltage, the output changes. There are two things that make it interesting. One is that it has hysteresis, which means that the threshold changes when the changeover occurs and is lower when the input is coming down than when it is going up, something which lends it some immunity from noise on the input and allows it to work with a very slowly moving input signal. The other is that there is positive feedback at the trigger point and that means that once the change starts to happen it happens very rapidly.


I first simulated it (here, I'm using TI-TINA, but any SPICE-based simulator should give similar results) and then built it on a breadboard. Here's the circuit from the simulator:




and a photograph of the physical layout




Here's the simulator output with a 50Hz sine wave at the input (green). This shows where the threshold levels are and the rapid change of the output (red). The threshold going up is at about 2.1V and that coming down at about 1.5V.



For comparison, this is the same thing from the real circuit:




This next pair of simuator traces show the rise and fall times of the output in more detail




and here are the real circuit waveforms:




The most obvious difference is that the simulator is more optimistic about the rise and fall times than what the real circuit manages. Also the shapes are somewhat different. Possibly, that might be a result of the feedback loop - on the previous switching blog, the transistor model looked to be quite good, but here, with multiple passes round and round the loop, you could imagine slight discrepancies in the model being magnified considerably.


Finally, I was curious as to what it would do at higher frequency, so here it is running at first 1MHz and then 2MHz:




and the corresponding simulator traces



The operation at these frequencies is quite marginal and the real circuit stops if the input amplitude is reduced. It really isn't a high-speed circuit, even though the edge-rate produced by the feedback is quite respectable.


The major deficiency, in this form, is the output being up in the air, which it has to be for the rest of the circuit to operate properly. A second problem is that the threshold levels are difficult to calculate (more on that further down) and adjust.

I've seen old circuits where a negative supply rail has been used, which gives a way of getting both the 'low' output level and the thresholds down around 0V.


Right, that's all the practical, what-it-does stuff - look away now if you don't like theory.


Finally, I'm going to say a few words about how I think the circuit operates. For a circuit with two transistors and four resistors, the behaviour is surprisingly complex. [You might want to think it out for yourself first and then come back and see if you agree with my analysis.]


The starting point is to imagine that the input is at 0V. Transistor T1 could only be on if the emitter were a diode drop below the base voltage, but since the emitter must be at 0V or above, we can say confidently that T1 is off and imagine for a moment that it's not present. That leaves us with T2 and three resistors, R2, R3 and R1. That circuit is a bit messy to analyse [what I'm after here is the voltage at the emitter of T2] so I'm going to take a short cut - it won't be quite right, but it will do for explaining the operation [if you want it more accurately, either sit down and solve the equations or do it the lazy way with a simulator]. The emitter voltage is the current through R1 times the resistance [Ohm's law], the current comes via two paths, R2 and R3. The R2 path includes a diode drop. Let's pretend the diode drop is 0V rather than 600mV - then T2, which is solidly on because the base current isn't too much different to the collector current, will end up like a node joining the three resistors and the voltage is the potential divider formed by R2 and R3 in parallel in series with R1. That gives a voltage of around 1.5V. Not accurate, but in the right sort of area. (The simulator says 1.39V.) Now let's imagine the input increasing in voltage. When do things start happening? It's fairly evident that that will only be when the base of T1 climbs to a diode drop above the voltage at the top of R1. So that will be just over 2V. At that point, T1 starts to turn on. Things then happen very rapidly - the collector current for T1 has to come through R2 and the voltage across the resistor will increase, that lowers the base voltage of T2 and starts to turn off that transistor. That reduces the current into R1 from T2, the voltage would go down a fraction but T1 turns on harder, more current flows in R2, and so on, round and round. After a few tens of nanoseconds it's finished and T1 is on and T2 is off. That process is called regeneration.


So, what happens going the other way. This is where it starts to get more complicated - it isn't simply the inverse of what we had before. We know that, because if it was the threshold would be the same and there would be no hysteresis. Let's start by imagining the input at 5V. The situation with T1 is now the same as was the case with T2 when we started at 0V: the circuit formed by R4, T1, R2 and R1 is the same circuit as was formed by R2, T2, R3, R1, so the emitter voltage will be the same [1.39v]. As the input voltage starts to come down the current contribution from the base resistor starts to lessen and the voltage across R1 will reduce. T2 remains off because T1 is still saturated and the voltage between the base and emitter of T2 is far below what is necessary to turn it on. At some point, T1 will come out of saturation and the voltage between emitter and collector will increase. At the point at which that happens, the contribution to R1's current from the base is very much less than from the collector (it's the collector current divided by the beta, of several hundred) so the emitter voltage will have fallen to approximately that of the potential divider formed by R2 and R1, or 0.87V. A slight decrease in the input voltage and the emitter-collector voltage will get up to a diode drop and T2 will start to turn on. Now we get a similar regenerative action to what we had on the way up and T1 will rapidly turn off and T2 turn on, and we're back where we started. Very roughly, the threshold coming down is the 0.87V plus a diode drop, ie about 1.5V.


A few final notes:


1) The regeneration requires gain around the loop to occur.
2) Both transistors saturate (though T1 actually comes out of saturation just before the trigger point) and that is what holds back the high frequency performance. It's possible to adapt the circuit to stop the transistors saturating. The other thing you'd do to get it to run fast is to increase all the currents by dropping the resistor values (which reduces the effects of parasitic capacitances by charging and discharging them quicker). A Ferranti Application Report [1975] I've got shows a circuit that runs at 50MHz, but it would hardly qualify as being low power.

3) Although the circuit looks like a variation of a long-tailed pair, it seems to be better not to try and analyse it like that.