|A simple swr analyser with ili9341tft and ad9850 dds|
A simple antenna analyzer is a helpful gadget which will tell us about the frequencies to which a piece of wire will resonate on. This is very useful in conjunction with a simple tuner to adjust the antenna for an optimum vswr (voltage standing waves ratio). Usually a good commercial antenna analyzer is an expensive device which we use once in a while. Here is a simple project which will give a rough estimation of vswr and resonant frequencies of random piece of wires, antennas and lc networks. For the critical reader, there is a lot of limitations with in this simple design and can read more about various possibilities here (keywords: harmonics, directional coupler, superheterodyne).
This project uses a simple ad9850 module as its heart to generate the rf signals for the sweep. The controller is an arduino promini (with an atmega328 running on 3.3volt) and for display, it uses an ili9341 tft.
The core circuitry for the analyser is very simple and is based on the design from Beriks (K6BEZ) simple antenna analyser (pdf). I added a buffer with the dds (as shown on W5DOR).
To control the whole circuitry, i added an ir receiver which is useful for inputting frequencies, setting up the scan , span, etc. (basics on ir library). There is an updated version which uses a rotary encoder at the bottom of the page [Rotary Encoder]
So currently the firmware supports three things, a simple dds vfo, a vswr plot with sweep from 1-30mhz and can be adjusted to smaller regions for e.g 7.000MHZ to 7.500 MHZ.
VSWR plot from arduino antenna analyser on a ili9341tft
There is a quick band scanner which scans all amateur radio bands and locate the best band which suits the antenna.
|Scanning the bands|
|Arduino DDS menu|
Here is a simple video of the analyser connected to an parallel lc circuit with a 50ohm carbon resistor to use it as a simple scalar network analyser (filter around 7mhz)
Here is some more pictures to show the constructions
|DDS and controller together with display|
|buffer, opamp and detectors|
- Get the arduino and lcd communicate and display the basic test patterns. See this post on getting the ili9341 up and running. It basically uses a simple library for drawing on the tft and i modified it a bit to get the correct display orientation (So use the ili9341 library here)
- Test the ad9850 module and the arduino to work together: See this post.
- Now get the Timed action, Infrared Remote and ad9850 libraries.
- Assemble the swr bridge board with buffer and adjust the potentiometer on the forward power to get a voltage output in the adc range (0-3.3v). Set the dds module to a fixed frequency and do the measurements (for e.g set 10mhz ) and do the same with a sweep. You could use the k6bez antenna analyzer script to test it first, which has the necessary functions to test and calibrate the circuit. See the link in the reference below (Note: adjust the sketch to match the pins (2,7,9,8)of your dds module)
- Upload the script and open a serial console. Keep pressing a remote control (any make) and assign the keys to different function by copying the number shown for specific buttons to the relevant areas in sketch.
A quick and dirty schematic (hand drawn) is attached below. It is basically derived from reference  and . The construction used some simple pro-typing boards. RF sections could be better constructed on a copper clad in Manhattan style. Here i used a simple strip board and attached a ground plane with a conductive tape (separated by a plastic film).
|Crude Schematic for the analyzer|
Here is a simple version of the vswr analyser using a rotary encoder with click. Connection is simple. Connect the center pin and one side of the click (button) to the ground. The other end of the click switch is connected to A0 pin and a library is used to detect single and double clicks (Onebutton). The other two pins on the encoder (of the three) is connected to pin 2 and 3 of the arduino (interrupt). There is a slight change in the wiring for ad9850 dds module which is connected to pin 9,8,7 and 10. Backlight on the tft is directly connected to 3.3v via a current limiting resistor.
See this post for testing rotary and tft - Adding Rotary encoder to arduino projects- quick start
Attached a simple hand drawn block schematic for several modules. The vswr bridge circuitry is same as k6bez. Alternatively an ad8307 based rf sense circuitry can be used. Ensure that the output of the rf sense is adjusted to fall with in the adc range (here 0-3.3v). A 5v design needs a level shifter for the tft module.
|Block schematic for the standalone analyzer with rotary encoder and Bluetooth serial (click to enlarge)|
1) If running with a pro-mini on 3.3 volt, make sure that the fwd and rev voltages from detector falls wit in the adc range (0-3.3volt)
2) Buffer amplifier design is actually for 12 volt. I was running it at 5.5 volts (make sure it is 5.5 with a multimeter, do not trust the wall wart) and got good results. To test it, add a 100 ohm resister to the antenna port and run the analyzer to get a flat line. If the swr rolles up at the higher frequencies, it means buffer is not working well. An alternative is to replace 1k resistors with 220 ohm and the emitter resister (470)with 220 for lower voltage. Also add an rf choke to the buffer power supply with a 0.1 cap to decouple.
3) Alternative solution is to run the promini at 5 volt and will give a wider adc (0-5v) at the cost of a level shifter.
4) Use a directional coupler to replace the resistive bridge. Use an ad8307 log detector.
5) Adding a superheterodyne detector to get rid of harmonics and drive the mixer using a multiple clock generator (e.g Si5351) and use other channel to feed the sweeper/buffer.
|Effect of inadequate power supply to buffer|
A few more pictures of the prototype in an earbud case :)
Hex File for atmega328 (Download)
Source Code (Download)
Simple schematic for analyser with encoder
Here is a simple attempt to draw a schematic in eagle cad. If some one can help out with a nicer one, please drop an email or comment
|Schematic for the analyser with encoder|
|C1||1u||C050-025X075||CAPACITOR, European symbol|
|C7||1u||C050-025X075||CAPACITOR, European symbol|
|C8||100n||C050-025X075||CAPACITOR, European symbol|
|C9||10n||C050-025X075||CAPACITOR, European symbol|
|C10||100n||C050-025X075||CAPACITOR, European symbol|
|C11||10n||C050-025X075||CAPACITOR, European symbol|
|IC2||LM358N||DIL08||OP AMP also LM158; LM258; LM2904|
|PROMINI3.3VOLT||PRO-MINI-2||PRO-MINI-2||Arduino Pro Mini Layout 2|
|R1||470||V234/12||RESISTOR, European symbol|
|R2||1k||V234/12||RESISTOR, European symbol|
|R3||100||V234/12||RESISTOR, European symbol|
|R4||5k||V234/12||RESISTOR, European symbol|
|R12||50||V234/12||RESISTOR, European symbol|
|R13||50||V234/12||RESISTOR, European symbol|
|R14||50||V234/12||RESISTOR, European symbol|
|R15||50||V234/12||RESISTOR, European symbol|
|R16||100k||V234/12||RESISTOR, European symbol|
|R17||5k||V234/12||RESISTOR, European symbol|
|R18||648||V234/12||RESISTOR, European symbol|
|R19||10k||V234/12||RESISTOR, European symbol|
|R20||100k||RDH/15||RESISTOR, European symbol|
|R21||5k||V234/12||RESISTOR, European symbol|
|R22||648||V234/12||RESISTOR, European symbol|
|R23||47||V234/12||RESISTOR, European symbol|
|SW1||EC12E_SW||ALPS_EC12E_SW||ALPS rotary Encoder EC12E series with switch|
|U1||AD9850 DDS Module||DDS_AD9850||AD9850 DDS Module|
|X2||BNC||AMP_227161||JACK, RIGHT ANGLE, 50 OHM, PCB, BNC|