Category Archives: HAM

100 000 Questions answered

Today, the HAREC trainer on my site has reached a hundred thousand questions answered. Taking into account that this is just a small application I made to test my knowledge before taking the exam, and theĀ limited audience (Dutch-speaking Belgians interested in becoming a HAM operator), and the fact that I don’t advertise its existence, I’m very impressed.

I have no idea who’s using it, and I don’t really feel a need to (although I sometimes am just a tiny bit curious how people find the site). I specifically designed it so you can use it without the need to create an account, enter your e-mail address and all that. If it helps you getting a licence, that’s the most important. But if you want to say hi, just leave a comment.

If you want to join a radio club, I can recommend the Radio Club Leuven, where I can be found most Friday evenings. Feel free to buy me a drink ;-).

Update: Since it is becoming so popular, I have begun to analyze the statistics, to locate the errors in the database (those errors come from the BIPT database itself). The progress can be seen on the wiki page here.

A dirt cheap “spectrum analyzer” with an RTL-SDR dongle.

Update: There used to be an error in the schematic, R2 was missing. It is needed to work correctly.

Frequency response of the 137MHz filter

Frequency response of the 137MHz filter (don’t mind the spurs)

If you want to see the frequency response of a filter, a spectrum analyzer with a tracking generator will be the tool of the trade. There’s only one problem: I don’t have one. An alternative is to hook up an RF signal generator, measure the output power of the filter with a power meter at multiple frequencies, and plot the result manually. But here too I have a problem: I don’t have a signal generator. Or a power meter. Besides, it’s a lot of work. So when I wanted to test a 137MHz bandpass filter, at first I didn’t think it would be possible. Fortunately I found a way that works reasonably well, and cost me nothing.

Using an RTL-SDR dongle, you can sample a piece of the spectrum up to 2 or 3MHz wide at a time. That’s not really enough for use as a spectrum analyzer. However, what you can do is to make the dongle hop from one frequency to the next, and make a composite spectrum. There is software that does just that: rtlsdr-scanner. This is fine if you want to scan the bands to spot interesting frequencies, but I still can’t measure filters with it.

If only I had a transmitter that transmits at every frequency: I could pass it through the filter and see what remains at the other side! Something like a wideband noise generator. After asking Google, it turns out that generating such noise is quite easy: a diode, when operating at the reverse breakdown voltage, generates a fair amount of noise, hundreds of megahertz wide! Then it’s just a matter of blocking the DC voltage with a capacitor, and there you have it, you are now the proud owner of a noise source! You then send this noise through an amplifier stage, but I used the amplifier of the dongle instead (I can set the gain between -1 and +42dB). Not ideal, because there are lots of other signals picked up too, but changing a slider in software is much less work than making a wideband amplifier. I also added an extenal 6dB attenuator immediately after the noise source to get better impedance matching to 50Ī©.

