Home www.play-hookey.com Sun, 05-28-2017
| Direct Current | Alternating Current | Semiconductors | Digital | Logic Families | Digital Experiments | Computers |
| Analog | Analog Experiments | Oscillators | Optics | HTML Test |
| The Basics | Variations in Feedback Circuits | Mixing Analog and Digital Technologies | Generating Waveforms |
| Operational Amplifiers | Current Mirrors | Differential Amplifiers |
| A Square Wave Generator | A Triangle Wave Generator | A Sine Wave Generator |

A Square Wave Generator

One requirement in a wide range of applications is a spontaneous source of some continuous signal, having a regular and definable wave shape. One of the most important of these is a squarewave.


A basic squarewave generator

The circuit to the right uses a comparator with both positive and negative feedback to control its output voltage. Because the negative feedback path uses a capacitor while the positive feedback path does not, however, there is a time delay before the comparator is triggered to change state. As a result, the circuit oscillates, or keeps changing state back and forth at a predictable rate.

Because no effort is made to limit the output voltage, it will switch from one extreme to the other. If we assume it starts at -10 volts, then the voltage at the "+" input will be set by R2 and R1 to a fixed voltage equal to -10R1/(R1 + R2) volts. This then becomes the reference voltage for the comparator, and the output will remain unchanged until the "-" input becomes more negative than this value.

But the "-" input is connected to a capacitor (C) which is gradually charging in a negative direction through resistor Rf. Since C is charging towards -10 volts, but the reference voltage at the "+" input is necessarily smaller than the -10 volt limit, eventually the capacitor will charge to a voltage that exceeds the reference voltage. When that happens, the circuit will immediately change state. The output will become +10 volts and the reference voltge will abruptly become positive rather than negative. Now the capacitor will charge towards +10 volts, and the other half of the cycle will take place. The output frequency is given by the approximate equation:

fout
 
 
1

2RfC ln (  2R1  + 1 )

R2

In practice, circuit values are chosen such that R1 is approximately Rf/3, and R2 is in the range of 2 to 10 times R1.


Prev: Mixing Analog and Digital Technologies Next: A Triangle Wave Generator

All pages on www.play-hookey.com copyright © 1996, 2000-2015 by Ken Bigelow
Please address queries and suggestions to: webmaster@play-hookey.com