DDS documentation

From Note to self
Jump to: navigation, search

Links to general information

AD9850 DDS Board

AD9850brd.jpg

PHSNA

PHSNA is a SNA design closely related to the design I have in mind, as pointed out to me by Nick Kennedy.

Selected excerpts from the mailing list

2) The RF amplifier that you added has limited harmonic distortion that will cause erroneous readings when the main signal is attenuated by the tested circuit but the harmonics will pass unattenuated. For example measure a narrowband Band Pass Filter frequency response and tune the SNA to a frequency band that includes the filter central frequency divided by 3. You will see there a spurious band pass curve (maybe 30 - 40 dB down) at third the filter frequency. I solved that by discarding the RF amplifier and using directly the DDS output, which has an excellent rejection of harmonics, at a cost of using lower power level.

3) The DDS module output power gets lower at higher frequencies. I have added a diode detector at the RF output and used the detected signal to stabilize the output power by comparing the detected signal to a reference voltage and feeding back the error signal through an integrator to the level pin in the AD9851. Now the accuracy is around +/1 dB across all the frequency range. Victor - 4Z4ME

link


I SPICE modeled the filter on the DDS module and its (ideal) response rolls off at around 60 MHz. I'll post that result to the Files in a little while. We opted to add a filter that rolls off just above 30 MHz. One other possibility is to pick off the complementary output available on the DDS module (no LPF in line there) and go straight the filter on the shield board.

Actually I'm still puzzled a bit about the decrease in level. The 9850 data sheet (and an Analog Devices guru) cite the sinc function response. But calculating the sinc function as per the data sheet only yields about a one dB drop from 1 to 30 MHz. And the LPF on the DDS "should" be pretty flat well beyond 30 MHz. But Jerry saw about 10 db roll off over 1 - 30 MHz. Our curve fit compensation took care of that, but it's like treating the symptom instead of the cause. Inquiring minds....

link


I'll find the time to take pictures of the SNA and post them here. The level control of the DDS chip is by controlling the Rset resistor connected to pin 12 of the AD985x. A circuit similar to the one that I use is presented here: http://www.vk5tm.com/homebrew/dds/dds.php However such a circuit will not be good for controlling a 10 dB RF level variation.

link


"building something without experimenting is just solder practice"

link


- I also have observed that the decrease in level with frequency is greater than expected. I think that it can be caused by the low Q of the surface mount inductors in the original filter.

- I also plan to put a better filter, and maybe use both outputs of the DDS with a balanced to unbalanced transformer.

- The AD9851 is almost identical to the AD9850, and doesn't have a level control feature. The amplitude is controlled with the current injected into pin 12 (Rset). That is what apparently Victor has done, but I would like to see his circuit.

link


A couple of days ago I made a revision on the PCB to add a couple of pads that could be used if you wanted to pick off the DDS signal at J4 on the module (complementary output - without LPF) Even considered hacking the module and removing the filter components. But I really like the idea of using both outputs (after ditching the LPF) and a transformer.

link


The amplifier characteristics that will influence the harmonics are the 2nd and 3rd intermodulation intercept point and the mmics will not differ by much from the amplifier that you use for a given similar power consumption. Why are you so worried for the isolation of the output? The DDS chip output practically is a current source and is not sensitive to its load if its output amplitude does not reach a high voltage. The low pass filter is your only concern for load termination. If you would use only the DDS 7th order filter, its cutoff frequency should be around 50 MHz so even if it is affected by load mismatch at its output, it would not affect its frequency response at 30 MHz and lower.

I think that I used only a 6dB attenuator at the RF output. As mentioned earlier, the level drop at high frequency might be caused by the low Q of the SMT inductors in the DDS board. You might try and replace them with small toroid inductors with the same inductance value.

link


We briefly thought about a MMIC but didd't go any further. In fact another 9850 DDS generator I have (KG6CYN design) uses a ERA1-SM1 MMIC.

link


An update version of the schematic is shown on this webpage (very similar to the QST article):

RF-workbench-5

It is posted with Wes' W7ZOI permission. There is a small change in the battery supply but the power measuring circuit is essentially the same.

link


