Advertisements

Archive for category Amateur Radio

DDS Musings: AD9850 and AD9851

The general idea is to build a specialized sine-wave source as part of a test fixture to measure quartz crystal / tuning fork resonators in the 10 kHz to 100 kHz band. AD9850 / AD9851 DDS modules are cheap & readily available, albeit with crappy two-layer PCB layouts and no attention to signal integrity:

AD8950 DDS module

AD8950 DDS module

Documentation seems scanty, at best. The Elecfreaks page may be as good as it gets, with a summary:

Serial mode just need connect GND,D7 WCLK, FQUP, REST, VCC, I-R

More doodling will be required.

Because the AD9850 has an upper clock limit of 125 MHz, of course those boards sport a 125 MHz oscillator-in-a-can. The AD9851 has a 180 MHz limit and an internal 6× multiplier, so it gets a more reasonable 30 MHz oscillator and can run at either 30 MHz or 180 MHz.

The included 70 MHz (?) reconstruction filter won’t do much to improve a 60 kHz signal. A much much lower outboard lowpass filter will be in order.

As far as the AD9850 goes, the output frequency comes from a 32 bit value determining the phase increment:

f = Δφ · osc / 232

Where

  • f = output frequency
  • Δφ = phase increment
  • osc = oscillator frequency (30, 125, or 180 MHz)
  • 232 = DDS phase counter width

The smallest frequency difference between successive phase increments is thus osc/232, which is 0.029 103 83 Hz at 125 MHz. Obviously, you can’t get nice round frequencies like 60.000 kHz, except by accident, but you can get close.

Alas, the resolution conflicts with tuning fork characterization, where you (well, I) want to step the frequency in nice round 0.1 Hz units across a 2 Hz range around 60.000 kHz. Because the crystal characterization requires closely spaced frequencies, where the difference between the test frequencies matters, you shouldn’t work from the nicely rounded frequencies on a display.

For example, successive values of Δφ produce these frequencies near 60 kHz:

  • 2 061 580 → 59.999 874 793
  • 2 061 581 → 59.999 903 897
  • 2 061 582 → 59.999 933 006
  • 2 061 583 → 59.999 962 104
  • 2 061 584 → 59.999 991 208
  • 2 061 585 → 60.000 020 312
  • 2 061 586 → 60.000 049 416
  • 2 061 587 → 60.000 078 520

In an ideal world, you could pick an oscillator frequency to produce nice increments. For, oh, say, 0.025 Hz increments, all you need is osc = 0.025 × 232 = 107.374 182 MHz. Riiiight.

The computations require more numeric resolution than built-in Arduino data types and math operations can provide. Floating point numbers have 6-ish significant digits (double is the same as float), which cannot represent the Δφ values or frequencies. Unsigned integers top out at 32 bits (unsigned long long int is not a thing), enough for 9 significant digits that can hold the Δφ values, but integer multiplication and division do not produce 64 bit results and overflow / underflow without warning.

Other than that, an Arduino would be just about ideal: the generator needs a small display, a knob, and a few buttons.

Perhaps storing precomputed Δφ values for specific frequencies in a table, then computing nearby frequencies as offsets from that value would suffice. This will require doodling some absurd significant figures.

Advertisements

11 Comments

Quartz Resonator Test Fixture: 32 kHz Quartz Tuning Fork

Soldering a 32.768 kHz quartz tuning fork resonator into the test fixture:

Quartz crystal resonance test fixture

Quartz crystal resonance test fixture

The HP 8591 tracking generator doesn’t go below 100 kHz, so I used the FG085 DDS function generator as a source. I trust the 8591’s calibration more than the FG805’s, but right now I’m more interested in the differences between successive frequencies and the DDS can step in 1 Hz increments.

The output appears on the 8591, with a big hump comes from the analyzer’s 30 Hz IF filter response sweeping across what’s essentially a single-frequency input. The hump is not the crystal’s response spectrum!

With the jumper installed to short the 33 pF cap, the output peaks at 32.764:

Removing the jumper to put the cap in the circuit, the response peaks at 32.765 kHz:

The marker delta shows the difference between the two peaks, ignoring their 1 Hz difference:

Quartz Resonator 32.764-5 no-34.6 pF delta

Quartz Resonator 32.764-5 no-34.6 pF delta

So I’d say the cap really does change the resonator series resonance by just about exactly 1 Hz.

With the jumper installed to remove the cap from the circuit, setting the reference marker at the 32.764 kHz peak, and measuring the relative response at 32.765 kHz :

Quartz Resonator 32.764-5 no cap delta

Quartz Resonator 32.764-5 no cap delta

So the response peak is much much narrower than 1 Hz: being off-peak by 1 Hz knocks 13-ish dB from the response.

What’s painfully obvious: my instrumentation is totally inadequate for crystal measurements at these frequencies!

2 Comments

Quartz Resonator Test Fixture

A recent QEX article (Jan/Feb 2017, Crystal Measurement Parameters Simplified, Chuck Adams K7QO) suggested a simplified version of the K8IQY crystal parameter test fixture would work just as well for low-frequency quartz resonators:

Quartz crystal resonance test fixture - schematic

Quartz crystal resonance test fixture – schematic

The resistive pads eliminate the fussy toroids and their frequency dependence.

Tossing a handful of parts on a small proto board:

Quartz crystal resonance test fixture

Quartz crystal resonance test fixture

I found two absurdly long hunks of RG-174 coax with BNC connectors, so that’s how it connects to the outside world; sacrificing a short SMA jumper would reduce the clutter, but that’s in the nature of fine tuning. At the frequencies this fixture will see, coax properties don’t matter.

I can’t think of a better way to mount those AT26 cans than by soldering the wire leads directly to a pin header; pushing them under spring clips seems fraught with peril, not to mention excessive stray capacitance.

Measure the actual in-circuit capacitance for the 33 pF cap (shown as 39 pF in the schematic, it’s not critical), which worked out to 34.6 pF.  That’s the external series capacitance Cx.

The overall procedure, slightly modified from the original:

  • Measure C0 with resonator in capacitance fixture
  • Solder resonator to pins
  • Remove jumper to put capacitor Cx in series
  • Find series-resonant peak = Fc
  • Install jumper to short Cx
  • Find series-resonant peak = Fs < Fc
  • Remember the peak amplitude
  • Unsolder crystal
  • Install suitable trimpot = Rm in socket
  • Adjust trimpot to produce same output amplitude

Crunch the numbers to get the crystal’s motional parameters:

Rm = trimpot resistance
Lm = 1 / [4 π2 (Fs + Fc) (Fs - Fc) (C0 + Cx)]
Cm = 1 / [(2 π Fs)2 Lm]
Q = [2 π Fs Lm] / Rm

Then you’re done!

3 Comments

Quartz Tuning Fork Resonator Teardown

Thinking of a 60 kHz crystal filter front end for the WWVB receiver brought a little bag of 32.768 kHz crystals to the surface; I figured I could use them as crash test dummies while a bag of 60 kHz crystals travels around the planet. Come to find out they don’t behave quite like crystals and a bit of investigation shows the little cans contain tuning fork resonators, not crystal slabs.

I had to see that, so I grabbed the base of one in a pin vise:

Quartz resonator - pin vise

Quartz resonator – pin vise

I don’t know the part number for those resonators, but it’s something like AT26, where the “26” means a cylindrical can 2 mm OD and 6 mm long, more or less.

Notching the can at the chuck with a triangular file, then wiggling the can with needle-nose pliers, eventually broke it off:

Quartz resonator - A side

Quartz resonator – A side

The other side:

Quartz resonator - B side

Quartz resonator – B side

A look through the microscope show they’re transparent, with laser trim scars on the ends:

Quartz resonator - detail

Quartz resonator – detail

The “holes” are unplated quartz areas, clear as the finest glass.

Not what I was expecting to see, at all!

7 Comments

Turkeys in the Snow

These guys looked completely disgusted with the situation:

Turkeys on rail fence in snow

Turkeys on rail fence in snow

They’re about 130 feet away in a heavy snowstorm that eventually deposited about a foot of wet snow on the area.

The top rail really does slant downward: the tenon on the right end broke and fell out of the mortise.

The DSC-H5 carries the 1.7× teleadapter, zoomed all the way tight through two layers of 1955-ish window glass, hand-held, braced against the pane.

The day before that snowstorm, we biked 18 miles out-and-back over the Walkway in beautiful, sunny, mid-50s (°F) weather:

KE4ZNU-9 - APRS track - 2017-02-08

KE4ZNU-9 – APRS track – 2017-02-08

We ride when we can and shovel when we must!

6 Comments

WWVB Receiver: First Light!

All the blocks for a WWVB receiver, lined up on the attic floor:

60 kHz Receiver - preamp HIT N3 Pi3 - attic layout

60 kHz Receiver – preamp HIT N3 Pi3 – attic layout

The dramatis personae:

The headless Pi connects to the house WLAN through its built-in WiFi link, so I can run the whole mess from the Comfy Chair at my desk through Remmina / VNC.

Recording 24 hours of WWVB shows it works:

WWVB - 24 hr reception AGC - 2017-01-16 to 17 - cropped

WWVB – 24 hr reception AGC – 2017-01-16 to 17 – cropped

The wavy line along the left edge looks like a birdie formed by a local oscillator in the attic, because the frequency varies (inversely) with temperature. It’s probably a signal on the Pi board, rectified by some junction, and translated in-band by some Ham-It-Up harmonic. Whatever.

The other traces come out bar-straight, suggesting that the 0.5 ppm (presumably, per °C) temperature-compensated oscillators along the whole RF chain behave as they should.

There’s a slight frequency shift, on the order of a few parts-per-million, between the absolutely accurate WWVB carrier and the indicated display. Not a big deal.

The broad, albeit irregular, orange band down the middle shows the loop antenna / preamp bandwidth, which is on the order of 2 kHz at -3 dB and a few kilohertz more down to the noise level.

The broad horizontal gashes seem to come from the N3’s on-board hardware AGC reacting to signals far outside the waterfall. Various birdies appear & disappear, even in this limited view, so you can just imagine what’s happening off-screen; anything popping up within the SDR’s tuning range clobbers the gain, which becomes painfully visible when zoomed this far in along both frequency and amplitude. Turning AGC off should stabilize things; perhaps software can tweak the SDR gain based on a very narrowband filter around 60.000 kHz.

The upper half of the waterfall shows decent reception for most of the night. The bottom half shows there’s basically nothing goin’ down during the day, which is about what I’d expect based watching the Alpha Geek Clock for seven years.

In any event, another 24 hours with the AGC turned off looks better:

WWVB 24 hr waterfall - Thumbnet N3 - 2017-01-19

WWVB 24 hr waterfall – Thumbnet N3 – 2017-01-19

Various sources still clobber the receiver response, but it’s not quite so dramatic.

 

,

3 Comments

60 kHz Preamp: First Pass

Encouraged by the simulation, the 60 kHz preamp hardware sprawls over a phenolic proto board:

60 kHz preamp board - fake antenna

60 kHz preamp board – fake antenna

The inductors and resistors hanging off the screw terminals produce more-or-less the same impedance  as the real loop antenna. The alligator clips connect a function generator to the secondary winding of a current transformer (used backwards), thus injecting a wee differential signal into the “antenna”.

The clump of parts in the lower left knock the 24 VDC wall wart down to 20 V and produce a 10 V virtual ground in the middle:

60 kHz Preamp - power supply - Kicad schematic

60 kHz Preamp – power supply – Kicad schematic

The LEDs give a cheerful indication that the power supplies have reported for duty, plus apply a minimum load to the LM317 while I was tinkering. The heatsink gets tolerably warm, so I should dial back or disconnect the LEDs to reduce the load.

The preamp hardware matches the simulated layout, with a few extra bits tossed in:

60 kHz Preamp - Kicad schematic

60 kHz Preamp – Kicad schematic

The weird values come from whatever 1% resistors and silver-mica caps emerged from the heap. The 27 V Zener diodes and 5 kΩ resistors may or may not protect the instrumentation amp inputs from lightning-induced transients.

Because the HP8591 analyzer’s tracking generator starts at 100 kHz, I fed the DDS function generator into the preamp, manually stepped the frequency in 250 Hz increments, and had the analyzer show the maximum response of 19 separate sweeps:

Preamp - max hold - 250 Hz steps

Preamp – max hold – 250 Hz steps

That was tedious and, no, it’s not a comb filter: the actual response skates across the peaks of all those bumps.

The marker shows the preamp bandwidth is 2 kHz, roughly what the simulation predicts; the extremely tight span of that plot makes it look a lot flatter that the usual presentation.

Tightening the span even more shows an unexpected effect:

Preamp - 120 Hz modulation

Preamp – 120 Hz modulation

Those sidebands at ±120 Hz (probably) come from power-line magnetic fields into the “antenna”, because the magnetic field strength depends on the absolute value of the voltage. If they came from the signal generator, they’d be at ±60 Hz: the waveform amplitude depends directly on the voltage.

2 Comments