AVR DDS Exciter

Synthesized Exciter for LF

By Murray Greenman ZL1BPU

A high performance, stable, frequency agile exciter for Amateur digital mode LF transmission. It includes a sweep generator, an internal beacon, and the ability to key any slow ASK, FSK, IFK or MFSK mode.


INTRODUCTION

This interesting project was designed especially for LF enthusiasts and "Lowfers". It consists of a very stable Direct Digital Synthesis VFO, with 1/10 Hz resolution, and covers a wide range from 0.07 Hz to 400 kHz. The output power is adjustable, and can be as much as 1 Watt. Frequency and keying control is via a serial communications link.

Not only can this unit therefore form the heart of a serious LF transmitting system or LF beacon, or as a source for sweeping and analysis of LF antenna systems, but can also be used as an audio signal generator of unusually wide range and high power, and as an audio subcarrier exciter for use with an SSB transceiver.

The unit can be quite small. The picture below shows the prototype, in a box 175mm wide, 210mm deep and 55mm high. The single circuit board is 140 x 90mm, so there's plenty of room inside for another board (a local control and LCD display board is planned).



The Exciter completed, in its enclosure.
(Click on picture for larger view)

Frequency stabiity is of paramount importance on LF, where very narrow band transmission and reception are the rule. This unit has been designed to use a standard 10 MHz or 12.8 MHz (cell phone) TCXO reference oscillator to provide high stability. Even with a simple crystal reference, the performance is stunning. The following image, recorded on ARGO in 120 second dot mode (the narrowest and slowest used for QRSS and DFCW), shows no obvious drift over many hours of operation.



The Exciter sending FSK, three minute dots.
(Click on picture for larger view)

For narrow band applications it is also important that the carrier signal be clean, with a minimum of noise and spurs close to the carrier. This is one of the strengths of the DDS design, since the close-in noise will be as good as that of the crystal reference used. The carrier of this Exciter is well over 60dB down 1 Hz either side of the centre. The spectrum below does not have the resolution to show this, and in truth is probably showing the sideband noise of the receiver, but does show the nearby spurs at about -45dBc. With a simple low pass filter in the Exciter, the second and third harmonics, and the sampling clock and aliasing image are all better than -60dBc.



Close-in spectrum of the DDS Exciter carrier at 181 kHz

DESCRIPTION

