Measuring frequency fairly accurately in the megahertz range

I am sure this is a case of “I don’t know what it’s called so I can’t search for it”… There must be a method/chip/something that will allow me to do this.
I want to measure the frequency (radio transmitter) (I can attach to the coax) and act upon the measured frequency. This is in the 10 meter - 12 meter range (24-29 mhz); I need it to be fairly accurate to differentiate between 10,11,12 meter bands. Something I need to be careful of is radio output power (may be up to 10watts of power).
any suggestions on method to use? thanks.

You left out the important thing. Budget. If money is not object a spectrum analyzer would be best. Other wise a frequency counter.

I have a cheap multimeter that can measure frequency. IIRC it works fine up to 4MHz (the max I tried). Perhaps a better model would cover the range you need. My multimeter also has some sort of RS232 output that I have never used.

...R

You can buy a frequency counter (meter) or build one, accurate to 1 Hz or better, depending on the accuracy of your time base. DIY kit example. Also possible with Arduino.

jremington: You can buy a frequency counter (meter) or build one, accurate to 1 Hz or better, depending on the accuracy of your time base. DIY kit example. Also possible with Arduino.

Can't argue with that. It even comes with a PCB!

It is interesting that the design for the inexpensive Chinese-produced kit was obviously taken directly from here: http://www.qsl.net/dl4yhf/freq_counter/freq_counter.html.

The above link describes several options, such as including a frequency offset, and also gives the PIC source code.

The author/designed includes this note on his site:

I don't mind doing that (since he sells the counter for a fair price, at least in February 2016), but unfortunately the kit maker / seller forgot to leave any note about the original developer and source. If you found this site via search engine, looking for "1Hz-50MHz Digital LED DIY Kits Crystal Oscillator Frequency Counter Tester", you will know the rest of the story. If you have problems with the kit mentioned above, please don't ask me to help you out, if there is something wrong with the counter (or the firmware, which seems to have been programmed erratically in a few occasions, with non-functional data EEPROM).

You can read really high with a uC 100 mhz is easy to read. I've seen some really cool homemade ones.

Sorry; I left an important bit out. I want to read said frequency with an arduino. Sure I can use a scope or purpose build frequency counter, but I want to be able to read the frequency in an arduino & act upon reading it. I know (believe?) the arduino cannot read frequencies that high directly, so I was looking for some other method (chip/circuit/module) that I could read it... Ordering one of those 50mhz kits is an option; and I could read the pins off the pic instead of feeding the LED's, but on 1st glance, it doesn't look like it powers all the led's at once, which might make it hard to time it...

You need a frequency divider which can bring the frequency down to a rate that the Arduino can read. That is what the 'prescaler' in the PIC chip is doing. It is really just a simple counter that counts up to 16 or 32 or whatever. The output is just the last digit in the count.

A PLL can be used to lock a local,oscillator to the incoming frequency like a radio tuner. I don't have any experience with these however.

Nick Gammon had a Freq Counter example in Timers and counters

// Timer and Counter example
// Author: Nick Gammon
// Date: 17th January 2012

// Input: Pin D5

// these are checked for in the main program
volatile unsigned long timerCounts;
volatile boolean counterReady;

// internal to counting routine
unsigned long overflowCount;
unsigned int timerTicks;
unsigned int timerPeriod;

void startCounting (unsigned int ms) 
  {
  counterReady = false;         // time not up yet
  timerPeriod = ms;             // how many 1 ms counts to do
  timerTicks = 0;               // reset interrupt counter
  overflowCount = 0;            // no overflows yet

  // reset Timer 1 and Timer 2
  TCCR1A = 0;             
  TCCR1B = 0;              
  TCCR2A = 0;
  TCCR2B = 0;

  // Timer 1 - counts events on pin D5
  TIMSK1 = bit (TOIE1);   // interrupt on Timer 1 overflow

  // Timer 2 - gives us our 1 ms counting interval
  // 16 MHz clock (62.5 ns per tick) - prescaled by 128
  //  counter increments every 8 µs. 
  // So we count 125 of them, giving exactly 1000 µs (1 ms)
  TCCR2A = bit (WGM21) ;   // CTC mode
  OCR2A  = 124;            // count up to 125  (zero relative!!!!)

  // Timer 2 - interrupt on match (ie. every 1 ms)
  TIMSK2 = bit (OCIE2A);   // enable Timer2 Interrupt

  TCNT1 = 0;      // Both counters to zero
  TCNT2 = 0;     

  // Reset prescalers
  GTCCR = bit (PSRASY);        // reset prescaler now
  // start Timer 2
  TCCR2B =  bit (CS20) | bit (CS22) ;  // prescaler of 128
  // start Timer 1
  // External clock source on T1 pin (D5). Clock on rising edge.
  TCCR1B =  bit (CS10) | bit (CS11) | bit (CS12);
  }  // end of startCounting

