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.

Microcontroller as period counter and speed detector

Hi, I am making Doppler effect based Radar sensor module. I want to measure the speed of a moving object. I have a sensor which gives a low voltage output signal(300 uV) with frequency 4320 Hz . This input goes to a preamplifier circuit and then to a microcontroller to detect speed of object. Can I get help on how to use the microcontroller for frequency detection and then speed measurement. Also what microcontroller from TI should I use for this purpose?

  • That is a pretty open ended question that depends on a lot of factors.

    What type of signal is it? Sine wave? Can you amplify the heck out of it and just look at it like an FM signal?

    The answers would determine whether you use ADC to capture or a timer module.

    What is the delta frequency deviation and what minimum resolution do you want? That will determine sampling frequency needed (or timer clock base required).

    I would also question how much processing you need to complete on the captured data.

    These will help guide you to an appropriate processor, and a microcontroller may not be the answer.

  • the signal is a sine wave of amplitue 2.1 V and frequency around 5 Khz. Do you think I should convert sine wave to square by using a zero crossing detector circuit and then use counter of microcontroller to find ou frequency and speed.

  • If all you need to know is the frequency, then that is the type of solution I would suggest. No need to try and do that detection in software when you can just look at the edge timing using the capture/compare feature of the built-in timers.

  • Navneeta Deo said:
    I should convert sine wave to square by using a zero crossing detector circuit

    Clip positive part of sine at VCC voltage with single supply amplifier, connect amplifier's output to timer capture input.

    Navneeta Deo said:
    then use counter of microcontroller to find ou frequency

    Exactly.

  • Thanks, this is a really great feature to use. And I think the simplest of all. But I need to calculate speed of target from the frequency obtained. How to go about with it?

  • Navneeta Deo said:
    But I need to calculate speed of target from the frequency obtained. How to go about with it?

    Use mathematics :)

  • Great :p but the question is not how to calculate speed from frequency but how to do it in micocontroller and if CCP feature is still ok for this application.

  • Navneeta Deo said:
    Great :p but the question is not how to calculate speed from frequency

    http://en.wikipedia.org/wiki/Doppler_radar

    Navneeta Deo said:
    but how to do it in micocontroller and if CCP feature is still ok for this application.

    Using timer you either measure single wave period duration to get frequency (freq=1/duration) or just count periods during reference (gate) time, for example 1sec (freq = periods/gate_time). msp430 timers allows both ways

  • I am also trying to work with doppler radar interface with MSP430.Can you help me with firmware how you are working through it

**Attention** This is a public forum