Minimalist VHF Software Defined Radio Part 2

Shortly after I published the first post on a simple VHF SDR, Brady KC9TPA started making suggestions about optimising the code. So I encouraged him to have a look into the transmit side. How can we take a baseband modem signal (like GMSK) and convert it up to a HF IF frequency like 10.7 MHz using the STM32F4 DAC?

After a busy month (and not much sleep) Brady has done it! The following figures explain how it works:

Normally we would use a baseband DAC, mixer, LO, and crystal filter to generate a signal at HF (top). However Brady has shown it is possible to use a much simpler architecture (bottom).

So with the STM32F4, some clever software, and a buffer amplifier, he has generated a 10.7MHz HF signal. The DAC runs at 2MHz, which creates images (aliases) spaced every 1 MHz. The Band Pass Filter (BPF) selects just the image you want, e.g. 10.7 MHz in our case. The BPF doesn’t have to be very demanding like an Xtal filter, as the other images are 1MHz away. It is possible to tune the exact frequency a few hundred kHz in software.

Compared to a baseband IQ design this architecture doesn’t need two DACs, and doesn’t have have any IQ balance issues.

He used a GMSK modem signal as the baseband signal, however it could have easily been SSB, analog FM, or FreeDV. This is basically a baseband to HF SSB exciter. With a suitable BPF it could easily be tuned to anywhere on the lower HF bands. Software could then be used to tune the tx frequency within that band.

Brady received and sampled the 10.7MHz signal using an off the shelf SDR and it demodulated perfectly. Here are few photos showing his experimental set up, just a STM32F4 Discovery board and a buffer amplifier connected to the DAC. Note the sharp edges on the scope plot – this indicates lots of juicy HF content that we can tune to. He hasn’t added a BPF yet. The last plot is the GMSK signal as received by our demodulator running in Octave.

Our next step will be to mix this signal to VHF and add a PA to produce a 1 Watt 2M signal, to support our VHF FreeDV work. Please contact us if you can help us with a VHF PA design!

This design and the previous post that demonstrated the HF rx side suggests that the SM1000 could be modified to be a HF SDR transceiver. It already has a microphone and speaker amplifier, and even runs FreeDV out of the box! We would need to add a BPF, PA, and some gain on the rx side.

There is still a question over the STM32F4 internal ADC, e.g. it’s inter-modulation performance when used in over-sampled mode (thanks Glen English for pointing this out). Some more work required there. However this architecture is not limited to the STM32F4 – any uC connected to a few M-sample/s DAC and ADC (internal or external) will do. That’s the great thing about radios based on gcc C code and nearly no hardware!

8 thoughts on “Minimalist VHF Software Defined Radio Part 2”

  1. I was thinking about this concept today, and the thought came as to how you could simplify it further, by deleting the buffer amplifier.

    Correct me if I’m wrong, but this amplifier is used to get a higher sampling rate out of the STM (2 MS/s versus the built-in 1 MS/s). Obviously 1 MHz images will get you faster to 10.7 MHz than 500 kHz images, at usable dynamic range.

    But there is no magic in 10.7 MHz. You’re still going to need a mixer to get to 145 MHz. So, my thoughts are 5.35 MHz which is three triplers away from 145 MHz (or as easily mixed to higher frequencies). 10.7 is the 10th image of 1 MHz, 5.35 MHz is the 10th image of 500 kHz. Just thinking out loud…

    1. The problem is that the internal buffer on the DAC is just too slow to generate clean aliases up at 10.7 Mhz. It’d be possible to run at a lower sample rate and hit 10.7, but the internal buffer would strongly attenuate those high aliases. This app note from ST does a better job explaining all of the ins and outs of it than I do (http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/application_note/DM00129215.pdf). We’re using 10.7 Mhz as an IF because it’s easy to get narrow ceramic and crystal IF filters for 10.7.

      1. Thanks Brady, yes that’s the document I read when I was trying to figure out what the Buf Amp was for. Interesting project. Your right about the IF filter.

  2. One advantage to keeping the IF higher rather than lower is that the filtering to reject the image and LO leakage can be easier to accomplish. It is important to be able to reject that image so that we don’t transmit out of band. 10.7 MHz is also a nice IF frequency since a wide variety of off-the-shelf filters can be purchased at that frequency. You can get high performance out of such filters for a low cost.

    However, keep in mind that there are some disadvantages to using multiplied up DAC signals. Everything regarding frequency and phase gets multiplied up. Noise can potentially be a problem. If I remember correctly the phase noise will expand out in bandwidth by the same multiplying factor. This means that the bandwidth of the phase noise of the oscillator driving the DAC will get multiplied up. The phase noise that the DAC adds will also multiply up. It potentially might be worse than that. This is a reason to not multiply up by too much. Hopefully things will be fine with using this method, but just watch out for the potential dangers. It is certainly a nice way to get a higher frequency out of a DAC.

    1. Thanks John, yes I have also been thinking along similar lines about the tx phase noise from this approach, which will be depend on the uC’s PLL We will have to measure it. If the phase noise is poor we could look at clocking the DAC output from another, higher quality oscillator.

  3. Looking a bit at the math, I notice that the 23rd overtone of 465kHz is at 10.695MHz, well within the passband of an off-the-shelf 10.7MHz ceramic filter.
    And not even having to use the mixing up approach should complicate things too much, either use a 455kHz 1st IF and mix it up with a crystal (10.245 MHz seems to be one of the standard frequencies my distro carries), or use a 700 kHz 1st IF and mix it up with a 10MHz signal.
    With the the CPU you’re using, you’re bound to use some (even) overtone of 10MHz to clock it, so why not make it a precision crystal oscillator, usable by the other components in the radio? I mean, you’re going to need precision for the part which mixes it up to 145MHz anyhow?

  4. There are many ways to generate 10.7 and if the direct method works, all the better. Mixing up to 10.7 would be painful as the filter would need to be better (likely) and there is added $ and complexity of the additional oscillator. Put a few additional $ into the direct 10.7 filter rather than a mixer. Everything is a tradeoff.

    I’ve not looked at the DAC, but rather than get locked into 10.7 right away, consider generating 28 MHz. Plenty of DACs could gen 28MHz.

    1. This is a ham band and the HF unit could be amplified, filtered and put on the air directly.
    2. There are tons of 28-144 transverter designs: see old ARRL handbooks, Dubus, CSVHF… Or buy one from Down East. 28440 is also common.

Comments are closed.