A current source (D1, D2, R1 and Q1) feeding a zener diode. Any diode will do really, just make sure the breakdown voltage is reached. R1 determines the current (there's a 0.6V drop over the resistor so i=V/R). R2 value is not critical, 10k-100k is fine.

A current source (D1, D2, R1 and Q1) feeding a zener diode. Any diode will do really, just make sure the breakdown voltage is reached. R1 determines the current (there’s a 0.6V drop over the resistor so i=V/R).
R2 value is not critical, 10k-100k is fine.

The setup is now ready for prime time. When I turn on the noise generator, the noise floor of the dongle increases by 30dB around 130MHz. So far so good. I set the start- and stopfrequencies to 125MHz and 150MHz, and do a sweep. I repeat the measurement with the filter in between, and save both sweeps. Then in Tools->Compare, I can subtract the two signals. This sets the noise level as the 0dB reference. The result is seen in the image at the top (the “difference” scale is at the right, the left scale is not used as the two individual plots are hidden).

Apart from the spurs, the technique works quite well! It sure has limitations, but so does a professional spectrum analyzer. The difference is that with this dongle, you bump into them a lot sooner. Well, ok, almost immediately. The biggest problem is the dynamic range. If your dongle measures 30dB of noise from the noise source, it means that after 30dB of attenuation, you have nothing left to measure. So while you can get accurate readings of the filter loss at the passband (2.5dB in this case), you’ll hit the noise floor of the receiver before you reach the stopband attenuation of the filter. Also, the ADC of the dongle is 8 bit, so the difference between the largest and the lowest possible sampled voltage (the dynamic range of the ADC) is 20*log(256) or 48dB. Even if you can increase the noise level, you are limited by this 48dB. You could start playing with changing the amplification of the LNA, a bit like High Dynamic Range Imaging. Maybe this could improve the range, maybe it will block the receiver. In any case, the first improvement should be to make the noise source better. Both the amplitude and the frequency range. at 100MHz I get roughly 30dB noise increase, but at 640MHz I only have 10dB left. that means that I have almost no dynamic range at that frequency.

Another problem is that the noise floor of the dongle isn’t flat. It’s more like the Alps. So the dynamic range varies, and you may see some bumps in the frequency response that aren’t really there, it’s just the noise of the receiver itself. If you have a dongle you can see the bumps yourself by setting full LNA gain and doing a large sweep with no antenna connected. You’ll see the power spectrum go up and down, and all kinds of spurs will show up. If you take a look at the FM broadcast band around 100MHz, you’ll see the signals leak through. This device is designed to do the job it’s meant to do at the lowest price point possible, not to have the best shielding and superb RF performance.

Nonetheless, there’s a lot to experiment with. What I’ve shown here is just the results of a few days of hacking. There’s definitely improvements that can be made, both in software and in hardware. So just make yourself a noise source and start playing!

Oh, and if you’re wondering what the filter is used for: it’s for improving NOAA weather satellite reception with a dongle. With these receivers it really helps a lot when the strong signals at other frequencies are removed first.

References:

WSPR with a vector network analyzer

I’ve been playing a lot with my N2PK VNA lately. Not only learning how to measure things (using the wonderful VNA tutorials of PA4TIM), but also how it works internally, and how I can control it from an Arduino. I can already set the frequency and phase of the two frequency generators, and I can read out the ADC.

Meanwhile, at the Radio Club Leuven, there has been a huge interest in WSPR lately, a low-power beacon-like digital mode, ever since Wim ON3ZOE demonstrated running WSPR with a Raspberry Pi. By hooking up an I/O pin to an antenna, with only a filter in between to remove the harmonics, he has gotten all the way to Greenland, 3500km away from Belgium. Hmm…

Arduino controlling the VNA

Arduino controlling the VNA

Continue reading

Making a crystal filter

A few weeks ago, I was given some hand-matched crystals at the radio club. My mission: to make a crystal filter for a Belthorn IF-module I’m going to build. Once again, something I’ve never done before. Let’s dive in with both feet.

To make a filter, there exist many software packages. I used Dishal from dj6ev, a windows program that luckily runs just fine under wine on Linux.

dishal
Continue reading

N2PK Vector Network Analyzer

N2PK VNA under construction
This is a very interesting build. If I were to make it again, I would go for a dual detector and the fast ADC, but even with its slow measuring rate (7 measurements per second), it’s still a very interesting piece of equipment to have. It can be used to measure complex impedances of all kinds of circuits. Using a bridge (I still have to build mine), you can also check antennas, something I’m looking forward to measure. You can find N2PK’s project page for this instrument here.
Continue reading

SMD soldering an SDR transceiver kit

After playing with RTL-SDR dongles and GnuRadio, I wanted to be able to listen on HF. The USB dongles are not suited for this, unless you buy an upconvertor. I looked around a bit I discovered the . As I was keen to learn how to solder SMD’s, this seemed like a great challenge. The kit was ordered and the soldering iron turned on.

There are two three pieces of advice I can give to anyone getting started with SMD soldering. Firstly, spend a good amount of time watching youtube video tutorials. If you hear things that keep getting repeated, then that’s probably important. I particularly recommend the soldering videos from EEVBlog, CuriousInventor, and W2AEW.

Secondly, use flux. If you followed the first advice, then that’s probably already one of the things you have seen everybody do. And for good reason: once you have used it, it will instantly convert you. It is a weak acid, that will do its work when heated. It will eat away the small layer of corrosion that forms around most metals, and allow for a good bond between the soldering tin and the PCB and component. Also, it will make the tin more fluid. It’s hard to describe, but if you use it you’ll clearly see how the flux influences the behavior of the tin. Without flux, drag soldering is almost impossible. With flux, it’s a breeze. I bought a syringe with flux gel, and I even use it for through-hole components when using old components.

And finally, get a good roll of solder wick. It’s like a towel for cleaning up excess solder. It’s simply a braided wire soaked with flux. When you hold it against some solder and melt it, the capillary force of the braided wire will suck all the solder up and leave your surface nice and clean. It’s also great for removing soldering shorts between pins of integrated circuits.

When the SDR kit arrived, it took me a weekend to put it together. It worked first time, and I use the radio for SSTV, WSPR and just general listening. As this also has transmit capabilities, getting a HAM license became a priority. Transmitting to a dummy load quickly becomes boring. To test how far I stood, I converted the publicly available exam questions database of the BIPT to SQL and made an online HAREC test page. A few months later I passed my exam and got the call ON8VQ.