Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

measuring frequency 2

Status
Not open for further replies.

buzzly

Electrical
Jan 16, 2002
7
Hi! Do any of you know of any methods of measuring frequency besides using a digital counter? r there any ways of improving the quality of the measurement like using a multiplying pll to increase accuracy? Thanks...
 
Replies continue below

Recommended for you

Is this for a product or just for your own use? A microcontroller could be used with an interrupt on zero cross and the time measured in between. There are a million ways to do this. To me, this would be the easiest.
 
it's for my own use... i want to do some experimentation and i need to be able to quickly monitor frequency changes in the range of 10 -20 kHz. The microcontroller sounds like a good idea... i've never used one b4... how would i convert the period reading into a frequency reading? are there microcontrollers which are specific for frequency measurements?
thanks for the reply
 
Actually, many Digital Multimeters can read frequency in this range.

A Fluke 87 is rated up to 200 kHz.

Might be just the excuse you need to buy a new DMM.
 
Another thought - depending on the level of the signal you are trying to measure, a PC sound card and a program such as Spectrogram could probably do this as well.
 
Simplest: divide the input frequency by 16,384 to generate
an about 1-2 sec. pulse. Measure its lenght with the
microcomputer timer, then calculate. <nbucska@pcperipherals.com>
 
Could someone please explain to me why using one of the most basic pieces of equipment is MORE difficult that creating an elaborate, unneccassary, and unreliable setup that is entirely way to complex? Why would anybody chose debugging a whole microprocessor project when they can use a simple oscilloscope? By the way, you will not get accurate results with the micro, you will alway just round off!
 
I'm sorry melone, I will need to measure the frequency fluctuation at about 5 times a second... I don't know how u could do that with a scope... hope that clarifies things... sorry for being unclear...
 
Rent, Borrow, or ?? one of the newer high end O'scope and dump that information to a file. On the really nice O'scopes you can choose how much and how often.

What could be simpler or more accurate?
 
ok cool thanks...will try and get a hold of one...
 
If you measure the time to complete a half cycle, then you can double this time and invert it. Walla, frequency. I would use a microchip micro since I have the programmer, etc. There are many programmers on the web for PIC chips that can be built from scratch. I think a lot of people use the 16F84 chip with these programmers. Depending on the chip, many ports can be configured to cause an interrupt on rising or falling edge. You can also measure full cycle by not changing to say rising edge after a falling edge interrupt, this will give you the time to complete one cycle and this can simply be inverted to get the freq. Microchip has application notes to measure frequency with all the code, etc, already done. Visit Good luck
 
One more note: The zero cross signal needs to be clean with very little slope so I use an RC network to generate a 'square' wave with much quicker rise/fall (compared to a 60Hz sin wave-probably still advisable with 20kHz) times to produce a more consistent zero cross. Good luck
 
melone,

maybe with all the newer tech, people don't remember how to use them.
 
If a scope is not available or if it is desired to measure the frequency all the time then why dedicate an expensive piece of equipment to monitoring the frequency all the time when a much less expensive solution is adequate? Or perhaps, buzzly just wants to play.
A scope is the obvious choice for one time measurements provided you have one that will measure the frequency. If it does not have this function then how do you propose to measure the frequency in real time using an oscilloscope without other interfaces(communications, logging capability,etc.)? And if these other interfaces were available to the scope then it would likely measure the frequency in real time.

A meter with frequency capability is a cheaper solution except you can not do anything with the information except display it. What if he wants to take an action when the freq falls out of a certain range? A micro has limitless possibilities in this area. Not only can you measure and display the information but you can take an action; energize a relay or SS device, communicate with a PC, call a telephone number, etc. Sure add-ons to meters allow communication, logging, etc, but you can not take an action without interfacing to some other device. Bottom line-buzzly knows what he needs to accomplish and if a scope is not an option then so be it.
Crowbar,
I am afraid with the newer technology, knowing how to use a scope is more important now than it ever has been.
 
BUZZP, check out the LeCroy LC584XL and let me know what you think. You can get details statistics on different characteristic on a live waveform, and heck, you can even do jitter analysis. This scope has an ethernet connection to allow for information to be transferred over a network.

I don't discourage anybody from playing around, but let's be realistic here. Micro projects are notorously laborious and very sensitive to any changes (hardware OR software). If you want to measure something, don't fool yourself and think that you will design something in your spare time that will outperform a dedicated piece of equipment that has proven time and again it's usefullness, and accuracy.

However, if you really want to do this with a micro, go with a high-sample rate, high-bit count A-D, and get yourself a fast micro. You will want to run a fast micro so you have enough time to sample your data and actually process it real time. Otherwise, you will be forced into acquiring and post-processing or you will need a DSP for real time processing capabilities. (Wait a second, now is sounds like your building a o'scope).

Hopefully, you have determined a good method for connecting your micro project to your signal. You will DEFINITELY need a scope to verify that your circuit doesn't load down your signal (resistively AND capacitively). I would suggest a very high impeadance (~10Meg) dummy load, but the C might be tricky. You will obviously want to keep it very low (in pF range) otherwise you can be modifying your signal and thus the resulting measurement will be useless. If you are connecting to a clock output from another IC, you must be very sure that you don't load it down, otherwise you could cause your whole system to become unstable or crash.

Also, what programming languages do you know, C, Assembly, etc.? Are you comfortable enough to learn one on your own? Are you comfortable trying to debug your code? What tools do you have available to debug (scope, logic analyzer, software, etc.)?

Why would you want to only check to see if the frequency has changed? Don't you want to know what the signal looks like? Just because your micro tells you that the signal is operating at 50KHz, don't you need to know if it is a 50KHz sinwave, squarewave or worse, something in between? Isn't the duty cycly also important? Are you looking for glitches? If so, how short?

Once again, I applaud your desire to try something new, but I don't think that this project is as easy as it seems. However, it would definetly be a very good learning experience!

Good luck and keep us posted!
 
melone,
You seem to be going to great lengths to prove that a scope is the best tool to use. Yet you don't know just what buzzly needs to measure - or why. Info that buzzly has not submitted is:

What range of frequencies? Is waveform important? Is it a one-off measurement, or for continuous monitoring? What action is to be taken with the data? Are records to be kept?

Until this is known, the best instument to use cannot be decided.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor