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.

Frequency to voltage

Status
Not open for further replies.

david234589

New Member
Hi,

I'm making something where I need to take the input from a microphone, fourier transform, pick out the largest peak in the fourier transform, and output a voltage proportional to that frequency.

In other words, if someone hums a Middle C into the microphone, the fourier transform will have many peaks and harmonics in but the strongest peak should be 278 Hz or so (which corresponds to Middle C), and the output should be some constant voltage V1. If the person then starts humming a C one octave higher, the strongest peak in the fourier transform should be at 2*278 Hz = 556 Hz, and the output should be some constant voltage V2 = 2*V1

Any ideas? I wasn't sure how to do it using analog electronics so was just about to try to do a digital version using an Arduino, but then realized that's probably overkill.

I'm not too experienced yet with designing electronics so the more details the better..

Thanks,
 
I may be way off base with this but have you given any thought to using a phase locked loop tone decoder like the NE / LM 567 family.

Once configured the chip will respond to a single frequency input. The output pin of the chip goes low when the input frequency matches the chips center frequency. The center frequency is determined by a few external components. That output could easily be changed with an inverter to show a high when the input frequency matches the chip's center frequency.

The downside of this is that a chip is needed for each frequency. Anyway, I was thinking along the lines of a phase locked loop.

Ron
 
The only way to do this is with a DSP chip, usually a uP optimized for DSP. You can use Matlab to write and test your code and then program your system. I don't have any particular recommendations, but you can peruse the DSP offerings.

Another option might be a reasonable fast processor which executes your FFT code. Either way, this is a code intensive effort, unless you can find a uP with your exact functionality already burned.

PS, for what it's worth, I own a unit like you're trying to build. It costs about $35 at the music store.
 
Last edited:
Really? You own something that does this job? Is it like a guitar tuner or something? I thought about taking apart a guitar tuner and trying to figure out if there was a place I could tap in to the circuit to get a voltage read off that's proportional to the largest freq component, but I thought it would be too tricky... especially with the modern guitar tuners. Perhaps there is some kind of old style guitar tuner out there with a physical needle and fewer or no microprocessors that might be easier to figure out...
 
My tuner has an LCD that emulate a needle. It would not necessarily output a DC voltage, and I might have assumed you're only interestd in making a tuner. Whatever the ultimate output, it's probably not a big deal to convert it to whatever you need. If it's a digital output, just use a D/A converter. That could save you quite alot of development time.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top