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.

Frequency Discrimination



Hello.  If I give the MSP430 an analog signal, can this microcontroller determine the fundamental frequency of that signal?  If so, to what degree of accuracy can it do this?  I am looking for a microcontroller that can determine the frequency of a signal (100-1000Hz) to within a half a hertz.  

  • If your signal have just single frequency component which you are looking for, then it's very easy. - All you have to do - convert it to digital pulses and count them using timer which is running from more or less precise time source like 32KHz "watch oscillator". Do you know for how long you shall count pulses to measure 100Hz with 0.5 Hz precision?

  • Peter Balzereit said:

    Hello.  If I give the MSP430 an analog signal, can this microcontroller determine the fundamental frequency of that signal?  If so, to what degree of accuracy can it do this?  I am looking for a microcontroller that can determine the frequency of a signal (100-1000Hz) to within a half a hertz.  

    If your analog signal is going from 0V to 3.3V it can be seen as digital signal on pin input.
    I made simple (zero parts, MSP430F55xx based) frequency meter with only one range, up to 50 MHz with 0.5 Hz resolution.
  • Peter Balzereit said:
     If I give the MSP430 an analog signal, can this microcontroller determine the fundamental frequency of that signal?

    The microcontroller by itself cannot. It has no hardware for such a job. But the code you write might be able to do it. it depends on your coding skills.

    If you have an analog signal with varying amplitude and overtones, you'll have to sample with at least 4kHz and do an FFT. You likely can't do that in realtime, but it should be doable

  • Thanks a lot for the responses.  It seems to me that I will be needing a different microcontroller or DSP device for what I want to do. The signal i'm putting in will be an audio signal (that I can span to be 0V-3.3V if needed).  The signal will most likely be single tone that has some harmonic components to it and I was hoping to implement some kind of bandpass filter to filter them out.  I want to be able to do an FFT in real time.  Does anyone know of any other microcontrollers that have this kind of hardware?

  • Peter Balzereit said:
    Does anyone know of any other microcontrollers that have this kind of hardware?

    You don't need any other hardware inside microcontroller than ADC and plenty of computing power. TI have wide selection of DSP's, just ask in the e2e DSP forum.

  • Peter Balzereit said:

    Thanks a lot for the responses.  It seems to me that I will be needing a different microcontroller or DSP device for what I want to do. The signal i'm putting in will be an audio signal (that I can span to be 0V-3.3V if needed).  The signal will most likely be single tone that has some harmonic components to it and I was hoping to implement some kind of bandpass filter to filter them out.  I want to be able to do an FFT in real time.  Does anyone know of any other microcontrollers that have this kind of hardware?

    http://www.simpleavr.com/msp430-projects/8-bit-fft-spectrum-analyzer

    http://forum.43oh.com/topic/3950-educational-boosterpack-8-bit-fft-spectrum-analyzer-attempt

    http://passworld.co.jp/ForumMSP430/viewtopic.php?t=51

  • zrno soli said:

    Particular spectrum 16-point analyzer is very, very far from 0.5 Hz resolution. Unfortunately author does not say anything about application, maybe FFT is overkill. For instance if you need to detect limited set of tones of known frequency, then Goertzel algorithm is much more effective than FFT. Anyway problem is clearly DSP-related and out of msp430 scope.

**Attention** This is a public forum