Hello everyone,

I have been trying to make an RF Wattmeter using an AD8313, ADL5513, or the AD8361.

I am a hobbyist whose weakness is Math and calculation.

So it's difficult for me to start a code from scratch. This is why I resorted to already available codes. Thanks to Arduinos, this has been available.

- The first problem I need a solution to is converting the following eqation in Arduino code. I have tried but I got errors:

(Vmax / v )² (4.9 V / 7.5)²

Pmax = -------------- = --------------------- = 8,53 mW = 0.6533 V (vrms)

Rload 50

- The other problem is that I want to add some protection to the AD8313 or so chip

once the voltage exceeds a certain threshold a relay cuts off power or connection to the input.

I wrote this code but as soon as the program runs I get the warning and the protection no matter the input signal

// if (Watts >10)// if the signal is higher than 10 Watts, then block signal.

// digitalWrite (4,HIGH);// drives a relay of so to block signal

// lcd.clear();

// lcd.setCursor(0,0);

// lcd.print("Warning");

// lcd.setCursor(0,1);

// lcd.print("OverVoltage");

// delay(5000);

I'd appreciate it if you wrote me the conversions and formulas concerning 1: Vrms to Watt, 2: Watt to dBm, and 3: dBm to Vrms.

Here's another eqation for the ADL5513, I was not sure of the results in Arduino:

Output power = the signal from the ADL5513 at the input A0 divided by 47 minus -89 from the result.

I wrote as such in arduino Pout= (Vin(A0)/47)/-89;

In languages one can't improvise, it's copy and imitate.

I wanted to try this one detector:

https://pa0rwe.nl/?page_id=356

it's luxurious but I don't have a rotary encoder. I looked for a more convenient one and I found this one:

http://www.darc-husum.de/pegelmesser-10ghz.html

and I've already built it as it is what I want and tried to adapt it to the ADL5513 but all my efforts in vain I didn't know how to change the math. Replacing the slope and intercept values wouldn't solve the problem. The measurement is counterclockwise the higer the input the lower the power and dB!!!!

I found this one:

https://www.changpuak.ch/electronics/Arduino-Shield-NRVD.phpbut

it's complicated as it usese double ADL5513

Thanks a lot in advance.