Function_generator

6
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) .IC CMD1 0V + U1 LF353 R2 2k 50% + U2 LM318 +V V1 12 +V V2 -12 C1 28.4n S1 S2 S3 S4 S5 S6 S7 S8 D1 1N751 D2 1N751 R1 9k R3 12.5k R4 25k R5 50k R6 100k R7 1meg R8 500k R9 250k R10 125k R11 11.4k R12 1k 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.

Transcript of Function_generator

Page 1: Function_generator

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)

.IC

CMD10V

+ U1

LF353R2

2k 50%

+

U2LM318

+V

V112

+VV2-12

C128.4n

S1

S2

S3

S4

S5

S6

S7

S8

D11N751D2

1N751

R1

9k

R312.5k

R425k

R550k

R6100k

R71meg

R8500k

R9250k

R10125k

R1111.4k

R121k

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.

Page 2: Function_generator

960u 1.33m 1.71m 2.08m 2.46m 2.83m 3.21m-6

-4

-2

0

2

4

6

Xa: 2.800m Xb: 1.552mYc: 5.733 Yd:-5.778

a-b: 1.248mc-d: 11.51

freq: 801.1

X: 0.000 Offsets Y: 0.000 Offsets

Ref=Ground X=375u/Div Y=voltage 178%

d

cb a

A

B

Frequency of triangle and square wave are decided by R10 and C1. Let’s assume that thumbwheel switch position is 80.

Input peak voltage applied to U1 though R10 is 5.75V. (Output of U2 is clamped to +/- 5.75V by diode D1 and D2)

Rate of rise of U1 output voltage (V/sec) = 5.8V/(12.5K*28.4nF).

Assuming that U1 output oscillate between +/-5V, Time required to change U1 output voltage for half of triangle period = 10V/5.75V*12.5K*28.4nF=617.35usec

Frequency of triangle wave = 1/(2*617.345usec)= 809Hz. (fine tuning can be done by POT-R2).

Square wave is generated of same frequency by making sure that whenever input triangle waveform reaches to peak voltages, input at U2 + input reaches almost near zero. Hysteresis near zero is formed by R1,R2 and R11.

Question2. What is the rise time of square wave?

Answer: Rise time of square wave is limited by slew rate of U2,LM318V. Data sheet gives minimum slew rate as 50V/usec. Output of U2 will be changing within +/-10V saturation levels, so rise time of square wave is 0.4usec or 400nsec.

Question3. How is “sine” obtained? What is its distortion?

Page 3: Function_generator

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. The non-linear gain network is formed by zener diodes 1N4728,3.3V (D3,D4) and 1N4733,5.1V (D5,D6). Note that triangle wave is buffered by gain of 2 U3, before applying to clipping network.

The triangle to sine converter part is as shown below:

100 Hz

V5-5/5V

12

D61N4733

D51N4733

D41N4728

D31N4728

+

U3

LM318

+VV2-12

D7

D8

+V

V35.9

+VV4

-5.9

R17100

R161k

R15200

R1410k

R1310k

2.69m 4.21m 5.74m 7.26m 8.79m 10.3m 11.8m-12

-8

-4

0

4

8

12

Xa: 2.685m Xb: 11.84mYc: 2.686 Yd:-2.914

a-b:-9.157mc-d: 5.600

freq: 109.2

X: 0.000 Offsets Y: 0.000 Offsets

Ref=Ground X=1.53m/Div Y=voltage 166%

d

c

baA

B

First clipping will happen when U3 output reaches at around 3.3V +0.7V= 4V, the attenuation gain here is = 1K/1.2K.

Second clipping will happen when U3 output reaches at around 5.1V+0.7V= 5.8V, the attenuation gain here is = 90.9/(200+90.9)

Page 4: Function_generator

Distortion can be determined by doing Fourier analysis of measured waveform, I do not know how to do this using circuit maker. I should learn this technique.

Question4. Relative phase shift of sine and square?

Answer: 90 degree, with sine wave leading, due to inverting gain for triangular wave generation.

Question 5. How to modify to be able to “offset” the output, selectable as square, sine and triangle? (Preferably equal amplitude..

Answer: This can be done by using three additional opamp used as summing amplifier using inverting configuration, summed with required offset value which can be derived connecting POT between +/-12V power supply.

Question 6. How one can change the square to have variable duty ratio. What happens to sine and triangle??

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, output will saturate to either plus or minus power supply depending upon the average value of square wave is negative or positive respectably.

I can think what generally done in dc-dc PWM controller Ics, in which triangular wave is compared to variable DC value to generate variable duty cycle square wave.

Question 7. What limits frequency to 10kHZ??

Answer: Slew rate of LF353.

So perhaps using LM318, one can get higher frequencies, 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. If its amplitude increases, the triangle to sine converter puts out a sine wave with higher distortion.

Question 8. 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.

Question 9. How does one provide an auxiliary TTL output.

This can be done using a separate comparator such as LM 339. Can you add one??

Page 5: Function_generator

One last question: I have a generator that has an output resistance of 50ohms (or 600 ohms) and provides 20Vpp output. I need to get 2V pp output with 50 ohms (0r 600 ohms) as source resistance. What is the solution??

The function generator:

+VV4

-5.9

+V

V35.9

D8

D7

+ U1

LF353R2

2k 50%

+

U2LM318

+V

V112

+VV2-12

C128.4n

S1

S2

S3

S4

S5

S6

S7

S8

D11N751D2

1N751

+

U3

LM318

D31N4728

D41N4728

D51N4733D6

1N4733

R1

9k

R312.5k

R425k

R550k

R6100k

R71meg

R8500k

R9250k

R10125k

R1111.4k

R121k

R1310k

R1410k

R15200

A settable function generator for 0.1Hz to 10kHz

R161k

R17100