Posts Tagged SDR

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

 

Advertisements

2 Comments

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.

 

,

3 Comments

Unicode Keyboard Flameout and Workaround

For unknown reasons, probably having to do with the unmitigated disaster of trying to get an SDRPlay radio working with GNU Radio (about which, more later), Unicode keyboard input stopped working. This is not to be tolerated, because engineering notation requires a lot of Greek letters.

Unicode support seems to be baked into the lowest levels of the Linux operating system, although it’s not clear to me whether it’s in X, QT, GTK, or somewhere else. Googling the obvious keywords was unavailing; evidently this feature never ever fails or, more likely, very few people use it to any extent.

Note that I already have the Compose key set up, but Compose sequences don’t include Greek letters.

After considerable flailing, I added the Simple Greek keyboard layout and defined the (otherwised unused) Menu key as the keyboard layout switcher. That’s a pretty big hammer for a rather small problem; I devoutly hope Unicode mysteriously starts working again.

For reference, the Greek keyboard layout looks like this:

Greek keyboard layout

Greek keyboard layout

I’d have put Ω on the W key, rather than V, but that’s just because so many fonts do exactly that.

,

4 Comments

60 kHz Preamp: Board Holder

A cleaned up version of my trusty circuit board holder now keeps the 60 kHz preamp off what passes for a floor in the attic:

Preamp in attic

Preamp in attic

The solid model became slightly taller than before, due to a serious tangle of wiring below the board, with a narrower flange that fits just as well in the benchtop gripper:

Proto Board - 80x110

Proto Board – 80×110

Tidy brass inserts epoxied in the corners replace the previous raw screw holes in the plastic:

Proto Board Holder - 4-40 inserts and screws

Proto Board Holder – 4-40 inserts and screws

The screws standing on their heads have washers epoxied in place, although that’s certainly not necessary; the dab of left-over epoxy called out for something. The screws got cut down to 7 mm after curing.

The preamp attaches to a lumpy circle of loop antenna hung from the rafters and returns reasonable results:

WWVB - morning - 2017-01-16

WWVB – morning – 2017-01-16

The OpenSCAD source code as a GitHub Gist:

, ,

1 Comment

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

Raspberry Pi CPU Temperature Watcher

Having just put a headless Raspberry Pi in the attic, the chip temperature is of some interest. Doing this in an SSH session comes in handy:

watch 'echo "scale=1 ; d = $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ; print d , \" °C\n\" " | bc'
# blank line to ensure the underscore displays correctly

Raspbian doesn’t have the bc calculator by default, so do that first.

For whatever it’s worth, the Pi starts out at 10 °C and warms over 60 °C under heavy load:

Every 2.0s: echo "scale=1 ; d = $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ; print d , \" °...  Sat Jan 14 19:58:59 2017

61.7 °C

It ticks along in the mid 30s under light load.

You can run all that in one tab of a terminal window through VNC. If you’ve got that much GUI goin’ on, just add a thermal monitor in the panel and be done with it.

,

2 Comments