Posts Tagged SDR

Crystal Parameter Measurement Musings

In order to probe a crystal’s response with decent resolution, I need a gadget to step a decent-quality sine wave by 0.01 Hz across the 10-to-100 kHz range and a logarithmic front end with a decent dynamic range. That’s prompted by looking at crystal responses through the SA’s 30 Hz resolution bandwidth:

Quartz Resonator 32.765 kHz - 34.6 pF

Quartz Resonator 32.765 kHz – 34.6 pF

Mashing a cheap AD9850/AD9851 DDS board against an Arduino Pro Mini, adding a knob, and topping with a small display might be useful. A Raspberry Pi could dump the response data directly into a file via WiFi, which may be more complication that seems warranted.

The DDS boards come with absurdly high-speed clock generators of dubious stability; a slower clock might be better. A local 10 MHz oscillator, calibrated against the 10 MHz output of the HP 3801 GPS stabilized receiver would be useful. If the local oscillator is stable enough, a calibration adjustment might suffice: dial for 10 MHz out, then zero-beat with the GPS reference, so that the indicated frequency would be dead on to a fraction of 1 Hz.

The HP 8591 spectrum analyzer has a better-quality RF front end than I can possibly build (or imagine!), but, at these low frequencies, a simple RF peak detector and log amp based on the ADL5303 or ADL5306 should get close enough. One can get AD8302 / AD8310 chips on boards from the usual low-budget suppliers; a fully connectorized AD8310 board may be a good starting point, as it’s not much more than the single-connector version.

With frequencies from 10 kHz to 100 kHz coming from a local oscillator, one might argue for a synchronous detector, formerly known as a lock-in amplifier. A Tayloe Detector might be a quick-and-dirty way to sweep a tracking-filter-and-detector over the frequency range. Because it’s a tracking generator, the filter bandwidth need not be very tight.

At some point, of course, you just digitize the incoming signal and apply DSP, but the whole point of this is to poke around in the analog domain. This must not turn into an elaborate software project, too.



, ,


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!


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!


SMA Attenuators vs. Broadcast FM vs. NooElec SDR

Four SMA attenuators arrived from halfway around the planet:

SMA Attenuators

SMA Attenuators

The top line has ATTENUATOR wrapped around the body. They’re rated for 2 W = +33 dBm, suitable for antennas and SDR and suchlike, not real radios or even HTs.

That assortment provides 39 dB of attenuation in 3 dB steps:

  • 3 6 9
  • 10 13 16 19
  • 20 23 26 29
  • 30 33 36 39

Sweeping them on the spectrum analyzer shows they’re doing what they claim, to within the resolution of the analyzer, and remain flat through 1.5 GHz, where my cheap N-to-SMA adapter cables roll off by 3 dB. Stacking them produces 38 dB of attenuation, which is certainly the small difference of large values and fine for my simple needs.

Conversely, a quick test with a NooElec SDR shows plenty of hocus-pocus betwixt antenna and display: the RF doesn’t attenuate nearly the way you’d (well, I’d) expect.

Direct from the antenna, with AGC off and 50 dB of RF gain:

WPDH Spectrum - 0 dB atten

WPDH Spectrum – 0 dB atten

3 dB attenuator:

WPDH Spectrum - 3 dB atten

WPDH Spectrum – 3 dB atten

6 dB attenuator:

WPDH Spectrum - 6 dB atten

WPDH Spectrum – 6 dB atten

10 dB attenuator:

WPDH Spectrum - 10 dB atten

WPDH Spectrum – 10 dB atten

20 dB attenuator:

WPDH Spectrum - 20 dB atten

WPDH Spectrum – 20 dB atten

Ain’t nothin’ simple…

Leave a comment

NESDR Mini 2+ vs. Input Terminator

A tiny handful of known-good-quality SMA terminators arrived from eBay:

KDI T187GS - 50 ohm 1 W SMA attenuators

KDI T187GS – 50 ohm 1 W SMA attenuators

They’re described as KDI Triangle T187GS SMA Female Terminator, 50Ω, 1W, 0-4GHz. A bit of searching suggests MCE (whoever they are) borged KDI quite a while ago (their website, last updated in 2003, has been lightly vandalized) and a datasheet won’t be forthcoming.

In any event, a NooElec NESDR Mini 2+ radio connected to a dual-band VHF-UHF antenna perched near a window shows this for a local FM station:

FM 101.5 NESDR - direct

FM 101.5 NESDR – direct

Zooming to 5 dB/div:

FM 101.5 NESDR - 5 dB steps

FM 101.5 NESDR – 5 dB steps

Installing the terminator at the end of an MCX-to-SMA adapter cable:

FM 101.5 NESDR - 50 ohm terminator

FM 101.5 NESDR – 50 ohm terminator

Haven’t a clue about those tiny little spikes with the terminator in place, but they don’t line up with any of the high-energy inputs and are, most likely, junk brewed up within the radio. That’s with the RF gain set to 49.6 dB and AGC turned off.

The hardware looks like this:

NESDR with SMA attenuators

NESDR with SMA attenuators

The MCX connector on the radio isn’t the most durable-looking thing I’ve ever seen, so strapping the adapter cable to the case seems like a Good Idea. You can get an NESDR radio with an SMA connector for about the same price, which I’d have done if were available a while ago.

The terminated input looks to be about -75 dBFS, about 15 dB below the between-station noise, and the carrier tops out around -25 dBFS, for a “dynamic range” of 50 dB. Oddly, that’s just about dead on the maximum dynamic range you can get from the 8 bit RTL2832U demodulator / ADC stuffed inside the NESDR: 8 bits × 6 dB/bit.

It is not obvious to me the signal from a randomly chosen (albeit powerful) FM station should exactly fill the receiver’s dynamic range, particularly without AGC riding herd on the RF gain. Some hardware tinkering seems in order.

The GNU Radio flow graph:

FM Broadcast - GNU Radio flow

FM Broadcast – GNU Radio flow



Monthly Science: WWVB Reception Sample

Further results from the SDR-based WWVB receiver:

60 kHz Receiver - preamp HIT N3 Pi3 - attic layout

60 kHz Receiver – preamp HIT N3 Pi3 – attic layout

Seven hours of mid-January RF, tight-zoomed in both frequency and amplitude, from 0350 to 1050 local:

WWVB waterfall - N3 - 2017-01-24 1050 - composite

WWVB waterfall – N3 – 2017-01-24 1050 – composite

The yellow line of the WWVB carrier comes out 2 ppm high, which means the local oscillator chain is 2 ppm low. We know the WWVB transmitter frequency is exactly 60.000 kHz, translated up by 125 MHz to the N3’s tuning range; you can, ahem, set your clock by it.

The blue band marks the loop antenna + preamp passaband, which isn’t quite centered around 60.000 kHz. Tweaking the mica compression caps just a bit tighter should remedy that situation.

Given that input, a very very tight bandpass filter should isolate the WWVB carrier and then it’s all a matter of fine tuning…


Leave a comment

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.