3
\$\begingroup\$

I'm still new to electronics and am making this in order to learn more about circuit design and filters. I do not want to use microcontrollers. I want a purely analog solution.

I'm trying to make a frequency detector that detects between 5-10 different frequencies. There will be a mic, an amplifier, a set of bandpass filters, and an LED that corresponds to each filter. The goal is to play a relatively pure tone into the mic, and have a certain LED light up which will be telling of the frequency of the tone. I want each filter to have a range of around 100Hz. The ranges will be 100-200,200-300,300-400,400-500,600-700 and maybe some more.

If I play a tone of 250Hz, the LED that correspond to the 200-300Hz range should light up.

The method I thought of is to have comparators after the BP filters so I can cut off the frequencies I don't want. The output of the comparator will be connected to the LED. I would much rather have the filter do the cutting off rather than having to use comparators, but won't I need a very high Q filter so that for frequencies immediately past the cutoff range the LED is completely off rather than being dim? How can I do this without using comparators?

My proposed flowchart of the circuit is mic->band pass filter->amplifier ->rectifier->low pass filter->comparator(maybe)->LED

Regardless of whether I use comparators or not, I will need to know the input voltage so that I can amplify it to the right level to light the LED. How can I do this if when I play a tone in the electret mic, the output voltage will change depending on how loud it is and how close to the mic it is. How can I take this into account when I design the circuit? I looked up automatic gain control schematics, but it looks a little bit too involved for my liking and would add a lot of complexity to the project. Is there any other option?

What kind of band pass filter do you guys recommend? I know there are two main categories, passive and active, but I don't know enough to judge which one will be best suited for this application. I'm leaning towards active because then I won't have to use inductors which are expensive and could possibly cause interference if they aren't shielded properly. From what I've read, active filters are easier to design and are less dependant on the load connected to it, which is a plus for me since I'm a beginner.Also since active filters have a 'built in' amplifier I won't need to make a separate amplifier. Anything I'm missing?

\$\endgroup\$
1
  • \$\begingroup\$ This exact circuit is called a Color Organ, and can be built with just transistors, caps, and resistors, for the amp and band pass filter sections. \$\endgroup\$
    – Passerby
    Commented Feb 5, 2016 at 1:30

3 Answers 3

3
\$\begingroup\$

To detect the frequency of a relatively pure tone you don't need filters. All you have to do is convert the fundamental frequency into a voltage, using a frequency to voltage converter such as the LM2907. You can then fed the voltage output into an LM3914 dot/bar LED display driver.

\$\endgroup\$
3
  • \$\begingroup\$ Excellent answer. It won't work if he doesn't use pure tones, but he's said he will. \$\endgroup\$ Commented Feb 5, 2016 at 4:01
  • \$\begingroup\$ It's not a completely pure tone. Its going to be from a tone generator app on my phone. \$\endgroup\$ Commented Feb 6, 2016 at 1:50
  • \$\begingroup\$ So long as it only has 1 positive and 1 negative peak per cycle it should be OK. A square wave would be fine. \$\endgroup\$ Commented Feb 6, 2016 at 2:41
1
\$\begingroup\$

So a little bit of filter theory kinda puts a little mud into this project. Unless you're looking at high-order filters (read complicated), a first order filter only rolls off at 20dB/decade which means your filters won't isolate their bands very well. This might work for 250Hz, but what about 290Hz? You may have so little filtering that 3-4 lights light up for any given frequency. Automatic gain control would help with this issue.

The simplest way to go would be to have one amplifier and a bunch of passive filters, but they would be large and expensive probably at those frequencies. Your other thought of using active filters would be a second choice. A little more complicated but cheaper and more compact.

You're on the right track, but at the end of the day, without automatic gain control or high order filters, you'll likely be disappointed with the results.

\$\endgroup\$
0
\$\begingroup\$

Amplify the signal and feed it though filter, buffer the output of the filter and rectify the voltage using a full wave rectifier, a smoothing capacitor and another diode to get rid of the ripple voltage. Send the output into a properly DC biased amplifier stage that will drive the LED. The DC signal will be low for values outside the cutoff but approach a higher voltage as the signal approaches the resonant frequency so you will have to find the right balance between stages.

It might be easier to do this with Op-Amps (to get a proof of concept) before you tackle this with MOSFETs or BJTs.

\$\endgroup\$
1
  • \$\begingroup\$ What is the purpose of buffering the output of the filter. Also, will this produce a well defined cutoff frequency? \$\endgroup\$ Commented Feb 6, 2016 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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