A very simple RF generator

This is a project ANYONE can build.
And it is a useful tool to have around.

I built this in a couple of hours, and then some hours to write the Arduino code for it.

The hardware

This is the really simple circuit. All you have to do is connect three pre-built modules : an Arduino board of your choice, a small OLED display and a Si5351 PLL breakout board.
When you order all the parts from China (except the box) , total cost is under 10 Euro.
In the picture I use an original Adafruit module, but for my first tests, I used a cheap Chinese clone, and it worked just as well.

Click on the image to get a larger view.

Each module just needs 4 wires to the Arduino : +5V and GND, and SCL and SDA (Clock and Data lines for the I2C bus).
Three buttons do all the work, and can be connected to any digital pin (D2-D13) you like, just make sure the numbers correspond in the code.
My connections were dictated by the physical location on the piece of perfboard, so I could solder the buttons directly to the Arduino pins without extra wires.

I did think to use a rotary encoder, but I wanted to keep it as cheap as possible, and most people have pushbuttons in the junkbox, but maybe rotary encoders are not so common.

That's all there is to it !

I found a nice metal box in a local "poundshop" (actually the box was around 1 Euro in the shop Wibra, well know to Belgian and Dutch hams, hi). It's a bit larger than an Altoids tin.
I have seen similar boxes at the known Chinese vendors for less than 1€ too.

Like it often goes, I spent more time drilling and filing the holes for everything, than the time needed to solder the parts on the perfboard.

I put a piece of (non conducting !) foam on the bottom of the box, and fixed the board inside with hot-melt glue.

There are still some shortcomings to my build : the display is sitting a bit too low in the box.
Some friend suggested I could have mounted the parts ON the lid instead of in the bottom of the box, and then maybe could have added a small Li-Ion battery beneath it, etc ...
Maybe some ideas for Version 2.0 .. but at the moment, I'm quite satisfied with the result.

I didn't see any need for a battery, since by the time you want to use the generator , your battery may have gone flat. So I chose to power the box from an external powerbank, which  is very common these days.
I use a LED flashlight which holds one 18650 cell, it can be charged with a regular cellphone charger, and also functions as a powerbank, very neat !

Here you can see the generator connected to my small power meter (see the post about it here).
The power is +13 dBm, but the carrier on 100 MHz is only about +10 dBm, so there is another 10 mW in the harmonics. For serious work, a filter should be used.

Software and "operating manual"

Making the sketch for the Arduino was really simple , thanks to code for the Si5351, made available by Christoph OE1CGS.
I found a link to his code, and lots of other info on the Si5351 on the QRP-LABS website here.
Christoph also maintains an interesting website of his own, you can find it here.

Now what to do when you have only three buttons ?
The STEP button rotates between several pre-defined steps.
I chose a number of useful steps : 10 Hz, 100Hz, 1 kHz, 5 kHz, 100 kHz, 1 MHz and 10 MHz.
Steps can easily be added or deleted in the code. Maybe later I will make them "settable" via a MENU option.
UP and DOWN buttons do just as the name says ... they put the frequency one STEP higher or lower.

After each operation, the new frequency, the step, and the power level is displayed on the small OLED display. The OLED display is used with a text-only library to save on memory. 

A long press on the STEP button brings up the MENU.
For the time being, I only have one MENU item : setting the output power in 5 steps : 0 = OFF, 1 = 25%, 2 = 50%, 3 = 75 % and 4 = 100%, selected with the UP/DOWN buttons.
Another long press on the STEP button exits the menu.

The menu code is not completely finished, I may add some other stuff and post it later.

You can download the basic version, and a temporary "menu" version from my github page.

73 Luc ON7DQ 

No comments:

Post a comment