• [ON7IR] Digital SWR and power meter - part 1

    From ON7IR via rec.radio.amateur.moderat@21:1/5 to All on Sun May 16 05:46:16 2021
    XPost: rec.radio.amateur.moderated

    Ham radio ON7IR

    ///////////////////////////////////////////
    Digital SWR and power meter - part 1

    Posted: 15 May 2021 07:01 AM PDT https://on7ir.blogspot.com/2021/05/digital-swr-and-power-meter-part-1.html


    Do we need really digital SWR meters? No I don't think so. There are a few
    on the market but most of the SWR meters are analog. That is because the concept of using a cross needle meter is very clear and good. Digital SWR meters are fancy, I do agree. But they are also expensive.
    So I started thinking of making one myself, just for fun. I could make a
    bridge from scratch but then I got an idea.
    The Daiwa CN-410M SWR & Powermeter was one of the things I bought last year from Silent Key ON2XXX. I opened it to see what's inside. The SWR bridge itselves is built inside a metal case and has two wires for the detected forward and reflected signals (at the 1000pF feed-thru capacitors) and a
    ground lead connected to a pcb containing the rest of the circuit for the analog meters.
    Here is the Daiwa CN-410M schematic:
    The Daiwa CN-410M Power and SWR meter can handle upto 150Watts.
    Green wire is forward signal, orange is reflected.

    With the transceiver connected to a 50 ohm dummyload I measured the
    voltages on these two wires at several output power values. At around 100
    Watt output, the forwarded voltage received from the bridge was less than 2 Volt. When the wires were disconnected from the pcb this voltage has almost doubled. That was a more useful voltage range to my believe. Another possibility is to keep the analog circuit intact and use opamps to upscale
    the measured values. With an LM324 this is possible, I tested it. But to
    keep things simple I quit that path but maybe later I continue with that. Anyway the decision was made, this SWR bridge will be used.
    Armed with oscilloscope and voltmeter I wrote down the measured
    peak-to-peak voltage (Vp-p) to the 50 ohm dummyload and also the forwarded voltage at every 10% increase step on my IC-7300 (up to about100 Watt). And
    the same for each 1 Watt step on my G90 (1-20 Watt). Vp-p was then
    converted to Watt. As expected, these figures showed that at lower power settings the bridge is not linear.The SWR bridge has been detached and a
    female header connector soldered on it.
    Now that I had an idea about the values it was time to convert to a digital readout. During programming two potentiometers each deliver a variable
    voltage to two analog pins of the Arduino emulating forward and reflected power. I had no TFT yet so I used an OLED to visualize the measured and computed values.
    The U8g2 library was used but it occupies a lot of memory and when, after several test versions, I added the graphical SWR bar then the OLED remained black. It took me a while before I understood that this was caused by lack
    of enough available memory. When I swapped the Nano V3 with a Mega 2560
    Core that problem was gone.
    Using the Arduino Mega 2560 Core. Quite a messy setup, no?

    Looking good on an OLED

    One thing to cope with was the non-linearity of the bridge. I found a
    software solution to that problem and will tell about it in part 2.
    Then finally the replament TFT for the NanoVNA arrived (read about it here
    for details) so I could start mastering the TFT albeit with a defective
    screen (read that NanoVNA story). Another TFT was ordered for this project
    and it arrived after two weeks.

    The malfunctioning TFT that came from the NanoVNA.
    Besides the disturbing lines it draws double the current compared to a new
    TFT.
    In this video with the potentiometer with the silver knob the forwarded
    power is emulated, the other potentiometer varies the reflected power.
    (YouTube link)
    Important to know is that these TFT's need 5 Volt to operate but the signal levels are at 3.3V so a voltage conversion is required (unless you use an Arduino on 3.3V). Although I have bi-directional level converters available
    I did the voltage conversion with resistors.
    I never used a TFT with an Arduino and some time was needed for
    investigation and learning. The TFT board contains two chips: the ILI9341
    to drive the display and an XPT2046 for the touch detection. The
    ILI9341_Fast library had my full attention and it was obvious for me to
    work with this library. The library requires less memory so the Arduino
    Nano is sufficient to do the job well.
    Once happy with testing on a breadboard I mounted the Arduino Nano and the resistors on an experimenter pcb and at the other side the TFT screen can
    be plugged in. The TFT plugs in at the back of the pcb.

    Currently the software is almost as I would like it to be as a first
    useable version. It shows forward and reflected power and the corresponding
    SWR in figures and graphically as a bargraph. The color of the SWR value changes when the SWR increases. Should be clear enough.

    This project leaves a lot of room for changes both in hardware and software
    and can currently be seen as the basis for it. What about combining the
    analog meters with this digital readout. Or make use of the touch
    possibilites (for instance to choose from different graphical interfaces or colors).
    I am aware that there is another and more precise way to measure power and
    SWR by using two AD8307 ic's.
    In below video an impression of my digital SWR and power meter. Running
    FT4 so every 7.5 second there is a transmission. Fluctuating SWR due to
    some wind playing with my cobweb antenna ;-)
    You also watch it on YouTube

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)