Actually, now that I've pulled up the original article, there are several small changes from the original schematic (that'll teach me to rely on my memory at 5 AM). However, they do originate from Wes, so I'm sure these changes are worth considering by anyone that needs to build one now.

link


Since I do have a parallel universe version of the PHSNA working, I've been measuring a few things. Most of my filters I'd already characterized point by point before developing the ability to auto scan. But I have several commercial filters in my junkbox from hamfests: Heath, Kenwood, Yaesu, ICM etc, which I've not checked. Some don't specify their design terminating resistance requirements and some are pretty high, like one from Heath that's 2000 ohms. To match it to my 50 ohm system, I could use some sort of resonated transformer or maybe an L-match but that sounded complicated and might affect the filter's response. Another way is to use minimum loss resistance pads. Minimum loss is pretty high when you're going all the way from 50 to 2000 though. It looks like 22 dB on the input and 22 on the output , so -44 dB total. That could put the signal down in the dirt, so I need some amplification. A while back I built a little broadband amplifier with 38 dB gain, using three MMICs in a line.

With this much difference in resistances, you just about don't have to calculate the matching pad. Just put 50 ohms shunt to ground at the input and output connections, and 2000 ohms series from there to the filter In/Out terminals. I had a fair amount of trouble with my noise floor while using the amplifier. Initially it was only -25 dBm but just by moving components and cables around physically I got to -40 dBm. Still way too high to show ultimate attenuation, but the shape and flattness and 3 dB BW ought to be OK. I don't know though, this filter is marked 2.1 kHz but I showed about 1.2 kHz. Is it my measurement method, or is it the filter? Guess I should try some others. What about filters that don't reveal their termination resistance requirement? From what I understand, you make measurements with various resistance values until the shape looks "right" and say, "that's it". Sounds like a lot of work to me. I wonder if we'll be able to do 455 kHz filters with this gizmo? Hope so.

link


I'd think you could use a broadband transformer. It ought to do OK over the fairly limited bandwidth of the filters. For 50:2000 you'd need about a 1:6 turns ratio. And the reactance of the high-turns winding ought to be around 2000 ohms or better. That's around 70 uH at 5 MHz. Ferrite cores should serve.

Or maybe a combination of techniques... 4:1 quadrafilar transformer to give 50:800 then attenuator pad to handle the remaining transformation. Wouldn't have to introduce so much loss, so maybe the level would be high enough for decent dynamic reange. link


This is a easy way to design matching circuits for your filters. But you will need a VNA not a SNA to produce s-parameter Touchstone file to load into RFsim99 software.

youtube movie

link


It has been my experience that an L network works a lot better than a transformer. However, I have never tried to build one for 50:2000 ohms. The transformers introduce more loss than an L network. I typically use ZMAT a software program which comes with the book, “Experimental Methods in RF Design” to design the network. I then wind the toroid and use a combination of a fixed and a variable cap. I temporarily mount the L network on a piece of copper clad and use a resistor as a temporary load. I then connect my RF generator with my Return Loss Bridge to the 50 ohm side. I set the frequency on the RF Generator correctly and adjust the variable capacitor for the best return loss (typically -25-30 db). Then, without changing the variable cap, I mount the L network in place. I learned this method from my good Aussie friend Kerry.

I am not sure if a 50:2000 ohm “L” network would work well. The Q might be too high. You might try a pair of L networks in series. Maybe a 50: 350 ohm and then a 350:2000 ohm.

Nick, as far as going down to 455 KHz, the SSNA has not been tested below 1 MHz. You may have to modify the amp or substitute a MMIC for the amp.

link


Well, I usually think a transformer should have 5 to 10 times the load resistance in the reactance of its magnetizing inductance, which is just to say the inductance of the winding connected to the load. That's hard to get if you need 10,000 to 20,000 ohms at 3.395 MHz, even with high permeability ferrites. You could use something with a lot less inductance, maybe iron powder, and then parallel resonant the winding, but now you're fusing with tuning.

But scratching around a bit I found that I have a few ferrite toroids with an AL value of 1100 to 1200, so I'd only need 20 turns to get the 10,000 ohms minimum I think I need. I wound a couple with 3 turns on the 50 ohms side and tried again, without the amplifier. Now my floor is at about -50 dBm - not great but a big improvement for sure. The filter shape looked about the same. Still 1200 Hz at -3dB points for a filter specified as 2100 Hz. Maybe it's just not a very good filter.

