You are on page 1of 8
Schmitt triggers, logic, and feedback Wilf Rigter tells al. This tutorial started out with a look at Richard Piotter’s Schmitt. gif schematic. 7 vee / 22K BCssec our eae BEAM Fromthe Ground Up is BEAM Reference Library site. This circuit is simple but non-inverting, has no input diodes, and has relatively low input impedance so it can't be easily used as a substitute for a 74C14 | 74HC14 ‘Schmitt trigger inverter for BEAM type applications. So I modified it as shown in the following diagram which more closely simulates a TAC/HC14 Schmit trigger including inversion, reasonably high input resistance (4M) and the all important input protection diodes. SCHMITT TRIGGER WILF RIGTER 32001 +yin=2°Ver “Mine 1/3*Vee Then I decided to write a little description of operation and before you know it tumed into a tutorial, The Schmitt tigger is a nice example of positive feedback so trying to describe that concept took another few paragraphs. "Why?" you may ask. Fourteen components may seem like a lot to simulate 1/6 of one 74HC14, but this discrete circuit shows you what is really going on inside that little black IC we so often take for granted. ‘The Schmitt trigger is used in BEAM for Nv and Nu neurons but is more generally used fo clean up analog voltages and convert them ino nice sanitary binary logic levels. Ifyou are in a hurry you can skip straight ahead to the section on the Schmitt ‘tigger but ifyou like some background read the bit about digital and analog signals and feedback first. DIGITAL SIGNALS Digital signals are generally considered to be one of two logic states called by various names: On / Off, High / Low, One / Zero, 1 / and Vee / Gnd, These are called logic signals because they are unambiguous “either / or" values. In the real world, the voltage levels that represent logic states are not precisely Vec and Gnd, When these fizzy real voltage levels are applied to digital inverter inputs, they are compared to an internal voltage threshold and the difference between the applied input voltage and the threshold is amplified (multiplied) by a factor of about 100. These real vohage levels representing | and 0 must be in a range of values, sufficiently above and below the actual switching threshold so that despite their fivzyness (noise) they always generate logic 1 or 0 levels at the output of the circu In 7411Cxx logic logic "I" signal levels are defined as greater than 2/3 Vee and a logic "0" signal must be less than 1/3 Vcc. The range of voltage levels between 1/3 Vec and 2/3 Vee is considered to be in the “forbidden” zone since signals in that, range cannot be guaranteed to be 1 or 0. When a voltage near the switching threshold in the middle of the "forbidden'" zone is applied to a digital input, the digital output can and does generate a burst of pulses which can play havoc in the precise digital world of counters and registers. In the real world, we also have to consider that when a 1 changes to a 0 and vice versa, the change is not instantaneous and while the logic voltage level slews from 1 to 0, it traverses through the "forbidden" zone. But since digital logic cannot react instantaneously to change either, there is a specification given for the minimum rate of change (switching time) which is guaranteed not to generate more than a single transition in response to the logic level change. So our unambiguous digital gic ignores glitches as long as the time of change is sufficiently short duration (< 500 ns). In short, a digital circuit responds to and generates one of two digital voltage levels, nominally labeled "I" and "0", These levels must be above and below the "forbidden" zone and any changes in logic levels, must be sufficiently rapid to meet the minimum specified switching times. Pethaps now is a good time to mention that in the world of BEAM circuits, these rules are generally ignored, Also note that On/ One / 1 / High is generally, but not always, equivalent to Vee; meanwhile, Off Zero / 0 / Low is generally, but not always, equivalent to Gnd. Sometimes this common-sense correlation is reversed (so that "On" is denoted by Gnd, and "Off" by Vec) -- this is called "negative logic," and happens to be used in microcores. But I digress. ANALOG SIGNALS. Digital signals are to analog signals what black and white isto the full spectrum of colors. Analog signal levels can be any value and each value is significant. In the real world there isa limit to the minimum and maximum values that can be distinguished by the input ofan analog circuit and the values that can be generated at the output of an analog circuit. Usually these signals fallin the range between the circuit power supply voltages, The main thing to remember is that sensors such as such as LDRs, PDs, thermistors and time sensitive circuits, such as RC networks (Nv / Nu), all generate analog vokages including those that are in the digital forbidden’ zone. In order to interface the analog and digital worlds we must use special circuit designs to avoid generating unpredictable chaotic results. This is done by using positive feedback. FEEDBACK One of the most important concepts in electronics is feedback. Once you understand this basic principle which applies to all dynamical systems, you will experience a quantum jump in knowledge. If may be so bold to suggest this idea: Chaos, Order and Feedback rule in a delicate balance that gives rise to all phenomena in this universe. Feedback, as the name implies, occurs when a process or interaction is recursively modified by the output or resuk that it generates. In electronic circuits this occurs when all or a part of the output signal(s) is added or subtracted fom the input signal(s). Feedback therefore has two distinet forms: Positive and Negative. To keep things simple and on familiar ground, we will just discuss in general how BEAM circuits use feedback and in detail how positive feedback is used in Schmitt trigger circuits, ELECTROMECHANICAL FEEDBACK ‘The essence of BEAM is the "autonomous" interaction between the electronic and mechanical assembly called the robot and it's environment as seen through it's sensors. The sensors provide input signals which modify the action of the robot and, in tum, that action modifies the signals received by the sensors. Well that is a fine example of electromechanical feedback! Ina phototropic robot like a photopopper, the circuit that controls the motors sends more current pulses to the side that receives less light. This causes that side to tun towards the light source until both light sensors are balanced. Then both sides receive equal current pulses as the robot "wageles" towards the light, In the Herbie line follower, the motion is continuous rather than pulsed and the robot follows a broad white ine against a dark background, Each motor receives current in proportion to the imbalance (also called error or difference signal) of light on the two photo sensors that point to the left and right edges of the white line. For example, as the 'bot drifis lefi, off the center of the line, the let sensor receives less light as it moves over to the dark background while the right sensor receives more from the center of the reflective white line therefore creating an imbalance signal that increases the current to the right motor and moves Herbie back on track. Phototropism is an example of negative feedback because the system as a whok- moves towards the "balanced sensors signals" condition. This is a very important distinetion from the "maximum sensors signals" condition. Photophobic behavior is and example of positive feedback that steers the system as a whole towards “unbalanced sensor signals" rather than the "minimum sensor signals" condition, However dont ket these subtle distinctions get in the way of the main idea that the action of the system influences the sensors which influences action of the system and so on - that isthe feedback loop we so often mention in the discussion of BEAM circuits. ELECTRONIC FEEDBACK Ifyou got the idea of mechanical feedback, then electronic feedback should be easy. In BEAM type applications which use digital inverters for quasi analog applications , the feedback balance point is the input volage level (threshold) at which the output switches over. For 74HCxx inverters like the 74HC240 that level is 1/2 Vee, right smack in the middle of the "forbidden" zone. We mentioned earlier that negative feedback subtracts from the input signal and steers the circuit output towards the balance point. Positive feedback adds to the input signal and steers the circuit output away ffom the balance point NEGATIVE FEEDBACK ‘Negative feedback subtracts from the input signal because itis inverted before it appears at the output and any inverted output signal will subtract fom the input signal. A good example of negative feedback would be a 74H1C240 inverter with a resistor connected ftom input to output. Ifyou measure the output of that circuit with a voltmeter you will know precisely what the threshold voltage of the inverter is, For a 74HC240 at Vee = 5 V the output will be very close to 2.5 V. As mentioned before digital logic is not designed to operate with input voltages from the forbidden zone and ifyou measure the Vee current you will know why it draws 50 mA or more current, In addition, ifyou tum on a radio near the circuit, the high frequency oscillation radiated from the circuit should be quite overpowering compared to local radio stations In general, negative feedback is undesirable in digital circuits but it can be hamessed and put to good use as will be discussed later. POSITIVE FEEDBACK Positive feedback adds to the input signal and steers the output away from the balance point, out of the forbidden zone and towards the Vcc or Gnd levels of ideal logic signals, This is why positive feedback is generally usefil in BEAM circuits and can in fact be used to counteract the effects of negative feedback. There are many examples of external positive feedback in BEAM bicores, monocores, SE triggers and latches. But the 74HC14 of Microcore fame, is an example of intemal positive Redback because the feedback occurs inside the chip. Asa black box, all we know about the 741IC 4 is that it has two thresholds and that regardless of the input signal, the output signals always have nice clean single transitions, are always at Vec or Gnd and never at some in between value (unless we forget to add a resistor in series with the LED indicators). This internal positive feedback is what makes the 74HC14 Microcore work and why, without positive feedback, a 7411C240 Microcore always degenerates into saturation, SCHMITT TRIGGERS The Schmitt trigaer isa special circuit which acts like a switch that changes state at two different thresholds, These are called the upper and lower threshold or the positive and negative going threshold. The difference in these two threshold levels is called the hysteresis voltage. The Schmitt trigger does not react to any input voltage level in the range between the two thresholds, which for a 74C/HC14 corresponds precisely to the "forbidden zone": ‘A Schmitt trigger can alo be likened to two comparators controling an RS flip-flop at the output. In fact, the schematic of the 74C14 shows it to be designed that way. The upper threshold comparator sets the output latch and the lower threshold comparator resets the output latch. ‘These two thresholds (balance points) makes the 74HC14 Schmitt trigger different from an ordinary 74HC240 inverter with a single threshold at 1/2 Vee. Each of the six inverters in a 74C14 Schmit trigger uses 12 MOSFETs, so by comparison the discrete version of the Schmitt trigger using 3 transistors and 11 other components is about as complex. ‘Normally the 74HC14 threshold parameters are a fixed ratio of Vee. This keeps the device fimetionally simple and as a result the 741C14 Schmitt trigger is one of the most popular devices for interfacing real world signals to digital electronics. It just doesn't get any simpler compared to the other versions we will discuss. However itis a little known fit that itis possible to alter the thresholds of a 741IC14 by using negative feedback from output to input. For example, by adding a $.1/M resistor from output to input and a 1M input resistor tis will provide about 15% negative feedback. That is subtracted from the internal 30% positive feedback and with Vee=SY, it effectively changes the thresholds at the input of the 1M resistor to approximately 2.1V and 2.9V. Very usefil ifthe signal of interest has smaller transistions than the normal 74HIC14 hysteresis voltage. Beside the 74HC14, there are a number of ways to impliment a Schmitt trigger in CMOS logic. The simplest is to use a non-inverting bufler like the 74HC245 and connect a 3M resistor from output to input to provide positive feedback which is summed with the input signal through the IM series resistor. These values will give the same thresholds as a 741IC14 but keep in mind the input resistance is 4M to GND or Vece depending on the current output state, ‘wee, 437 |WIFRigter on Seri triggers ‘Solaroois.noogututorals_schrit ml bclio= MAR 1V2LWNATBMIAGIZg_m2sqZAggHe8lq TaTCKNIKy smGdPJVIFtyHoMQ e Bcssec our ea The above diagram reproduces the basic circuit of Richard Piotter. It consist of two inverters (NPN and PNP) which give a double inversion to the input signal. The output of the second stage is fed back and summed with the input signal and a to Think of those as forming a voltage divider which determines the input voltage required to cross the 0.6 V threshold of the _junetion to tun the on of off, With the values given the positive going threshold is 1.95 V and the negative going threshold is 1.34 V assuming a Vee of SV. The output signal at the PNP collector is non-inverting with respect to the input signal SCHMITT TRIGGER WILF RIGTER 03/2001 2M This diagram shows how the basic circuit is modified to give the symmetrical 1/3 - 2/3 Vee thresholds equal to the ; This is done by setting voltage to 1/2 Vee - 0.6 V which makes the on / off switching threshold at the input NPN base exactly 1/2 Vee. The 1M input and 3M feedback resistors forma voltage divider that sets the values of the positive going input threshold to 2/3 Vee and the negative going input threshold is 1/3 Vee. The positive feedback signal at one end of the 3M feedback is alterately Veo or Gnd depending on the state of the non-inverted output signal at the collector ‘wee, 437 |WIFRigter on Schmit triggers oye (oes ‘Solaroois nog ututorals_schrit imi Mbclio= MAR 1V2LWNATBINGIZg_m2sqZAgdHe8lq TCKNIKy smGdPJVIFtyHoMQ

You might also like