Advertisement
Advertisement

Optimizing Arduino and the AD9851 DDS signal generator

-February 10, 2016

Arduino has taken the product “maker” world by storm and one of the more popular Arduino modules is the Analog Devices AD9851 DDS waveform generator. An Internet Web search for “Arduino DDS” showed more than 100,000 results, while the same video search turned up many dozens of videos. Internet forums are filled with discussions related to two specific issues. One issue is that the output amplitude is not constant with frequency, requiring a level control loop. The second issue is that the distortion gets pretty horrific, particularly at higher output frequency settings. In this article, we’ll show how to correct these issues, as well as providing some additional tips for improving the quality of the output.

DDS basics


While this article concentrates on the AD9851 device, Analog Devices produces many others that operate in a similar fashion. The devices combine a clock reference with a digital divider and a phase locked loop to provide a sinewave output with very fine resolution. In the case of the AD9851, the digital divider is 32 bits and the clock frequency is typically 125 MHz. This results in a frequency resolution of approximately 30 milli-Hz. A single resistor, Rset controls the current output level and therefore the output voltage level.

The digital nature of the DDS process results in an output signal and many signal images. The images follow a sin(x)/x envelope. This envelope is shown in the Analog Devices website and is shown in Figure 1.


Figure 1 Sin(x)/x envelope from the AD9851 datasheet.

From this figure it is easy to see that as the output frequency increases the first system image and the output frequency move closer together, while at the same time the amplitude of the image increases. The AD9851 DDS board is shown connected to an Arduino in Figure 2. The Arduino is used to set the DDS output frequency. A DC block, the Picotest J2130A (shown in the figure, www.picotest.com) or the P2130A 500Hz - 8GHz Blocker, is used to connect the DDS output to a 50Ω oscilloscope port to view the spectral response. The unfiltered AD9851 output is measured so that we can see the digital spectrum rather than the filtered output.


Figure 2 A popular AD9851 DDS module from Ebay is shown connected to an Arduino UNO via the Picotest J2130A DC blocker. The Arduino is used to set the output frequency of the AD9851.

The output frequency is set to 3 MHz and the unfiltered output spectrum is shown in Figure 3. As expected we can see the 3 MHz fundamental as well as the first and second images at 122 MHz and 128 MHz, respectively. The clock feedthrough is also visible in this measurement at 125 MHz. The images are far from the 3 MHz fundamental making them simple to filter using a low pass filter.


Figure 3 The DDS unfiltered output spectrum with a 3 MHz output frequency.

The output frequency is set to 50 MHz and the unfiltered output spectrum is shown in Figure 4. Now we can see the first and second images appear at 75 MHz and 175 MHz respectively, as expected. The first image amplitude is only 2.5 dB lower than the fundamental and also less than an octave from the fundamental, making it difficult to filter.


Figure 4 The DDS unfiltered output spectrum with a 50 MHz output frequency.

Further increasing the frequency to 60 MHz the unfiltered output spectrum is shown in Figure 5. Now we can see the first and second images appear at 65 MHz and 185 MHz respectively, again as expected. Now the first image amplitude is only 0.5 dB lower than the fundamental and very close to the fundamental, making it even more difficult to filter.


Figure 5 The DDS unfiltered output spectrum with a 60 MHz output frequency.




Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES