Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sound frequency counter.

Status
Not open for further replies.
Just trying to use what the OP said he had (a condenser mike).

Realize that you don't think too highly of the 741. Just trying to give the OP something readily available and cheap. I choose 10kHz because that's in the middle of the audio range (for the REALLY good of hearing ;).

Took out the 2N2222 as necessary for the task. Little less clipping (see below).

I figure the OP just needs something to start with, not the final perfect amp to test his system. If we do it all for him, what's to keep him coming back except to always do it all for him? (Just a rhetorical question: no need to answer...)

View attachment 67301
 
I choose 10kHz because that's in the middle of the audio range (for the REALLY good of hearing ;).
No.
People with good hearing can hear from 20Hz or a little lower to 20kHz or a little higher. The range is about 10 octaves.
But 10kHz is no where near the middle, it is only one octave below the highest.
5 octaves above 20Hz and 5 octaves below 20kHz is about 632Hz which is the middle.
I and many other audio people use 1kHz as the middle.
 
Last edited:
The highest open string on an acoustic guitar is E4 = 330Hz, so even the lousy old 741 might manage that :D.
 
audioguru said:
I and many other audio people use 1kHz as the middle.

OK. Valid point.

632Hz example:

View attachment 67311

And, as you can see, the 741 operates OK at 6VDC (at least in the SIM. My experience with the real thing confirms this).

alec_t said:
The highest open string on an acoustic guitar is E4 = 330Hz, so even the lousy old 741 might manage that .

150Hz example:

View attachment 67312

Ugly waveforms, to be sure, but I'm fairly confident the freq counter would handle them without undue weirdness.

Hope ikelectro is still with us...
 
Repeat, you do not want the sound of a guitar string to be clipped because then the harmonics will have the same amplitude as the fundamental which causes confusion in the frequency counter.

Maybe it is good that the lousy old 741 opamp has trouble with high audio frequencies because then it will filter away some of its hiss.
 
Repeat, you do not want the sound of a guitar string to be clipped because then the harmonics will have the same amplitude as the fundamental which causes confusion in the frequency counter
(My emphasis)

Not to put too fine a point on this issue, but...

For an ordinary pluck of a properly tuned guitar string (no frets depressed), the fundamental mode will dominate (in the case of a string that is lightly touched, harmonics can be emphasized). Individual guitar strings are usually tuned to a fundamental note.

But, should that single, fundamental note be electronically clipped (squared), then the next significant harmonic component is the 3rd harmonic with 1/3 the amplitude) of the fundamental, the 5th harmonic with 1/5 the amplitude of the fundamental, and so on, as it would with any square wave.

Since the predominant leading edge is of the fundamental frequency, that is what the counter will key on. This can be thwarted, of course, by over-driving the counter's input. Hence, appropriate input amplitudes should be observed.

I'm comfortable that the simple amplifier circuit described will suit the OP's needs, as I understand them.
 
If the 3rd harmonic is 30% of the amplitude of the fundamental frequency then when the amplifier is overdriven more than 3 times, isn't the 3rd harmonic at the same level as the fundamental producing a mess of harmonics?
There will be lots of leading edges.
 
If the 3rd harmonic is 30% of the amplitude of the fundamental frequency then when the amplifier is overdriven more than 3 times, isn't the 3rd harmonic at the same level as the fundamental producing a mess of harmonics?
There will be lots of leading edges.

The amplitude of the harmonics stay at the same ratios (1/3, 1/5, etc.) to that of the fundamental, regardless of amplification, i.e., if the fundamental=1V, then the 3rd harmonic=0.333V: if the fundamental=3V, then the 3rd harmonic=1V. The fundamental always has the predominate amplitude (unless otherwise filtered).

But, since most counters have a front end comparator of some sort, there is the need to not over drive the counter input due to the increased likely hood of the comparator being over whelmed with harmonics that will swamp the threshold of the comparator. As with most electronics, signal strength is just as important as signal composition in this application.
 
I was talking about clipping like your circuit produces.
You are talking about a linear amplifier with no clipping.
 
Same holds true. ANY square wave has harmonic distribution as stated.
 
Most modern methods of measuring a frequency used in instrument tuners etc measure the digital period (using 1bit ADC or a comparator type threshold). Square waves and clipping and harmonics are all largely irrelevant.

What is relevant is the short term frequency variation caused by the instrument resonances, so it needs to average quite a large number of periods as the period of a single wave can vary by as much as 0.5% from the average.
 
Same holds true. ANY square wave has harmonic distribution as stated.
Can you show the amplitude of the fundamental and the amplitude of the harmonics in a badly clipped signal that has harmonics?
 
If the mic amp feeds directly into a comparator having a reference voltage about half way between the positive and negative peaks of the amp output then harmonics resulting from clipping don't seem to affect the comparison.
Here's a simulated one-transistor amp which begins to clip when the input is > 1.5V pp. Even when overdriven with a 30V pp signal the comparator output shows no extra pulse edges or noticeable change of pulse width.
 
Your simulation's input is a sinewave. when an opamp is overdriven with a sinewave then its output is a square-wave but yours is worse.

A guitar does not produce a sinewave. Its output has harmonics that mess up the signal when an amplifier clips.
 
A guitar does not produce a sinewave. Its output has harmonics
Hmm. Any idea which harmonics and their relative amplitudes? I'll re-do the sim if I can model the input better.
 
Raw guitar output from a cleanly plucked string can be sine like, but sometimes also contains a smaller harmonic sine and will look a bit like a DTMF waveform. The main harmonic present will be f*2.
 
I looked for Acoustic Guitar Waveform in Google Images and found an article about the spot on a string that is plucked changes the amount and type of harmonics, "smooth" or with a "twang".

Agilent showed this graph of a waveform with harmonics and when it is clipped.
Without clipping, the level of the fundamental is much higher than the harmonics.
With clipping, the second and third harmonics are the same level as the fundamental which will mess up a frequency counter.
 
Last edited:
All well and good, audioguru. Thank you.

But, if a string is plucked, in the tuning process, without any interference, and it is at precisely the note sought, it will resonant properly and without harmonics. I have been going on the assumption that the OP wished to use his counter for tuning purposes.

The counter will, of course, give wildly fluctuating readouts until the proper, single frequency for the key he is tuning for is reached. But once tuned correctly, it will display the right frequency, whether or not the signal to it is clipped.

Now, if the OP meant he wished to see whatever frequency(s) are being played, regardless of finger on string manipulations or plucking positions, then, yes, of course, the harmonics will abound and with or without the clipping effect of the preamp the counter will be over whelmed and display gibberish.

In the above example, I can't think of any situations where any counter could suffice for the OPs needs and equipment on hand. A spectrum analyzer, yes. But not a counter.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top