2
\$\begingroup\$

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)?

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Thank you for your suggestion. I was thinking it would be possible using maybe an ATtinyxxxx but was a little hesitant about programming. Might be easier for me to use an ATMEGA328 simply because I could use my Arduino to program the chip then remove it to put into my circuit. The speed is up to 20 MHz which should be enough, I suppose...but I was hoping for a non-micro solution. I may go buy a cheap DMM from Harbor Freight which has the frequency counter function and tear it open to see what was used. \$\endgroup\$ – rdivilbiss Jul 2 '12 at 23:56
  • \$\begingroup\$ Okay, no problem - I added a discrete logic example, and a bit more on other solutions. Maybe check eBay, there might be little frequency modules available at decent prices. \$\endgroup\$ – Oli Glaser Jul 3 '12 at 0:29
  • 1
    \$\begingroup\$ I am a fan of EEVBlog and can't imagine why I didn't check there. I love this sentence: "This circuit is ideal for adding a low cost frequency display to a function generator or other design. I doubt if it is possible to get a cheaper design using off the shelf components!. In fact, I challenge anyone to make a cheaper design using garden variety components!." Sounds perfect for my one off frequency/clock generator. In fact, knowing the reputation of the source, I am sure this is the answer I wanted, even before building it. Thank you very much! \$\endgroup\$ – rdivilbiss Jul 3 '12 at 1:55
  • \$\begingroup\$ Good stuff, glad to help - it being by Dave Jones is why I picked that example, as it's more than likely to be a pretty well designed circuit. \$\endgroup\$ – Oli Glaser Jul 3 '12 at 19:05
  • \$\begingroup\$ I agree. Dave Jones probably can be considered an above average souce of information. \$\endgroup\$ – rdivilbiss Jul 4 '12 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.