Pico-WSPR-tx Does It In Software

What do you need to make a radio transmitter? There are builds that work with just a couple of transistors. But how about a GPS-disciplined small signal beacon? You can actually get the job done for less than the cost of a fancy hamburger, thanks to [RPiks]’s pico-WSPR-tx and the Weak Signal Propagation Reporter Network (WSPR).

WSPR is a digital protocol where a beacon encodes its callsign, location, and transmitting power, and then sends it out to a network of receiving stations worldwide. The idea is to use the data coming from the beacons to determine whether radio propagation conditions are good or not; if you hear a quiet signal from afar, they’re good in that direction. [RPiks]’s beacon design simply includes a Raspberry Pi Pico and a GPS receiver. Everything else is software.

Of course, this means that it’s using the Pico’s GPIO pins for transmission. Maybe you want to add some filtering to take off the rough square-wave edges, and/or maybe you want to boost the power a little bit with an external amplifier. If so, check out our own $50 Ham column’s advice on the topic. But you don’t need to. Just a Pico and a GPS should get you working, if you want to test the WSPR waters.

38 thoughts on “Pico-WSPR-tx Does It In Software

  1. WSPR is definitely one of the coolest aspects of amateur radio especially for those of us more intrigued with the technology of radio communications than with the on air interaction with other amateurs. The distances covered and the minimal power levels needed are nearly unbelievable. There are currently several manufacturers supplying transmitters and related equipment at very reasonable prices.
    Jim WB4ILP

      1. If not the FCC then by their local equivalent.

        Amateur radio enthusiasts are restricted worldwide and required to comply with regulations that are multinational in nature. The exact rules that apply may be different, but they are unlikely to be non-existent.

        Available frequencies differ, power levels available, encodings etc may all be a little different, but the general rules, regarding not splattering your signal across bands, particularly across non-amateur bands are almost unquestionably universal.

        If you find a country without local regulations regarding that then you’ve found a country that isn’t signed onto the international agreements in the first place. Intentionally communicating with them on the amateur bands is also technically violation of the regulations.

        The only real bonus with this in an unfiltered scenario is the low signal power and the reality that it isn’t likely to actually cause significant interference by its very nature.

        Even filtered its technically illegal for me without a different certificate than what I have. My have to up mine to Advanced…

        Toss on a filter, which at these power levels isn’t difficult and this is a cool project.

      2. Never mind “laws”. It is a matter of simple etiquette and human decency. Anything you do which purposefully emits radio waves MUST be designed so as not to generate output waves at frequencies which someone else might be using for something important. Defy whatever government departments you wish, in whatever aspects of life you encounter them, in whatever ways you like, but when it comes to RF spectrum, be good and share it sensibly.

  2. Nice hack!

    But an external filter definitely isn’t optional when putting this on the air, without any qualifiers like “maybe you want” (HaD) or “if you want to use this module extensively” (project page).

    1. Yes, filters are important. However I think you’re bringing that up because of the PiFM tx hack, which is *extremely* noisy, likely to be used by people who don’t know enough to use it responsibly, and was mentioned on HaD often enough to require an automatic disclaimer (which I have made several times myself).

      But this is on completely different hardware (the Pico, *not* the Pi!), in a completely different frequency band (7000kHz) that doesn’t require splashing harmonics about to reach, is a low power mode, and is likely to only be interesting to people who already know what they’re doing.

        1. So? They can’t go anywhere, as the appropriate antenna connected to it is resonant at an extremely low frequency and will do a terrible job of radiating the higher harmonics.

          Unless you’re going to go around criticising *every* microcontroller project on HaD that isn’t inside a faraday cage? All those GPIOs, constantly generating square waves…

          1. It’s not that rare for an antenna to be effective at the harmonic multiples of the fundamental frequency it is designed for. For low frequencies like this, they can even be more effective at harmonics than at the base frequency.

          2. HF dipole antennas work okay on odd harmonic multiples.
            So a 40m dipole will radiate decently on 15meters and be a little high on 6m.

            A “perfect match” for a square wave rich in odd harmomics :)

          3. Uniformed… A few milliwatts propagates around the world. Those harmonics *will* drive another operator across town crazy. Used to be rules re QRP harmonics were different and more relaxed. That’s gone.

          4. No, it will work fine on every odd harmonic, it will even start to generate gain in the direction of the wire when it is a few wave length long.
            And it just so happens that a square wave emits odd harmonics.
            A Low Pass filter is required. Radio Amateurs are the only group in the society that are allowed to operate home built transmitters. We get that privilege as we have proven in a test that we know the regulations and will make sure we operate within the boundaries of it.

      1. And if you are transmitting WSPR you would have a callsign allocated to you by your government (Which should have given you the basic knowledge that you need to filter all TX).
        Each 110.6 second WSPR transmission is 50 bits (28 bits for callsign, 15 bits for Maidenhead locator, 7 bits for power level). So if you have not been allocated a callsign by your goverment, and are using some made up random string, you are transmitting your location. And since timing is critical to how WSPR works, even if you transmitted a fake location, your location can easily be worked out.

        WSPR is well designed there are safeguards in the protocol to help track down idiots.

  3. In software… PLL in software. Why? Just run the Pico’s clk_sys and clk_peri from pll_usb (either at 48M or up it to 192M and divide clk_usb by 4 to keep USB working; if you need to calculate something along the way), route pll_sys to gpout21 and reconfigure it along with clk_gpout21 divisor as needed. You already have two hardware PLLs, so just use one!

    1. WSPR frequency step is 1.4648 Hz around the 7.04 MHz middle frequency. RP2040 PLL can’t do that fine steps.

      Even the fractional divider of clock outputs only has 8 fractional bits, giving frequency step of about 1 kHz.

      1. I’ve checked the code instead of just reading the descriptions. I understand the situation better now, so thank you for pointing it out to me.

        In order to tune down to such small fractions, they have implemented PLL over Pico’s clk_sys using what amounts to PDM with respect to signal edges. I assume that the correction noise is random enough to avoid spurs, but I would expect to still see increased noise floor around the carrier.

        1. You probably don’t even need a dedicated mixer. Pico’s ADC has high enough bandwidth to undersample 7.04 MHz. You need a single-transistor LNA followed by a band-pass filter and then let the ADC downmix the signal for you to +40kHz (at default ADC rate).

          1. 2nd for wanting to hear more about this. I’m somewhat hazy about picking out a very narrow band signal from 40kHz on a pico.

            Any links to code/papers/pages would be much appreciated!

  4. Also, I’ve recently experimented with Pico at 434MHz and it “works”. Either using 3rd or 5th harmonic or even overclocking to 434MHz directly (ideally run everything from pll_usb and overclock just pll_sys for gpout). There are huge side lobes and some spurs just from a CW, though. The PLL was not designed for RF operation, especially so far outside the specification.

    What’s super funny to me is that at 434MHz you don’t even need a dedicated antenna. It seems that USB shield is connected to ground without a ferrite, meaning the USB cable is your antenna as the GPIO pin feeds the parasitic capacitor causing ground current spikes. Well, at least that’s my current theory.

    I can reliably receive the Pico from across the flat with RTL-SDR at zero LNA gain. I can also reliably receive it at 868MHz (2nd harmonic) and a little bit at 3rd harmonic. This could probably be used to control some RC device in a pinch.

    1. I’v done the same with ESP32, setting a PWM channel to 1-bit resolution and frequency 33.875 MHz, one harmonic at 433.875 MHz falls close enough to 433.92 MHz and can be received up to 10m away by 433 MHz devices with a 17.5cm piece of wire (very not legal of course).
      Without antenna the range is up to 1m, while being CE/FCC compliant, it can be co-located near a 433MHz device to make it controllable from anywhere in the world.

      1. Yeah, it really drives home the point that there are two kinds of electrical engineers. Those who make antennas intentionally and those who make them unintentionally. I’ve just checked what a TFT screen at 62.5 MHz on a breadboard does. 😅

  5. Has anyone actually looked at the spectrum of one of these low-rent WSPR transmitters from a few hundred feet away? Is it really so bad that the black helicopters of the FCC are going to start hovering over your and shooting you with those little tranquilizer darts while your family watches in horror? Or is everybody spouting theory without their own measurements of a completed, operational system?

    1. Ya, there’s a lot of man-splaining going on. Instead of talking about the idea or equipment. Which is interesting for two reasons. A seriously low cost technology that enables a lot of the planet qualified to participate. And the technology being off the shelf.

    2. You mean the part where the developer suggested if it was going to actually be used for anything other than intermittent testing that one would be advised to add a filter, hmm.

      Wait till you figure out how complicated the filter is for this… it’s not exactly onerous

    3. It might be fine, but I side with those who object to HaD’s “But you don’t need to”. They should be more responsible and mention the caveats about licencing and corresponding emissions-filtering constraints

  6. Thanks for this brilliant project. I’ve been looking at your code on github, and you have put a lot of work into it, and lots of comments. It follows on nicely from the R Pi code that has been around for some years. With the GPS disciplined freq stabilisation, it’s a very cheap way to have a precision oscillator. Is there any chance to go a little higher in frequency for the fundamental?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.