Beruflich Dokumente
Kultur Dokumente
Background
The “$50 Antenna Analyser” started off life as a presentation for Pacificon 2013.
The inspiration was what someone could do with a $5 DDS module found on eBay and a $35
Arduino micro-controller.
During early development it was discovered that using a PIC instead of the Arduino brought the
price down to under $25.
The PIC is used to sweep an AD9850 DDS and measure the forward and reverse detector
voltages from an SWR bridge at each frequency and return the values to a PC for plotting on the
screen.
The prototype shown at Pacificon is shown below along with the schematic
$20 Version:
Schematic:
Stand Alone Version
The addition of a $10 (If you look around on eBay) LCD module allowed some data to be shown
without using the PC. The prototype of this was made on a Sierra Radio Systems Hamstack
DEV-1 development board, and is shown below:
At start-up the device will start sweeping from 1 MHz to 30 MHz and display the frequency and
VSWR of the best match point. To keep the code usable on the free version of Swordfish the
VSWR is displayed *100 as the floattostr() call seems to use a lot of memory which easily
exceeds the variable byte limit of the free compiler.
Pressing the mode button (SW3 on the Dev-1 board)will cycle through the frequency bands Full,
160m, 80m, 60m, 40m, 30m, 20m, 17m, 15m, 12m, 10m.
If data is received by the PIC, the mode is changed to give control of the sweep to the PC, at
which point it starts behaving like the $20 version above.
Arduino Version
There was a brief attempt to make an arduino version, but it was abandoned due to the relatively high
cost of the Arduino ($35) compared to a PIC ($4). The schematic is show below, along with a prototype
unit:
Arduino source code is available here :
https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/DDS_sweeper.ino
Functionality is the same as the $20 version above. No automatic sweeping or display is implemented.
The PIC provided in the kit is pre-programmed, but the .HEX file can be downloaded:
https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/K6BEZ_AntennaAnalyserV1.hex
U2 is a voltage regulator that will provide +5V to the board from an external power source on J5.
Power can also be taken from the USB port (J2 or J3), but shouldn't come from both. If you are using
USB, then J5 should not be used.
J3 and U6 provide a USB interface using the popular FTDI RS232 to USB converter chip. This appears as a
COM port on the connected PC, just like any RS232 interface. J2 is a USB mini connector, and is not
provided as part of the kit. If the builder wishes to use USB mini then he/she is advised to source their
own connector.
Alternatively U7 and J4 provide an RS232 interface for older computers with no USB interface.
JP1 and JP2 are used to select whether USB or RS232 is to be used.
If you are planning on using USB only, then there is no need to load U7, J4, U2 and J5, but these parts are
provided in the kit and may as well be loaded to make things more flexible.
The LCD option, DIS1 can be loaded if you want the stand alone functionality (no need for a PC).
Note: U6 (FT232RL) is a surface mount IC, and will be provided pre-loaded onto the PCB as part of the
kit.
J6 can be used for programming the PIC. This should mostly be un-necessary, but may be useful if newer
functionality is added.
A resonably high resoltion photo of a fully loaded PCB (without the DDS module or LCD) is available here:
https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/AssembledPCB.jpg
another picture of the board with the DDS and LCD installed:
https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/AssembledModule.jpg
Loaded board without DDS module or LCD
It is recommended to load all the small low profile components first, starting with the resistors, diodes
and capacitors. Then the switches, followed by the IC sockets.
Trim all leads nice and flush after soldering and check for solder bridges between traces and
connections.
U1 DDS Module. Use the 10 way SIL connectors underneath to hold the DDS
above the board as there are parts under the DDS
U3 MCP6002 Op-Amp. Use 8 pin socket. Observe polarity.
U5 PIC18F46K22. Use 40 pin socket. Observe polarity.
C4 1 uF Electrolytic. Observe polarity.
C14 10 uF Electrolytic. Observe polarity.
C1,C5, C9, C15 100 nF Ceramic
C6,C7, C8 10 nF Ceramic
C12, C13 22 pF Ceramic
R3, R4, R5 49.9 Ohm, ¼ W – Note Silkscreen says “50 Ohm”
R14 270 Ohm, ¼ W
R9, R16 649 Ohm, ¼ W
R1,R2,R6, R10, R17 10 k Ohm, ¼ W
R8, R15 22 k Ohm, ¼ W – Note Silkscreen says “5k Ohm”
R7, R10 100 k Ohm, ¼ W
Y1 10 MHz Crystal
LED1 Red, 5mm
JP1, JP2 3 pin header
S5 Push switch
J6 6 way header
D1, D2 Germanium Diodes AA143. Observe polarity.
2)
Power supply. The board can get +5V from the USB cable if the USB option is loaded, otherwise.this
section must be loaded to provide the +5V to the system
J5 DC Jack
C11 10 uF Electrolytic. Observe polarity.
U2 LM7805 Voltage regulator
3) USB. These parts are loaded to provide USB communication to the PC and provide +5V from the
USB jack.
4) RS232. Load along with the Power supply to provide a RS232 port to the PC
5) LCD. Load these parts to gain the LCD functionality and allow stand-alone operation without the
PC.
NOTE: R19, the variable resistor isets the contrast for the LCD. Best results can be found by turning it
almost fully counter-clockwise.
Header position for LCD module. Use 1 1x16 header, or 2 1x8 headers provided in the kit.
PC Interface Specification
Control is done by serial comunications, using ASCII over RS232. As a result, the analyser can be operated
using a serial terminal program such as Tera-term. Hey presto – a command line antenna analyser.
A Windows program is provided as a much more useable front end, but the protocol is detailed here for
the home-brewer or experimenter.
There are 2 possible connections on the Analyser board to talk to the PC: RS232 (J4 – D-sub) and USB
(J3). If USB is used then the Analyser can also use this connection for power, and DC should not be
applied to J5. If RS232 is used, DC must be supplied by a connection to the USB port (phone chargers
should work well for this, or DC should be applied to J5.
To select between USB and RS232 communication, JP1 and JP2 must be set accordingly:
JP1 and JP2 are shown set for “USB” with pins 1 and 2 connected.
RS232 connections will appear on the PC as a standard COM port. If you are using USB-RS232 adaptors
then make sure you have the correct driver installed.
USB connections will also appear on the PC as a COM port. The USB utilizes an FT232RL chip. The driver
for this can be downloaded (see link in next section), but I discovered that Windows 7 seems to be able
to get this driver automatically via windows update.
Either way, once you have determined what COM port your Analyser is attached to (Use Drivce Manager
if not sure), you can then use Tera Term ot any other serial terminal to talk directly with the anaylser.
Syntax:
This will return a list of frequencies and VSWR (*1000). The example shown is for a 20 point sweep
between 27 MHz and 30 MHz. The first line shows 27 MHz with a VSWR of 3.412:1. Glancing down the
list, it looks like this antenna has lowest VSWR of about 1.55:1 at around 29.4 Mhz.
27000000,3412
27150000,3510
27300000,3471
27450000,3317
27600000,3190
27750000,3058
27900000,2905
28050000,2723
28200000,2653
28350000,2530
28500000,2268
28650000,2128
28800000,1917
28950000,1824
29100000,1693
29250000,1556
29400000,1550
29550000,1648
29700000,1751
29850000,2051
30000000,2274
End
PC Client Software
There is also a Stand-alone .exe file in the zip which can be used without the Visual Basic environment
being installed on your computer.
https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/PC_Software.zip
In this zip file are 2 folders. One is the installation program for the analyser software, the other is
the FTDI Driver software for the USB port.
If you wish to use the USB interface then run the “CDM v2.08.30 WHQL Certified.exe”
program in the “FTDI_Driver” folder.
To install the Analyser software run the “setup.exe” from within the “K6BEZ Antenna Analyser
PC Software” folder and follow the directions.
After starting the program, the serial port that the Analyser is attached to needs to be selected from the
“Serial Port” pull-down list.
Next click on “Connect”, and the connect button should turn grey and the “Sweep” button will be
enabled. Also a sweep should be performed.
At the end of each sweep the frequency of lowest VSWR along with the VSWR will be displayed, along
with a red marker on the trace.
If a band is chosen from the “Band” drop-down, the start and stop frequencies will be changed
automatically, and 3 markers will be placed on the screen. These are the low and high band edges, along
with the CW/Voice changeover point.
[Show screenshot]
“Steps” tells the analyser how many points to use in the sweep. The maximum is 101. Fewer steps make
the sweep faster, but show less detail on the screen.
If a frequency is entered into the “Marker” text box, then a marker will be placed onto the screen at that
frequency. This can be used as a target to see if your tuning is getting to the right place.
Pressing the "Zoom In" button will narrow the span around the point of lowest VSWR and trigger
another sweep.
The "Marker (MHz)" box can be used to set a single marker (black dotted line) which can be used as a
visual target for tuning an antenna. Clicking in the plot window will also set the frequency in the Marker
box and set the visual marker.
If a frequency is entered in the “CW Signal Source” box and the “Set CW” button is pressed then any
sweep will stop and the Antenna Analyser output will be set to that frequency.
The Rescan button can be used to re-detect serial ports if for instance you start the program up and then
remember to plug in your USB-RS232 cable.
“Save CSV” will save the current data to a comma seperated value file for further processing in your
favourite spreadsheet software.
The PC client software will be updated over time. To be informed of future updates, please email me at
k6bez@arrl.net.
Sourcing parts
Most of the parts are available from Digi-key, Mouser, ADA-fruit or your local electronics store. Digikey
part numbers are given in the BOM.
However, the DDS module and the LCD module are best found on ebay due to their low cost.
DDS Module
Searching ebay for “AD9850” will probably produce a bajillion results. There are a couple of type of
module out there. The one you are interested in looks like this:
LCD module
Again search ebay for “16x2 LCD”. Again you will find a bajillion results. You are looking for something
like this:
Note the 16 pin connector, and make sure the pinout is the same. This does appear to be a standard
connector.
At the time of writing these could be found for under $5, and you get to pick your colour!
Full BOM