Success With FreqCount Above 10MHZ on Teensy 3.2

Status
Not open for further replies.

markmokris

New member
I have built the EXACT project documented in the FreqCount tutorial.

https://www.pjrc.com/teensy/td_libs_FreqCount.html

I have followed this exactly in every way. I am using it with the same preamp transistor 2N3904 and the same Schmidt trigger. I feed the circuit with a signal generator that is supplying the input to the preamp with about .6 vpp sine wave.

Except I am using a Teensy 3.2. I would like to use this frequency counter up to about 20 MHZ.

It works great up until about 10MHZ. After that the readings in the serial monitor begin to show low by a few KHZ. As I move the frequency up to 15MHZ, the readings are low by more - low by close to 12 KHZ. The higher I go, the more they are off.

I am using a 1000 msec gate time just like in the tutorial.

I am comparing the readings to 2 other, manufactured, frequency counters that agree with each other.

Is there something about the input stage that could be limiting my effective max frequency? Shouldn't the Teensy 3.2 permit me to count much higher than 10 MhZ with accuracy?

What might I be doing incorrectly? Any advice is appreciated.

Thanks,

Mark
 
The page indeed says :: FreqCount: best for 1 kHz to 8 MHz (up to 65 MHz with Teensy 3.0 & 3.1)

Is the simple code in that linked page in use?
 
Yes, this is the code I am using.

#include <FreqCount.h>

void setup() {
Serial.begin(57600);
FreqCount.begin(1000);
}

void loop() {
if (FreqCount.available()) {
unsigned long count = FreqCount.read();
Serial.println(count);
}
}

Thanks,

Mark
 
Can your function generator output a 0 to 3V signal? Then you could drive the pin directly.

That transistor circuit was only tested with the old Teensy 2.0 boards. It may not work well at higher frequency.
 
I am thinking it may be in that input circuit. I will be trying this with a signal from a VFO from a Swan 350 ham transceiver. I think I can get a higher voltage signal from that.

Thanks,

Mark
 
Can somebody explain frequency counting on the teensy

Does it use the main processor to do this ? Or is there a part of the processor dedicated to counting ?

On the arduino typically you use a interrupt, but this causes the main loop to break down at high frequencies

I want to count 40 khz on 4 channels
 
Can somebody explain frequency counting on the teensy

Does it use the main processor to do this ? Or is there a part of the processor dedicated to counting ?

On the arduino typically you use a interrupt, but this causes the main loop to break down at high frequencies

I want to count 40 khz on 4 channels
For that frequency, it looks like FreqCount is recommended. There's a link on the page to github where you can view the code. It uses counter / timer hardware resources on the chip. Which resource depends on which processor you're using. But, all of them have a single dedicated input pin. To have 4 channels, it might be easier to have an external hardware selector.
 
Status
Not open for further replies.
Back
Top