Signal generator

The signal generator program turns the RFzero into a semi-professional GPSDO controlled signal source from 2289 Hz to 200 MHz and beyond. In addition to a single frequency source the RFzero can also generate two-tone, I/Q, H3A or spread spectrum signals or be used as a sweep generator. It is also possible to control various attenuators making the output level variable.

The setup used during the development of the signal generator.

The amplitude and frequency can be controlled via a keypad, rotary encoders or via the USB port. Different kinds of displays can also be used.

If you want to work very closely with the Si5351A you can try the SigTest program that allows direct register manipulation among other things.


Getting started

If you upload the signal generator program without having a “proper” I2C bus H/W, i.e. with pull-up resistors to 3V3 on both the SDA (D8) and SCL (D9) pins, which may be stand-alone resistors or on an SX1509 module, the program will stop executing and the USB port will freeze. If so please see the I2C, SX1509 and MCP23017 paragraph at the bottom of the page.

The first time you run the signal generator program you will have to enter the configuration mode and evoke the “wr defaults” command to setup the EEPROM in the correct way. Otherwise the parameters may be gibberish.


Users

W2UA

Jeff, W2UA, has made a really nice 3D enclosure for his signal generator.

The RFzero in a 3D enclosure. Picture courtesy Jeff, W2UA.

OZ2XH

Hans, OZ2XH, has put his RFzero signal generator in a very small enclosure with an ILI9341 display.

The RFzero signal generator with an ILI9348 2,8″ display and keypad. Picture courtesy Hans, OZ2XH.

See much more here.

ZP4KFX

Pino, ZP4KFX, has build his signal generator into a project box and included an PE4302 attenuator too.

The RFzero signal generator during build. Picture courtesy Pino, ZP4KFX.


Display

To setup the type of display used please use the “wr display” command. If you want to change what is shown on the display please edit the display.cpp file.

Please see the display page for more information.

LCD 16×2

The display shows the frequency/~ies, the “.” shows which frequency is currently controlled by the frequency rotary encoder, the signal level for frequency0, the last three characters of the keypad input and the output mode.

Example of an LCD 16×2.

LCD 20×4

The display shows the frequency/~ies, the “>” shows which frequency is currently controlled by the frequency rotary encoder, the signal level(s), the output mode and its possible parameters (sweep: points and dwell time [ms], spread spectrum: modulation amplitude). The last line is used for keypad input.

Example of an LCD 20×4.


Frequency

The frequency range for all the output modes, except I/Q modulation, is 2289 Hz to 200 MHz and beyond. The closer the frequency gets to 300 MHz the less likely it is that the Si5351A PLL locks. This means that the frequency is highly unstable or not even generated. The lower end of the frequency range for the I/Q modulation is 3,492 MHz.

The frequency can be changed using the keypad, MMI command or by turning the frequency rotary encoder.

The step value of the frequency rotary encoder can be changed by clicking its push button (1 MHz -> 100 kHz -> 10 kHz -> 1 kHz -> 100 Hz -> 10 Hz -> 1 Hz -> 1 MHz …) in single frequency modes. In dual frequency modes clicking the frequency rotary encoder will toggle between f0 and f1. The step value of the frequency rotary encoder can also be changed by using the keypad, menu or MMI.

Single frequency modes: push-pull, I/Q and spread spectrum.

Dual frequency modes: two-tone, H3A and sweep.

Set the frequency in single frequency modes

  • Frequency rotary encoder
  • Keypad
    <F>FREQ<Enter>
    where FREQ is the frequency in Hz
    Pressing <*> after the second position pads the input with “000”
  • Menu
    Not possible
  • MMI
    wr freq FREQ
    where FREQ is the frequency in Hz

Set the frequencies in dual frequency modes

  • Frequency rotary encoder
    where the “>”/ “.” indicates the active frequency
  • Keypad
    <F>FREQ <*><0><Enter>
    <F>FREQ <*><1><Enter>
    where FREQ is the frequency in Hz, <0> is for frequency0 and <1> is for frequency1
    Pressing <*> after the second position pads the input with “000”
  • Menu
    Not possible
  • MMI
    wr freq FREQ PORT
    where
    – FREQ is the frequency in Hz
    – PORT is the port 0/1 or start/stop for the sweep mode

