How to detect a specific (very high) frequency

Discussion in 'Embedded Systems and Microcontrollers' started by paw1, Feb 17, 2015.

  1. paw1

    Thread Starter Member

    Jan 13, 2015
    32
    0
    I have a project where a switch is going to be activated/deactivated when a sweeping signal goes above/below ~150 MHz. I've been thinking of using a microcontroller to detect the frequency, using the ADC and appropriate programming code, but that would require a heck of a sampling rate, and I've never seen a controller that fast.

    Any thoughts on how to do this?

    Best regards
    -paw
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    To get the 74Gxx counter and you may get to the target on 150Mhz easily.
     
  3. paw1

    Thread Starter Member

    Jan 13, 2015
    32
    0
    May you elaborate on what this counter does please? Or maybe you have a link?

    Thanks
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Using some PO74G74A and one 74HC4040 to divide the input frequency then you can get a slow frequency, that is the detecting signal, just a thought, but I think it could works.
     
  5. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
  6. paw1

    Thread Starter Member

    Jan 13, 2015
    32
    0
    Forgive me for being unknowledgeable, but after reading the data sheet I still don't understand what a "DUALPOSITIVE-EDGE-TRIGGERED D-TYPE FLIP-FLOPS" (PO54G74A) is/does. To me it looks like a frequency generator of some sort, although that's most likely wrong. I'd agree with you that a frequency divider could do the job, in theory. The fastest sampling rate I've seen in a microcontroller is 2 MHz, so I'd have to divide the signal frequency at least 300 times for it to work, which just doesn't seem possible in real life.

    I appreciate you taking the time to help.
     
  7. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    What is the nature of the sweeping signal? Min/max freq during the sweep? Signal level? To what resolution do you need to determine its freq?
     
  9. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,736
    And, is it on a cable or wireless?
     
  10. paw1

    Thread Starter Member

    Jan 13, 2015
    32
    0
    Appreciate it. May not be enough though.

    Amplitude: (+-) 10 V.

    The signal will sweep the range ~100-200 MHz. The sweeping period will be about 1 ms. I'd like the switch to activate when the frequency is 150 MHz (+-) 0.5 MHz, which means that the microcontroller needs to react in less time than 5 microseconds.


    It will not be wireless. Maybe microstrip.
     
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I would approach this problem based on my RF experience. A 150MHz pre-programmed oscillator module from DigiKey. Feed it to one port of a mixer (MiniCircuits). Feed your sweep oscillator to the other port. A simple RC integrator on the output of the mixer will show when the swept signal is within +-bw, where bw is directly controlled by the time-constant RC.

    If this was a one-of test, I would just use a VHF receiver, and tune it to 150MHz. The Carrier-operated-squelch circuit in the receiver lights a LED when a signal falls within the passband of the receiver. You can buy a complete Chinese VHF transceiver for ~$35, so it is not out of the question to obtain your own...
     
  12. KLillie

    Member

    May 31, 2014
    126
    14
    Wouldn't you only have to divide it 7 times?
     
  13. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
    If the signal is restricted to 100MHz to 200MHz you can sample at 100MHz.
    This is going to down convert your signal from the 3rd and 4th Nyquist zones to baseband, 0MHz to 50MHz and back down to 0MHz.
    If the scanning signal is always increasing from 100MHz to 200MHz you will be able to detect 150MHz because the digitized frequency will max out at 50MHz.
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
    Here is simpler solution.

    Use a high speed D-type flip-flop as a phase detector.

    Feed the sweep signal to the D-input. Clock the flip-flop at 150MHz.
    Feed the Q output to an integrator (low-pass filter). Exactly at 150MHz you will get zero volts output.

    74LVC1G74 or 74LVC2G74 will clock at 200MHz
     
  15. paw1

    Thread Starter Member

    Jan 13, 2015
    32
    0
    If I have a microcontroller with a sampling rate of 2 MHz, it will only be able to (correctly) sample signals up to maximum 1 MHz (Nyquist theorem). Because the signal goes up to 200 MHz, I'd "only" need to divide by 200. It's always good practice to make sure the system is reliable by overqualifying it slightly though.

    By using the formula f(sampled) = |Fs*n - f| I get the same result as you when using a sampling rate of 100 MHz: Every time it samples 50 MHz, the real signal should be 150 MHz. Unfortunately I haven't seen any microcontroller coming close to that sampling rate.

    If I used a microcontroller with a sampling rate of 1 MHz, the sampled signal would sweep from 0 kHz, up to 500 kHz, and down to 0 kHz, 200 times in a single sweep of the input signal. Unfortunately that is not useful.

    I'll look into this suggestion a bit later.

    Thank you so much for all your suggestions.
     
Loading...