fbpx

Getting started with

Three years ago, the AA-30.ZERO analyzer was included in the Rig Expert company’s product range. This is a miniature analyzer that has no case, display, and keyboard in the shield format for Arduino UNO. The analyzer has a 30 MHz upper operating frequency (later increased up to 170) and is connectable to a PC via a USB-to-UART adapter.

The AA-30.ZERO has become popular among DIY amateurs who used as it a basis to create a variety of designs of portable antenna analyzers, tuners, power meters, etc.

The AA-30.ZERO has a simple and intuitive control command system.

Two years ago, we developed a special library for Arduino that later simplified the development of sketches and programs for the above analyzer.

Despite all the advantages, the AA-30.ZERO has a number of inconveniences. Having reviewed all the feedback from our customers who shared with us their experiences, we developed a second version of the analyzer and gave it a simple and clear name – ZERO II

The new analyzer has the following characteristics:

  • operating frequency range: from 100 kHz to 1 GHz
  • size: 55*35 mm.
  • user interfaces: HID, UART, I2C, SPI
  • USB connector (for firmware updates, power supply, connection to gadgets via OTG)
  • current consumption: about 120mA in measurement mode
  • antenna connector: SMA
  • weight: 10 grams

The ZERO II has a unique ability to connect to Android-based gadgets and the AntScope application via OTG connection. With this feature, you can use just a smartphone and an analyzer, and no development of any software for Arduino, Raspberry Pi, or any other microcomputers is required.

In this article, I would like to give an example of a simple portable antenna analyzer project where Arduino UNO, a 20*4 I2C liquid crystal indicator, an encoder, and our new RigExpert ZeroII_UART library are used.

References to libraries used when creating the sketch.

 

The latest version of the sketch can be downloaded here.

Important! For the ZERO II, the Arduino and the RigExpertZeroII_UART library to function, the analyzer needs to be flashed by a special firmware version. In this version, the data exchange rate via the UART protocol has been reduced from 115200 to 38400 baud.

To download the firmware, go to this link.

Overall photo of the prototype.

All components for practical work, of course, must be fit in compactly in a suitable housing.

But, again, this project is a demonstration of the ZERO II and the RigExpert ZeroII_UART library capabilities. No one and nothing can limit the flight of your imagination!

Connect all components according to this schematics:

More details are here:

  • connect the RX pin of the analyzer to the 7 pin of the Arduino UNO
  • connect the TX pin of the analyzer to the 4 pin of the Arduino UNO
  • connect the Reset pin of the analyzer to the 6 pin of the Arduino UNO
  • connect the SW pin of the encoder to the 5 pin of the Arduino UNO
  • connect the DT pin of the encoder to the 3 pin of the Arduino UNO
  • connect the encoder’s CLK pin of the encoder to the Arduino UNO 2 pin
  • connect the SDA pin of the screen to the A4 pin of the Arduino UNO
  • connect the SCL pin of the screen to the A5 pin of the Arduino UNO
  • connect all +5 volt conductors and connect to the corresponding Arduino UNO pin
  • connect all the Earth conductors and connect to the corresponding Arduino UNO pin

After all the components are connected, connect the Arduino to the PC and upload the sketch. Before that, make sure to add the necessary libraries to IDE, otherwise, the program will not be compiled.

Take into account the fact that the encoder processing subroutine is already embedded in the body of the sketch (lines 34 to 140). Please do not change the code in these lines. If you do not use the encoder in your project, then this code may be deleted.

After successfully loading the program code into the Arduino, the text should be displayed on the LCD screen.

4 information screens are implemented in this project.

The first screen displays a welcome inscription, the firmware version, and the serial number of the analyzer.

The second screen appears only if the Arduino fails to communicate with the ZERO II. Every 1 second the Arduino will be retrying doing it.

Make sure that you have connected all the conductors correctly. Make sure that the analyzer is powered up. Make sure that the dip switch of the power supply source switch is in the upper position.

The third screen appears after the successful initialization of the analyzer. This screen displays the measurement frequency set, as well as an invitation to press the encoder knob to start the measurement.

When activated for the first time, the operating frequency will be 0. Later, the current frequency will be remembered.

The frequency can be changed by rotating the encoder knob.

The normal rotation changes the frequency value by +- 10 kHz.

Rotation with the simultaneous pressing of the knob changes the frequency value by +- 1 MHz (necessary for a quick change of the operating frequency).

To enter the frequency on the keyboard is, of course, much more convenient.

But to implement this process is already a “home assignment” for you 🙂

The fourth screen displays the finished measurement result.

In this case, we see the value of the operating frequency, SWR, Z, R, X, Return Loss, and Rho (magnitude of the reflection coefficient).

But this is not a complete list of parameters that can be obtained and displayed on the screen.

Below is a list of commands and parameters that the ZERO II can return:

ZERO.getFwVersion();

ZERO.getMajorVersion();

ZERO.getMinorVersion();

ZERO.getHwRevision();

ZERO.getSerialNumber();

ZERO.getR();

ZERO.getRp();

ZERO.getX();

ZERO.getXp();

ZERO.getXp();

ZERO.getRL();

ZERO.getZ();

ZERO.getPhase();

ZERO.getRho();

ZERO.getZ0();

Besides, the command ZERO.setZ0(double Z0) can set the system impedance value.

References to the components used:

The problems that may arise while implementing this project.

A failed attempt to compile a sketch.

Check if you have added all the necessary libraries. Check the correct selection of the Arduino model type and serial port number in the IDE settings.

After loading the sketch, nothing appears on the LCD screen.

There is a tuning resistor on the back of the screen that adjusts the contrast of the screen. The contrast might require some adjustment.

 

Depending on the type of the LCD screen controller used, the I2C address may differ. Check the address value with the screen manufacturer. As a rule, the base value is 0x27 The address is written in this line:

LiquidCrystal_I2C lcd(0x27, 20, 4);

When the encoder rotates, the value of the operating frequency does not change / changes incorrectly.

Depending on the manufacturer, the encoder can have one of two types and two options for reading the direction of rotation.

Try changing the last two parameters here (0 or 1):

encMinim enc(CLK, DT, SW, 1, 0);

The name of the library directly indicates that data exchange of the analyzer and the Arduino is carried out via the UART protocol. The ZERO II also has other user interfaces.

 

We are planning to develop a library for the I2C protocol as well.

Unlike the AA-30.ZERO (which has a text format of commands), the ZERO II analyzer has all commands and data in bit format.

You can find the analyzer data format and read about other technical details in this manual and examples for STM32.

 

Any your questions are welcome. You can always find us at: [email protected] , https://www.facebook.com/RigExpertUkraineLtd