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.
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.