Set the frequency step value

  • Frequency rotary encoder push button
    Click
    only in single frequency output modes otherwise it toggles between f0 and f1
  • Keypad
    <F><*>FREQ <Enter>
    where FREQ is the frequency step in Hz
  • Menu
    Not yet defined
  • MMI
    wr fstep STEP
    where STEP the step frequency from 1 Hz to 10 MHz

In single frequency mode the frequency step value is shown as a caret “^” under the digit, if the step value is 1 Hz, 10 Hz, … 1 MHz otherwise the value is shown.

Please note that if the settings are saved to the memory, the step frequency will be rounded up to nearest power of 10 integer, unless the step is 5 kHz, 6,25 kHz, 12,5 kHz or 25 kHz.


Amplitude

It is possible to change the amplitude of the output from the RFzero if you have connected an external attenuator. The attenuator defines the insertion loss and minimum output level.

In two-tone, H3A and sweep modes the amplitude is calculated using the f0.

The amplitude can be changed using the keypad, MMI command or by turning the amplitude rotary encoder. The step value of the amplitude rotary encoder can be changed by clicking the its push button (toggles between 1 dB or the decimal resolution of the attenuator), using the keypad, menu or MMI.

Set the amplitude

  • Amplitude rotary encoder
  • Keypad
    <A>AMPL<Enter>
    where AMPL is the amplitude in dBm
  • Menu
    Not possible
  • MMI
    wr ampl AMPL

Set the amplitude step value

  • Amplitude rotary encoder push button
    Click toggles between 1 dB and decimal step
  • Keypad
    Not possible.
  • Menu
    Not yet defined
  • MMI
    wr astep STEP
    where STEP is “one” for 1 dB step and “dec” for decimal step

Output modes

The RFzero can be set to different output modes

  • Push-pull (default)
  • Two-tone
  • I/Q modulation
  • H3A modulation
  • Sweep
  • Spread spectrum

The frequency range for all modes, except I/Q modulation, is 2289 Hz to 200 MHz and beyond. The closer the frequency is to 300 MHz, the more likely it is, that the Si5351A gets out of lock, and the frequency is not made or highly unstable. The lower end of the frequency range for the I/Q modulation is 3,492 MHz.

Each output mode has a keypad, menu and MMI command that sets the mode.

Push-pull

This mode has the highest power and the best spurious and harmonic performance. Especially the even harmonics are very low. This is also the standard mode for most lab work.

Example of a push-pull signal.

Set the output mode

  • Keypad
    <*><0><Enter>
  • Menu
    Output mode | Push-pull
  • MMI
    wr output 0

Two-tone

The two-tone mode is very useful for testing the linearity of amplifiers. To release the full potential T1 has to be changed from the factory mounted transformer to a combiner.

Example of the a two-tone signal with the third order IMD products at -66 dB PEP.

In general it applies that if the IMD of the input signal to an amplifier is -12 dB then the contribution to the output is 6%.

Set the output mode

  • Keypad
    <*><1><Enter>
  • Menu
    Output mode | Two-tone
  • MMI
    wr output 1

I/Q modulation

I/Q modulation consist of two signals, with the same frequency, that are 90° out of phase.

Example of I/Q modulation signals (I: yellow) and Q: purple).

To release the full potential T1 has to be removed. The I and Q signals can then be found on CON4 and CON5.

Set the output mode

  • Keypad
    <*><2><Enter>
  • Menu
    Output mode | I/Q
  • MMI
    wr output 2

H3A modulation

This is a variant of amplitude modulation (AM), where only one of the side bands is generated. In the receiver it will sound like normal AM.

Example of a H3A modulation signal with a 1 kHz modulation tone.

The amplitude of the side band (f1) is about 10 dB lower than the carrier (f0).

Set the output mode

  • Keypad
    <*><3><Enter>
  • Menu
    Output mode | H3A
  • MMI
    wr output 3

Sweep