I have this other filter of unknown termination requirements that came with a nice plot. It's 2.1 kHz at 10.7 MHz and the plot shows it nice and flat on top with steep sides. I thought I'd try it in a 50 ohm environment and see how it looks. The main thing was a large amount of ripple in the passband - at least 3 dB. It had a little shelf or shoulder as it sloped off on the low side. And the loss inside the passband was about 19 dB. I wonder if there's some way from these observations to deduce the required terminating R, or if it's all trial and error.

Regarding using a L-match for 2000 to 50 ohms -- I've done it for an 80 meter EFHW. Don't know how efficient it is, but it seems to do OK.

I also thought about some kind of active matching for the 2000 ohm filter. Maybe simple JFET buffer stages with 50 in / 2000 out and 2000 in and 50 out impedances. But that was going to be more effort than I wanted to exert just for playing around with junkbox filters.

link


Jerry and I had been discussing a version of the SSNA that substituted a MMIC buffer amplifier instead of the discrete 2N5109 design. I've done the layout for such a version using a MiniCircuits ERA-3+ MMIC and can get boards made of either type. They will still be combined with a power meter board. I just have to get multiples of ten of each kind. No difference in cost. The MMIC offers wider bandwidth and needs a couple fewer parts.It could be useful if you wanted to use an AD-9851 DDS module.

The ERA-3+ costs less than $2, but MiniCircuits has a pretty steep minimum order of 20 pieces. But a couple of DX ops said it was easier to get them than to hunt up a 2N5109 or 2N3866.

Look in the files section for "COMBO ERA3" and "COMBO 2N5109" to see the schematics and layouts of each version to see what you'd be getting.

link


Yes, was thinking about it and then saw how much vendors were asking for the AD822. The AD820 is pricey enough.

But finally I decided the amp wasn't being loaded enough to worry about needing independent outputs, and two trimpots would serve to make the analog meter and the A/D output independently adjustable anyway. As long as you first set the gain to define the A/D port span, and then trim out the series resistance to the meter.

I was really considering the dual op amp in order to subtract an offset so that the bottom end of the dynamic range would map to zero volts, but decided that was needlessly complex just to recover about 10% of the A/D range.

link


If you go to Mini-Circuits website, you can register and received free samples of the ERA-3 chip (they automatically give you 4). Here is their address:

http://www.minicircuits.com/homepage/homepage.html

Just follow the registration instructions. They will ask for your application when you ask for the "EZ Samples." Just tell them the truth, don't try to make them think you're a defense contractor. :-)

link


I chose -10 dbm as the output to prevent damaging crystals. I think -10 dbm is good maximum based on some emails I had with Kerry Powers (can’t remember his call). However, the extra attenuation was put in so that people could decide how much power they wanted. You can get up to +20 db more out of the SSNA. Of course if you decide to increase the power out of the SSNA, you will have to change the amount of voltage you get out of the power meter. A value of +5 VDC is the absolute maximum you can feed back into the SSNA.

link


Thin brass 'shim stock' is available at most hobby and craft stores. It can be cut with scissors and bent to shape. The holes all along those strips are 'plated through' and tie the top and bottom strip together. Small pieces of wire may be soldered through several to solder to the 'shield' material.

link


Yes, That was the intent. To allow you do do at least some shielding around the front end components. I have one in the works at the home QTH and will post photos when I'm done, but that will be at least a week.

I had built a prototype (homemade PCB) without shielding and it workes fine, but I thought... maybe more is better :^))

[1]


Now that a lot of you have your boards, you will probably want to get building. There is a preferred building sequence that will help you test your system as you build. First, build the power meter. Calibrate it and set the voltage output to produce +5.0 VDC MAX at -10dbm. On my power meter, the output is set a little lower. The maximum input to the UNO R3 is +5.0 VDC. Anymore and you run the risk of damaging the UNO. So, my meter is set at 4.55 VDC for -10 dbm. When you guys get to the calibration point, there are several ways to do it based upon the equipment you have. If you have access to a HP8640B generator or other high quality generator, you can use it to do the calibration. Or if you have a good 5 watt power meter and a QRP transmitter, you can use them. There are a lot of different ways to do the calibration. We will be discussing them with you.

