This version of the active bridge is arranged as a general purpose SWR meter, but however an SWR meter that will measure the Transmitter output power as well as calculating both the SWR value and the vector angle of the antenna match and in addition the transmission line representation of the load antenna. The arduino code in this regard is acting as an "Antenna network analyser", the calculations there of made just from purely the forward and reflected SWR voltages.
The arduino code design runs independently of the PTT button or the CW key actions. The "general purpose SWR meter" is designed to run inline with the transmitter and antenna as does any other SWR meter unit. The displayed results of the SWR meter are updated every 400ms, but this may be altered to suit individual needs.
The Arduino Uno analog ports listing is below, however it may be wise to use an external voltage reference and an analog signal ground to increase the conversion accuracy overcoming a digital noisy ground signal.:
analog port A0 = Vswr forward voltage
A1 = Vswr reflected voltage
A2 = Transmitter signal power
A3 = not connected
A4 = i2c display connection
A5 = i2c display connection
The Tx signal on analog port "A2" has a full scale voltage of 5Volts, as does all the arduino analog ports, but the current with the supplied code calculates the transmitter full power reading is around 50Watts, current code setting. For greater reading change the multiplier "100" to " 1000" for 500Watts full scale, or a multiplier of "10000" for a 5KW maximum reading or perhaps max 5Watts with a multiplier of just "10", or even just 500mW without a multiplier. The relevant program code line is listed below has a maximum displayed value of 50Watts.
float tx_power_output = ((tx_signal_level * tx_signal_level) / 50) * 100; // tx power = (v * v) / antenna
The subject article regarding "lumped component antenna's", http://radiohamtech.com/page20.html mentions using such a "Antenna network analyser" to measure input as well as output impedances for passive and active circuits, filter and amplifiers as well as RF mixers all used for RF technology could be measured. However many of these RF circuits use only small signal voltages, an RF antenna amplifier would be within the "uV" region, while an RF mixer be it a passive or active mixer stage would be subjected to a far stronger signal levels, particularly the "local oscillator" input terminal. Measuring signals of such a small magnitude would require signal amplifiers on the arduino ports of A0 and A1, the "Vswr forward voltage" and also the "Vswr reflected voltage". The arduino port A2 would measure the test RF signal source carrier level, thereby measuring the signal strength of the RF test signal. Likewise the Tx power measurement may as well be the output signal level, of the test device, thus from the known input the RF signal, the RF signal gain or signal loss of the device under test can be determined. However, with an RF signal amplifier placed on the inputs of arduino analog port A0 and A1, the input and output impedance measurement of the device under test can be successfully made or determined with "mV" or "uV" signals.
One idea would be to use two "Antenna network analyser" units, connecting the output of the analyser to the device under test, the analyser input a 50ohm sourced RF signal, and the second analyser input terminal connected to the output of the device under test, the output terminal of the analyser the termination of the circuit as 50ohm dummy load as the simulated antenna load. From this arrangement, four parameters of the device under test, the RF signal level, the SWR match, the vector measure or calculation as well as the impedance viewed as a transmission line characteristic impedance of both the input and output terminal circuits of the device under test can be conducted. The only alteration to the "Antenna network analyser" code to accurately measure the output circuit of the device under test would be to reciprocate the SWR value within the arduino coding, to represent the output impedance measurement.
With this simple code alteration adaption made, the "Antenna network analyser" connected as the output termination of the device under test, the listed results of the displayed measurement would accurately illustrate the output impedance characteristics of the device under test. The other alternative would be to swap around the "Antenna network analyser" input terminals using a simple DPDT switch, simulating the SWR calculation reciprocation. The Tx signal power measurement could easily be calculated as either a voltage or as a dBm or dBW or perhaps a dBuV measurement. The advantage of a decibel value, the RF signal gain or loss can be easily seen between the two "Antenna network analyser" displayed results.
In essence, the "Antenna network analyser" can be used as a simplified but perhaps accurate "RF network analyser", such devices or instruments perhaps costing the earth to purchase.
Below are test runs of the program code to test voltages applied to the analog ports, the photography in this case simulating the output of a radio transmitter connected to an antenna under test.
The above illustrated photo, shows the SWR as a 1:0·5486 which is can be also viewed as 1:1·8228, why?, well with the 1·8228 ratio on the right hand side of the 1:1 ratio, this would indicate a lower then 50ohms antenna impedance, but if the middle image as shown as 1:1·8092 was listed as 1·8092:1, then with the 1·8092 shown on the left hand side of the 1:1 ratio, his would indicate a antenna higher than 50ohms impedance. The SWR ratio method used in my arduino code has essentially used a normalised impedance mathematics notation. Although the notation used is perhaps not strictly correct, it is how the arduino code was written to calculate the impedance variables, the SWR calculation used normalises the antenna impedance as a calculation routine, which is the one shown in the above photo's.
The arduino code is downloaded from my google drive in a text file, to then copy and paste into the Arduino ide.
https://docs.google.com/document/d/1AVP0TA6A6Lq_tqWSoav28Mf0FXE1ImaIrYZ98LgocEg/edit?usp=sharing