EngineerGuy314 / pico-WSPRer

Minimalist WSPR tracker for pico-balloons utilizing Raspberry Pi Pico (or Rp2040) as the RF generator (aka The Cheapest Tracker In The World™). More info: [WIKI](https://github.com/EngineerGuy314/pico-WSPRer/wiki/pico%E2%80%90WSPRer-(aka-Cheapest-Tracker-in-the-World%E2%84%A2))
MIT License
50 stars 9 forks source link

Wrong frequencies #55

Closed IU5HKU closed 1 week ago

IU5HKU commented 1 week ago

Hi, i'm testing the multiband code, but unluckly for me, it doesn't work as expected. The only frequency who lies in the small wspr tx window is the 20m one, all the others are out of frequency of an amount who depends on the choosen frequency. I'm using a RP pico one, with 2040 mcu. I've sets 'X' as suffix and, '--' as Ub4 all the remaining settings are left as default. What i'm doing wrong? Ah, when the tx starts, it's not wspr-modulated, in the waterfall it looks like the 'test frequency', and, as said before, out of the wspr window by some kzh...look:

Screenshot_2024-11-24_20-53-02

this is grabbed from my local openwebrx receiver, here the cpu freq is 133Mhz but you obtain the same with 115Mhz.

Thank you for your time MC

EngineerGuy314 commented 1 week ago

You can't run bands higher than 20M without overclocking. For instance for 10M you would need to set the Klock param to 230Mhz at least. You could probably do 17M at 150Mhz, but I haven't tried. Unfortunately not every Pico likes to be overclocked, so you need to try it and find out.

Also, If you did not wire up the PPS signal as shown (or if the GPS does not have a position fix) the output frequency will be uncalibrated and likely very wrong.

If still no luck, try the non multiband version and see if that behaves the same. Let me know, thanks. And please try to include a screenshot of the user-config screen.

Using the semi-secret standalone beacon mode ('X' as suffix and, '--' as Ub4) has not been tested on multiband. If it works on the regular version but not multiband I need to dig into that a bit...

IU5HKU commented 1 week ago

Yes, now everything works as expected, my fault was to not overclock the mcu. Values you told me are correct, 150Mhz at least for 17m, not less than 230Mhz for 10m, my pico board (the original one) support without effort an overclock till 250Mhz, I'll try if it still works with a cheap chinese clone asap. I'm using the pps, yes, I've followed the circuit you show in the wiki page. I confirm that 'X' and Ub4 '--' works without problems in the multiband version, well done. Please, add this useful hints about frequencies and overclocking in the wiki page, so other users can benefit about that. I'm also using an 1:9 balun, with rf output pins practically in short circuit, without overheating problems, as you told me in the past. The only caveats, but that I've experienced with other projects i did in the past, you need to place the gps antenna quite far away the dipole, because the rf output into a resonant antenna completely takes over the gps signal, this is obviously not a software related problem... :-) My compliments for this project, clean code and works like a charm.

EngineerGuy314 commented 1 week ago

I will update the documentation with the overclocking information.

Thank you for verifying the standalone-beacon mode works in multiband!

Regarding the ability to overclock some rp2040's, I am starting to suspect that the reason some boards function at 270Mhz while others do not has something to do with the on board power supplies. None of my custom-PCB versions will run at 270Mhz, but they all use a pretty simple LDO regulator. Genuine Pi Pico's all seem to work at 270Mhz, but they have a fancy buck/boost multi-mode regulator. The fake Picos I tried were hit or miss. Well, thats a topic for another day...

EngineerGuy314 commented 1 week ago

This got me thinking, so I put a scope on the 3v3 and looked at behavior during startup with different Klock speeds. Previously, I was setting the clock speed, then enabling the GPS unit. When the GPS unit is first enabled it makes the supply sag to about 2.9v for 0.1mS. It turns out the rp2040 can tolerate that sag easily normally, but not when overclocked.

So I just changed it to power up the gps first, wait a couple milliseconds, and only then set the clock speed higher. Now I can run a full 270Mhz on the same boards that wouldn't work before! Change has been pushed to repo.