Once the power meter is built and operational, you can then build the SSNA. Before you build the SSNA, try downloading the software, compiling it and installing it on your UNO R3. That will give your little computer a quick test. Actually, this test can be done anytime. After building the “shield” board (the board that plugs into the computer), decide where you want to take the output from the DDS board. Jim, has written up some options for you. Depending on where you extract the output, you may have to modify T1 on the shield board. More on that later. You will be able to test the output level of your SSNA using your power meter. You will be able to set the calibration of the DDS by using a well calibrated Frequency meter or by listen for zero beat against WWV on a receiver.

link


One important thing to remember about the AD8307 rf detector is that it is VERY sensitive. It will measure down around -70 dBm, which is one ten-billionth of a watt! Or 71 millionths of a volt.

So you have to take extra special care to keep stray rf away from it. First and foremost is a VERY well shielded enclosure. One of those cast aluminum boxes is probably best, but the "minibox" style will be OK if the halves fit tightly together. I used an "Altoids tin on steroids" with a tight fitting slip-on lid, from PaperMart.com.

Anything coming into the box (other than the signal, of course) needs to be well bypassed for rf, hence the posts you've read recently about feedthru capacitors. Best bet is to keep the power supply (battery) inside the box. Then the only other penetrations are for input signal and DC out to the Arduino. You can probably get away without a feedthru cap for the dc output if you use an rf type connector and bypass it very close to the box wall with a couple of caps, maybe a 0.001 uF in parallel with a 0.1 uF There is another bypass cap on the PC board, but don't rely on that one.

If you use an analog meter with yours, the meter represents a big hole in the box (unless its one of those great mil surplus full-metal-jacket types). For a plastic meter, maybe some copper foil tape or real aluminum foil duct tape can be applied to the back to cover most of the gaps.

link


The filter components on the DDS module are "correct" if what you want is a LPF with a 70 MHz cutoff.

In the Files section I earlier had posted a SPICE model of that filter.

The problem is that the DDS ought not be used higher than 1/3 its clock frequency because of the spurs that are generated. So for the 125 MHz clock, about 40 MHz ought to be the upper limit. A 70 MHz cutoff will let some spurs through when you are operating at the upper end of the range. Jerry's filter is much better matched for the useful range of this DDS.

There has been speculation that these modules are goofs. Somebody put a 9850 on a board meant for a 9851. Maybe that's we can get 'em so cheap.

link


Look in the "Links" section for a link to an article from Analog Devices.

Key point is that if the AD8307 is driven with a DC source, it will read 3.01 dBm too high, compared to a sine wave. This gives you a way to calibrate your power meter using a battery, trimpot, and a DC voltmeter.

Of course the regular input to the 8307 is capacitively coupled, so to do this you have to connect the DC source directly to pins 1 and 8, and the source has to float.

I have done this with a previous build of a power meter and it appears to work, but I'd like to hear from others who try it, especially if you have a good independent means to verify the result.

link


Bob Kopski, K3NHI, wrote an article for the Jan/Feb 2004 issue of QEX that describes a simple calibration device for use with the AD8307.

link


Bob, K3NHI, posted an update to his 10 MHz oscillator calibrator on the EMRFD Yahoo group. It seems that later production runs of the AD8307 don't respond the same to square waves at low levels as the one form the early years.

Bob now recommends the square wave calibrator be set at -10 dBM (instead of -20) so that the chip operates in its well characterized region. I'm planning on getting one of the CMOS oscillator cans and building one up.

Jim, N5IB

BTW - Bob doesn't think much of my DC idea  :^)) Indeed, the reading I get are larger than they ough to be, rather like Nick is seeing... therefore... Caveat Molitor link


I considered another method to prevent leaving my device on and killing the battery. It's a MOSFET kept ON with a capacitor that you charge with a momentary pushbutton, and depending on your choices for timing R and C, it keeps the device energize for a period of time and then shuts off. A slightly tricky part is that you have to put it in the negative return of your circuit. By Bruce, N1RX:

http://newenglandqrp.org/files/WM-2%20control.jpg

link