ISR (TIMER1_OVF_vect)
  {
  ++overflowCount;               // count number of Counter1 overflows  
  }  // end of TIMER1_OVF_vect


//******************************************************************
//  Timer2 Interrupt Service is invoked by hardware Timer 2 every 1 ms = 1000 Hz
//  16Mhz / 128 / 125 = 1000 Hz

ISR (TIMER2_COMPA_vect) 
  {
  // grab counter value before it changes any more
  unsigned int timer1CounterValue;
  timer1CounterValue = TCNT1;  // see datasheet, page 117 (accessing 16-bit registers)
  unsigned long overflowCopy = overflowCount;

  // see if we have reached timing period
  if (++timerTicks < timerPeriod) 
    return;  // not yet

  // if just missed an overflow
  if ((TIFR1 & bit (TOV1)) && timer1CounterValue < 256)
    overflowCopy++;

  // end of gate time, measurement ready

  TCCR1A = 0;    // stop timer 1
  TCCR1B = 0;    

  TCCR2A = 0;    // stop timer 2
  TCCR2B = 0;    

  TIMSK1 = 0;    // disable Timer1 Interrupt
  TIMSK2 = 0;    // disable Timer2 Interrupt
    
  // calculate total count
  timerCounts = (overflowCopy << 16) + timer1CounterValue;  // each overflow is 65536 more
  counterReady = true;              // set global flag for end count period
  }  // end of TIMER2_COMPA_vect

void setup () 
  {
  Serial.begin(115200);       
  Serial.println("Frequency Counter");
  } // end of setup

void loop () 
  {
  // stop Timer 0 interrupts from throwing the count out
  byte oldTCCR0A = TCCR0A;
  byte oldTCCR0B = TCCR0B;
  TCCR0A = 0;    // stop timer 0
  TCCR0B = 0;    
  
  startCounting (500);  // how many ms to count for

  while (!counterReady) 
     { }  // loop until count over

  // adjust counts by counting interval to give frequency in Hz
  float frq = (timerCounts *  1000.0) / timerPeriod;

  Serial.print ("Frequency: ");
  Serial.print ((unsigned long) frq);
  Serial.println (" Hz.");
  
  // restart timer 0
  TCCR0A = oldTCCR0A;
  TCCR0B = oldTCCR0B;
  
  // let serial stuff finish
  delay(200);
  }   // end of loop

Here is a link to a Freq Counter with prescaler

40MHz-Frequency counter with ATmega8

Hi, A quick google arduino mhz frequency counter

https://github.com/abdallah-ali-abdallah/Arduino-Frequency-Counter-with-LCD

Tom.... :)

@BillHo well; I don't see it, but Gammon's site does not appear to have anything related to getting faster signals; would you mind pointing it out? The code posted doesn't seem to applicable to 29mhz.

The "frequency divider" looks promising; thank you. I still find it odd that this isn't more commonly needed & that someone hasn't done a generic pcb/module for it. At least I now have the proper term I can search for help/answers -- thank you for that!

daveyjones: @BillHo well; I don't see it, but Gammon's site does not appear to have anything related to getting faster signals; would you mind pointing it out? The code posted doesn't seem to applicable to 29mhz.

Yes, Gammon's site the code posted doesn't seem to applicable to 29mhz. but was a base for the frequency counter, it can work up to more then 5MHz.

With the prescaler, "frequency divider" it can work for up to 40Mhz.

daveyjones: The "frequency divider" looks promising; thank you. I still find it odd that this isn't more commonly needed & that someone hasn't done a generic pcb/module for it. At least I now have the proper term I can search for help/answers -- thank you for that!

The code from the "frequency divider" was assembler source code, which I don't think you will use it. So the posted code can be use, and Gammon's site will give you more info on how to use the code.