Professional Documents
Culture Documents
Arduino DDS Sinewave Generator
Arduino DDS Sinewave Generator
Arduino DDS Sinewave Generator
Arduino Sine wave Generator using the direct digital synthesis Method
Here we describe how to generate sine waves with an Arduino board in a very accurate
way. Almost no additional hardware is required. The frequency range reaches form zero
to 16 KHz with a resolution of a millionth part of one Hertz! Distortions can be kept
less than one percent on frequencies up to 3 KHz. This technique is not only useful for
music and sound generation another range of application is test equipment or
measurement instrumentation. Also in telecommunication the DDS Method is useful for
instance in frequency of phase modulation (FSK PSK).
Software implementation
Results
In the upper part of the picture you see PWM signal on pin 11 and in the lower part
what the filter makes out of it. The sinewave looks not so clean but thats mainly the
limited resolution of the digital oscilloscope.
The spectrogram shows a surprisingly good result. The big peak is the output frequency
of about 1000 Hz. All unwanted distortions are below 50 dB which is roughly what we
expect from a signal what is generated by an 8-bit DAC. ( 1/256 = 48dB).
DDS Spreadsheet
dds_calc A little worksheet around the DDS formula to calculate the tuning word.
For a start you can just connect the output pin 11 to active speakers. But usually you
need lowpass filter is to get rid of the 32KHz sampling frequency in the output signal. A
Chebyshef lowpass with a cutoff at 12 KHz build with standard component values is
shown here.
This software implementation of DDS has of course several drawbacks in case of signal
purity and frequency range due to the limited speed of the software algorithm and
analog capabilities of the atmega chip. DDS modules which are using dedicated DDS
chips are the state of the art in signal generation and offer a frequency coverage from
zero up into the 100MHz range.
WSPR Application
wspr_beacon_dds_dcf_f4
Forum
http://arduino.cc/forum/index.php/topic,64217.0.html
Contact