Sweeps between the start and stop frequencies using either 51, 101, 301 or 501 points and with a dwell time between 2 ms and 1024 ms.

Example of a sweep spectrum signal using max hold. Some glitches can be expected.

When the sweep starts a pulse, low to high, with a duration similar to the dwell time is made on A1.

When the sweep is running a DC voltage ramp, 0 V to 3,3 V, is present on A0.

Example of the sweep trigger (purple) and DC voltage ramp (yellow).

To enable the sweep mode please perform the below steps

  1. Set the sweep output mode
  2. Set the start frequency (f0) or use what is already set
  3. Set the stop frequency (f1) or use what is already set
  4. Set the number of sweep points and dwell time

It is not necessary to set the sweep output mode again if changing the sweep parameters, i.e. sweep points and dwell time, start and stop frequencies.

Set the output mode

  • Keypad
    <*><4><Enter>
  • Menu
    Output mode | Sweep
  • MMI
    wr output 4

Toggle the sweep on/off

  • Keypad
    <*><4><*><Enter>
  • Menu
    Not yet defined
  • MMI start/stop frequencies respectively
    wr sweep 1
    wr sweep 0

Set the number of sweep points, dwell time and start the sweep

  • Keypad
    <*><4><*>POINTS<*>TIME<Enter>
    where
    – POINTS is the number of sweep points 51, 101, 301 and 501
    – TIME is the dwell time from 2 ms to 1024 ms
  • Menu
    Output mode | Sweep | POINTS
    Output mode | Sweep | TIME
  • MMI
    wr sweep POINTS TIME
    where
    – POINTS is the number of sweep points 51, 101, 301 and 501
    – TIME is the dwell time from 2 ms to 1024 ms

Set the start and stop frequencies

  • Keypad
    <F>FREQ<*><0><Enter>
    <F>FREQ<*><1><Enter>
    where FREQ is the frequency in Hz, <0> is for the start frequency and <1> is for the stop frequency
    Pressing <*> after the second position pads the input with “000”
  • Menu
    Not yet defined
  • MMI start/stop frequencies respectively
    wr freq FREQ 0
    wr freq FREQ 1
    where FREQ0 is the start frequency in Hz and FREQ1 is for the stop frequency in Hz

Spread spectrum

The RFzero can be set to generate a spread spectrum signal with a modulation amplitude from 0,1% to 1,5% of the signal frequency.

To enable spread spectrum is a three step process

  1. Set the spread spectrum output mode
  2. Set the frequency or use the one already set
  3. Set the modulation amplitude

To disable the spread spectrum output mode set a different output mode.

Example of a spread spectrum signal.

Set the spread spectrum output mode

  • Keypad
    <*><5><Enter>
  • Menu
    Output mode | Spread
  • MMI
    wr output 5

Set the spread spectrum modulation amplitude

  • Keypad
    <*><5><*>AMPL<Enter>
    where AMPL is modulation amplitude percentage in 0,1% increments from 0,1% to 1,5%, but multiplied by 10, e.g. 10 for 1%
    The current frequency is used or set a new one
  • Menu
    Not yet defined
  • MMI
    wr spread AMPL
    where AMPL is modulation amplitude percentage in 0,1% increments from 0,1% to 1,5%
    The current frequency is used or set a new one

Saving, recalling and viewing settings

The settings can be recalled and saved to the memory, i.e. the EEPROM of the RFzero.

When the RFzero signal generator program starts the settings from memory 0 are loaded. But the RF is always off.

It is only possible to save, recall or view the settings when the program is in run mode.

Recall settings from memory

  • Keypad
    <#>NUMBER<#><Enter>
    where NUMBER is the memory number
  • Menu
    Memory | Recall | NUMBER
  • MMI
    rd mem NUMBER
    where NUMBER is the memory number

Save the current settings to memory

  • Keypad
    <#>NUMBER<*><Enter>
    where NUMBER is the memory number
  • Menu
    Memory | Save | Number
  • MMI
    wr mem NUMBER
    where NUMBER is the memory number

Please note that the step frequency will be rounded up to nearest power of 10 integer, unless the step is 5 kHz, 6,25 kHz, 12,5 kHz or 25 kHz, and the sweep dwell time will be rounded up to nearest power of 2 integer.

