SWR mega

SWR meter design (just indicator, probe will be described later - one possible design is here (in Czech))

New version 1.2 available! Minor PCB design changes 20.9.2013.

Version 1.1 (Apr 6, 2010) changes: SWR calculated using peak measured value (average value used earlier), indication of overload (too high forward power), "!!!" shown instead of SWR value.

New update 25.4.2012 Several people asked me to modify program for different LCD display sizes. Currently there is support for 2x40, 2x24 and 2x20 chars models. But I still recommend the large scale 2x40 because of best bar resolution and more text information. There is also possibility to use internal 2.56V voltage reference for ADC instead of 5V - for situation you have a probe giving max 2.56V (you must also disconnect AREF pin from +5V but keep it blocked by capacitor!). See the #if switches in source code... I publish HEX files for all display sizes for 5V standart reference voltage.
Remote display application added to package.

3.9.2012 Configuration tool - minor bugfix (immediate stop when COM1 port not available).

Version 1.2 (13.5.2013) New features:
- support for two RF probes operation. The input signals from both probes are independent, switching is performed in software (the probe with stronger signal is displayed). Useful in situations when you have more radios/antennas in shack - the SWR meter always shows that currently used. Also good for SO2R contest category. But you can always connect just one probe and use it in same way as the old version...
- SWR protection signal. The SWR value is monitored and when SWR>3 a binary signal (relay contact) is generated to protect valuable equipment (how to connect is up to you). The protection signal is reset when the RF power is removed.

Because of additional probe signals there is a new schematic diagram and new PCB layout. The design is backward compatible (if you use processor with version 1.1 in version 1.2 PCB it works fine, no changes necessary). So I recommend to use PCB v1.2 for your copy also when you don't need the 1.2 features. I include the v1.1 here just for case you need really small PCB.

Version 1.3 (20.8.2013)
- just bugfix related to probe linearity correction. Tnx UY3QW.


Prototype

Goal: to build a simple circuit with following properties:
  • SWR and RF power meter for home usage (to be installed in Hamshack) powered from AC line or possibly from 12V DC
  • use LCD text backlit display instead of classic analog meter
  • bar indicators for both forward and reverse signal with maximum possible resolution
  • display numerical values for forward power, reflected power, real power and SWR. Selection between peak or average values.
  • possibility to use up to 8 different RF probes with different characteristics and power ranges
  • possibility to calibrate each probe (compensation for detector non linearity) using software tool under Windows


  • Configurator

    Technical points

  • Heart Atmel AVR Mega8 single chip microcontroller - powerful, cheap, easy to get, easy programmable (without need to remove it from the circuit). Program written in C using WinAVR tools and library, free, sources available here (of course!)
  • Use analog-digital convertor on the chip to read analog signals from probe (10 bit resolution)
  • Use USART for serial communication (interface with well known MAX232 IC) for configuration parameters and actual measured data
  • LCD display 2 lines 40 characters each (large, good readable). Maximum possible resolution of bar indicators reached using LCD's graphical general RAM: the top line is able to display 2 bars, each with 80 squares resolution (1 character consists of 4 squares)
  • Probe identification using analog signal: there is one resistor in each probe; the meter supplies current and microcontroller measures voltage on that resistor. The value identifies the probe
  • Set of parameters for each of 8 probes: maximum range (number), decimal place displayed, unit (pW till MW), correction of detector non linearity as table of 16 values for 16 equally spaced ADC values. The value between that points is calculated using linear interpolation
  • One side PCB only, with minimum wire jumpers and without "narrow places", easily made in shack of ordinary HAM
  • I use LCD display type Solomon LM1030SYL, 2 lines, 40 characters each, based on standard chip HD44780. I don't expect compatibility problem with other similar models. Just one experience: some product (very few) have different pin layout (esp. crossed ground and +5V), so check carefully documentation of your particual model. LCD display 2 lines 20 character each has been tested as well - the bar indicator resolution is sufficient, the bottom line shows only probe ID, power and SWR (there is a parameter in source code defining display width resulting in another HEX firmware; the EEP is the same).
  • Probe design is not yet part of the project. Perhaps when I build a probe that I like I will publish it here as well. But - currently a lot of designs exist... The basic probe parameters: maximum voltage (full range reading) is +5V DC, the same range for reverse and forward signals. The meter is very low load for the detector, in range of 1 MOhm.


  • Prototype



    Remote display - a simple Windows application reading power/SWR data from SWRMega over serial port.

    Remote display

    Documentation

    Manual (sorry, to be updated...)
    Circuit diagram (version 1.2)
    Circuit diagram (version 1.1)
    Printed circuit board layout
    Source code in C language
    Complete user package for download: manual, binary files, programming tool, calibration tool, remote display, PCB layout files, size 2 MBytes
    Complete developer package for download: C sources for AVR, PCB layout sources (ExpressPCB format), C# sources for calibration tool and Remote display(MS Visual Studio 2008)
    Supporting package for download: Microsoft Chart component (free, used in calibration tool; .net framework 3.5 SP1 required), ExpressPCB setup for PCB layout, total size 11 MBytes
    WinAVR 13.3.2009 development tool size 22 MBytes (GNU license) for Windows
    One SWR probe not a complete design, more how to design
    Obsolete version 1.1 sources and binaries plus PCB design.
    Very first obsolete version 1.0 sources and binaries. Just for sure...

    Links

    Atmel home page for AVR microcontrollers
    ExpressPCB, free PCB software and PCB production

    Very first prototype (version 1.0)
    Prototype

    Version 1.2, LCD with 2x20 chars
    Prototype

    Support

    The project is hamware, free for radio amateurs and non commercial usage (that means, to build one copy for you, not for sale). For all other purposes please contact me.
    I have an experience some HAM's ask me for help to get the microcontroller, to program it etc. I try my best to help them, but it is just a hobby and I have limited resources... About the PCB - I have no possibility to produce the boards. Anyway, if you are in position you can arrange the PCB for others, please let me know and I will publish contact to you here.

    73 Pavel OK1DX

    Clones

    I have built another piece for my club station, here are the pictures:
    Prototype
    Prototype

    Prototype
    Prototype

    Another copy, together with probe (by OK1DXD)
    OK1DXD version

    Don't forget to connect the display correctly (pins D0-D3 not connected)!
    Prototype