Sunday, March 16, 2025

A simple Si5351 VFO for RP2040 zero in Micropython

Having had a wonderful time with the Soldersmoke direct conversion receiver and after that a very simple double sideband transmitter, I'm now formulating a DC/DSB transceiver. From the experience of those that have tried, it seems that a traditional VFO on the transmit frequency is not a good idea as the transmit signal gets back in to the VFO and causes problems.

My plan is to use an Si5351 clock generator (<$2) based VFO which should not be affected. Recently I've been playing with the tiny RP2040 Zero boards which can be purchased for under $2 and are an impressively powerful computer.


The RP2040 CPU is powerful enough to run MicroPython. While I'm comfortable in C++ I love python's clean syntax and library. The code is quite simple and I've put it up on GitHub here: https://github.com/peterbmarks/micropython_vfo

Pushing the rotary encoder button changes the step size. You can see it in action here:


My display is a tiny 128x32 OLED board with an ssd1306. I imagine many builders will swap this out for something grander.

The hard part is done with libraries created by smart people:

ssd1306.py from https://github.com/kwankiu/ssd1306wrap/

si5351.py from https://github.com/hwstar/Si5351_Micropython

I like the way all the source code is stored on the MicroPython device.

You can see which pins I've wired the i2c and encoder devices to in vfo.py. You may wish to change these.

This is early days and there are sure to be bugs and improvements to be made. Send me a pull request!

1 comment:

Bill Meara said...

Very cool Peter. Glad to see that the experimenting and building continues. One note: I have never had trouble using one single, on frequency VFO for both transmit and receive. Now it may be a problem with the particular DC receiver we built in the challenge becasue of that big PTO inductor. But in general, this has not been a problem, and is probably much less of a threat with your digital VFOs. 73 Bill Hi7/N2CQR