Home  324

Jul 7 2020

LM324 Function Generator: Circuit Simulation and Test

I Introduction

1.1 What is LM324?

LM324 is a low-cost quad-operational amplifier.

The low-frequency signal generator designed with it as the core device has the advantages of simple circuit, stable waveform, economical and practical, and easy to use. It can output the sine wave, square wave and triangle wave signals commonly used in experimental testing. And the frequency and amplitude of the signal can be adjusted.

Figure 1. LM324 Quad-Operational Amplifiers

Figure 1. LM324 Quad-Operational Amplifiers

1.2 What is Wave Generator?

The wave generator refers to an instrument that generates electrical test signals with the required parameters. The circuit form can be composed of op-amps and discrete components, or a single-chip integrated function generator. It is widely used in production practice and technology. Some standard products that are widely used at present, although they have complete functions and high-performance indicators, are more expensive and have many functions that are not available.

1.3 Wave Generator Using LM324

In this blog, quad-operational amplifiers with differential input LM324 are used as the core device, a sine wave is generated by an RC bridge oscillation circuit, then a square wave is generated by a zero-crossing comparator, and a triangular wave is generated by an integrating circuit.

Through Proteus software simulation and simulation experiment, the ideal waveform of 20Hz~20kHz is obtained, and the frequency and amplitude of the signal can be adjusted.

Catalog

I Introduction

1.1 What is LM324?

1.2 What is Wave Generator?

1.3 Wave Generator Using LM324

II How to Generate and Transform Wave

III Design of Unit Circuit

3.1 Sine Wave Generating Circuit

3.2 Square Wave Generating Circuit

3.3 Triangle Wave Generating Circuit

IV Circuit Simulation and Test

II How to Generate and Transform Wave

There are many schemes for waveform generation and transformation. Here, the sine wave→square wave→triangle wave scheme shown in Figure 2 is used. Among them, the sine wave is generated by the RC bridge oscillation circuit, which is characterized by stable amplitude and frequency and easy adjustment, and can generate a sine signal with a very low frequency; then a zero-crossing comparator is used to generate a square wave, and then an RC integration circuit is used to generate a triangular wave. This signal has the same frequency.

This circuit has a simple structure and can produce good sine and square wave signals, but it is difficult to generate a synchronized triangular wave signal through an integration circuit. The reason is that if the time constant of the integration circuit does not change, the amplitude of the output triangle wave changes at the same time as the frequency of the square wave signal changes. To keep the triangle wave output amplitude unchanged and good linearity, the integration time constant must be changed at the same time.

Figure 2. Wave Generation and Transformation

Figure 2. Wave Generation and Transformation

The frequency of the signal is determined by the RC frequency selection network of the sinusoidal oscillation circuit. Due to the large frequency range, the frequency selection network uses three sets of capacitors with different capacities to form three frequency bands, which are selected by the band switch, and then the coaxial potentiometer adjusts the oscillation frequency. Three kinds of waveforms can be selected through a gear switch, and then output independently through the amplitude adjustment potentiometer to achieve the purpose of signal selection and amplitude adjustment.

III Design of Unit Circuit

3.1 Sine Wave Generating Circuit

The sine wave generating circuit should not only generate the sine signal of the required output, but also the input signal of the following circuit. This part of the circuit uses a typical RC bridge sine wave oscillation circuit, as shown in Figure 3, it consists of two parts of the amplification link and frequency selection network. The operational amplifier is the core to form the amplification link. The network composed of resistor R1 and capacitor C1 in series, resistor R2 and capacitor C2 in parallel is the RC series-parallel frequency selection network. The frequency selection network is also a positive feedback circuit, providing zero phase shift and forming an in-phase amplifier. R 3 and R 4 are deep negative feedbacks to obtain a good output waveform. If R1 = R2 = R, C1 = C2 = C, then the center frequency of the frequency selection network is f0 = 1/( 2π RC ). When the circuit works at this frequency, the feedback coefficient is the largest and is | F |max = 1/3. According to the oscillation conditions, the voltage gain of the amplifier circuit should be at least 3A | (R4 + R3) / R4|. Therefore, in order to ensure the oscillation of the circuit, R 3> 2R 4 is required.

Figure 3. RC Bridge Oscillation Circuit

Figure 3. RC Bridge Oscillation Circuit

In practical applications, in order to adjust the frequency and the gain of the amplifier, the circuit shown in Figure 4 can be used. Among them: R3 ~ R5 and diodes D1, D2 form a negative feedback network and amplitude stabilization link. Adjusting RV3 can change the feedback coefficient of negative feedback, thereby adjusting the voltage gain of the amplifier circuit to meet the replication conditions of oscillation.

Figure 4. RC Oscillation Simulation Circuit

Figure 4. RC Oscillation Simulation Circuit

In view of the large span of the signal frequency from 20Hz to 20kHz, two groups of three capacitors each with a capacity of 10 times different and two coaxial potentiometers are used for adjustment. Choose different capacitors as the coarse adjustment of the oscillation frequency f0, and use the coaxial potentiometer to achieve the fine adjustment of f0. The resistance values corresponding to different capacitances and oscillation frequencies f0 are shown in Table 1.