Save settings to memory

  • Keypad
    Not possible
  • Menu
    Not possible
  • MMI
    wr mem NUMBER MODE FREQ0 FREQ1 FSTEP ATT ASTEP SWPTS SWTIME SSAMPL
    where
    – NUMBER is the memory number
    – MODE is the output mode number
    – FREQ0 is the f0
    – FREQ1 is the f1
    – FSTEP is the frequency step value in Hz
    – ATT is the attenuation level
    – ASTEP is the attenuation step “one” or “dec”
    – SWPTS is the number of sweep points
    – SWTIME s the sweep dwell time
    – SSAMPL is the spread spectrum amplitude

All values have to be included even if they are not used for the actual output mode. Thus valid but dummy values can be used.

Please note that the step frequency will be rounded up to nearest power of 10 integer, unless the step is 5 kHz, 6,25 kHz, 12,5 kHz or 25 kHz, and the sweep dwell time will be rounded up to nearest power of 2 integer.

Viewing the settings

  • Keypad
    Not possible
  • Menu
    Not possible
  • MMI
    rd set

The settings are listed on the USB port.


Keypad command overview

CategoryCommandSyntaxNote
AmplitudeSet the amplitude<A>AMPL<Enter>
Negative sign<#>
Decimal separator<∗>
FrequencySingle frequency modes<F>FREQ<Enter>
Sweep start frequency<F>FREQ<#>0<Enter>
Sweep stop frequency<F>FREQ<#>1<Enter>
Dual frequency modes<F>FREQ<#>PORT<Enter>
Pad input with 000<∗>
Step value<F><∗>FREQ<Enter>
Output modeSet push-pull<∗><0><Enter>
Set two-tone<∗><1><Enter>
Set I/Q<∗><2><Enter>
Set H3A<∗><3><Enter>
Set sweep<∗><4><Enter>
Set sweep points and dwell time<∗><4><∗>POINTS<∗>TIME<Enter>Also starts the sweep
Start/stop sweeping<∗><4><∗><Enter>
Set spread spectrum<∗><5><Enter>
Set modulation amplitude<∗><5><∗>AMPL<∗><Enter>AMPL is x10%, e.g. 10 for 1%
MemoryRecall from memory<#>NUMBER<#><Enter>
Save current settings to memory<#>NUMBER<∗><Enter>

Here is a keypad command overview to print and keep next to your signal generator.


Menu overview

Awaiting the maturity of the signal generator program to ensure an easy and consistent use.


Configuration

The configuration of the program is done via the USB port, 9600 Baud, 8 bits, no parity and one stop bit, using a terminal program (e.g. Arduino IDE Serial Monitor, Termite Terminal (Windows), CuteCom (Linux) or Terminal (Mac OS)). Please connect the RFzero via a USB B cable to your computer and connect the terminal program to the right COM port in the terminal program. The RFzero identifies itself as an Arduino Zero (Windows Device Manager).

If you don’t see the RFzero> or RFzero config> prompts please press the enter key. When you want to execute a command you don’t have to enter the prompt but only the command and parameters after the >.

All input to the RFzero must be in lowercase.

To enter the configuration mode please enter   config   at the RFzero> prompt, i.e.

RFzero> config

To see the available commands please enter   ?   at the RFzero config> prompt, i.e.

RFzero config> ?

To leave the configuration mode please enter   exit   at the RFzero config> prompt, i.e.

RFzero config> exit

When in configuration mode, i.e. when you see the RFzero config> prompt, the most frequent commands are

rd cfg

to see the configuration that will be used after exiting the configuration mode.

wr defaults

to set most of parameters to their default values. Please see the actual program for the specific default values.

wr t1 MODE

to set the T1 H/W mode where MODE is

  • 0: Transformer (default)
  • 1: Combiner
  • 2: None

wr display MODE

