Home RF Signal Generator
Post
Cancel

RF Signal Generator

Originally posted 2020/05/17

sig gen pcb

Following my build of a low cost vector network analyser last year, I had a desire to add to my RF lab, and with the parts I had remaining a simple RF signal generator seemed to be the obvious choice. The end result is shown above, and is capable of sweeping between 23.5 MHz and 6GHz, with -35 to +15 dBm of output power (-25 to +10 guaranteed).

Whilst I had considered making it a single board device with the micro-controller on-board, due to the ubiquity of the Adafruit Feather form factor I decided to design this as a “Feather Wing” so it can be plugged into a number of different main boards, which would allow it to be used in conjunction with WiFi, BLE, or even Circuit Python, all by switching out the board it is plugged into and writing some new firmware.

However, after struggling to get the MAX2871 up and running on my VNA for a number of reasons, all of which existed between the keyboard and chair, I wanted to be able to port as much of my firmware as possible over to whatever Feather I used. Whilst the STM32F405 Feather would have been a perfect option (as I used a STM32F373 on my VNA), it was not available when starting this project, so I designed a STM32F103 Feather, which with the exception of the ADC driver could run all of my previously developed VNA firmware.

stm32 feather pcb

Another goal of this project was to write a GUI for it, as I ran out of time with the VNA and wanted to get some experience designing a user friendly interface for the device. After first writing a python script which handles proper argument parsing and error checking (both lacking in the firmware), I designed a GUI in PyQt5 which would call the python script, and would in turn send the correct commands to the signal generator over a COM port. Being the first real project I had used QT for there was plenty of learning experiences along the way, but the end result was quite nice, with a simple GUI allowing the frequency and power to be set, along with configuring a frequency sweep.

frequency selection gui

What’s next for the signal generator? There are a number of features including Int/Frac-N PLL selection, power sweeping, and a few bugs with the CLI usage which need be added / resolved, however some of these will require a rewrite of the firmware to handle these options, as the code ported from the VNA was very narrow in scope. As it is I’ve been looking for a project to play around with an RTOS on, and this project would be perfect for this as there are a number of limitations due to the single threaded design of the current firmware. However after spending the last month and a bit getting the firmware and software working I need a break to design some hardware, so will continue this project at a later date. If you want to find out more about the project, look at the design files, or make your own, all of the info is up on GitHub. Feel free to reach out if there are any questions.

hackrf sweep of output

This post is licensed under CC BY 4.0 by the author.