Table 1. Correspondence between Oscillation Frequency f0 and Resistance & Capacitance

Table 1. Correspondence between Oscillation Frequency f0 and Resistance & Capacitance

It can be seen from Table 1 that each combination of capacitance and resistance can adjust a certain range of frequencies, and these three ranges have intersections, so the frequency can be continuously adjusted. If you want to generate a 200 Hz to 2 kHz signal, you can set the capacitor to 33 nF, and then adjust RV1 and RV2 to make the resistance in series with R1 and R2 change between 24 kΩ and 2.4 kΩ.

3.2 Square Wave Generating Circuit

The square wave generating circuit is relatively simple. The inverting input of the operational amplifier LM324 is grounded. The non-inverting input is connected to the output of the sine wave generating circuit to form a zero-crossing comparator, as shown in Figure 5.

Figure 5. Square Wave Generating Circuit

Figure 5. Square Wave Generating Circuit

When the input sinusoidal signal sin changes between positive and negative half cycles, the output is a square wave signal squ with a fixed amplitude and in phase with the sine wave.

3.3 Triangle Wave Generating Circuit

The triangular wave generating circuit adopts the RC integrating circuit shown in Figure 6, which is composed of the operational amplifier U1: C, C 3/C 3′/C 3″, R7 and RV4.

Figure 6. Triangle Wave Generating Circuit

Figure 6. Triangle Wave Generating Circuit

The square wave signal squ is connected to the inverting input terminal of the amplifier through R7 and RV4, and the output signal is the triangular wave trii generated by the integral transformation of the RC circuit composed of R7, RV4 and C3 / C3 ′ / C3 ″. C3, C3 ′, C3 ″ are selected by the band switch (this switch should be synchronized with the band switch of the selected frequency network) to change the integral time constant of the circuit in different frequency bands. Potentiometer RV4 can adjust the amplitude of the output signal. In order to obtain a triangular wave with good linearity, resistor R8 is used for negative feedback limiting, and when selecting the component parameters, the time constant of the integrating circuit τ = RC should be greater than half the period of the square wave signal (the width of the square wave). If the signal frequency is 100 Hz, the width of the square wave is 0.005 s. If C = 1 μF, then R> 5 kΩ.

IV Circuit Simulation and Test

Draw each part of the circuit shown in Figure 4 to Figure 6 in Proteus. The three parts of the circuit are connected according to the relationship shown in Figure 2. Then connect the output of each part of the circuit to the virtual oscilloscope and then start the simulation. You can observe simulation waveform in Figure 7. In the simulation process, there are several issues that need to be noted: According to theoretical calculations, the sine wave generation circuit can start to vibrate when the amplifier gain is greater than 3, but sometimes the phenomenon of no vibration occurs in the actual simulation process.

Disturbance is added to solve it, as shown in Figure 4, -9V power supply, see the literature for details. To change the frequency band, the three groups of capacitors C1 / C1 ′ / C1 ″, C2 / C2 ′ / C2 ″, C3 / C3 ′ / C3 ″ must be changed at the same time, otherwise there will be no vibration or The waveform is distorted. Potentiometers RV1 and RV2 should be adjusted to the same resistance. Adjust RV3 to make the output sine wave amplitude reach the maximum undistorted state. RV4 can adjust the amplitude of the output triangle wave. Through experimental testing of the circuit, in Three ideal waveforms can be observed on the oscilloscope. It should be noted that: switches SW1, SW2, and SW3 should use a 3-position switch with more than 3 groups. RV1, RV2 use coaxial potentiometers for adjustment. The output signal can be output in parallel at the same time, or it can be output separately through a potentiometer (to make the signal amplitude adjustable) through a selection switch. In addition, the power supply does not need to be disturbed during actual testing.

Figure 7. Simulation Waveform Obtained in Proteus

Figure 7. Simulation Waveform Obtained in Proteus

After reading this blog, do you have a better understanding of LM324? If you have any thoughts about LM324, please don't hesitate to let us know in the comments section!

Related Articles

  • Difference between LM324 Op Amp and Other Similar Models
    I IntroductionThis blog mainly discusses the difference between LM324 and LM324A, and whether they can replace each other in the circuit. Difference between LM324 and other models like LM741, LM358, L...
  • LM324 Op Amp: Detailed Analysis of 10 Simple Circuits
    I IntroductionThe LM324 is widely used in various circuits, that is because, the LM324 quad op-amp has a wide range of power supply voltage, small static power consumption, can be used with a single p...
  • LM324 Op Amp: A Basic Overview
    DescriptionLM324 is a operational amplifier (OP-AMP) that require a battery or single-polarity supply. Compared to the standard operational amplifier type, it has several obvious advantages in single-...

0 comment

Leave a Reply

Your email address will not be published.

 
 
   
Rating: