The Cranky Sysadmin A world of technology, fun, and ignorant rants.

March 3, 2013

Sync Two AD9850 DDS Modules from the Same Clock

Filed under: Electronics,ham radio — Cranky Sysadmin @ 9:51 am

One of the features which I’m trying to build into my antenna analyzer project is to measure whether the impedance in the antenna is capacitive or inductive. Judging from other designs, this means I will need two signal sources which are 90 degrees out of phase. The AD9850 data sheet mentions this feature, as do several other ham sites, but I haven’t found a really good description about how to get it done.

Because there are a few versions of the AD9850 module out there, it’s hard to describe precisely how to sync the two. The general process is:

  1. Choose your least accurate DDS module.
  2. Remove the crystal from it. Mine was through-hole, so it was straightforward.
  3. locate the hole or pad which connects to pin 9 on the ad9850.
  4. Jumper this to the same location on your intact AD9850 module.
  5. When you connect your microcontroller to the modules, data, fq_ud, and reset will be common. your w_clk signal from each module should go to a separate pin on your controller.
  6. Now you can load data into each module. Don’t activate fq_ud until both module’s registers are loaded.

The phase info goes into word 0, which is the last word when loading serially. The data sheet hides the phase information well away from the programming section. Each phase bit from MSB to LSB is 180, 90, 45, 22.5, and 11.25 degrees. You can combine these to produce any phase shift in increments of 11.25 degrees. I used 0x40 (01000000b) for a 90 degree shift. The last three bits aren’t part of the phase information and shouldn’t be set.

The reason step 4 above is highlighted is that I ran into some issues with that. As soon as I connected a wire to the active crystal, whether the other end was connected or not, I got a 125mhz signal riding on my intended signal. It looks to me like the jumper is acting as an antenna. Here are some poor pictures of the strange sine waves:

sinewave with 125mhz clock riding on it.

sine wave with 125mhz clock riding on it.

Here’s a picture with the clock jumper removed completely:

IMG_0340My “solution” was to add an inductor in series. This was 3 turns on an FT37-43 core. This cleaned up the output a lot:

Two nice sinewaves 90 degrees out of phase

Two nice sine waves 90 degrees out of phase

There’s no magic here. I’m really filtering out a lot of the strength of the 125mhz signal. Whereas before, the clock signal was about 3 volts peak to peak, it’s now about 0.5 volts. Now the 125mhz clock is about 20+ db down from the desired signal. This still isn’t great, and I should find another solution before making a permanent device. As I said above, it looks a lot like I’ve added an antenna as soon as I attach a jumper to the active crystal oscillator. I don’t know if the offending signal is because of interaction with the breadboard, or if there is something harder to solve. I have my synced signals though.



  1. I’m really interested in your project and I wish you the best of luck with it.

    In today’s episode, although you concentrated on the 125 MHz interference, I think you might have a more serious problem. How did you verify that your signals were indeed in quadrature? As I understand it, in your setup the two clock paths are not equal and one clock is therefore delayed with respect to the other. At the HF end of the DDS range this could introduce a significant phase error. At 30 MHz, for example, a delay of only 93 picoseconds would introduce a one degree error. At the speed of light, a 93 ps delay corresponds to a path length difference of not much more than an inch.

    There are a few words of wisdom in this document:

    Comment by David — March 3, 2013 @ 10:51 am

  2. I am only able to measure phase via the oscilloscope, which will probably be somewhat inaccurate as well. I believe electricity flows a bit slower in copper than in air, so the error will probably be somewhat higher than you state. The inductor will also introduce some phase error. To make phase more accurate, I could do a couple of things. One idea is to place the modules as close together as possible and keep the jumper as short as possible. Another idea is to cut the trace between the oscillator and pin 9 and intorduce some phase correction. Since this isn’t meant to be a lab quality instrument, a small amount of phase error (maybe up to a few degrees) may not matter much. On the other hand, it might.

    This is all a learning process to me, so I’ll find out soon whether the measurements will be good enough. Thanks for that link. I hadn’t seen that document It looks like mostly by luck I’m implementing in a similar manner, though I am playing a little fast and loose in the protorype.

    Comment by Cranky Sysadmin — March 3, 2013 @ 9:35 pm

  3. Dear Cranky Sysadmin,
    I am building a very similar system that will utilize two AD9850 or AD9851 modules working in synch.
    The objective of my project is related to self-resonances of the transformers.
    What physical phenomenon were you trying to employ by using two DSS generators in such way that their signals are 90 degrees apart?

    What amplifier circuit did you use to amplify the DSS outputs?
    I would like to know all the peculiarities of this project if I will not overburden you.

    Thank you.
    — Vladimir

    Comment by Vladimir — June 2, 2014 @ 12:44 am

  4. I had a couple of projects in mind at the time; an antenna analyzer and a DSP based radio similar to the Soft Rock designs. I used a very simple amplifier described here: Honestly, I haven’t worked on this project in a while. I’d have to find my notes if you need more detail. The app note from Analog Devices was helpful:

    Comment by Cranky Sysadmin — June 2, 2014 @ 5:12 am

  5. Thank you.

    What is the lowest frequency that can be obtained from AS9851?
    How did you amplify the output? I see that you had used a buffer amplifier, but where did the signal go after that?

    I read the application notice. I am curious why you needed 2 signals, 90 degrees off one another for your application. To shift one against the other?

    Comment by Vladimir — June 3, 2014 @ 7:30 pm

  6. Could this be used to produce a short range AM C-QUAM stereo transmitter? If I AM modulated each module seperately with left and right channel audio, would this work? I was reading about C-QUAM and it seems like it would, but I’m not sure because they mention L-R and L+R audio channels and I don’t know what they mean by the subtraction and addition.

    Comment by Paul — October 14, 2014 @ 11:28 pm

  7. I don’t know much about C-QUAM except what I read on wikipedia, but I don’t think this application will help you. The phase shift between the two modules is accomplished on startup and seems to require resetting the modules to change the phase. This probably won’t be fast enough for C-QUAM.

    Comment by Cranky Sysadmin — November 5, 2014 @ 1:39 pm

  8. Hello Cranky

    Please, let me how to put the 90 degrees phase (0x40) in the second ad9850… I am novice in Arduino and C ….if possible write me a simple sketch …
    I am bilding a VFO to use in SDR receiver / transmitter.

    73 from py2ohh miguel

    Comment by Miguel — July 2, 2015 @ 7:37 pm

  9. Hello Miguel, I haven’t worked on this project in a while and I can’t seem to find my source code. The app-note from Analog Devices was helpful in working out the details of changing the phase of one of the modules. It looks like the one I point to in comment #4 is no longer there. Try this one:

    Comment by Cranky Sysadmin — July 31, 2015 @ 7:37 am

RSS feed for comments on this post.

Leave a comment

Powered by WordPress