April 3, 2000 • ELECTRONIC DESIGN
153
ideas for design
INNOVATIVE DESIGNS FROM READERS
Ken Levine
Pacific Systems, 2838 67th Ave. SE, Mercer Island, WA 98040; (206) 236-2832; e-mail: kwlevine@aol.com
Low-Cost Function Generator
T
his low-cost function generator,
based on the Maxim MAX038
high-frequency waveform genera-
tor, produces sine, triangle, and square
waves from under 1 Hz to over 20 MHz
(see the figure). The frequency, ampli-
tude, and offset of all output wave-
forms are adjustable, as is the duty
cycle of the square wave.
Frequency adjustment is accom-
plished with a capacitor bank and a
variable resistor. Amplitude, offset, and
duty-cycle adjustments are performed
via variable resistors. Switches S2 and
S3 select the waveform type to be gener-
ated. The frequency range is chosen us-
ing one of 12 capacitors, C2-C13, via
switch S4. Resistor R16 is for fine-tun-
ing. The f
ADJ
pin of U1 is tied to ground
through a 12k resistor, so the frequency
of the waveform at U1-19 is f =
2(I
IN
/C
F
), where I
IN
= V
REF
/R, R is the
sum of R7 and R16, and V
REF
= 2.5 V.
The values of C2-C13, R16, and R7
were chosen to provide frequency-
range overlap. Table 1 shows the fre-
quency range for each capacitor value.
The output at U1-19 is 2 V p-p, cen-
tered around zero, for all waveforms.
For amplitude adjustment, R18 and R9
form a voltage divider. The portion of
U1-19 fed to the summing amplifier
U3 varies from 0.74% to 100%. The
summing amplifier multiplies this volt-
age by
−
12.2, so the signal at U3-6 will
vary from 0.18 V p-p to 24.4 V p-p.
CIRCLE 521
C
F
22 pF
82 pF
330 pF
0.001
m
F
0.0047
m
F
0.022
m
F
0.068
m
F
0.33
m
F
1
m
F
4.7
m
F
22
m
F
100
m
F
Frequency range
3.8 MHz – 22.7 MHz
1.16 MHz – 6.1 MHz
252 kHz – 1.5 MHz
83.4 kHz – 500 kHz
17.8 kHz – 106 kHz
3.8 kHz – 22.7 kHz
1.23 kHz – 7.4 kHz
252 Hz – 1.5 kHz
83.4 Hz – 500 Hz
17.8 Hz – 106 Hz
3.8 Hz – 22.7 Hz
0.8 Hz – 5 Hz
FREQUENCY RANGE
FOR SPECIFIC
CAPACITOR VALUES
The offset voltage is controlled by re-
sistor R15. This voltage is fed to the
summing amplifier, where it’s added
directly (the gain through the summing
amp is –1) to the waveform voltage. Re-
sistors R1 and R2 force the variation in
the offset voltage to be within –13.6 V
to +13.6 V to prevent the unity-gain
buffer amplifier from being overdriven.
Duty-cycle adjustment is controlled
by resistor R17. The +2.5-V reference
voltage of U1 is passed through a unity-
gain inverter to R5. R5, R17, and R6
(which is tied to the +2.5-V reference
IDEAS FOR DESIGN
154
ELECTRONIC DESIGN • April 3, 2000
voltage) form a voltage divider. The
voltage developed across R17 varies
from –2.3 V to +2.3 V. It first goes
through a unity-gain buffer, then to the
D
ADJ
pin of U1. This ensures that the
voltage at D
ADJ
falls within the operat-
ing limits of –2.3 V to +2.3 V.
+
-
+
-
+
-
+
-
S3
Triangle wave
C15
0.15
mF
U2B
LM324
C16
0.1
mF
Square or
triangle
wave
S2
Variable
duty cycle
R16 50k
R17
10k
+5 V
+5 V
+5 V
R10
1k
R5
390
R1
500
R15
10k
R2
500
R6
390
Sine wave
Square wave
R3
100k
+15 V
+15 V
+15 V
+15 V
3
2
11
4
11
4
5
6
7
11
4
1
10
9
8
8
4
1
7
3
2
6
U2A
LM324
–15 V
–15 V
–15 V
–15 V
R4
100k
R7 10k
+15 V
–15 V
R9
75
50%
duty
cycle
S1
R8
12k
U1
MAX038
R18
10k
S4
Amplitude adjust
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
REF
GND
A0
A1
COSC
GND
DADJ
FADJ
GND
IIN
V–
OUT
GND
V+
DV+
DGND
SYNC
PDI
PDO
GND
C6 0.0047
mF
C5 0.001
mF
C4 330 pF
C3 82 pF
C2 22 pF
Output
R14
1k
C18
0.1
mF
C17
0.1
mF
C 14
0.1
mF
C 1
0.1
mF
C19
1
mF
C20
1
mF
C13 100
mF
C12 22
mF
C11 4.7
mF
C10 1
mF
C9 0.33
mF
C8 0.068
mF
C7 0.022
mF
U3
OP37
R13 10k
R11
10k
R12
820
This MAX038-based function generator produces sine, triangle, and square waves from less than 1 Hz to over 20 MHz.