LM324

The LM324 is a quad general-purpose operational amplifier made by Texas Instruments. It packs four independent amplifiers into a single 14-pin package and runs from a single supply of 3 to 32 V or a split supply of ±1.5 to ±16 V. Its input range extends down to the negative rail, which simplifies single-supply designs. Power consumption is low and the bandwidth is roughly 1 MHz, more than enough for low-frequency applications like this oscillator.

This circuit uses only one of the four amplifiers (U1, pins 1-2-3). The remaining three are available for other tasks or should have their inputs tied to ground to prevent spurious oscillation.

How the circuit works

The circuit is a classic astable oscillator that produces a square wave at the output Vo by exploiting the op-amp’s positive feedback. It needs just five components: one amplifier (U1), four resistors (R1–R4) and one capacitor (C).

Positive feedback (R4). Resistors R2 and R3, both 100 kΩ, form a voltage divider between V+ and ground, while R4 (100 kΩ) connects the output Vo to the non-inverting input (+). The three equal resistors set the (+) input at (V+ + Vo)/3. When the output is high (≈ V+), the (+) input sits at V+×2/3; when the output is low (≈ 0 V), the (+) input drops to V+×1/3. This network sets the oscillator’s switching thresholds.

Timing (R1-C). Capacitor C (0.01 µF) charges and discharges through R1 (100 kΩ), which is connected between the output and the inverting input (−). The voltage at (−) follows an exponential rising toward V+ or falling toward 0 V depending on the output state.

Oscillation cycle. Assume the output starts high:

  1. C charges through R1 toward V+. The voltage at (−) rises.
  2. When the voltage at (−) exceeds the (+) threshold (V+×2/3), the amplifier switches: the output goes low.
  3. Now C discharges through R1 toward 0 V. The voltage at (−) falls.
  4. When the voltage at (−) drops below the new (+) threshold (V+×1/3), the amplifier switches back to high.

The process repeats indefinitely, producing a square wave at Vo.

Application design

Oscillation frequency

The frequency depends on R1, C and the thresholds set by R2, R3 and R4. With all three resistors equal, the thresholds sit at V+/3 and 2V+/3, and the frequency is approximately:

f0.72R1Cf \approx \frac{0.72}{R_1 \cdot C}

With the schematic values (R1=100kΩR_1 = 100\,\text{k}\Omega, C=0.01μFC = 0.01\,\mu\text{F}):

f0.72100×1030.01×106720Hzf \approx \frac{0.72}{100 \times 10^{3} \cdot 0.01 \times 10^{-6}} \approx 720\,\text{Hz}

Adjusting the frequency

To change the frequency, modify R1 or C:

f1R1Cf \propto \frac{1}{R_1 \cdot C}

Doubling R1 or C halves the frequency. Replacing C with 0.1 µF lowers it to roughly 72 Hz; using 1 nF raises it to about 7.2 kHz. The practical range is limited by the LM324’s bandwidth (~1 MHz) and slew rate (~0.5 V/µs), which rounds off the edges at higher frequencies.

Duty cycle

With the symmetric thresholds at V+/3 and 2V+/3, both half-cycles have the same duration and the duty cycle is ideally 50 %. In practice the LM324’s output does not reach exactly V+ or 0 V, which introduces a slight asymmetry. If a precise square wave is needed, consider a rail-to-rail output op-amp or a dedicated comparator.

Power consumption

The LM324 draws a typical quiescent current of about 375 µA per amplifier. The oscillator circuit adds the current through the R2-R3 divider and R4, which at 100 kΩ and a 5 V supply is on the order of 50 µA per branch. Total circuit consumption stays below 1 mA at 5 V, making it suitable for battery-powered applications.

Other applications

Beyond the square wave oscillator described here, the LM324 is used in a wide variety of analog circuits:

  • Voltage comparator. The same topology without the timing capacitor: the amplifier compares two voltages and outputs high or low.
  • Instrumentation amplifier. Combining two or three of the four internal amplifiers to measure small differential signals with high input impedance.
  • Active filters. Low-pass, high-pass or band-pass for signal conditioning in sensors, audio or control loops.
  • Triangle wave generator. Adding an integrator stage after the square wave oscillator produces a triangular ramp.
  • Simple linear regulator. As the error amplifier in low-power regulated supplies.