cancel
Showing results for 
Search instead for 
Did you mean: 

measure amplitude and phase of a input signal

arunl4g
Associate II
Posted on June 24, 2015 at 10:57

hej 

i would like to know the procedure for measuring the amplitude and phase of the signal 

using stm32f404-discovery board.

can anyone tell me how to acheive this ?
1 REPLY 1
raptorhal2
Lead
Posted on June 24, 2015 at 14:53

Review your Discovery User Manual to determine which pins are free for your use.

Read at least the ADC section in the processor's Reference Manual, available on the ST web site.

Review the ADC examples in the F4 Cube or Standard Peripheral Library and adapt one for your project.

Assuming a sine wave:

Scale and bias the signal to fit in the 0 to 3V ADC range.

ADC convert at least several signal cycles at a conversion frequency that meets your phase accuracy requirement.

Analyze the data for minimum and maximum to get amplitude. Reverse scale and bias to determine signal amplitude.

Analyze the data for deviation from mid amplitude to determine phase.

Simple, no ?

Cheers, Hal