For anyone working with radio frequency circuits, having a stable RF signal generator on the test bench is almost a necessity. It can substitute a reliable signal for testing receivers, it can allow characterization of filters and amplifiers, and it can substitute for oscillators that are questionable or not built yet. It is also a convenient tool for checking calibration of other test equipment.
The generator described here can be assembled for less than $30 USD but is very stable, has wide range, and is battery powered. It tunes from 4 KHz to 100 MHz in a single continuous range in steps as small as 1 Hz or as large as 10 MHz. It has an OLED display for easy reading and a reliable rotary encoder for tuning. While running at 5 volt power, it draws less than 90 milliamps.
This project is easy to build, even easier to use, but it is not simple. The heart of the generator is a three-output Phase Locked Loop synthesizer using a temperature-compensated crystal reference oscillator and controlled by an Arduino microcontroller board. The display is an array of 8,192 Organic Light Emitting Diodes with its own on-board controller.
What makes this such an easy project? All the principle parts are pre-wired. Just a few solder connections join the pre-assembled controller board, the pre-assembled synthesizer board, the display, the rotary encoder, and the output connector. There isn’t even a power supply since everything is powered through the controller, which is powered by a battery through its USB port.
To make it crazy easy, both the synthesizer and the display are controlled using an I2C bus, just two wires in addition to power and ground. The necessary regulators are already part of the pre-wired boards.
The controller is an Arduino Nano. The firmware is available here for free or you can provide your own to suit your needs. Loading the operating system is done using a simple USB cable from your PC and handled by the free Arduino software. The synthesizer is a Si5351 with a temperature stabilized reference oscillator already mounted on a board available from Etherkit.com. The display is a .96” OLED display with I2C interface available from Amazon.com.
The most difficult part of the project is to decide what sort of cabinet to put it in. For best shielding I would recommend a metal case. If you intend to use it to test receiver performance or some other purpose depending on low level signals then this is very important.
My case was half of an extruded aluminum case from a failed mobile data transmitter. I had sawed it in half and used the first half to house a small QRP transceiver. I then cut front and rear panels from some scrap aluminum (salvaged from junk equipment housings) using a plain hacksaw, a hand-held rotary drill, and a file.
Most extruded cabinets have slots that accept circuit boards and also serve as anchor points for the panel screws. Mine had those. I fastened the Nano and the Si5351 breakout board to a piece of perf-board cut to slip into the lower rails. I positioned the Nano so that the USB connector was nearly flush with the rear panel and made a cut-out there large enough to allow the USB cable to make a connection when the panel was installed. I used short wire jumpers to connect the Nano and synthesizer and a short 4-conductor ribbon and plug to plug onto the display. Four more wires connect the rotary encoder (the only control), and a small capacitor serves as the jumper from the synthesizer board to the BNC connector on the rear panel. On my build I mounted a 2-conductor jack on the board and a short length of RG-174 coax through the capacitor to the center pin of the jack. Whatever you do, leave enough room to enable mounting (or removing) the panel from the case. The capacitor may not be necessary, it is just to isolate the Si5351 from any DC voltages. Cheap insurance, though.
You could, of course, mount this generator in any size case that you are comfortable with. It doesn’t need to be small. You could install it with additional features, like a power supply, or a variable attenuator. Be creative.
Download the EZgen2.ino file by clicking here. Right click anywhere on the displayed source code page, choose “Save File As...”, and save it to your Arduino Sketchbook as a plain text document. Your operating system may be worded a bit differently but you get the drift.
You can download the listing PDF here.
If you don’t already have the required encoder, display, and synthesizer libraries then download them from:
https://github.com/brianlow/Rotaryhttps://github.com/adafruit/Adafruit_SSD1306 https://github.com/etherkit/Si5351Arduino Place them in the “Libraries” folder and install them from the IDE “Sketch” and Libraries tabs.
Create a folder in the sketchbook and name it “EZgen2” and move the EZgen2.ino file into it. Open the IDE by clicking on the EZgen2.ino file. Open the “Tools” tab and option the IDE for “Arduino Nano” as the board, “ATmega328P” as the processor, and check to ensure that you have the correct communication port selected. See if the Nano is indeed connected and communicating by opening the “Get Board Info” window and confirming that the “OK” box is checked.
Compile and upload the firmware by clicking on the “upload” (the right arrow on the tool bar) icon. When the message bar at the bottom of the screen shows “Upload Complete” then you should see the display screen come on with the name and version of the firmware then quickly clear to show the initial frequency of 10 MHz. Congratulations!
There is only one control and that is just the tuning knob. There is no power switch, you simply plug in the power to begin operation. I am quite fond of the small 5 volt battery packs used to charge cell phones in the field. They are cheap and very convenient. There is only one RF output connector.
Tuning is a bit unusual, though, since it uses my simplified "Agile Tuning" method that I developed for the BITX series of transceivers. Rather than persistent pressing of the tuning knob to move the tuning increment you simply press it in and turn it at the same time. When you do that you will see the underline cursor move left or right depending upon which direction you rotate the knob. Place the cursor beneath the digit that you wish to change and then release it. Turn the knob to increase or decrease that digit.
As an example, say that you want to tune in 1 KiloHertz steps. You would press in the tuning knob and rotate it so that the fourth digit from the right is underlined. Release the knob and you can then tune in 1 KiloHertz steps.
The Si5351 sythesizer has two more outputs available. With firmware changes and just a couple more BNC jacks (with blocking capacitors) then you can have as many as 3 virtual oscillators functioning simultaneously. For just pennies more!
A real signal generator should have variable output levels, too. As the EZgen II now stands, I use an external step attenuator to provide lower signal levels when needed. For my next build I am considering installing the Si5351 board within an additional shield and adding a variable attenuator on one output. If I do, I'll add an AD8307 level detector to drive the display with a precise amplitude reading. That will certainly require a larger cabinet! Perhaps an internal AC power supply? The possibilities are endless!