DDS RF
Signal Generator
Frequency range: 50 Hz to over 70 MHz
Design by G. Baars, PE1GIC.
pe1gic@amsat.org
Radio amateurs and RF engineers in general will welcome this design. This
contemporary RF signal generator has many bells and whistles and is just
the ticket for testing HF/VHF receivers, aligning filters, IF amplifiers and
AM/FM demodulators. The instrument can even act as a source for very
low frequencies starting at 50 Hz.
While the combination of an ordinary multimeter and a rudimentary signal tracer is perfectly
adequate for many kitchen table
hobbyists to get their homebrew
circuits working, more sophisticated equipment is typically
required by those interested in
radio and higher frequency circuits in general. In particular, the
more complex designs in the RF
realms normally require accurate
adjustment, which in practice
translates into a decent RF signal
generator with an internal or
external modulation option available. But then, most of you will
agree, we are talking of an
expensive piece of test equipment and that is why we expect
the present design to be highly
valued, not only by the radio
amateur fraternity but also by
those with an interest in all
things RF. The generator
described in this article offers
good performance, may be used
for commonly required test, service and repair jobs, and is reasonably simple to build.
14
Elektor Electronics
10/2003
RF&COMMs
Concept and
block diagram
Specifications
10/2003
Elektor Electronics
Circuit diagram
As youll discover a bit further on,
the circuit is spread across two
printed circuit boards. The division
is reflected by the circuit diagram.
Broadly speaking, the schematic in
out
CLK
DDS
VGA
LPF
32dB
64dB
AM
LCD
encoder
keys
020299 - 13
15
RF&COMMs
+5VB
L4
L2
L5
L3
C2
C1
4H7
4H7
4H7
4H7
100n
100n
C6
L7
L8
L9
100n
100n
150nH
220nH
150nH
23
11
18
27
10
D7
D6
11
12
D5
D4
13
14
RESET
22
15
16
WRCLK
D6
26
D7
25
D3
13
VOUTN
D6
14
VOUTP
D7
RST
RSET
FQUD
24
10
220nH
150nH
150nH
C16
C17
C18
C19
18p
68p
68p
18p
100k
1k
+9V
11
10MHz
D2
1N4148
100n
64
+9V
RE2
D3
1N4148
R14
10
1k96
T1
50
RE3
BS170
1N4148
R20
1k96
T2
R15
L17
BS170
2k00
64
R12
C24
C32
220p
100n
R13
1k96
R27
BS170
2k00
32
10p
R26
T3
R21
2k00
1H2
X1
100n
R29
22p
C21
C27
0V4
R31
IC1.E
C23
6
10
R10
64
R11
R18
C33
100n
R19
105
+9V
RE1
105
D1
560
IC1.C
4
15
BS170
150k
IC1.B
C28
GND
13
T4
105
10n
2V5
10k
GND
12
100n
R30
2V5
R6
GND
GND
R7
100n
100n
12k
GND
14
16
C10
0V55 RMS
R5
BYP2
R8
C39
C40
2V5
C37
47
10V
K2
4V1
8
2V5
BYP1
ENN
11
R28
IC1.D
CLK
GND
6k8
AMH
10
SDATA
32
IC1 = 74HCU04
VOUT
C36
22
10V
L15
C31
100n
AD8321
+9V
C38
40p
150nH
20
VIN
4V
1V25
19
C22
L14
+5VB
IC1.F
19
L13
R3
15
VINN
REFCLK
AM
PD
VIN+
R4
IC1
12
VCC
IC3
L12
120nH
12
17
VCC
4V
C26
100n
0V075
L11
AD9851
0V75 RMS
R2
17
14
2V5
C20
5p6
WCLK
18p
0V075
R1
IC1.A
68p
18
20
IOUTB
D5
VCC
68p
IC2
D4
VCC
18p
21
IOUT
D2
9
VCC
D1
DACBP
FQUD
8
VCC
R16
R17
R24
C34
100n
R25
R22
R23
105
28
D5
C14
105
D4
D1
C13
105
D3
C12
105
C11
105
7
VCC
R9
0V075
105
D3
100n
CLK
D2
L10
150nH
16
VINP
D0
L6
120nH
ENN
C29
C35
22
10V
DATA
D1
100n
866
C9
100n
536
13
C30
432
C4
499
D0
L18
4H7
100n
499
K1
C25
100n
0V075
C7
D0
C15
5p6
536
100n
D2
7809
C3
100n
+12V
4H7
C5
100n
VCC
L1
4H7
C8
+9V
IC5
L16
105
7805
105
IC4
105
+12V
020299 - 11
16
Elektor Electronics
10/2003
RF&COMMs
K1'
2
10
+5VA
R2
82
KEYPAD
S2
S3
S4
+5VA
S5
D
P1
S6
S7
S8
S9
S10
S11
S12
S13
C1
100n
10k
5W
C8
K4
15
16
13
14
40
11
12
10
EN
R/S
11
S1
LC DISPLAY
S15
S16
PA2(AD2)
16
PA3(AD3)
PD4
PA4(AD4)
PD5(OC1A)
PA5(AD5)
PD6(WR)
PA6(AD6)
PA7(AD7)
PD7(RD)
D3
D1
D0
10
D7
39
D0
D6
11
12
D5
38
D1
D4
13
14
37
D2
15
16
36
D3
35
D4
34
D5
33
D6
32
D7
PB2
S17
12 PD2(INT0)
13 PD3(INT1)
17
PB1
S14
PA1(AD1)
15
ENCODER
PA0(AD0)
PD0(RXD)
PD1(TXD)
14
ALE
RESET
30
D2
IC2
10
PB3
K2
100n
+5VA
EXP
31
AT90S8515
K1
020299 - 12a
OC1B
ICP
PB0
29
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB7
10
KEYPAD
PB0(T0)
PC0(A8)
PB1(T1)
PC1(A9)
PB2(AIN0)
PC2(A10)
PB3
PC3(A11)
PC4(A12)
PB4(SS)
PB5(MOSI)
PC5(A13)
PB6(MISO)
PC6(A14)
PB7(SCK)
PC7(A15)
X1
20
K3
21
64
22
32
10
23
ENN
24
CLK
25
DATA
26
RST
27
FQUD
28
WRCLK
X2
19
18
+5VA
X1
R1
F1
K5
1 4x 22k
C4
TR1
33p
C3
8MHz
C2
IC1
33p
MAX7400
32mA T
1V2
IC3
7805
B1
+5VA
AMI
10k
100n
4700 25V
10/2003
Elektor Electronics
C10
100n
B80C1500
OUT
SHDN
OS
IN
COM
CLK
AMH
6
1
R4
330
C9
C5
R3
100n
4
C6
270p
C7
100n
020299 - 12
Attenuators
Additional attenuators are called for if we
want the generator to supply a lowest output
level of 127 dBm into 50 (which equals
0.1 Vrms). The VGA itself already provides
for 31 dB of attenuation, so we need to add a
17
RF&COMMs
D1
D2
C11
O1
D3
R14
R15
R20
R21
R26
R27
R23
R22
R25
R24
R17
R16
C28
R19
R18
C29
R11
R10
C36 C25
C10
RE3
RE1
R7
IC3
C34 T3
RE2
R8
L15
R4
C37
L9
C15
C13 C14
C27
C26
020299-1
C33 T2
R13
R12
L2
C12
C31
L18
R9
L8
C4
C22
C18
L14
C20
L7
K1
C19
L10
R30
R28
R31
C6
L13
L6
R1
X1
C7
C17
L3
L12
C9
C32 T1
C8
C30
C38 C16 0
R2
L11
R3
L4
C3
C39
R5
C21
C40
IC2
L5
IC1
T4
K2
IC5
IC4
R29
R6
L17
C24
++
C5
L16
L1
C2
C1 C23
C35 1-992020
ROTKELE )C(
(C) ELEKTOR
020299-1
Figure 4. The PCB for the signal generator circuitry is marked by very short connections and a generous earth plane.
32-dB and a 64-dB attenuator. The latter comprises two series connected 32-dB sections,
which are easier to produce in practice without the risk of inaccuracy or leakage associated with a single 64-dB attenuator.
The relays used here (Re1, Re2 and Re3)
are configured to switch attenuator sections
in and out of circuit under microprocessor
control. Despite their relatively low price, the
relays are usable for frequencies up to 1 GHz.
In practice, these 12-volt models pull in reliably a just 9 volts coil voltage. In case of
doubt, the relay supply voltage may be taken
from the unstabilised +12-V rail in the circuit.
Control and AVR
The various circuits in the RF Signal Generator are controlled by an Atmel AT90D8515
microcontroller (IC2 in Figure 2). This 8-bit
RISC controller offers 32 I/O lines and a speed
of 8 MIPS which makes it perfect for the job.
Parallel driving of the DDS guarantees that its
programming its fast enough to modulate sufficient samples when FM is used. Note, however, that this does require 11 I/O lines. To
save some I/O resources, the LCD and the
keyboard share a number of processor pins.
The rotary encoder drives an interrupt line
to make sure the software can not miss any
pulse. The LCD is used in 4-bit bus mode
where data is copied to it in two operations.
That, too, is done to save I/O line capacity.
Finally, sharing I/O lines between the DDS
18
COMPONENTS LIST
Signal generator board (020299-1)
Resistors:
R1,R2 = 499
R3 = 6k8
R4,R9 = 536
R5 = 12k
R6 = 10k
R7 = 432
R8 = 866
R10-R13,R16-R19,R22-R25 = 105
R14,R20,R26 = 1k69
R15,R21,R27 = 2k0
R28 = 1k
R29 = 560
R30 = 100k
R31 = 150k
Capacitors:
C1,C2,C3,C5,C8,C10,C30,C32,C33,
C34,C38,C39 = 100nF, 5mm lead
pitch
C4,C6,C7,C9,C25-C29,C31 = 100nF,
SMD shape 0805
C11,C14,C16,C19 = 18pF
C12,C13,C17,C18 = 68pF
C15,C20 = 5pF6
C21 = 10pF
C22 = 40pF trimmer
C23 = 22pF
C24 = 220pF
C35,C36 = 22F 10V radial
Elek-
RF&COMMs
C1
C8
H1
020299-2
C10
K5
IC3
H2
K1
IC1
C6
TR1
B1
C2
C5
P1
R1
IC2
R3
R4
R2
C7
K2
K3
S1
EXP
F1 32mAT
ROTKELE )C(
2-992020
C9
C3
H3
C4
H4
K4
X1
COMPONENTS LIST
Control/power supply board
(020299-2)
Resistors:
R1 = 4-way 22k SIL array
R2 = 82 5W
R3 = 10k
R4 = 330
P1 = 10k preset
Capacitors:
C1,C2,C5,C7,C8,C10 = 100nF, 5mm
lead pitch
C3,C4 = 33pF
C6 = 270pF
C9 = 4700F 25V radial
Semiconductors:
B1 = B80C1500, rectangular case
(80V piv, 1.5 A)
IC1 = MAX7400CPA
10/2003
Elektor Electronics
19
RF&COMMs
safe value using series resistor R2. In practice, one third of the recommended current
guarantees a sufficiently bright display. The
saving in current then amounts to 200 mA!
Preset P1 acts as the LCD contrast adjustment.
AM modulator
Most RF signal generators of the affordable
kind use fixed 30%, 1000-Hz AM modulation.
Because the DDS has no internal provision for
amplitude modulation, an external add-on
had to be devised. The resistance at pin 12 of
the DDS determines the DDS output level. By
using a FET (T4), this resistance can be varied dynamically. The sinewave applied to the
FET is obtained by filtering a square wave
from processor pin 15. The filter in question
is a pretty steep one, built around a Maxim
integrated elliptic low-pass (IC1 in Figure 3).
The filter suppresses the fundamental frequency of the square wave, which results in
a clean 1-KHz sinewave.
FM modulation
Frequency modulation (FM) is realised in software, with the microcontroller employing an
internal processor timer and a sinewave lookup table containing frequency steps. FM with
1000-Hz sinewave modulation is obtained by
sending 32 samples to the DDS at a timer rate
of 32 kHz. The number of samples and the
sampling frequency distance are large
enough to warrant a reasonably clean modulated spectrum.
20
Software
The microcontroller executable code
was created using an assembler program with well over 2,000 lines.
Broadly speaking, this program consists of three flows:
Main flow
In the main flow, the keyboard is
scanned and the keyboard presses
are linked to their associated functions. From the main flow, a number
of subroutines are called controlling,
among others, the LCD. Here, too,
the interrupt timer is initialised for
AM and FM.
The main flow is preceded by a
reset interrupt which arranges for all
hardware and software initialisations to be carried out.
Timer interrupt
The timer interrupt is activated at a
rate of 2,000 Hz or 32,000 Hz for AM
and FM respectively. With AM, the
timer interrupt causes a square
wave to appear on an I/O pin. With
FM, a frequency sample from the
sinewave look-up table is added to
the current frequency and the result
is sent to the DDS.
Encoder interrupt
When an encoder interrupt occurs,
either the frequency, frequency step
size or the output level is increased
or decreased. Next, besides other
chores, the display readout is
updated. The function of the encoder
is determined using the keyboard.
Keyboard functions
The complete functionality of the
instrument is accessible to the user
via the keypad and the rotary
encoder. The keyboard functions
have been defined as follows:
*
0
#
0-9
Elektor Electronics
10/2003
RF&COMMs
D
A
B
C
D
Notes:
The desired output frequency does
not appear at the output until D is
pressed.
If FM is selected using key A, the display will indicate F1. After pressing
C (display: F?) the desired deviation
may be entered using the number
keys.
By pressing * you can set the step
size applied to the current frequency
on the display, i.e., the
increment/decrement caused by one
click of the rotary encoder. The step
size appears in the left-hand bottom
corner of the display. The output level
appears at the other side.
Power supply
The complete circuit draws up to
400 mA at a supply voltage of 12 V,
Construction
As already mentioned, the complete
Figure 7. SMD integrated circuits IC2 and IC3 are fitted at the underside of the
board, together with a dozen or so SMD passives. The mounting of IC2 is tricky
owing to the small lead pitch of just 0.65 mm.
10/2003
Elektor Electronics
21
RF&COMMs
Components
RE3
O1
D3
RE2
R8
RE1
R7
R14
R15
R20
R21
R26
R27
R23
R22
C28
R25
R24
L15
R4
C15
C13 C14
C12
C29
C34 T3
C10
R17
R16
K1
C36 C25
R19
R18
C4
C22
IC3
C26
L9
R11
R10
L8
C27
020299-1
D2
R13
R12
C7
C33 T2
D1
C37
C20
L7
C31
L18
R9
L2
C6
L13
L6
R1
X1
C19
C18
L14
L3
L10
C3
C39
C17
R2
L11
R29
R30
R28
R31
C40
L12
C9
C32 T1
C8
C30
C38 C16 0
R5
C21
L4
R3
IC1
T4
K2
IC5
IC4
L5
C24
++
C5
IC2
R6
L17
L16
L1
C2
C1 C23
C35 1-992020
C11
H2
ROTKELE )C(
K2
X1
C3
C8
K3
H3
C5
C7
C6
C4
EXP
R4
H4
F1 32mAT
K5
020299-2
TR1
ROTKELE )C(
2-992020
B1
R2
IC3
R3
C10
P1
C1
IC1
C9
C2
K1
K4
S1
R1
IC2
Sensitivity measurements
H1
020299-14
Enclosure
For obvious reasons, a metal enclosure is a
must for an RF signal generator and the
project discussed here is no exception. The
good news is that only a small enclosure is
required, and suitable tin-plated steel
cases with detachable lids are available in
several sizes. In our case (pun intended),
the required size is 160 48 25 mm. The
signal generator board allows small metal
screens to be fitted to separate the various
circuit sections. The position of these
screens is indicated by lines on the component overlay. In the case of our prototype, no differences were measured with
the screens in place or removed, so we
decided to leave them out. Perfectionists
are, of course, free to fit whatever screens
they think are necessary.
Next, the various units that make up the
equipment may be assembled together allowing the complete signal generator circuitry to
22
In many cases, an RF signal generator will be used to measure the sensitivity of a receiver or IF amplifier.
Usually, youll want to know the sensitivity in microvolts (V) at a certain
signal-to-noise ratio. The following
method may be applied to obtain
meaningful measurement results
with a minimum of effort.
Connect the RF Signal generator
to the receiver input by means of a
short length of good quality 50-
coax cable like RG58C/U and ditto
plugs. Switch off any computer
equipment which is prone to leak
spurious radiation into the receiver.
Adjust the signal generator to the
receiver frequency and then switch
off the test signal by pressing the
D key. Next, with the receiver volume control sufficiently up, use a
multimeter or an oscilloscope to
measure the level of the AF noise
produced by the receiver. Switch on
the test signal again and increase
the output level from the lowest
point (127 dBm) to a level at which
the AF noise level has dropped to a
quarter of the that without an input
signal. The difference represents a
signal-to-noise ratio of 20 log10(4) =
12 dB, or 12 dB SINAD. To obtain
the 20-dB SINAD sensitivity value for
your receiver, increase the generator
output level until the noise voltage
has dropped to 1/10th.
(020299-1)
Elektor Electronics
10/2003