Frequency Switch: Ideas & Advice

In summary: DC levels and look at the ratio between the two. You can't look at just the filtered signal...it'll be affected by changes in amplitude too. Unless you want to build a frequency to voltage converter from scratch.
  • #1
jescriba
8
0
I'm trying to build a switch that is closed only when the input signal is roughly the same signal over some time. So when ever the frequency of the input changes by a significant amount the switch opens, and when the input frequency is roughly constant the switch is closed. I'm building this in analog and wanted some advice/ideas. 1) I was thinking of taking the signal and passing it through a RC Highpass then putting the signal through a differential op amp configuration to subtract the incoming signal with a slightly delayed signal. And if the difference is sufficiently small (in reality it won't be zero) to go through a transistor not gate. 2) The other way I was thinking of doing this is passing it through some sort of comparator test.
Would this in practice actually work?
Any suggestions and recommendations welcome. Thanks.
 
Engineering news on Phys.org
  • #2
If these frequencies are audio, you could use a simple microprocessor to do this.

There are various types, but one is the Picaxe series.

These use a "count" comand where you just measure the number of pulses on one pin and then the pulses on another pin, for a fixed time interval.

You then have two numbers that you can do calculations on before you do another set of readings.

You could set a limit of 10% and say that if the readings are within 10% then they are approximately the same.
If they were, you have many choices of what to do about it. You could put 5 volts on another pin and use this to sound a buzzer, for example.

If the word "Microprocessor" put you into panic mode, they are actually very friendly devices intended for Educational use by kids who are 14 and up.
Only a minor investment is required to be able to program them and the software to do this is actually free.
 
  • #3
Thanks for the response. I'm trying to build this as part of a project for an analog electronics course so I can't use any microprocessors :/ But I am trying to do this for audio frequencies. I'll look into how the Picaxe series works to see if I get a better idea of how I could achieve this in analog.
 
  • #4
That makes it a lot harder.

There are chips that can convert frequency to voltage.
The LM2917 is an old one, but still available, I think.

You could easily compare these voltages and decide which was greatest.

The problem is that you want to use expressions like "almost the same" which is a different branch of logic called "fuzzy Logic".
 
  • #5
What sort of input signal is it? A series of pulses? Pure tones? An audio signal?

If it's a pure tone, you can do a frequency to voltage conversion and then differentiate that to detect rapid changes in frequency. If it's a generic audio signal, real sounds are composed of a mix of frequencies. You can't really convert that into a single DC signal that you then watch for changes.

Frequency to voltage conversion: consider charging a capacitor continuously (with a constant current source, perhaps), and discharging it at the zero crossings of the input signal. Low pass filter the voltage across that capacitor to get a voltage dependent on the input frequency. Or of course,d use one of those F-V ICs if the project allows it.
 
  • #6
Thanks for all the responses. So, I'm doing this with an audio signal. I might be able to use an IC if the task is too difficult to do without ICs. Why could I not use a RC filter for frequency to voltage converter and put that through a not gate or some sort of interval comparator setup. I'm taking the output from an electric guitar so I'm not sure practically how the mixing of frequencies would effect a frequency to voltage converter.
 
  • #7
jescriba said:
Thanks for all the responses. So, I'm doing this with an audio signal. I might be able to use an IC if the task is too difficult to do without ICs. Why could I not use a RC filter for frequency to voltage converter and put that through a not gate or some sort of interval comparator setup. I'm taking the output from an electric guitar so I'm not sure practically how the mixing of frequencies would effect a frequency to voltage converter.

An RC filter doesn't convert frequency to voltage, and if it did, not gates and interval comparators wouldn't detect changes. You could estimate frequency from the attenuation by a high-pass or low-pass filter...rectify and low-pass the filtered and unfiltered input to get DC levels and look at the ratio between the two. You can't look at just the filtered signal...it'll be affected by changes in amplitude too. Unless you want that...
 
  • #8
cjameshuff said:
An RC filter doesn't convert frequency to voltage, and if it did, not gates and interval comparators wouldn't detect changes. You could estimate frequency from the attenuation by a high-pass or low-pass filter...rectify and low-pass the filtered and unfiltered input to get DC levels and look at the ratio between the two. You can't look at just the filtered signal...it'll be affected by changes in amplitude too. Unless you want that...

I see... Well, then my circuit would have to test incoming ratios with a delayed ratio to trigger the switch? And how would I test the ratio some sort of op amp dividing configuration or divider IC?
For the high pass filter, would I be able to neglect the changes in amplitude if its comparing the delayed and incoming signals quick enough that if the signal is smooth it shouldn't matter? By this I mean, when I pluck a note on the guitar the wave will be relatively smooth and decaying but if my sample points are close enough the decay will not matter since the circuit is testing points very near one another. I assume this depends on the actual rate of decay of the signal but could this assumption be even close to being made or would the decay be much quicker than the circuit testing points on the signal?
 
  • #9
jescriba said:
I see... Well, then my circuit would have to test incoming ratios with a delayed ratio to trigger the switch? And how would I test the ratio some sort of op amp dividing configuration or divider IC?
For the high pass filter, would I be able to neglect the changes in amplitude if its comparing the delayed and incoming signals quick enough that if the signal is smooth it shouldn't matter? By this I mean, when I pluck a note on the guitar the wave will be relatively smooth and decaying but if my sample points are close enough the decay will not matter since the circuit is testing points very near one another. I assume this depends on the actual rate of decay of the signal but could this assumption be even close to being made or would the decay be much quicker than the circuit testing points on the signal?

You're looking at the rate of change of the ratio signal. Look up differentiator circuits.

However, I'm really wondering if solving the problem you describe is the best way of doing what you want to achieve. You've stated you want to detect changes in frequency of a signal, and referred indirectly to plucking strings on a guitar. It's quite easy to detect presence of a given frequency, and a few copies of such a circuit would be a lot less finicky and easier to adjust/troubleshoot than a single frequency change detector circuit. Build a band-pass filter, rectify and integrate the output to get a DC level indicating presence of that frequency...there's tone detector ICs that do this all in one chip, look for DTMF decoder chips. Build copies for all the notes you want to detect.

If all you want to detect is changes, use comparators to get digital levels, and then edge detectors to get the changes. Just OR the edge detector outputs together to get one digital signal that pulses whenever there's a change. You could do some stuff with registers or a simple microcontroller to weed out changes due to single notes ending, leaving only the frequency changes.
 
  • #10
Are you trying to build a color organ? A spectrum analyzer type display that has a bar graph for each band of frequencies? You have me curious.
 
  • #11
The solution all depends upon what you actually want from this switch. Is the signal likely to consist of a lot of different frequencies (audio programme)? If you want an intelligent response from your system then it would need to be complex - involving DSP - but you aren't allowed that. Otherwise a number (two or three?) of band pass filters and detectors could provide you with a crude spectrum analysis of your signal. Differentiating these level signals, at a 'syllabic' rate, or slower, could tell you when anything has changed significantly (to a threshold of your choice) as the signal either alters in level or as it moves from one frequency band to another.

You could, actually, use an RC filter as a frequency detector as long as you limit your input signal first (that's a pulse counter). That would be a very simple solution and you could also detect amplitude at the same time, with a simple level detector. But this simple solution would only work when there is a readily identified single frequency involved.

Detecting ratios can be done with a potential divider (no fancy multiplier is needed if you are just interested in a particular 'trigger' ratio) - a delayed version of the amplitude is fed across the whole R and the input signal level is compared with a proportion of this voltage. That would tell you when the signal had dropped by your desired percentage. A similar arrangement but with the delayed signal on the 'wiper' of another potentiometer and the input applied to the top end. Both circuits can trigger an alarm if the percentage change, in a given time, is more than the setting.
 
  • #12
There used to be an IC that does what you want to do. It was the LM567.
http://www.national.com/ds/LM/LM567.pdf

Maybe you can still find some.
 
Last edited by a moderator:

1. What is the purpose of Frequency Switch?

Frequency Switch is a platform designed to provide ideas and advice for individuals interested in learning about and exploring the concept of frequency. It offers a variety of resources and tools to help individuals better understand and utilize frequency in their daily lives.

2. How can Frequency Switch benefit me?

Frequency Switch offers a wealth of knowledge and resources for individuals looking to improve their understanding of frequency. By learning about frequency, you can gain a better understanding of the world around you and how to use it to your advantage for personal growth and success.

3. What types of content can I expect to find on Frequency Switch?

Frequency Switch offers a variety of content, including articles, videos, and resources, covering a range of topics related to frequency. These may include the science of frequency, practical applications, and techniques for incorporating frequency into daily life.

4. Is Frequency Switch suitable for beginners?

Yes, Frequency Switch is designed to be accessible for individuals with little to no prior knowledge of frequency. The platform offers introductory resources and information for beginners to help them understand the basics before delving deeper into the subject.

5. Can I contribute to Frequency Switch?

Yes, Frequency Switch welcomes contributions from individuals with knowledge and expertise in the field of frequency. You can submit articles, videos, or resources for consideration to be featured on the platform and share your insights with the community.

Similar threads

Replies
10
Views
440
Replies
31
Views
2K
Replies
46
Views
3K
Replies
2
Views
1K
  • Electrical Engineering
Replies
8
Views
893
Replies
7
Views
3K
  • Electrical Engineering
Replies
3
Views
793
  • Electrical Engineering
Replies
4
Views
2K
Replies
18
Views
2K
  • Electrical Engineering
Replies
3
Views
965
Back
Top