thumb|Simple relaxation oscillator made by [[Feedback|feeding back an inverting Schmitt trigger's output voltage through a RC network to its input.]]
In electronics, a relaxation oscillator is a nonlinear electronic oscillator circuit that produces a nonsinusoidal repetitive output signal, such as a triangle wave or square wave. The circuit consists of a feedback loop containing a switching device such as a transistor, comparator, relay, op amp, or a negative resistance device like a tunnel diode, that repetitively charges a capacitor or inductor through a resistance until it reaches a threshold level, then discharges it again. The period of the oscillator depends on the time constant of the capacitor or inductor circuit.
thumb|upright=0.7|The blinking [[turn signal on some motor vehicles is generated by a simple relaxation oscillator powering a relay.]]
Relaxation oscillators may be used for a wide range of frequencies, but as they are one of the oscillator types suited to low frequencies, below audio, they are typically used for applications such as blinking lights (turn signals) and electronic beepers, as well as voltage-controlled oscillators (VCOs), inverters, switching power supplies, dual-slope analog to digital converters, and function generators.
The term relaxation oscillator, though often used in electronics engineering, is also applied to dynamical systems in many diverse areas of science that produce nonlinear oscillations and can be analyzed using the same mathematical model as electronic relaxation oscillators. For example, geothermal geysers, networks of firing nerve cells, coupled chemical reactions, The period of a relaxation oscillator is mainly determined by the relaxation time constant.
Electronic relaxation oscillators
thumb|upright=1.4|A vacuum tube Abraham-Bloch multivibrator relaxation oscillator, France, 1920 (small box, left). Its harmonics are being used to calibrate a wavemeter (center).
thumb|Original [[vacuum tube Abraham-Bloch multivibrator oscillator, from their 1919 paper]]
The first relaxation oscillator circuit, the astable multivibrator, was invented by Henri Abraham and Eugene Bloch using vacuum tubes during World War I. Balthasar van der Pol first distinguished relaxation oscillations from harmonic oscillations, originated the term "relaxation oscillator", and derived the first mathematical model of a relaxation oscillator, the influential Van der Pol oscillator model, in 1920. Van der Pol borrowed the term relaxation from mechanics; the discharge of the capacitor is analogous to the process of stress relaxation, the gradual disappearance of deformation and return to equilibrium in an inelastic medium.
Relaxation oscillators can be divided into two classes They are also used in voltage-controlled oscillators (VCOs), inverters and switching power supplies, dual-slope analog to digital converters, and in function generators to produce square and triangle waves. Relaxation oscillators are widely used because they are easier to design than linear oscillators, are easier to fabricate on integrated circuit chips because they do not require inductors like LC oscillators, However they have more phase noise or unijunction transistor) connected in parallel to the capacitor. The capacitor is charged by the input source causing the voltage across the capacitor to rise. The threshold device does not conduct at all until the capacitor voltage reaches its threshold (trigger) voltage. It then increases heavily its conductance in an avalanche-like manner because of the inherent positive feedback, which quickly discharges the capacitor. When the voltage across the capacitor drops to some lower threshold voltage, the device stops conducting and the capacitor begins charging again, and the cycle repeats ad infinitum.
If the threshold element is a neon lamp, the circuit also provides a flash of light with each discharge of the capacitor. This lamp example is depicted below in the typical circuit used to describe the Pearson–Anson effect. The discharging duration can be extended by connecting an additional resistor in series to the threshold element. The two resistors form a voltage divider; so, the additional resistor has to have low enough resistance to reach the low threshold.
Alternative implementation with 555 timer
A similar relaxation oscillator can be built with a 555 timer IC (acting in astable mode) that takes the place of the neon bulb above. That is, when a chosen capacitor is charged to a design value, (e.g., 2/3 of the power supply voltage) comparators within the 555 timer flip a transistor switch that gradually discharges that capacitor through a chosen resistor (which determine the RC time constant) to ground. At the instant the capacitor falls to a sufficiently low value (e.g., 1/3 of the power supply voltage), the switch flips to let the capacitor charge up again. The popular 555's comparator design permits accurate operation with any supply from 5 to 15 volts or even wider.
Other, non-comparator oscillators may have unwanted timing changes if the supply voltage changes.
Inductive oscillator
frame|Basis of solid-state Blocking oscillator
A blocking oscillator using the inductive properties of a pulse transformer to generate square waves by driving the transformer into saturation, which then cuts the transformer supply current until the transformer unloads and desaturates, which then triggers another pulse of supply current, generally using a single transistor as the switching element.
Comparator–based relaxation oscillator
Alternatively, when the capacitor reaches each threshold, the charging source can be switched from the positive power supply to the negative power supply or vice versa. The earlier inverting Schmitt trigger animated example operates on the same principle (since the Schmitt trigger internally performs comparison). This section will analyze a similar implementation using a comparator as a discrete component.
thumb|A comparator-based hysteretic oscillator.
This relaxation oscillator is a hysteretic oscillator, named this way because of the hysteresis created by the positive feedback loop implemented with the comparator (similar to an operational amplifier). A circuit that implements this form of hysteretic switching is known as a Schmitt trigger. Alone, the trigger is a bistable multivibrator. However, the slow negative feedback added to the trigger by the RC circuit causes the circuit to oscillate automatically. That is, the addition of the RC circuit turns the hysteretic bistable multivibrator into an astable multivibrator.
General concept
The system is in unstable equilibrium if both of the inputs and the output of the comparator are at zero volts. The moment any sort of noise, be it thermal or electromagnetic noise brings the output of the comparator above zero (the case of the comparator output going below zero is also possible, and a similar argument to what follows applies), the positive feedback in the comparator results in the output of the comparator saturating at the positive rail.
In other words, because the output of the comparator is now positive, the non-inverting input to the comparator is also positive, and continues to increase as the output increases, due to the voltage divider. After a short time, the output of the comparator is the positive voltage rail, <math>V_{DD}</math>.
thumb|Series RC Circuit
The inverting input and the output of the comparator are linked by a series RC circuit. Because of this, the inverting input of the comparator asymptotically approaches the comparator output voltage with a time constant RC. At the point where voltage at the inverting input is greater than the non-inverting input, the output of the comparator falls quickly due to positive feedback.
This is because the non-inverting input is less than the inverting input, and as the output continues to decrease, the difference between the inputs gets more and more negative. Again, the inverting input approaches the comparator's output voltage asymptotically, and the cycle repeats itself once the non-inverting input is greater than the inverting input, hence the system oscillates.
Example: Differential equation analysis of a comparator-based relaxation oscillator
thumb|300px|Transient analysis of a comparator-based relaxation oscillator.
<math> V_+</math> is set by <math> V_\text{out}</math> across a resistive voltage divider:
<math display="block">V_+ = \frac{V_\text{out{2}</math>
<math> V_-</math> is obtained using Ohm's law and the capacitor differential equation:
<math display="block">\frac{V_\text{out}-V_-}{R} = C\frac{dV_-}{dt}</math>
Rearranging the <math> V_-</math> differential equation into standard form results in the following:
<math display="block">\frac{dV_-}{dt}+\frac{V_-}{RC}=\frac{V_\text{out{RC}</math>
Notice there are two solutions to the differential equation, the driven or particular solution and the homogeneous solution. Solving for the driven solution, observe that for this particular form, the solution is a constant. In other words, <math>\, \! V_-=A</math> where A is a constant and <math>\frac{dV_-}{dt}=0</math>.
<math display="block">\frac{A}{RC}=\frac{V_\text{out{RC}</math>
<math display="block"> A=V_\text{out}</math>
Using the Laplace transform to solve the homogeneous equation <math>\frac{dV_-}{dt}+\frac{V_-}{RC}=0</math> results in
<math display="block">V_-=Be^{\frac{-1}{RC}t}</math>
<math> V_-</math> is the sum of the particular and homogeneous solution.
<math display="block">V_- = A+Be^{\frac{-1}{RC}t}</math>
<math display="block">V_- = V_\text{out}+Be^{\frac{-1}{RC}t}</math>
Solving for B requires evaluation of the initial conditions. At time 0, <math>V_\text{out}=V_{dd}</math> and <math> V_-=0</math>. Substituting into our previous equation,
<math display="block"> 0 = V_{dd}+B</math>
<math display="block"> B = -V_{dd}</math>
Frequency of oscillation
First let's assume that <math>V_{dd} = -V_{ss}</math> for ease of calculation. Ignoring the initial charge up of the capacitor, which is irrelevant for calculations of the frequency, note that charges and discharges oscillate between <math>\frac{V_{dd{2}</math> and <math>\frac{V_{ss{2}</math>. For the circuit above, V<sub>ss</sub> must be less than 0. Half of the period (T) is the same as time that <math>V_\text{out}</math> switches from V<sub>dd</sub>. This occurs when V<sub>−</sub> charges up from <math>-\frac{V_{dd{2}</math> to <math>\frac{V_{dd{2}</math>.
<math display="block">V_- = A+Be^{\frac{-1}{RC}t}</math>
<math display="block">\frac{V_{dd{2}=V_{dd}\left(1-\frac{3}{2}e^{\frac{-1}{RC}\frac{T}{2\right)</math>
<math display="block">\frac{1}{3}=e^{\frac{-1}{RC}\frac{T}{2</math>
<math display="block">\ln\left(\frac{1}{3}\right)=\frac{-1}{RC}\frac{T}{2}</math>
<math display="block"> T=2\ln(3)RC</math>
<math display="block"> f=\frac{1}{2\ln(3)RC}</math>
When V<sub>ss</sub> is not the inverse of V<sub>dd</sub> we need to worry about asymmetric charge up and discharge times. Taking this into account we end up with a formula of the form:
<math display="block">T = (RC) \left[\ln\left( \frac{2V_{ss}-V_{dd{V_{ss\right) + \ln\left( \frac{2V_{dd}-V_{ss{V_{dd \right) \right]</math>
Which reduces to the above result in the case that <math>V_{dd} = -V_{ss}</math>.
See also
- Multivibrator
- FitzHugh–Nagumo model – A hysteretic model of, for example, a neuron.
- Schmitt trigger – The circuit on which the comparator-based relaxation oscillator is based.
- Unijunction transistor – A transistor capable of relaxation oscillations.
- Robert Kearns – Used relaxation oscillator in intermittent wiper patent dispute.
- Limit cycle – Mathematical model used to analyze relaxation oscillations
