Arduino frequency counter input questions

Thread Starter

KLillie

Joined May 31, 2014
137
OK, I've been toying with the idea of making a frequency counter. I bought a Arduino Uno and found some Arduino C code for frequency counting. So here's some questions:

1. It is my thought that the "A"rduino needs a TTL input. How can I get this? A comparator? I would like to measure up to 8MHz.
2. Can I run the "A" from an external crystal (or clock) that is faster than 16MHz?
3. If I do need a comparator, it looks like the lm339 is pretty common, but if the best response time is .3us can I subtract that from...oh whatever. I just had a quart.
Just could use some help/ideas.
 

MrChips

Joined Oct 2, 2009
30,823
Find out the switching threshold levels of the Arduino input.
As long as you satisfy the threshold levels and don't go beyond the min and max input, you're ok.
A 74LS04 or 74LS14 will do the trick if you want to condition the input signal. You don't need a comparator.

You can overdrive certain chips but then you're on your own. There is no guarantee it will always work if you operate beyond manufacturer's specs.
 

Thread Starter

KLillie

Joined May 31, 2014
137
OK, I finally got some 74HC04 Hex Inverters. I'm looking at a couple schematics.


As you might notice, both of these use Schmitt trigger input inverters. Will my 74HC04's work alright? Should I use two inverters?

I think I remember the Arduino accepting voltage inputs of 1.8 - 5 V as a logical 1 (max 40ma) Also, I would like to guarantee my input never exceeds these specs. Ideas? Zeners? Fuse!!?
I am just getting into this hobby, so don't be shy! I promise I won't be negative. Thanks in advance.
 

MrChips

Joined Oct 2, 2009
30,823
Any of the above circuits will work. In the third circuit with the two 74HC14, eliminate the 0.1μF at pin-3.
74HC04 will work. One inverter will work.
 

Thread Starter

KLillie

Joined May 31, 2014
137
Thanks for the reply Art. I guess I was waiting for people to hold my hand on this one. I guess I just am going to have to dive in. Thanks again one and all. Ready to go! ;)
 
Top