One thing I've discovered about my build: I performed the calibration sweeps when the boards were still sitting loose on the desktop without a case. This calibration sweep showed a dip in output between 10 and 12 MHz of about 3-4 dBm. I was going to ask about this anomaly, but I've discovered that it has disappeared now that everything is in the metal case. This results suggests that calibration should be done after the build is complete, and I will re-do mine now to see how it compares to the first attempt.

link


Take a look at W0FNQ's plot of his filters. In particular the 12 meter plot. You can see a blip at around 12 MHz. No doubt that is the response to the second harmonic, though it's down more than 20 dB.

link


This may (or may not) help be wiht your regression fitting efforts. It may help (perhaps with code extension) in several ways such as: pre, post, or real-time look-up binary value normalization - to avoid floating point overhead (no fighting with compiler optimization switches, and especially when coding in assembler).

(long post, see link if interested)


Photos are posted of a return loss bridge that can be a useful accessory for the PHSNA.

Jerry sketched out a layout and found a source for an inexpensive cast aluminum box, and I did a PCB layout and had a handful of prototype boards made for testing. Initial results are pretty good - at 10 MHz the difference between a matched load and a short/open is better than 40 dB.

The little copper shield was a kludged up afterthought, and I want to do another run of tests without it, but if it turns out to be beneficial some anchor points can be included in any new run.

We'll probably put up a poll later (when Yahoo gets straight again) to see if there's any interest in either a partial kit (PCB, resistors, toroid, wire) or a full kit (drilled box and all parts and connectors)

But guys...this is REAL easy to build out of the junque boxe. Plenty of places show you how - including K8IQY's manhattan construction website.

return loss bridge

For those unfamiliar, a RLB allows you to determine the reflection coefficient (essentially determining the vswr) looking into an unknown device, like a filter, or amplifier, or antenna. And it can be done at low signal levels like that of the PHSNA.

With that you can determine the magnitude of the impedance (but not the resistive and reactive parts - that needs a vector network analyzer - VNA)

link


I built a crystal test fixture today. It consists of a couple BNC connectors, a -10 db attenuator and a pair of 4:1 transmission line transformers. I am going to try out Nick's crystal measuring software. But, before I do that, I will build a low pass filter with a cut off of about 5.5 MHz since I am measuring 4.915 MHz crystals. As Nick has stated in his paper presented to the 4-States group, "Crystal characterization and crystal filter design - An overview of techniques and tools," the sine wave signal generator should be as clean as possible. I am hoping we can get some small low pass filter boards made up. Everyone that does any filter work will need a few of these boards. Also, as Nick found out, -10 dbm is about the highest level a crystal should be subjected to. At higher levels you actually run the risk of cracking a crystal besides distorting the measurement results. I'll try to upload a picture of my crystal measuring fixture.

link


AD9851 Update

The AD9851, as in the NJQRP DDS-60, can be controlled in almost the same way. Just use a reference frequency of 180 MHz to calculate the PI, and for the control byte, send 01 instead of 00. The 01 tells the chip to use the internal x6 multiplier, which boosts the 30 MHz clock up to 180 MHz.

Initializing AD9851

I’ve been going without initializing, but wondered why I had to send the first frequency frame twice. In serial mode, as is used in the DDS60, you need to initialize, because the chip comes up in parallel mode. The three important bits of control word W0 are hard wired on the board as follows, W0 = xxxxx011, where the lowest three bits mean, NOT powered down, serial mode, and enable x6 reference frequency multiplier (for the AD9851). The first load will be in parallel mode and will be W0. In parallel mode, it’s OK to just program W0 and then load, so you can just do one load to initialize. To initialize, just do a pulse up & down of the W_CLK line and then a pulse up & down of the FQ_UD line. See page 15, figure 17 of the data sheet. The data sheet recommends that you immediately follow that with a serial load of all 5 bytes containing valid frequency data, to overwrite the unknown state of the PI registers.

link


It all started with deciding to put a frequency counter inside my PHSNA. Thinking about it the PHSNA knew what frequency it was on, I just needed to display it!

To save connections to the arduino I used an IIC module soldered to the back of the 16x2 LCD module. (ebay ~$6) I modified "SimpleSNA_WA5BDU_1r6a_rev2r62.ino" to drive the display and show what is being sent to the computer. Feature creep ensued and I added a "power meter" mode where the LCD just shows the power level detected after disabling the DDS module to reduce signal leakage

