Archive for category Amateur Radio
As part of some protracted flailing around while trying to get GNU Radio running on a Raspberry Pi 3, I discovered Raspbian defaults to a 100 MB swap file, rather than a swap partition, and everything I thought I knew about swap management seems inoperative. The key hint came from some notes on
/etc/dphys-swapfile config file to set
CONF_SWAPFACTOR=2 for a 2 GB swap file = twice the size of the Pi’s 1 GB memory.
Start it up:
sudo dphys-swapfile swapoff sudo dphys-swapfile setup sudo dphys-swapfile swapon
And verify it worked:
cat /proc/meminfo MemTotal: 949580 kB MemFree: 194560 kB MemAvailable: 594460 kB Buffers: 85684 kB Cached: 377276 kB SwapCached: 0 kB Active: 600332 kB Inactive: 104668 kB Active(anon): 250408 kB Inactive(anon): 20688 kB Active(file): 349924 kB Inactive(file): 83980 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 1918972 kB SwapFree: 1918972 kB Dirty: 40 kB Writeback: 0 kB AnonPages: 242072 kB Mapped: 136072 kB Shmem: 29060 kB Slab: 33992 kB SReclaimable: 22104 kB SUnreclaim: 11888 kB KernelStack: 1728 kB PageTables: 3488 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2393760 kB Committed_AS: 947048 kB VmallocTotal: 1114112 kB VmallocUsed: 0 kB VmallocChunk: 0 kB CmaTotal: 8192 kB CmaFree: 6796 kB
Then it became possible to continue flailing …
Rather than bestir myself to measure the Test Signal Source on the Ham-It-Up upconverter:
The 74LVC2G14 Schmitt-Trigger Inverter datasheet supplies useful parameters:
All of which come together and produce a waveform (clicky for more dots):
Which suggests the Test Signal ticks along at tens-of-MHz, rather than the tens-of-kHz I expected from the birdies in the filtered 60 kHz preamp response.
Of course, hell hath no fury like that of an unjustified assumption, so actually measuring the waveform would verify the cap value and similar details.
The dotted line comes from WWVB’s 1 Hz PWM (-ish) modulation: yeah, it works!
Well, not quite all the hash. Enabling the SDR’s hardware AGC and zooming out a bit reveals some strong birdies:
The big spike over on the left at 125.000 MHz comes from the Ham-It-Up local oscillator. A series of harmonics starting suspiciously close to 125.032768 kHz produces the one at 125.066 MHz, just to the right of the WWVB signal, which leads me to suspect a rogue RTC in the attic.
There is, in fact, a free running “Test Signal Source” on the Ham-It-Up board:
Although I have nary a clue about that bad boy’s frequency, measuring it and cutting the inverter’s power trace / grounding the cap may be in order.
The SDR’s AGC contributes about 30 dB of gain, compresses the hottest signals at -25 dB, and raises those harmonics out of the grass, so it’s not an unalloyed benefit. Manually cranking on 10 dB seems better:
The bump in the middle shows the WWVB preamp’s 2 kHz bandwidth around the 60 kHz filter output, so the receiver isn’t horribly compressed. The carrier rises 30 dB over that lump, in reasonable agreement with the manual measurements over a much narrower bandwidth:
With all that in mind, a bit of careful tweaking produces a nice picture:
I love it when a plan comes together …
Radio communication between our bikes failed on the way back from a grocery ride and the problem turned out to be a failed radio:
The Wouxun KG-UV3D radio seems jammed firmly somewhere in its power-up sequence, doesn’t respond to any buttons, and has no hard-reset switch. On the other paw, it’s been in constant (and rugged!) use for almost exactly five years, so I suppose it doesn’t owe me much of anything.
The new radio, another KG-UV3D from PowerWerx, has marginally different spacing around the screw attaching the plug cover preventing the previous screw from fitting, so I kludged up a screw from a 2 mm socket-head screw, a 2.5 mm (yes) washer, and a pair of 2 mm nuts:
Which looks a bit odd, but holds the plug adapter plate firmly in place:
I suppose when the radio on my bike fails, I must rebuild both APRS + voice interfaces for Yet Another Radio, because the Wouxuns will be completely unobtainable.
The weather abruptly became too cold for riding, at least for sissies such as we, but maybe we’ll get out later in the month …
A reader (you know who you are!) proposed an interesting project that will involve measuring audio passbands and suggested using white noise to show the entire shape on a spectrum analyzer. He pointed me at the NOISE 1B Noise Generator based on a PIC microcontroller, which led to trying out the same idea on an Arduino.
The first pass used the low bit from the Arduino runtime’s built-in
Well, that’s a tad pokey for audio: 54 μs/bit = 18.5 kHz. Turns out they use an algorithm based on multiplication and division to produce nice-looking numbers, but doing that to 32 bit quantities takes quite a while on an 8 bit microcontroller teleported from the mid 1990s.
The general idea is to send a bit from the end of a linear feedback shift register to an output to produce a randomly switching binary signal. Because successive values involve only shifts and XORs, it should trundle along at a pretty good clip and, indeed, it does:
I used the Galois optimization, rather than a traditional LFSR, because I only need one random bit and don’t care about the actual sequence of values. In round numbers, it spits out bits an order of magnitude faster at 6 μs/bit = 160 kHz.
For lack of anything smarter, I picked the first set of coefficients from the list of 32 bit maximal-length values at https://users.ece.cmu.edu/~koopman/lfsr/index.html:
The spectrum looks pretty good, particularly if you’re only interested in the audio range way over on the left side:
It’s down 3 dB at 76 kHz, about half the 160 kHz bit flipping pace.
If you were fussy, you’d turn off the 1 ms timer interrupt to remove a slight jitter in the output.
It’s built with an old Arduino Pro Mini wired up to a counterfeit FTDI USB converter. Maybe this is the best thing I can do with it: put it in a box with a few audio filters for various noise colors and be done with it.
It occurs to me I could fire it into the 60 kHz preamp’s snout to measure the response over a fairly broad range while I’m waiting for better RF reception across the continent.
The Arduino source code as a GitHub Gist:
Putting a small capacitor in series with the tuning fork resonator pulls the series resonant frequency upward and reduces the amplitude:
So something around 10 pF, net of stray capacitance and suchlike, should suffice. Plunk a small twiddlecap on the preamp board and tune for best picture:
Using the DDS generator as a manual signal source with 1.0 Hz step size shows the resonator tightens up the preamp’s response quite nicely:
I’m not convinced the preamp will have filter skirts that low farther away from the peak, but it’ll do for a start.
Zoom in on the peak with 0.1 Hz steps:
The bandwidth looks like 0.6 Hz, centered just slightly above 60.000 kHz, which should be fine for a first pass.
I’m tickled: all the hardware & firmware fell neatly into place to make those graphs possible!
Next step: install it in the attic and see whether the filter cuts back the RF clutter enough to stabilize the SDR’s AGC gain.
Over the course of a few weeks, both of the indicators in the SRAM grip shifters on my bike snapped off. Having recently touched my parallel jaw clamp assortment, it occurred to me I could mold snippets of polypropylene sheet (saved from random clamshell packages for just such a purpose) around the nose of a clamp and come out pretty close to the final shape:
A hot air gun set on LOW and held a foot away softened the polypro enough so a gloved thumb could squash it against the jaw. Too much heat shrinks the sheet into a blob, too little heat lets the sheet spring back to its original shape.
The flat tab of the original indicator is about 1 mm thick. I found a package of 47 mil = 1.2 mm sheet with one nice right-angle bend and ran with it.
Because I expect sunlight will fade any color other than black, that’s the Sharpie I applied.
They don’t look as awful as you might expect. The rear shifter, minus the cover:
The front shifter, with cover installed and HT PTT button below the still-good Kapton tape:
The transparent covers press the OEM indicators down and do the same for my homebrew tabs. I expect the Sharpie will wear quickly at those contact points; next time, I should tint the other side.
They’re rather subtle, I’ll grant you that.
Now, to see if they survive long enough to make the worry about a brighter color fading away a real problem…