Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to convert ADC data to dBm

Status
Not open for further replies.

strahd_von_zarovich

Advanced Member level 4
Joined
Sep 25, 2015
Messages
118
Helped
1
Reputation
2
Reaction score
3
Trophy points
1,298
Activity points
2,463
Hi Everyone,
I collect data from ADCs on my board. I couldn't figure out how to convert them to dBm on frequency spectrum. I wrote a Matlab code but it doesn't give me the correct results.
Sampling Rate : 250MS , ADC Resolution: 16bit, Input Impedance: 50ohm

Code:
FsChan = 250e6;  % sampling frequnecy
DataLsb = 2^-15; % Least significant bit for 16-bit ADC

dataInt16 = fscanf(inFile, '%f');   % reading data from file
data = double(dataInt16) * DataLsb; % multiply data with LSB to get real voltage
L=size(data,1);
[pxx,f] = periodogram(data,[], L, FsChan ,'psd');   
pxx_dB=10*log10(1000*pxx/100); % dBm/Hz 50 Ohm Load

But this code gives me something like the picture below, but the real power of the signal should be 0dBm.
R1.PNG



Thanks in advance.
 

Digital values can only show dB not dBm unless you have some ADC reference for that.
To get dB your periodogram is ok but use 10*log10(pxx). You also need to offset effect of FFT resolution on power level (I think it is -10*log10(N)) since more resolution lowers noise floor.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top