The sketch, schematic and photos have been uploaded to "ww2r" in the files area.

I am currently progressing well with modifying the sketch with a rotary encoder to make the unit standalone. This will help aligning filters before hooking up the computer to plot the full characteristic. It will also allow the PHSNA to be used as a standalone signal generator, a much used function recently whilst building Transverters

link


BTW ... I am about finished with a PCB layout that will use the "other" DDS module (the one with the little blue trimmer) This version WILL use the complementary outputs, since they are both brought out to that module's headers. The "push-pull" outputs and the center-tapped transformer should provide additional even harmonic suppression.

[i]note from the editor: There are two versions of the AD9850 board[/i]

link


Since we have a lot of folks who have joined the group since the first PHSNA offering, I should probably give y'all an update on what board/projects are in the pipeline. Here's what's cooking - more or less in the order they will get done.

1. Return Loss Bridge - full and partial kits. These are "in production." I'm going to end the reservation period tomorrow (Tuesday the 14th in USA) since the volume of requests has just about over reached my $$$ resources to acquire parts. PC boards will be ordered tomorrow and kits should be ready to ship in about 3 to 4 weeks.

PLEASE DO NOT start sending requests for these next several items. I'm not ready to begin keeping lists.

2. New run of PHSNA boards. I've corrected the errors I made in the first run and will have some more of the ERA-3+ version made. This board can be considered "mature." The ERA-3+ allows the PHSNA to be used with higher frequency DDS units like the AD985. For that reason I do not plan to make more of the 2N5109 version. The boards will be ordered after I finish shipping the return loss bridge kits.

3. Power meters . I've made a new layout that incorporates some good advice I've received on shielding and isolation. The new boards will be the same physical dimensions, but will use SMT Rs and Cs (1206 size) for the RF front end, and will use an SOIC AD8307 chip. Keeping the front end all SMT and confined to the top side will allow for more convenient shielding. The back end (op amp, V-reg and metering circuits) will be all through-hole. These new boards will be ordered at the same time as the PHSNA run.

4. Filters. Jerry has been working up some low-pass and bandpass filters that can be used in conjuction with the PHSNA, power meter, and RLB. I hope to be able to fit them in the same size box as the RLB. The BPF will be especially useful if you want to do antenna measuring, since hooking the AD8307 up to an antenna sucks in all the RF in your QTH from near DC to VHF. It's possible that these may be available as kits - most likely partial kits without enclosure and connectors, but we'll see.

5. A PHSNA board that uses the "other" cheap DDS module. The DDS with the little blue trimpot has the feature that both complementary sine wave outputs are brought out to its header. So you can use a center-tapped transformer to couple the output in a sort of push-pull fashion. This should provide additional supression of even harmonics. And we have seen that 2nd harmonic enrgy from the DDS can be a problem when doing wide band sweeps. One other wrinkle is that the low pass filter on this PHSNA will be interchangeable. You'll be able to build different versions of LPFs and swap them out as plug-in modules. They will be identical to the stand alone low pass filters described above. This board is about done and at least a few prototypes will be made at the same time as the item (2) PHSNA.

6. Measurement Receiver (Instrumentation Receiver) Jerry has designed it and has a prototype on his bench and we hope to be able to generate a board set. It will be SMT for most of the front end and mixer circuits, and through-hole for the filter and buffer stages. No timetable on this one yet.

That's what keeping me off the street and out of trouble (and pretty much off the radio - hi) these days. . PLEASE DON'T send any requests for any of items 2-6. I'm not keeping any lists until I'm ready to announce them. I will, however, create a poll to gauge demand.

link


[i]Note from the editor: here's a few posts about measuring crystal parameters[/i]

702 703 707


Please have a look at http://www.rudiswiki.de/wiki9/RaspberryPiWobbulator#PHSNA for more details.

[2]


The other day I was reading some Mini-Circuits application notes and it mentioned using a diode ring mixer as an attenuator. The note said that by varying a DC current into the IF port the attenuation between the RF port and LO port would vary from about 2dB to about 50dB.

733