Sound Frequency to Voltage Converter for material discrimination

Thread Starter


Joined Apr 17, 2011

I want to create a sound frequency detector circuit. I want to determine the frequency of a sound and then output an analog voltage so I can use the ADC of my PIC16F877a. I plan on using an electret microphone.

I want to know the frequency/pitch of an object when I tap it so I that can discriminate the different types of objects being tapped.

For example, a glass bottle has a higher pitch than that of a plastic bottle.

Can you give me any suggestions on how to approach this project?

Thank you very much!


Joined Aug 21, 2008
It sounds like you want to generate an output based on the material's filter effect of an impulse. One simple way would be to capture a lot of samples, evenly spaced in time, then perform a transform to find the spectral distribution of the waveform, then using some sort of weighting scheme, integrate the weighted frequencies to get an indication of how much high frequency content is there compared to low frequency content.

Lots of got-ya's here, mainly assuring that the impulse to the material is uniform.

If you want to do this based strictly on ringing frequency (assuming some ringing in the material), its much simpler -amplify the microphone input, pass it through a limiting amplifier, and then connect the limiting amplifier to the input of a frequency meter. You could look at frequency and the number of cycles passing through the counter's threshold. Additional information could be had by using an amplitude detector (either peak or average/quasipeak) before the limiting amplifier.

Its easy to dream up stuff like this, but a lot of work to get it actually doing what you want.