The main reason for this project is to find the resonant frequency of loop antennas I'm intending to build for the 20m HAM band. This work is greatly inspired by the work of K6BEZ on a low cost antenna analyzer, a link to his slides can be found in the links section.
The basic idea is as follows:
- Generate a continuous signal on the design frequency of the antenna (sine or square, both is fine)
- Measure the voltage of the transmitted wave and the reflected wave, and calculate the standing wave ratio.
- Repeat for frequencies around the design frequency, and plot the swr as a function of frequency.
The uC will set the frequency of the Si5351 via the i2c bus, and measure the voltage of both the waves on two separate analog inputs, via the swr bridge.
Wiring the ESP32 or the Arduino nano to the Si5351 requires 4 wires; power and gnd, and the i2c data and clock lines:
i2c line | ESP32 default pin | Arduino default pin |
SDA | D21 | A4 |
SCL | D22 | A5 |
Both ESP32 and Arduino will be programmed using the Arduino IDE, so I can use a single code base. The difference is that the ESP32 will have the logic to do the frequency sweep and will generate the SWV(freq) plot, and in the Arduino case a PC side python script will send commands to the arduino to change the frequency and plot the resulting swr measurements.
The Si5351 library used is the Etherkit one, since it is much easier to use than the Adafruit one. The github repo will also contain some sketches to test the hardware, for example an i2c bus scanner to search for the Si5351 address and a minimal sketch to just set a frequency on the clock outputs.
Testing is done using an rtl-sdr to listen to the frequencies on the outputs, and using a sketch (ESP32) or PC side python script (Arduino) that will generate WSPR tones.
Hi, I have tried this code Si5351 Antenna Analyser but result is the output is 25MHz. I have tried all sorts of sketches for the ESP32 and Si5351 like Cal routines but all do the same thing. 25Mhz output.
Has anybody found this problem and found a solution?