to set the display mode where MODE is

  • 0: None
  • 1: LCD 16 characters and two lines, HD44780 interface
  • 2: LCD 20 characters and four lines, HD44780 interface
  • 3: LCD 16 characters and two lines, HD44780 via I2C PCF8574 interface
  • 4: LCD 20 characters and four lines, HD44780 via I2C PCF8574 interface
  • 5: Graphics display, ILI9341 SPI interface
  • 6: Graphics display, ILI9488 SPI interface

wr rotenc TYPE

to set the type of the rotary encoders used

  • 0: Full step
  • 1: Half step

If you have set the right rotary encoder type, then you will experience one step per click. If you on the other hand experience two steeps per click, then you have a full step rotary encoder, but are using a half step configuration. If you experience that you have to turn two clicks to get one step, then you are using a half step rotary encoder in a full step configuration.

Both the amplitude and the frequency rotary encoders have to be of the same type.

wr att MODE

to set the attenuator mode where MODE is

  • 0: None
  • 1: 6 bits 0-31,5 dB in 0,5 dB steps connected to the SX1509, active low
  • 2: 6 bits 0-31,5 dB in 0,5 dB steps connected to the SX1509
  • 3: 6 bits 0-63 dB in 1 dB steps connected to the SX1509
  • 4: 7 bits 0-127 dB in 1 dB steps connected to the SX1509
  • 5: 8 bits 0-127,5 dB in 0,5 dB steps connected a MCP23017
  • 6: 9 bits 0-76,5 dB in 0,5 dB steps connected a MCP23017
  • 7: 11 bits 0-106,5 dB in 0,5 dB steps connected a MCP23017

Please also see the Attenuator section below.

wr sx1509 ADDR

to set the SX1509 I2C address in hex to 3E, 3F, 70 or 71. Set to 0 if no SX1509 is connected. If set to 0 only the MMI commands, via the USB port, can be used to change the signal generator.

The most used address is 0x3E.

wr mcp23017 ADDR

to set the MCP23017 I2C address in hex between 20 and 27. Set it to 0 if not in use.

The most used address is 0x20.

wr pwr INDEX LEVEL

to calibrate the power LEVEL in dBm for INDEX where

  • 0: 100 kHz
  • 1: 300 kHz
  • 2: 1 MHz
  • 3: 3 MHz
  • 4: 10 MHz
  • 5: 30 MHz
  • 6: 100 MHz
  • 7: 200 MHz
  • 8: 280 MHz
  • 9: 290 MHz

E.g. to set the level at 100 MHz to 14,5 dBm

wr pwr 6 14.5

Please remember that the level must include the insertion loss of the optional attenuator and low pass filter bank.

Please see the Calibration section below for a more detailed explanation about the calibration.

wr filter INDEX CONTROL

to set the ULN2803A low pass filter CONTROL bit pattern, in hex, vs the highest frequency used for the INDEX where

  • 0: 2 MHz
  • 1: 4 MHz
  • 2: 5 MHz
  • 3: 10 MHz
  • 4: 22 MHz
  • 5: 49 MHz
  • 6: 110 MHz
  • 7: 250 MHz

E.g. to set the control bits to 0x04 for the 10 MHz low pass filter

wr filter 3 4

Above 250 MHz all bits are 0.


Calibration

You can calibrate your RFzero to match your specific solution which includes the Si5351A, T1 (the standard transformer, combiner or nothing), attenuator type and low pas filter bank. The signal generator program has a set of general default values measured using a standard RFzero, i.e. T1 is a transformer and no attenuator or low pass filter bank connected.

If you want you can calibrate your setup in the configuration mode using the “wr pwr” command. But you will need a good watt-meter that can measure the power from -20 dBm to 15 dBm. Please also remember to make the measurements with the signal generator set to push-pull, and T1 is either a transformer or combiner.

Example of the maximum output power vs frequency of a typical RFzero.

If you have an attenuator and/or low pass filter bank connected the actual power vs frequency is the maximum power minus the attenuation and insertion loss.

Below is a description of the different frequency intervals, their characteristics and how the power is found.

Below 30 kHz

Below 30 kHz the output power is set to uncalibrated but is typically below -15 dBm.

Between 30 kHz and 100 kHz

