Sie sind auf Seite 1von 20

K6BEZ Antenna Analyser

Beric Dunn, K6BEZ@arrl.net


$50 Antenna Analyser

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.

“Where can I get a kit?”


Despite the talk at Pacificon being aimed at the Maker Ham with the intent being to show that
circuits can be made cheaply and simply out of parts both scrounged and sourced on eBay, the
question I got more than any other was “Where can I get a kit?”.
The remainder of this document details how to make and use your own antenna analyser using a
custom PCB and a bag of parts.

What does the kit do?


During development of the kit, it was decided to make a PCB that was flexible enough to fit most needs,
whilst still being cheap enough for the budget concious to use.
The core of the analyser consists of U1, the DDS (Direct Digital Synthesizer), the VSWR bridge
(components between U1 and U3 on the schematic), an amplifier (U3) and the PIC microcontroller (U5).
The DDS is configured to generate one frequency at a time by the PIC, the forward and reverse voltages
on the VSWR bridge are detected by D1 and D2, amplified by U3 and then read by the PIC.
The PIC then calculates the VSWR and sends the result to the PC before moving onto the next frequency
in the sweep.

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

The source code (written in Swordfish Basic) is available here:


https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/K6BEZ_AntannaAnalyse
rV1.bas

A free version of Swordfish Basic is available from Sierra Radio Systems:


http://www.hamstack.com/hamstack.html

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.

Building the kit


The circuit has been broken up into 5 main parts, which can be loaded as required. Follow the loading
diagram as an aide.

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.

Next install the LEDs and connectors.

Trim all leads nice and flush after soldering and check for solder bridges between traces and
connections.

1) Core parts. These need to be loaded no matter what.

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.

Header positions for U1

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.

U6 FT232RL Surface mount. PCB supplied with this loaded


C3, C3 100 nF Ceramic
R12, R13 270 Ohm, ¼ W
LED2, LED3 Red, 5mm
J2 USB mini connector – Not supplied
J3 USB connector

4) RS232. Load along with the Power supply to provide a RS232 port to the PC

U7 MAX232 IC. Use 16 pin socket. Observe polarity


C20 100 nF Ceramic
C16, C17, C18, C19 1 uF Electrolytic. Observe polarity.
J4 9 pin D-sub connector

5) LCD. Load these parts to gain the LCD functionality and allow stand-alone operation without the
PC.

DIS1 LCD module


R20 10 Ohm, ¼ W
R19 10 k Ohm POT
S1 Push switch

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.

LCD with header and stand-offs attached


LCD in position

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.

The default Baud-rate is 57600, 8 bit, 1 stop bit, no handshake.

Syntax:

"1000000C" sets the DDS output to 1 MHz

"1000000A" sets the start frequency to 1 MHz

"30000000B" sets the stop frequency to 30 MHz

"100N" sets the number of sweep steps to 100

"S" Starts the sweep.

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

"?" Returns a list of the sweep parameters:


Start Freq:27000000
Stop Freq :30000000
Num Steps :20

PC Client Software

The User interface on the PC is written in Visual Basic .NET


The Free "Express" edition of Visual Basic is available for download from Microsoft:
http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop

The source code for the client is available here:


https://dl.dropboxusercontent.com/u/205696/K6BEZ/AntennaAnalyser/PC_Software_Source.zip

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.

Click on “Continuous” to perform continuous sweeps.


The start and stop frequencies can be entered manually in the boxes.

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:

The backside pinout looks like this:


At time of writing they can be had for as little as $5 if you look around.

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

Description Reference Designator QT Supplier Digikey partnumber


Y
PCB 1 K6BEZ
AD9850 U1 1 eBay
LCD DIS1 1 eBay
DIS hardware 7/16" standoff 2
screws 4
Resistors:
10 Ohm, 1/4 W R20 1 Anchor Electronics
49.9 Ohm, 1/4 W R3,R4,R5 3 Anchor Electronics
274 Ohm, 1/4 W R12,R13,R14 3 Anchor Electronics
648 Ohm, 1/4 W R9,R16 2 Anchor Electronics
22k Ohm, 1/4 W R8,R15 2 Anchor Electronics
10k Ohm, 1/4 W R1,R2,R5,R6,R17 5 Anchor Electronics
100k Ohm, 1/4 W R7,R11 2 Anchor Electronics
100k Pot R19 1 Digi-Key CT94EY103-ND
RF Connector J1 1 Digi-Key A32245-ND
Caps:
22 pF, radial, 0.1" C12,C13 2 Anchor Electronics
spacing
10 nF, radial, 0.1" C6,C7,C8 3 Anchor Electronics
spacing
100 nF, radial, 0.1" C1,C2,C3,C5,C9,C15, 7 Anchor Electronics
spacing C20
1 uF, radial, 0.1" C4,C16,C17,C18,C19 5 Anchor Electronics
spacing
10 uF, radial, 0.1" C11,C14 2 Anchor Electronics
spacing
XTAL 10MHz X1 1 Digi-Key CTX902-ND
PIC18F46K22 U5 1 Digi-Key PIC18F46K22-I/P-ND
LED, 5mm LED1,LED2,LED3 3 Anchor Electronics
FT232RL U6 1 Digi-Key 768-1007-1-ND
USB Connector J3 1 Digi-Key ED2983-ND
LM7805 U2 1 Digi-Key LM7805CT
Jumpers 3 pin JP1,JP2 2 Anchor Electronics / Frys
8 pin IC Socket 1 Anchor Electronics / Frys
16 pin IC Socket 1 Anchor Electronics / Frys
40 pin IC Socket 1 Anchor Electronics / Frys
Switch S1,S5 2 Digi-Key SW400-ND
6 way header J6 1
8 way header DIS1 2 or use 1x16 way header
10 way header DDS 2
DC Jack J5 1 Digi-Key CP-102A-ND
MAX232 U7 1 Digi-Key 296-6940-5-ND
D-Sub J4 1 Digi-Key 626-1561-ND
Op-amp, MCP6002 U3 1 Digi-Key MCP6002-I/P-ND

Female 0.1” spacing 0.375” tall headers:

1x10 (2 of) for U1

1x16 or 2 of 1x8 for LCD

Male header strip 0.1” spacing 1x16 for LCD

Das könnte Ihnen auch gefallen