 # How can I get the power in dBm?

## Question

How can I display the remote power readout of a NRP.Zxx power sensor in "dBm" on the NRP or NRP2?

## Answer

The NRP and NRP2 base unit has a "dBm" and a "Watt" readout. Conversion to "dBm" takes place in the NRP or NRP2. A remote command always returns the measured power values in "Watt". The sensors cannot internally convert the power values to "dBm".

However, a computer and a program are always needed for remote operation. In the computer program, it is easy to convert the unit from "Watt" to "dBm" using equation :

a = 10 * (log10(P / 1 mW)) dB 

Sometimes compilers only provide a base 2 logarithm function. In this case, you can calculate the base 10 logarithm function with equation :

log10(x) = log2(x) / log2(10) 

Using the base 2 logarithm function, equation  and equation  give you equation :

a = 10 * (log2(P / 1 mW) / log2(10)) 

Equation (4) is the general way to calculate the base 10 logarithm from other logarithm bases (note the subscripts b and c):

logc(x) = logb(x) / logb(c) 

Where:

a -> power level in "dBm"

P -> power returned from the sensor

log2 -> base 2 logarithm function

log10 -> base 10 logarithm function

logb -> base b logarithm function

logc -> base c logarithm function