# Schmitt-trigger circuit tutorial

- Noise reduction with hysteresis
- Low level Schmitt trigger circuit
- Calculation of the high trigger level
- Calculation of the low trigger level

## Noise reduction with hysteresis

Noise elimination is one of the main problems in achieving higher data rates and longer communication cables. There are several ways noise can be reduced. Communication lines can be shielded. Differential communication like with RS422 and RS485 is quite immune to noise, especially when the wires are twisted. Low output impedance and proper termination resistors to reduce reflections may also help, but there will always be some noise left on the line. This noise can be reduced by adding input filters, for example with an RC network, but input filters have the disadvantage that they not only reduce noise, but also the maximum allowed data rate. Another possibility is adding a hysteresis in the input line. An input line with hysteresis uses two switching levels **V _{high}** and

**V**. When the input voltage exceeds

_{low}**V**, the output switches to a high level. Only when the input voltage falls below

_{high}**V**(which should be lower than

_{low}**V**), the output switches back to its low state. This type of noise reduction is implemented in the inputs of the I²C bus. The effect of an hysteresis can be seen in the next picture.

_{high}

The first graph shows the actual input signal. There is quite some noise on the line, and if the center voltage is used to determine if the input is in the on, or off state, there can be four high periods detected in the signal as shown in the second graph. If we however use two trigger levels with hysteresis, it is possible to reduce the number of detected logical highs to only one. This is what the Schmitt trigger does in the last graph.

## Low level Schmitt trigger circuit

Making an electronic circuit with hysteresis is not difficult, thanks to Otto Schmitt, an American scientist. He invented a simple electronic circuig which has a built-in hysteresis effect. This circuit is now known as the Schmitt-trigger. Two transistors and a handful of carefully chosen resistors are enough to create the circuit. The values of the resistors define the input voltage levels where the Schmitt trigger circuit changes state. The basic Schmitt trigger circuit is shown in the next picture.

## Calculation of the high trigger level

Let’s try to understand this circuit by assuming the input voltage is zero. Transistor **T _{1}** will not conduct because of the zero input voltage. The state of transistor

**T**is totally determined by the resistors

_{2}**R**,

_{C1}**R**and

_{1}**R**. These three resistors create a voltage divider. Let’s assume that the base current flowing in

_{2}**T**is small enough to be neglected. With modern transistors where the

_{2}*gain*

**h**is often larger than

_{FE}**150**this assumption will create only a very small error. The base voltage of

**T**can then be calculated as

_{2}**V _{B2}** =

**V***

_{supply}**R**/(

_{2}**R**+

_{C1}**R**+

_{1}**R**)

_{2}The emitter voltage of **T _{2}** will be less, because of the

**V**voltage difference between the base and emitter. For a silicon transistor where current is flowing, the

_{BE}**V**voltage can be estimated at roughly

_{BE}**0.61 Volt**. The emitter voltage can be calculated as:

**V _{E2}** =

**V**–

_{B2}**V**=

_{BE2}**V***

_{supply}**R**/(

_{2}**R**+

_{C1}**R**+

_{1}**R**) –

_{2}**0.61**

The Schmitt trigger circuit uses emitter coupled logic. Therefore **V _{E}** =

**V**=

_{E1}**V**.

_{E2}Now consider the situation that the input voltage of the circuit increases. As soon as **V _{B1}** is larger than

**V**, a very small current will start to flow through transistor

_{E1}**T**. This current also passes resistor

_{1}**R**, and therefore the base voltage of transistor

_{C1}**T**will decrease. As the base voltage gets lower, so does the emitter voltage of transistor

_{2}**T**and because the emitters of transistor

_{2}**T**and

_{1}**T**are directly coupled, the voltage difference

_{2}**V**will increase. More current will start to flow through transistor

_{BE1}**T**and transistor

_{1}**T**will close. Please note that the emitter voltage over resistor

_{2}**R**won’t fall to zero. Although

_{E}**T**is closing,

_{2}**T**is opening at the same time keeping the emitter voltage more or less stable at a value of

_{1}**V**–

_{in}**V**. When

_{BE}**T**is totally closed and

_{2}**T**has opened, the system has changed state. The output will change to the high state because resistor

_{1}**R**pulls the output to the power supply. The trigger voltage where this effect starts to happen is called the high trigger voltage and can be approximately calculated as

_{C2}**V _{high}** =

**V***

_{supply}**R**/(

_{2}**R**+

_{C1}**R**+

_{1}**R**) –

_{2}**0.61**

