# Function generators: Basics

:
A function generator is described with frequency settable digitally using two thumbwheel switches. The advantage is that at low frequencies, one does not have to measure the frequency as it is assured to be the set value within specified limits. [How do you measure and display a low frequency such as 0.73Hz??] (This function generator is in vsv·s designs folder in circuit maker)
V1 12 +V

S1 S2

R3 12.5k R4 25k R5 50k R6 100k

CMD1 C1 0V 28.4n .IC

+ U1 LF353 R2 2k 50%

R1 9k

+

U2 LM318 R12 1k

S3

R11 11.4k D1 1N751 D2 1N751

S4

V2 -12 +V S5 S6 R10 125k R9 250k R8 500k R7 1meg

S7

S8

Question1. How is the triangle wave generated? Answer: Triangle wave is generated by integrating square wave by U1 (LF353). Interestingly square-wave is generated by Schmitt trigger circuit formed using U2 (LM318) whose input is triangle wave. Complete circuit of U1 and U2 is connected such a way to form positive feedback which each other which continuously oscillate after power on transient.

552m Yd:-5.Xa: 2. Assuming that U1 output oscillate between +/-5V.778 X: 0. input at U2 + input reaches almost near zero. so rise time of square wave is 0.5.733 Offsets A B 6 Xb: 1.46m 2.75V.33m 1.83m 3.4nF=617.71m 2.000 a c 4 2 0 -2 -4 -6 960u d 1.08m 2. (fine tuning can be done by POT-R2).4nF). Hysteresis near zero is formed by R1.1 c-d: 11. Square wave is generated of same frequency by making sure that whenever input triangle waveform reaches to peak voltages.4usec or 400nsec. Question2. (Output of U2 is clamped to +/. Time required to change U1 output voltage for half of triangle period = 10V/5.LM318V.248m freq: 801. Data sheet gives minimum slew rate as 50V/usec.8V/(12.R2 and R11.000 b a-b: 1.345usec)= 809Hz.800m Yc: 5.75V*12. What is the rise time of square wave? Answer: Rise time of square wave is limited by slew rate of U2.51 Y: 0.75V by diode D1 and D2) Rate of rise of U1 output voltage (V/sec) = 5.21m Ref=Ground X=375u/Div Y=voltage 178% Frequency of triangle and square wave are decided by R10 and C1. Question3.5K*28.35usec Frequency of triangle wave = 1/(2*617.5K*28. How is sine obtained? What is its distortion? . Let s assume that thumbwheel switch position is 80. Input peak voltage applied to U1 though R10 is 5. Output of U2 will be changing within +/-10V saturation levels.

7V= 5.Answer: Sine is obtained by a non linear stage that reduces the gain at high amplitudes and finally clipping the triangle wave during its peak values.8 R f =Grou d X=1.686 Offs t s Xb: 11.685 Yc: 2.1V+0.26 8.000 ¡£             ¢     fr q : 109.9/(200+90. before applying to clipping network.21 5.000 a-b:-9.69 d 4. The triangle to sine converter part is as shown below: R14 10k 12 R13 10k V5 -5/5V + U3 R15 200 LM318 100 Hz V2 +V -12 D3 1N4728 D4 1N4728 R16 1k D5 1N4733 D6 1N4733 R17 100 D7 V3 5.D6).7V= 4V.84 Yd:-2. The non-linear gain network is formed by zener diodes 1N4728.3.600 Y: 0.53 /Div Y=volta 166 First clipping will happen when U3 output reaches at around 3.2K.9 A B a 12 8 4 0 -4 -8 -12 2. Second clipping will happen when U3 output reaches at around 5.5.8V.1V (D5.9)   ¤   ¡ Xa: 2.74 7.79 10.D4) and 1N4733.9 +V D8 V4 +V -5.157 c-d: 5.3 11. Note that triangle wave is buffered by gain of 2 U3.914 X: 0.3V +0. the attenuation gain here is = 90.3V (D3. the attenuation gain here is = 1K/1.2 ¡   ¡ ¡ b c .

If its amplitude increases. Relative phase shift of sine and square? Answer: 90 degree. So perhaps using LM318. due to inverting gain for triangular wave generation.. sine and triangle? (Preferably equal amplitude. one can get higher frequencies. I should learn this technique. Question 8. I can think what generally done in dc-dc PWM controller Ics. How to modify to be able to offset the output. Question4. How does one provide an auxiliary TTL output. summed with required offset value which can be derived connecting POT between +/12V power supply. output will saturate to either plus or minus power supply depending upon the average value of square wave is negative or positive respectably. Question 5. in which triangular wave is compared to variable DC value to generate variable duty cycle square wave.Distortion can be determined by doing Fourier analysis of measured waveform. the triangle to sine converter puts out a sine wave with higher distortion. Question 6. What limits frequency to 10kHZ?? Answer: Slew rate of LF353. Answer: This can be done by using three additional opamp used as summing amplifier using inverting configuration. Question 7. Can you add one?? . selectable as square. I do not know how to do this using circuit maker. with sine wave leading. upto say 100kHz. Beyond that one has to take extra care regarding delays in switching etc to ensure that the triangular waveform has constant amplitude. What happens to sine and Answer: Definitely variable duty cycle square-wave cannot be used to generate triangle-wave using integrator circuit of U1. because of high DC gain of integrator circuit. Question 9. How does one get Rout as 50 ohms for sine and triangle? This can be obtained by placing a 50ohms in series with an amplifier whose output resistance is known to be <<50 ohms. triangle?? How one can change the square to have variable duty ratio. This can be done using a separate comparator such as LM 339.

One last question: I have a generator that has an output resistance of 50ohms (or 600 ohms) and provides 20Vpp output.1Hz to 10kHz .4n + U1 R2 2k 50% R1 9k + U2 LM318 R12 1k S3 LF353 R11 11.9 D7 +V S4 R14 10k S5 S6 R10 125k R9 250k R8 500k R7 1meg R13 10k + U3 R15 200 LM318 S7 V2 +V -12 D8 D3 1N4728 D4 1N4728 R16 1k D5 1N4733 D6 1N4733 R17 100 V4 +V -5.5k R4 25k R5 50k R6 100k C1 28.4k D1 1N751 D2 1N751 V3 5. What is the solution?? The function generator: V1 12 +V S1 S2 R3 12. I need to get 2V pp output with 50 ohms (0r 600 ohms) as source resistance.9 S8 A settable function generator for 0.