This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to measure a sine wave using ADC ?

Other Parts Discussed in Thread: MSP430F5529, MSP-DSPLIB

Hello ,

I am using the MSP430F5529 kit . I wanted to measure a sine wave signal using ADC12 .. for a particular frequency how am I supposed to measure the signal (Vpp) ??

The signal is give a DC offset and then fed to the ADC.

Thanks & Regards ,

Maisie

  • Use MSP-DSPLIB. Before using it you should be aware of understanding what reduced properties discretized analog signal has. You also should be aware of how digital spectral process do, Fourier transform, his optimized form and what it actually is a 'complex numbers'.
    Do you know all of it?
  • You can also use analog methods to capture desired fixed frequency and then just read voltage levels on your ADC.
  • To add a DC bias so that the signal is always positive is in the right direction. The MSP cannot handle any signal below Vss or above Vcc. To be able to digitize the signal with ADC, the signal has to be above V-ref and V+ref (where V-ref is usually the same as Vss, but V+ref is usually below Vcc).

    Furthermore, your signal has AC component, you need to digitize at least twice per shortest AC period at a fixed and known sampling rate. Sampling at much higher rate is preferred.

    After the above conditions are met, you can then take meaningful measurement. As for analyzing the measured result, that is what Alexey was talking about. But that was not mentioned in your original posting and I do not know if you want to do those.
  • If your sampling rate is high enough, the difference of max-min is the Vpp you want to know. No need for complex analysis.
  • hello ,

    Thanks for the replies.

    What I have known is that all the discrete values of the sine wave are to be read and a DFT is to be computed  by which one can compute the Vpp value.

    Rather can I read one cycle of the signal and track the max and the min values obtained and do a (max-min) ??

  • Maisie Fernandes said:
    What I have known is that all the discrete values of the sine wave are to be read and a DFT is to be computed  by which one can compute the Vpp value.

    Not "all the discrete values", that is impossible. You only need the discrete values at a fixed and known sampling rate within a know window of time.

    If the sampling rate is high enough, and the window is wide enough, the DFT will give you estimates of all the frequencies and amplitude (Vpp) of each components in the signal.

    If you know that the signal has only a DC component and one AC component, this approach is an overkill.

    Maisie Fernandes said:
    Rather can I read one cycle of the signal and track the max and the min values obtained and do a (max-min) ?

    That is a KISS approach if you know that the signal has only a DC component and one AC component.

**Attention** This is a public forum