Electronic – Inexpensive Frequency Counter and Display for clock generator

7segmentdisplayclockfrequencyled

I have the desire to add a frequency display for a clock generator. Certainly not necessary, I can use my DNN, but it would be nice, I found a veritable plug & play frequency counter and LDC display for in excess of $50 USD at Digikey. I didn't have to pay a tenth of that for the clock generator.

I have 1 $20, el cheapo, backup DMM for when I need to measure more than one thing at a time. It has a frequency counter/display. Therefore I would think there must be a way to get this functionality at a reasonable price.

I'm sure I'm over-thinking this and a simple solution is avoiding me. Any ideas on how I can count the number of clock pulses per second and display the results, (7 segment LED would be preferred)?

Best Answer

A small micro would do this easily. You can set up a capture compare peripheral to count input pulses and read/clear at a regular interval (e.g. 50ms - use a timer interrupt for this)
Then write result (after multiplying by necessary value - e.g. in above example: capture_result * 20 = Hz) to whatever display you have in mind.

A non-micro solution could be produced with some discrete logic ICs, there are quite a few designs floating around on the web. It would be a pretty "old school" solution but may be fine for a one off home project (and cheap) Here is a 0-40MHz example (from this page)

Discrete Logic Counter

For higher frequencies a small CPLD/FPGA would work well and would be a quick/easy HDL program to write - may be an idea if you have a small dev board lying around.

There are almost certainly dedicated ICs/Modules available if you have a look around. Most DMMs probably use an ASIC of some sort to provide multiple functions, though some of the cheaper models may use off the shelf stuff.