This project explain how you can build your own RF generator using an Arduino.
The unit is built around my Arduino breakout circuit board. (more details below)
The output frequency can be set from 250 -950 MHz in steps of 6.25kHz - 10 MHz.
RF output ON/OFF and many other functions.
Background
I needed a good RF generator for my antenna experiments. I wanted to have clean rf signal and I also wanted it to be portable.
I started to experiment with different VCO and PLLs, and by good luck I found a very good tranceiver cuircut RFM22.
This circuit can handle all kinds of rf communication with very good rf quality. A great feature it had, was a wide range internal VCO.
The RFM22 can output a rf carrier from 250 to 950 MHz in one sweep and with low noise. The project was born rigth there!
A a good rf generator needs to be controled in some way.
I choosed to use an Arduino Nano module as control unit, and why not use the great LCD display of Nokia 5110 phone.
I added four buttons to control all functionality of the rf generator and four LEDs for indication.
The pcb of this project is special, since I made it as a breakout bord or general purpose bord for experimenting purpose.
I will use this board in many comming projects, but first out is the rf generator.
I will talk more about the breakout bord in next section...
I can asure you, this project will open many new doors for you.
Arduino Breakout bord
So before we go into details about the rf generator, lets have a look at my general purpose pcb.
I advice you to click on the picture to the rigth, and enlarge it while I explain how it works.
At the top right corner is an Arduino Nano module. The only differens between Nano and Uno is physical size.
Both circuits has the same Processor ATmega328 and clock speed of 16 MHz. I do have a suprise for you, which I will tell you later in this project.
In the top center of the pcb you will find a Nokia 5110 LCD display. This display is my favourite. It has great contras in day light and when it is dark,
the background LEDs giver perfect view. Another advantage with this display is that it is very simple to use. You can write both texts and make drawings.
It is common labelled as Nokia 5110 but the real name is lph7366 (lph7366.pdf) and the driver circuit inside is pcd8544.pdf.
Nokia 5110 was the phone using this display. I have a great Arduino library for you, to handle this display in a very simple way, do not worry.
Under the display is four pushbuttons (P3, P2, P1, P0). To the left of the display you will also find four LEDs with different colors.
The buttons can easy be read with the Arduino processor and the same with the LEDs, they can easy be SET by the Arduino processor.
So, now we have a processor, display, buttons and LEDs perfect to use for any projects.
The bottom area is made for experimenta purpose. You will find footprints for SOT23-8, SOT23-6, SOT23-5 and a large area with pads.
Here you can place your own parts for experimental purpose.
One last thing to mention, the top left corner. Here is pads for the rfm22 radio module and a SMA antenna output.
I have choosen to use the rfm22 for my comming radio projects and of course for this rf generator project.
The rfm22 is simple and very powerful radio transceiver. It has great sensitivity and strong output signal.
I guess you have a clear picture why I developed the breakout bord, lets focus on the rf generator project now, shall we.
Hardware and schematic
To the right, you can click on the schematic to enlarge it.
Main power to the board can come from USB port of the Arduino or as RAW power to the pin list left side.
The Arduino has a 5V power regulator which will feed the ATmega with +5V and the LEDs. The +5V will go to another power regulator of +3.3V placed on the board.
The 3.3V will feed the display and the rfm22 circuit. Both the +3.3V and +5.0V can be found on testpoints of the board to be used on the experimental pad array.
LCD display
The LCD display has a SPI interface and it is connected to the Arduino at D9, D8, D6, D5, D4. The display work with 3.3V levels, so I have added divider resistors
to each line. The resistor reduce the 5V levels from Arduino down to 3V lever which suits the LCD better. Behind the LCD is four white LEDs to give backlight.
Buttons and LEDs
The buttons and LEDs are controlled by an I2C expander circuit. The PCF8574.pdf circuit is a input/output Port.
Buttons are connected to P3, P2, P1, P0. and the LEDs are connected to P7, P6, P5, P4. These signals can also be found on the output pins.
RFM22B
The rfm22 radio module is a tranceiver (Transmitter and Receiver RFM22B.pdf).
The rfm22 module comes with a referens crystal and an antenna rf switch.
In this project I will use the rfm22 to create a rf carrier, that is all. All is placed on a small pcb 16 x 16 mm. The difficult part is the pad spacing, which is 2mm.
This makes the module unable to be soldered to standard 2.54 mm pads. Do not worry, this breakout board has perfect footprints for the rfm22.
The rfm22 is connected to the Arduino through the SPI interface. Here I use divider resistors to reduce the 5V level to suitable 3V levels.
The output rf signal goes to a sma connector. THere is two testpoints (Rx, Tx) which can be used to control an external antenna switch. Here is a schematic showing how the rfm22 module use GPI00 and GPI01 to internally control Rx and Tx switching.
In comming project I will use this module for communication purpose and it has great sensitivy -121dBm and strong output power +20dBm.
The rfm22 can be set to four differen modulation types, 1. unmodulated carrier, 2. On-Off Keying, 3. Frequency Shift Keying, 4. Gaussian Frequency Shift Keying.
Data rate can be set from 2kbs to 125kbs. All together, this is a great rf circuit.
Arduino Nano
As I said earlier, there is no differens between the Nano and Uno....but there is. Yes, both use the ATmega328p but the Nano has had problem with its boot.
There has been some documented problem using the watchdog timer. Second, programming is slower than the Uno.
So what I have done is to change the boot to latest Uno boot (Optiboot). This means that the unit behaves as an Arduino Uno. Great!
From this on, it is a Uno and have all advantages an Uno has.
Menu
Below you will see the main menu. Top fram shows the choosen stepsize. You can choose 6.25k, 10k, 12.5k, 25k, 50k, 100k, 250k, 500k, 1M, 10M by pushing buttom P1.
Below the stepzise you will find the Output rf carrier control. By pushing P0 you can alter the rf carrier ON and OFF. When carrier is on the red LED will light.
At the bottom you find the output frequency. By pushing P2, you increase the frequency and by pushing P3 you decrease the frequency. Very simple.
The unit always store the last setting in memory.
Menu Contrast
The Contras menu is not a menu you need to enter often. To enter the contrast menu, you must push the P1 button during power on sequence.
The blue LED will indicate the contras menu.
The contrast of the display can be changed by pushing button P2 and P3. When you find good contrast you simply push P0. That is it.
The unit will remember the contrast setting during power down.
Some lph7366 display has fixed contrast, which means that the manufacture has set the contras to best performance and you can not change it.
Menu Calibration
After the Contrast menu, you enter the calibration menu. This menu display the internal calibration register (REG 09) of the rfm22.
This register will affect the internal calibration capacitor connected to the crystal of the rfm22.
The rfm22 will send out a carrier at 434.0000 MHz. The red LED indicates carried is ON and the yellow LED indicates calibration menu.
By pushing P2 or P3, you will increase or decrease the register and the output frequency can be tuned.
Connect a frequency counter to the output and tune the P2, P3 button until your counter show 434.0000MHz. Push P0 when done.
The unit will remember the calibration setting during power down.
Now, the unit is calibrated to an exact output frequency. Great!
Performance
Below you will see a sweep from 0 to 1GHz. The main rf carrier is placed at 433.92MHz. The unit has about +10dBm output power.
There is an overtone to the right. All together I am very pleased with the performance of rfm22 VCO.
KIT
Order a KIT
Kit include pre assembled board ready to use as rf generator. Unit will have perfect contrast and frequency calibrated!
Final word
I hope you have enjoyed reading about this rf project.
Hopefully you have found new inspiration for your own projects. I will ofcourse share your projects here if you wish.