It is evident that an increasing voltage at the input of the circuit will keep the circuit in the high state. This is because a higher voltage at the input will create a higher base and collector current and this higher collector current will pull the base voltage of transistor **T _{2}** even further down. But when does the circuit fall back to its zero state again? This requires further analysis of the circuit.

## Calculation of the low trigger level

If **V _{in}** is lowered, the current flowing through

**T**will decrease. This causes the current through resistor

_{1}**R**to decrease and the voltage level at the base of transistor

_{C1}**T**will increase. Because the transistors are emitter coupled, the emitter voltage of that transistor decrease, and when

_{2}**V**is low enough, the base voltage of transistor

_{in}**T**will become slightly higher than the emitter voltage, causing a small base current to flow through

_{2}**T**. This small base current will create an emitter current through the shared resistor

_{2}**R**. The emitter voltage will rise and less current will flow through

_{E}**T**because the voltage difference between the base and emitter of

_{1}**T**gets smaller. This causes less current to flow through

_{1}**R**and the base voltage at

_{C1}**T**increases even more.

_{2}**T**will open and

_{2}**T**will close at the same time. At this input level

_{1}**V**the circuit has changed state back to zero. But at what specific voltage is this state change triggered?

_{in}Calculating the low trigger voltage for a Schmitt trigger circuit is a little bit more difficult than calculating the high trigger level. **T _{2}** will start to open when the base voltage

**V**gets slightly larger than the emitter voltage

_{B2}**V**. We will try to calculate the input voltage where

_{E2}**V**and

_{B2}**V**are equal when

_{E2}**T**is

_{2}closed.

First some basic calculations for voltages and currents in the circuit when **T _{2}** is closed. As stated above, we assume that the base currents flowing through the transistors are small. Therefore the collector current and emitter current through

**T**are considered equal. Also because

_{1}**T**is closed, there won’t flow any base current through this transistor.

_{2}**V _{E}** =

**I***

_{E1}**R**

_{E}**V _{C1}** =

**I*** (

_{R1R2}**R**+

_{1}**R**)

_{2}**V _{supply}** –

**V**= (

_{C1}**I**+

_{C1}**I**) *

_{R1R2}**R**

_{C1}The important factor in this calculation is the collector voltage of transistor **T _{1}**, because if we know this value we can easily calculate the base voltage of transistor

**T**. Given the above equations and the assumption that

_{2}**I**equals

_{E1}**I**, we can derive

_{C1}**V _{C1}** =

**V**–

_{supply}**R*** (

_{C1}**V**/

_{E}**R**+

_{E}**V**/(

_{C1}**R**+

_{1}**R**))

_{2}**V _{C1}** is still on both sides of the equation, but this can be solved with some simple mathematics. This gives:

**V _{C1}** = (

**V**–

_{supply}**V***

_{E}**R**/

_{C1}**R**) / (

_{E}**1**+

**R**/(

_{C1}**R**+

_{1}**R**))

_{2}With this equation, we can easily calculate the voltage level **V _{B2}** of the second transistor.

**V _{B2}** =

**V***

_{C1}**R**/(

_{2}**R**+

_{1}**R**)

_{2}**V _{B2}** = (

**V***

_{supply}**R**–

_{2}**V***

_{E}**R***

_{C1}**R**/

_{2}**R**) / (

_{E}**R**+

_{C1}**R**+

_{1}**R**)

_{2}This is where the magic jumps in. We are looking for the value of **V _{B2}** where the transistor

**T**starts conducting. This is the point where the base voltage

_{2}**V**equals the emitter voltage

_{B2}**V**. We can therefore substitute

_{E}**V**for

_{E}**V**and reduce the equation further. I will skip some steps, but the end-result can be shown below:

_{B2}**V _{E}** =

**V***

_{supply}**R**/(

_{2}**R**+

_{C1}**R**+

_{1}**R**+

_{2}**R***

_{C1}**R**/

_{2}**R**)

_{E}When transistor **T _{2}** starts to conduct, the transistor

**T**is still open, so the calculate the input voltage where

_{1}**T**starts to conduct, we have to add

_{2}**V**or

_{BE}**0.61 Volt**to this equation to calculate the value at the base port of

**T**. The low trigger value of the Schmitt trigger can therefore be calculated as

_{1}**V _{low}** =

**V***

_{supply}**R**/(

_{2}**R**+

_{C1}**R**+

_{1}**R**+

_{2}**R***

_{C1}**R**/

_{2}**R**) +

_{E}**0.61**