The unit is quite inexpensive and simple to build, since it contains ony four ICs and a couple of transistors. One of the ICs is a very fast AVR microcontroller. To achieve maximum performance, this device performs digital signal processing at nearly 10 MIPS (that's 10 million instructions per second!). The signal output is converted to an analog sine wave and amplified by a 1W audio amplifier with good high frequency response and DC controllable output power. The third chip provides a low-frequency symbol rate clock using a simple RC oscillator reference. The final IC is a small low current voltage regulator. The two transistors form an inexpensive RS232 interface for message programming, frequency, shift, speed and mode control.


The Exciter block diagram

The unit operates as a Direct Digital Frequency Synthesizer (DDS), using a software technique and a sinewave look-up table to generate precision high frequency sinewaves. The efficient six instruction algorithm and accompanying sine table were developed by Jesper Hansen. While there are specialized (and expensive) chips for this purpose, able to operate at up to 30 MHz or more, the limit using a microcontroller is more modest, about 400 to 500 kHz. The upper limit is set by aliasing in the sampling system, such that when there are insufficient samples per sinewave (at high frequencies) there are other frequencies which can be reconstructed with the same samples. This effect is avoided by staying well below half the sampling frequency (1.1MHz) and using a good low pass filter on the output.



Aliasing - this happens when the DDS frequency is too high

Some of the features of the unit are:

  • A-D output level flat from DC to 300 kHz.
  • Provides sinewave output with low distortion and spurious content.
  • Digitally synthesized signal with 0.1 Hz resolution and high stability.
  • Instant frequency change anywhere within range, with no bounce, chirp or level change.
  • No range switch - only one range, with the same resolution at all frequencies.
  • Stepped sweep generator mode with the same precision and stability.
  • Built-in ASK, FSK, and DFSK Morse, as well as MFSK and HELL beacon modes, with command script.
  • Simple bi-directional serial communications protocol, using "human readable" commands.
  • User friendly simple event driven PC control program available.
Write your own beacon software! You could develop a specialized multi-mode keyer, for real-time transmission in CW, DFSK, QRSS and even MFSK modes.

You will need to use an external modulator for PSK and Wolf operation, since the carrier phase is disturbed when commands are sent. JASON is also possible, providing you use different control software, and a reference crystal that allows the correct frequency steps to be generated accurately.

TECHNICAL ASPECTS

SPECIFICATIONS

Spectral Purity
Second harmonic typically -42dBc, third harmonic -50dBc, even without a low pass filter! With a filter, these and and all other harmonics are at least -50dBc. At audio frequencies, second, third and all other harmonics are better than -60dBc. Random spurii better than -60dBc, close-in noise below -60dBc within 1 Hz. Sampling rate 1.11 MHz (Nyquist frequency 550 kHz). Sampling clock and alias image at 1.4 MHz -42 and -54dBc respectively.
Operating Range
0.08 Hz to 400 kHz, in any step size, with a resolution of 0.08 Hz (about 12 steps /Hz). Power amplifier response drops off below 7 kHz and above 250 kHz. 500mW power bandwidth 10 kHz to 200 kHz, and depends mostly on the output transformer and coupling network.
Power Output
Amplifier: Up to 1W into 8 - 50 Ohm load. Use low pass matching network for high power amplifier or antenna. Power level control adjustable over much greater than 60dB range using a DC control pot. (Can also be used for ALC and manual keying).
Direct: Output without power amplifier is 5V p-p into 1M Ohm, or 1V RMS into 1000 Ohms.
Digital Outputs: By changing the sine table, it is possible to generate push-pull non-overlap square wave drive at 20mA with any one of four user selected duty cycles. The eight squarewave CMOS 5V level outputs have sub-microsecond risetimes. It is also possible to use two 4-bit sine/cosine tables to generate two signals with constant and accurate 90° phase relationship. This is useful with quadrature modulators or demodulators, e.g. using the phasing technique. See author about firmware for these options.
Output Ports
Three digital outputs can be controlled for external use - controlled via script or serial command.
Power Supply
+12V DC to +15V DC at about 300mA. Supply need not be regulated. Key up 10mA, key down up to 150mA.
Commands
Twelve immediate mode user commands. See Serial Command List. There are also six script commands. Scripts are downloadable and used for beacon messages.
Serial Interface
RS232, TXD and RXD only, at up to 19200 bps (user selected), no parity, eight bit data, one stop bit. Command bytes are echoed to the host, followed by a confirming response. Errors are reported as "?". Comms message synchronism can be restored by sending <ENTER>. The synthesizer stops while processing commands. 19200 bps available only at selected clock frequencies (8, 12, 12.8, 11.0592, 14.7456, 16 MHz for example), but NOT at 10 MHz. Data rate is stored in EEPROM - there is only one version of the firmware.
Beacon Messages
112 bytes of user EEPROM message memory, containing coded data and commands. Memory is sufficient for about 15 words in Morse, 8 in JASON, or three words in S/MT-Hell or Feld-Hell. 16 bytes of EEPROM are used to store the current user settings for power-up beacon or normal mode restoration.
Physical
The unit can be built on a prototype board of about 100 x 75mm size. Layout is unimportant, and the Exciter is very stable, with no sign of hum or instability. The Exciter will operate from 0 to 70°C and will tolerate thermal and mismatch overload. The microcontroller can be programmed and reprogrammed in circuit. The unit is very light and portable. A TNC-sized box 150 x 100 x 25mm would be suitable.



The Exciter sinewave output

COMMS PROTOCOLS

Messages to the Exciter consist of a command letter followed by one or more parameter characters. All parameters are sent in HEX-ASCII, thus there are two characters per data byte. Hence 6 characters are sent to define the 24 bit frequency setting. Upper and lower case letters are acceptable, both in the command letter and in the message data. Receipt of any control character during a command will abort the command, cause "?" to be transmitted, and restore operation of the Exciter on the previous frequency.

Responses from the Exciter include echoing each command character, followed by a space, and the actual interpreted command to be performed. The response is then followed by CR/LF. An exception to this involves the two TX on/off commands, T and X, which are not echoed, in order to provide maximum speed for PC controlled ASK applications. There is also a short sign-on message which appears during initialization, and gives the identity and software version. A typical transaction is illustrated below:

<EXCITER D3>                    Sign-on message
f2c0000 2C0000                   Goto frequency 0x2C0000
f2c0002 2C0002
fr22c00 B32C00                   Typing error, command misunderstood
0?
f22c000 22C000                   Goto frequency 0x22C000
A18 +18                          Offset added, plus 5 steps
R A18 K2 M2 PC V0 F22C000        Settings report, shift, key speed, mode, power,
                                 table version and frequency
The Exciter controlled via Windows TERMINAL

In the examples above, the user's entry text is coloured RED, while the Exciter responses are in BOLD. Note how the unit recovers from a misunderstood entry. Error checking of data is not completely rigorous, so other letters in the data part of the message may result in incorrect performance. However, this is easily checked as the response will show unexpected values. In the above example, the finger-slipped "r" was interpreted as "B", and the trailing "0" was thus one character too many and was assumed to be the next command - and thus caused an error. Command parsing is rigorous.

The commands are listed in the Serial Commands document, and users will quickly find that the commands are intuitive, easy to remember, and very easy to use. The frequency setting Fhhmmll command is easy to use, but knowing where you'll end up is another matter altogether! Frequency is set relative to the number of resolution steps up from zero Hz, and programmed in hexadecimal. This can be calulated as follows:

Resolution = fcrystal/(9 x 224)

Frequency Setting Value = Required Frequency / Resolution

For manual control, i.e. using a terminal, a HEX-capable calculator is highly advisable!

CONTROLLER PROGRAMS

One of the simpest ways to control the unit is to write a small program in BASIC. A primitive BASIC interpreter is quite adequate, especially if all you want to do is translate and send decimal frequency commands. You could also make the Exciter send 120 second dot QRSS or DFSK or both, by making a file containing a list of the frequencies required (use X and T to send a gap), and setting the timer in the program to send one item from the list every two minutes. The program might be under 10 lines of code.

For more sophisticated control, such as free-form messaging (you write the file in ASCII and the software converts it to QRSS or whatever), real-time keyboard sending or multi-mode messaging, (for example sending normal speed Morse and QRSS or QRSS and QRSS(S) alternately), you will need a much more complex program, but still within the capability of BASIC, as the program operates very slowly. The upper limit for accurate on-off keying for Morse is about 20 WPM, dependent more than anything else on the timing accuracy of the PC software and computer serial communications. The response time of the Exciter to T and X commands used to send ASK is about two milliseconds.

The Exciter is perfect for sweeping and scanning applications, and even for sending Sequential MT-Hell and Feld-Hell. The maximum stepping rate under PC control is about 50 steps/second. The limit is the communications rate - at higher baud rates, higher stepping rates would be possible. The internal sweep operates at 200 steps/second without much effort. The Exciter is extremely agile - there is no settling time, step instability or excessive transient noise generated as the frequency is changed. It is quite practical to change frequency instantly while operating at full power.

The author supplies a DOS program (which operates happily in a Win95/98 DOS box), which will control the Exciter frequency, offset and power level in friendly decimal numbers, right down to parts of a Hz. The program corrects crystal reference frequency errors automatically. As yet the beacon modes and sweep mode are not controlled. The software is essentially a CW exciter.

This more sophisticated program is designed for beacon transmission and real-time keyboard transmission. The program has 10 built-in modes and four messages, and all these can be pre-defined by the user. These programs are compiled DOS programs that will operate in a Win 9x or Win3.1 "DOS box". More importantly, they will operate at the same time as ARGO, on the same computer, for full duplex operation, or receiving your own transmissions.

You don't need these programs to actually operate the Exciter. The built-in beacon mode already makes portable multi-mode beacon operation possible without a PC or human intervention, and you can always hand-key the Exciter in ASK Morse.



A simple DOS Control Program
(Click on picture for larger view)

WHERE TO GET THE SOFTWARE

So that you can gain an impression of how the unit works before you build it, the author offers an Exciter Simulator, which is a DOS program which operates to about 30 kHz using the PC speaker as output. This program obeys the main control commands of the Exciter in a similar manner, and was written to allow development of PC control software. You will need two PCs or at least two serial ports to operate it. There is no sweep or beacon mode in the simulator.

You can also freely download the special Exciter Control Program, which allows the Exciter to be fully and easily controlled, the beacon to be loaded and the operating modes changed and set. This program is a DOS executable, but will operate in a Windows 3.1 / WIN95 / WIN98 or WIN2000 DOS box. Use of the program with the Exciter is described in MAKEBCN.TXT. You'll also need to use EXC.SET to set the correct parameters for your PC and Exciter.

The DDS Exciter software is not free, but the price is very modest, considering the performance and features offered. The price is $10 for the executable code (for AVR and PC) and $30 for source code. The one version of firmware will operate with most crystal frequencies from 10 to 16 MHz. Software is delivered by email, and includes the complete project archive, including source code for the PC executables. Also included in the price is email support for your project. What a bargain! Send cheques (no cash or credit cards) to the address below. Any questions? Send me an email.

HOME


I trust you will find the AVR DDS Exciter useful. Please send any feedback or questions direct to me. While the software is offered at a rock-bottom price for private use, donations to cover development costs and to encourage further development are especially welcome.
zl1bpu@nzart.org.nz

Murray Greenman CSc, ZL1BPU
94 Sim Rd, Karaka,
RD1 Papakura
NEW ZEALAND

© Copyright M. Greenman 2000-2002. All Rights Reserved. See Legal Information for details.