Between 30 kHz and 100 kHz the power level is calculated using a hard coded formula. The formula has been made with a curve fit tool. If you want to make your own calibration you can enter your measurements into e.g. MyCurveFit, and see which formula and coefficients have the best fit. The one already in the signal generator is a third order polynomial. Then enter the formula in the

int maxPower(const unsigned int freq);

function located in the global.cpp file.

Between 100 kHz and 290 MHz

Between 100 kHz and 290 MHz the actual power level shown is calculated by interpolating between the power level set with the “wr pwr” command.

Above 290 MHz

When operating the Si5351A high above its 200 MHz maximum frequency sooner or later the PLL will not lock. This means that some output may be present, but it will be highly unstable. At what output frequency this occurs depends on the actual device. However, empirically 280 MHz to 290 is doable for all devices. But the way from 280 MHz over 290 MHz, where interpolation is still used, and towards 300 MHz also shows a steady decline in power as the above picture shows. Due to this behavior the output power above 290 MHz is displayed as uncalibrated.


Hardware

You may use the signal generator program without connecting anything else than a computer to the USB port. However, if you want to have a semi-professional signal generator connecting a display (LCD or graphics), two rotary encoders with push buttons, a 4×4 keypad and two extra push buttons, an attenuator and a low pass filter bank will be a great extension.

The signal generator block schematic showing all the entities.

If you want to attenuate the harmonics you will also need a low pass filter bank which is controlled on D7 to D0 or via the on-board ULN2803A

“Shopping list” and overview of the hardware entities and options.

EntityMinimumMediumMaximum
RFzeroXXX
Display (20×4 LCD is recommended)XX
SX1509 port expanderXX
Keypad 4x4XX
Frequency rotary encoder with push buttonXX
RF on/off buttonXX
Menu buttonXX
Amplitude rotary encoder with push buttonX
AttenuatorX
MCP23017 port expander if the attenuator uses more than 7 bitsX

The 4×4 keypad, rotary encoders with push buttons, display, SX1509 and MCP23017 are available from many sources. The attenuator can be professional surplus, a cheap module or a do-it-yourself type. If you buy a module it might be an idea to find one with mounting holes in it.

Example of expander modules, SX1509 (L) and MCP23017 (R).

The 4×4 keypad, rotary encoders with push buttons, RF on/off push button and Menu on/off push button will effectively make a 5×4 keypad that is connected to the SX1509.

Here is a connection schematic that shows how to wire all the entities together. Once the SX1509 and the rotary encoders have been connected you can load the SigGen_SX1509test program to verify your work. This can be very helpful in case you need to troubleshoot instead of doing it via the signal generator program.

EntityPinConnected to entityConnected to pin
SX1509GNDRFzeroGND
3V3RFzero3V3
SDARFzeroD8 (SDA)
SCLRFzeroD9 (SCL)
INTRFzeroD17
IO0Keypad
Amplitude rotary encoder
5
Push button Y
IO1Keypad
Frequency rotary encoder
6
Push button Y
IO2Keypad
RF on/off
7
Push button Y
IO3Keypad
Menu on/off
8
Push button Y
IO4AttenuatorBit 0, LSB
IO5AttenuatorBit 1
IO6AttenuatorBit 2
IO7AttenuatorBit 3
IO8Keypad1
IO9Keypad2
IO10Keypad3
IO11Keypad4
IO12Amplitude rotary encoder
Frequency rotary encoder
RF on/off
Menu on/off
Push button X
Push button X
Push button X
Push button X
IO13AttenuatorBit 4
IO14AttenuatorBit 5
IO15AttenuatorBit 6, MSB
Keypad (see also note below)1SX1509IO8
2SX1509IO9
3SX1509IO10
4SX1509IO11
5SX1509IO0
6SX1509IO1
7SX1509IO2
8SX1509IO3
Amplitude rotary encoderGNDRFzeroGND
ARFzeroA5
BRFzeroA4
Push button XSX1509IO12
Push button YSX1509IO0
Frequency rotary encoderGNDRFzeroGND
ARFzeroA2
BRFzeroA3
Push button XSX1509IO12
Push button YSX1509IO1
RF on/offPush button XSX1509IO12
Push button YSX1509IO2
Menu on/offPush button XSX1509IO12
Push button YSX1509IO3
MCP23017GNDRFzeroGND
3V3RFzero3V3
SDARFzeroD8 (SDA)
SCLRFzeroD9 (SCL)
GPA-GPBAttenuatorDepends on att.

