Signal generator refers to the instrument that produces the electrical test signal of the required parameters. The circuit form can be composed of operational amplifier and separation elements, and can also use single chip integrated function generator. It has a wide range of applications in production practice and scientific and technological fields. At present, some standard products are widely used. Although they have complete functions and high performance indexes, they are expensive and have many functions that cannot be used. The four operational amplifier LM324 with differential input is used as the core device. Sine wave is generated by RC bridge oscillation circuit, square wave is generated by zero crossing comparator, and triangle wave is generated by integral 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.
1. Determination of overall scheme
There are many schemes for waveform generation and transformation. Here, the scheme of sine wave → square wave → triangular wave as shown in Figure 1 is adopted. The sine wave is generated by RC bridge oscillation circuit, which is characterized by stable amplitude and frequency and easy adjustment, and can generate sinusoidal signal with very low frequency; Then the square wave is generated by the zero crossing comparator, and the triangle wave is generated by the RC integral circuit. The frequencies of the three signals are the same.
The circuit structure is simple, and can generate good sine wave and square wave signal, but it is difficult to generate synchronous triangular wave signal through integral circuit. The reason is that if the time constant of the integrating circuit is constant, the amplitude of the triangle wave will change with the change of the frequency of the square wave signal. In order to keep the output amplitude of the triangular wave unchanged and the linearity good, the magnitude of the integration time constant must be changed at the same time.
The frequency of the signal is determined by the RC frequency selection network of the sinusoidal oscillation circuit. Because of the wide frequency range, the frequency selection network uses three groups of capacitors with different capacities to form three frequency bands, which are selected by the band switch, and then the coaxial potentiometer is used to adjust the oscillation frequency. The three waveforms can be selected through a gear switch, and then output independently through the amplitude adjusting potentiometer to achieve the purpose of selecting signal and adjusting amplitude.
2. Design of cell circuit
2.1 sine wave generating circuit
Sine wave generating circuit is not only to produce the required output sine signal, 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 2, which is composed of two parts: amplification link and frequency selection network. The operational amplifier is the core of the amplifier, and the RC series parallel frequency selection network is composed of resistor R1 and capacitor C1 in series and resistor R2 and capacitor C2 in parallel. At the same time, the frequency selection network is a positive feedback circuit, which provides zero phase shift and forms a in-phase amplifier. R3 and R4 are deep negative feedback to obtain a good output waveform. If R1 = R2 = R, C1 = C2 = C, then the center frequency of the network is fo = 1 / (2) π RC）。 When the circuit works at this frequency, the feedback coefficient is the largest and | f | max = 1 / 3. According to the oscillation conditions, the voltage gain of the amplifier circuit should be at least 3a | (r4r3) / R4 |. Therefore, in order to ensure the circuit vibration, R3 | 2R4 is required.
In practical application, in order to adjust the frequency and the gain of the amplifier, the circuit shown in Figure 3 can be used. Among them, r3-r5 and diodes D1 and D2 constitute negative feedback network and amplitude stabilization link. By adjusting rv3, the feedback coefficient of negative feedback can be changed, so that the voltage gain of amplifier circuit can be adjusted to meet the replication condition of oscillation.
In view of the large span of signal frequency from 20Hz to 20kHz, two groups of three capacitors with 10 times capacity difference and two coaxial potentiometers are used to adjust. Different capacitors are selected as the coarse tuning of the oscillation frequency fo, and the coaxial potentiometer is used to realize the fine tuning of fo. The resistance values corresponding to different capacitance and oscillation frequency fo are shown in Table 1.
It can be seen from table 1 that each combination of capacitor and resistor can adjust a certain range of frequency, and the three ranges are crossed, so the frequency can be continuously adjustable. In order to generate 200hz-2khz signal, the capacitance can be set at 33nF, and rv1 and RV2 can be adjusted at the same time to make the resistance value of R1 and R2 in series at 24K Ω～ 2．4k Ω There is no change between them.
2.2 square wave generating circuit
The square wave generation circuit is relatively simple. The inverse input end of the operational amplifier LM324 is grounded, and the in-phase input end is connected with the output end of the sine wave generation circuit to form a zero crossing comparator, as shown in Figure 4.
When the input sine signal sin changes between positive and negative half cycle, the output is square wave signal squ with fixed amplitude and in phase with sine wave.
2.3 triangle wave generating circuit
The potentiometer Rv4 can adjust the amplitude of the output signal by selecting the band switch (the switch should be synchronized with the band switch of the frequency selective network) to change the integration time constant of different band circuits. In order to obtain good linear triangular wave, resistor R8 is used for negative feedback limiting, and the time constant of integrator circuit should be kept constant when selecting component parameters τ= RC is greater than half of the period of the square wave signal (the width of the square wave). If the signal frequency is 100Hz, the width of the square wave is 0.005s, if C = 1 μ F. Then r > 5K Ω。
3. Circuit simulation and test
In Proteus, draw the circuits of each part as shown in Fig. 3 to Fig. 5, connect the three parts according to the relationship shown in Fig. 1, connect the output end of each part of the circuit to the virtual oscilloscope, and then start the simulation, and the simulation waveform shown in Fig. 6 can be observed. The drawing and Simulation of schematic diagram in Proteus are shown in the literature. In the process of simulation, there are several problems need to pay attention to: according to the theoretical calculation, the sine wave generation circuit can start to vibrate when the gain of the amplifier is greater than 3, but sometimes it will not start to vibrate in the actual simulation process, so it can be solved by adding disturbance into the power supply, such as – 9V power supply in Figure 3, see the literature for details. To change the frequency band,
The three groups of capacitors must be changed at the same time, otherwise they will not vibrate or the waveform will be distorted. The potentiometer rv1 and RV2 should be adjusted to the same resistance value. Adjust rv3 to make the output sine wave amplitude reach the maximum undistorted state. Rv4 can adjust the output triangle wave amplitude. Through the experimental test of the circuit, three ideal waveforms can be observed on the oscilloscope. It should be noted that: switch SW1, SW2, SW3 should use more than one 3 groups of 3-bit band switch. Rv1 and RV2 are adjusted by coaxial potentiometer. The three kinds of output signals can be output in parallel at the same time, or separately through a selection switch and potentiometer (to make the signal amplitude adjustable). In addition, there is no need to add disturbance to the power supply during the actual test.
Proteus is a kind of physical simulation software which integrates circuit design, analysis, simulation, plate making and other functions. After design simulation with Isis of Proteus, the design result data can be directly imported into ares of Proteus to further design PCB. Therefore, the efficiency and quality of circuit design are improved through proteus simulation technology. LM324 is a low-cost four operational amplifier. The low-frequency signal generator designed with LM324 as the core device has the advantages of simple circuit, stable waveform, economic and practical, easy to use and so on. It can output sine wave, square wave and triangle wave signals commonly used in experimental test, and the frequency and amplitude of the signal can be adjusted. The signal generator can be used for teaching experiment demonstration and amateur production test.
Editor in charge: GT