A little more about the AA-30 ZERO from RigExpert.

Discussion in 'Homebrew and Kit Projects' started by UT2UM, Feb 8, 2020.

ad: L-HROutlet
ad: l-rl
ad: MessiPaoloni-1
ad: abrind-2
ad: HRDLLC-2
ad: Left-2
ad: L-Geochron
ad: L-MFJ
ad: Left-3
  1. UT2UM

    UT2UM XML Subscriber QRZ Page

    Greetings friends!

    I would like to talk a little about the tiny AA-30 ZERO antenna analyzer from RigExpert.
    There are some features that are not mentioned on the official website, but these features are damn interesting.

    So, the figure in RigExpert analyzers indicates the maximum operating frequency of the device. Therefore, does the AA-30 ZERO operate at a frequency of 30 MHz? No, it is not. It turns out that this baby can measure much higher.
    Together with a PC, the analyzer works in tandem in the AntScope software. There are two versions of this software.
    In the first version of AntScope, the analyzer works up to 230 Megahertz! Fantasy! But you need to make minor changes to the configuration file.
    In the second version of AntScope, the maximum frequency is 170 Megahertz. Also not bad and it works out of the box. No need to make edits anywhere.

    A few screenshots. I connected a 100 ohm resistor to the AA-30 ZERO (the analyzer was not calibrated).

    AntScope:
    [​IMG]


    AntScope2:
    [​IMG]


    Sometimes, depending on the set number of measurement points, artifacts are formed on the graph at frequencies of about 112 and 150 MHz. I attribute this to phase noise when switching the dividers in the microchip of RF generator Si5351.
    [​IMG]
    These frequencies do not lie in HAM band and do not interfere in practical measurements.

    Quite recently, information on the new firmware appeared on the Rig Expert website. Details here: https://rigexpert.com/news/new-firmware-for-aa-30-zero/

    Now it is possible to measure at a single frequency.
    It's great. Moreover, there is a library for Arduino which significantly simplifies the work with the analyzer. Now it is not necessary to connect the ZERO only to the PC.

    Based on this library (and some other publicly available), I wrote a sketch and made a prototype analyzer on Arduino UNO + AA-30 ZERO + LCD i2c display+ rotary encoder.

    The rotary encoder sets the frequency and starts the measurement. The results are displayed on the screen. There is not much space for information output, for this reason I only display the SWR and impedance. But the library allows you to request from the analyzer the value of SWR, impedance, R, X (in the series and parallel systems), return loss, phase and reflection coefficient.

    Source code:
    Code:
    /*Sketch for the work of Arduino UNO and the AA-30 ZERO analyzer without using a PC.
    The analyzer operates in the frequency range from 1 to 30 MHz.
    The operating frequency is set by rotating the encoder. Measurement is started by pressing the encoder knob once.
    One click of the encoder turn changes the frequency by 10 kHz,
    one click of the turn with push of encoder knob changes the frequency by 1 MHz.
    Information is displayed on the LCD type 1602 I2C.
    Used libraries:
      For display operation:https://rigexpert.com/files/libraries/LiquidCrystal_I2C_V112/
      For the analyzer to work: https://rigexpert.com/files/libraries/RigExpertZero/
      For encoder operation: https://rigexpert.com/files/libraries/GyverEncoder/
                             https://rigexpert.com/files/libraries/encTest/
    © Alexander Antonov UR4MCB February 05, 2020.*/
    
    
    /* Added a library to work with the display. */
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
    
    /* Display setting. Address I2C, number of columns, number of rows. */
    LiquidCrystal_I2C lcd(0x27, 16, 2);
    
    /* Added a library to work with AA-30 ZERO analyzer */
    #include "RigExpertZero.h"
    
    /* ZERO pins */
    #define RX_PIN 4
    #define TX_PIN 7
    
    RigExpertZero ZERO(RX_PIN, TX_PIN);
    
    /* Added a library to work with rotary encoder HW-040 */
    #include "encMinim.h"
    
    /* encoder pins */
    #define SW 5
    #define DT 3
    #define CLK 2
    
    /* setting the center frequency of the measurement, Hz */
    volatile int32_t freq = 15000000;
    
    /* variable "timer" so as not to use the standard delay function */
    int32_t timer = millis();
    
    /* pin CLK, pin DT, pin SW, direction of rotation (0/1), type (0/1) */
    encMinim enc(CLK, DT, SW, 1, 0);
    
    void setup() {
    
      ZERO.startZero();                   // Initialize analyzer
      delay(50);                          // required delay
      lcd.init();                         // Initialize display
      delay(10);                          // required delay
      lcd.backlight();                    // Turn on display backlight
    
    /* Check if the analyzer is found? */
      while (!ZERO.startZero()) {
        lcd.setCursor(4, 0);              // set the cursor
        lcd.print("analyzer");            // and print text on the display
        lcd.setCursor(3, 1);
        lcd.print("not found");
        delay(1000);                      // recheck after 1 second
      }
    
    /* If found, then display the greeting on the screen. */
      lcd.setCursor(3, 0);
      lcd.print("AA-30 ZERO");
      lcd.setCursor(4, 1);
      lcd.print("analyzer");
      delay(4000);                         // Display splash screen 4 seconds
      lcd.clear();                         // Clear display
    
      lcd.setCursor(0, 1);
      lcd.print("press to measure");
    
    
    }
    
    
    void loop() {
      enc.tick();                           // Initialize rotary encoder
    
    
      /* Rotary encoder processing */
      if (enc.isLeft()) {
        freq_left();
      }
      if (enc.isRight()) {
        freq_right();
      }
      if (enc.isLeftH()) {
        freq_leftH();
      }
      if (enc.isRightH()) {
        freq_rightH();
      }
      if (enc.isClick()) {
        start_m ();
      }
    
      /* Update the frequency value on screen every 200 ms. */
      if (millis() - timer > 200) {
        if ((freq / 1000) > 10000) {
          lcd.setCursor(0, 0);
          lcd.print("FQ = ");
          lcd.setCursor(5, 0);
          lcd.print(freq / 1000);
          lcd.setCursor(12, 0);
          lcd.print("kHz");
          timer = millis();
        }
        if ((freq / 1000) < 9999) {
          lcd.setCursor(0, 0);
          lcd.print("FQ = ");
          lcd.setCursor(9, 0);
          lcd.print(' ');
          lcd.setCursor(5, 0);
          lcd.print(freq / 1000);
          lcd.setCursor(12, 0);
          lcd.print("kHz");
          timer = millis();
        }
      }
    
    
    }
    
    void freq_leftH () {
      freq = freq + 1000000;
      if (freq >= 30000000) {
        freq = 30000000;
      }
    }
    
    void freq_rightH () {
      freq = freq - 1000000;
      if (freq <= 1000000) {
        freq = 1000000;
      }
    }
    
    void freq_left () {
      freq = freq + 10000;
      if (freq >= 30000000) {
        freq = 30000000;
      }
    }
    
    void freq_right () {
      freq = freq - 10000;
      if (freq <= 1000000) {
        freq = 1000000;
      }
    
    
    }
    
    void start_m () {
      ZERO.startMeasure(freq);              // start measurement
      delay(10);
      lcd.clear();
      lcd.setCursor(0, 1);
      lcd.print("SWR");
      float SWR = ZERO.getSWR();            // get SWR value
      lcd.setCursor(4, 1);
    
      if (SWR < 10) {
        lcd.print(SWR, 2);
      }
      if ((SWR >= 10) && (SWR < 100)) {
        lcd.print(SWR, 1);
      }
      if ((SWR >= 100) && (SWR <= 200)) {
        lcd.print(">100");
      }
    
      int Z = ZERO.getZ();                  // get Z value
      lcd.setCursor(9, 1);
      lcd.print('Z');
      lcd.setCursor(11, 1);
      if (Z <= 1000) {
        lcd.print(Z);
      }
      if (Z > 1000 ) {
        lcd.print(">1000");
      }
    
    }
    I used components purchased in the Chinese online store Aliexpress. All together (with the exception of the analyzer) costs less than $ 10.
    Arduino UNO - http://got.by/4gmk02
    LCD display i2c - http://got.by/4gmk8f
    Rotary encoder - http://got.by/4gmken

    All connections are made with short wires using soldering.
    A few photos:
    [​IMG]
    [​IMG]

    I hope that soon more information will appear on the official website. In the meantime, if you have any questions, I will be glad to talk.

    Have a good weekend!

    Alex UR4MCB
     
    KI4ZUQ, N0TZU and AB2YC like this.
  2. KB1YFD

    KB1YFD Ham Member QRZ Page

    Well done Alex. -John
     
    UT2UM likes this.
  3. UT2UM

    UT2UM XML Subscriber QRZ Page

    Thank you, John!

    Another small addition:
    [​IMG]
     
  4. AB9NZ

    AB9NZ Ham Member QRZ Page

    How do I enable my AA30 zero to work past 30 Mhz? do I need a newer version of Antscope? Thanks much, Tom, AB9NZ
     
    UT2UM likes this.
  5. UT2UM

    UT2UM XML Subscriber QRZ Page

    Hi Tom,

    You can either use AntScope2 (download the new version here: https://rigexpert.com/files/software/Antscope/antscope2forwindows/ )
    In AntScope2, everything works out of the box up to 170 MHz.

    If you use AntScope, then in this case you need to edit the file
    [​IMG]

    The file is here (you will have a different username): C:\Users\UR4MCB\AppData\Local\RigExpert\AntScope

    You need to edit the line:
    [​IMG]
    Enter the value of 230000000 there

    Alex.
     
    AH7I, WN3F and KU3X like this.
  6. AB9NZ

    AB9NZ Ham Member QRZ Page

    This is wonderful! Thank you very much Alex.
     
    UT2UM likes this.
  7. UT2UM

    UT2UM XML Subscriber QRZ Page

    You are welcome, Tom!
     
    AB9NZ likes this.
  8. VK3FBOM

    VK3FBOM Ham Member QRZ Page

    Thank you so much for this sample code and the library, Alex. And thank you for the information about the extended range.

    I had a couple of problems trying to use your sketch. There was a display issue with the rollover to 10MHz, and different behaviour with my encoder (two increments per detent, one at the stop and one midway), so I worked around those - and just kept going. I have some code set up for a 2004 display and with a PC passthrough mode at https://github.com/VK3EET/analyzer-1.
     
    UT2UM likes this.
  9. UT2UM

    UT2UM XML Subscriber QRZ Page

    Dear Mark.

    I am very glad that my modest work were useful to you.
    Thank you for sharing the link to your code.

    Alex.
     
  10. KF0BVD

    KF0BVD Ham Member QRZ Page

    Mark,
    Thank you very much for this. New to Ham and started building my own Stealth antenna's due to HOA rules and realized I need an analyzer to tune things up but couldn't afford other rig expert models...this really helps me out. Super work and thanks again.
     

Share This Page