Display

If you use a HD44780 compatible LCD connect it to the JP12 LCD connector in the normal way. Alternatively you may connect a graphics display. The type of display must be set in the configuration.

Please note that the graphics display has not yet been implemented but is expected to be mid June.

Connections for a graphical display controlled via SPI.

DisplaySignalRFzero
Not connectedMISOD16
SDI/MOSIMOSID18
SCKSCKD19

This section will be moved to the general display description when the graphics display has been implemented in all of the programs.

Rotary encoder (with push button)

The two rotary encoders with push buttons can be either full- or half-step. It is not important which one you have. In the configuration you can setup which type is used.

None of the push button pins, X and Y, must have connection to the rotary encoder ground pin.

Keypad

Adding a 4×4 standard keypad to your RFzero will make it easy to change amplitude or frequency. To make it even easier to remember which keys to use the <B> and <D> keys can be modified using a scalpel so the <B> key will look like an <F> for frequency, and the <D> key will look like an <Enter> key arrow. The <C> key functions a backspace/clear key.

Example of a keypad where the <B> and <D> keys have been modified to look like an <F> and <Enter> arrow by removing the red parts of the letters and a membrane type.


Please note that some keypads may have unused terminals.

Attenuator

If you want to have a variable output from your RFzero you will have to add an attenuator. It can be a simple module or professional surplus found on a flea market. They come in a million different sizes, attenuation ranges and step sizes.

Example of a simple 6 bits, 31,5 dB attenuator in 0,5 dB steps .

Example of a professional 7 bits, 127 dB attenuator in 1 dB steps.

A number of “generic” attenuators have been implemented. More can be added. You can do this yourself or ask for a it to be added. Since there are many different kinds of ways to control RF attenuators this cannot be generalized. Thus it has to be hard coded.

Implemented attenuator types and the attenuator mode.

Max attenuation [dB]Steps [dB]BitsTypeControllerPinsMSBLSBActiveMode
31,5         0,56SKY12347SX1509IO[14:13]+IO[7:4]IO[14]IO[4]Low1
31,5         0,56PE4302SX1509IO[14:13]+IO[7:4]IO[14]IO[4]High2
63,0         1,06GenericSX1509IO[14:13]+IO[7:4]IO[14]IO[4]High3
127,0         1,07GenericSX1509IO[15:13]+IO[7:4]IO[15]IO[4]High4
127,5         0,58GenericMCP23017GPA[7:0]GPA[7]GPA[0]High5
76,5         0,512RFzeroMCP23017GPA[3:0]+GPB[7:0]GPA[3]GPB[0]Mixed6
106,5         0,516RFzeroMCP23017GPA[7:0]+GPB[7:0]GPB[7]GPA[0]Mixed7

I2C, SX1509 and MCP23017

Both the SX1509 and MCP23017, and if you use an LCD with I2C access, are connected to the RFzero via the I2C/Wire bus. Please remember to connect the pull-up resistors yourself if you use the bare IC. Most ready made modules already have the pull-up resistors mounted.

If no pull-up resistors are connected the I2C bus will hang, and it will cause the program and USB port to hang too. This is not unique to the RFzero, but is a general thing in Arduino.

If the program hangs please connect two resistor, 2 kΩ to 10 kΩ, from 3V3 to each of the D8 (SDA) and D9 (SCL) pins. Then press the reset button. If this fails try to upload the program again, while being prepared to double click the reset button, until the uploading is successful. You may then, in the configuration, set both the SX1509 and the MCP23017 addresses to 0 which disables the activation and use of the I2C bus.

Alternatively upload the disable I2C user bus program to disable the signal generator from using the I2C user bus until you have the pull-up resistors in place. If successful you may then load the signal generator program again.

You can see more tricks in the troubleshooting guide.