Go Down

Topic: Arduino as a frequency meter (counter) (Read 3570 times) previous topic - next topic


Hi all,

I'm messing around with quartz crystals and I wanted to try to measure their frequency using the arduino.

I found this page,


and I've tried hooking a crystal to the F_in point in the second schematic, leading it directly to an input on the 74HC14. I'm using 74HCT14, but I don't think that this will be the problem that I can not get any reading out.

The other lead of the crystal is connected to ground. Maybe I'm doing something wrong ? In the picture the guy is measuring a frequency off a crystal, I'm aiming to do the same.

Any ideas on what I might be doing wrong ?

Thanks in advance,


My best guess is that your crystal isn't oscillating - what speed is the crystal supposed to be (its best when testing a circuit like this to use a known speed device that you know is working)? The author does note that 8 MHz is about the maximum input frequency - if your crystal is working, and is greater than 8 MHz, that could be the issue...?

The thing about his circuit (his breadboard/protoboard) is that on the board are two caps, but the actual circuit only shows a singular cap. Now, he could be using those in parallel or something to get the proper size shown on the schematic, but it isn't clear. Also, I wonder where the loading capacitors are (or are those the ones shown, and if so, where is the one in the schematic then?); most crystal oscillator circuits I have seen (I am not an expert, keep that in mind) have a couple of smallish capacitors (18-22pF, IIRC) on each leg of the crystal, leading to ground (once again, IIRC).

You might try contacting the author...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


I have several crystals below the 8 MHz threshold. and none of them are showing any results. The capacitor there is I think just to filter the supply to the IC, I've tried it with the cap and without the cap, nothing seems to be doing anything.


I fixed the problem using the solution found here :


Now the problem is that on the serial output I'm getting random number that aren't even close to the xtals's real frequency. Even when I only hold a wire connected to pin 5 it displays random data.

Go Up