Simple frequncy detector - Page 1
Forum section: electronics / projects

author: ataradov
author_rank: Super Contributor
timestamp: May 11, 2015, 02:51:53 am
content: Just a random idea I've been kicking around in my head.Let's say we have a 5v level square wave with frequency of 1 Hz - 10 MHz. The goal is to design a circuit that will discriminate the frequency into a number of bins - 100 Hz, 1 kHz, 10 kHz, 100 kHz, 1 MHz, 10 MHz, or similar. It can be just one output active for a measured frequency, or all outputs active for the frequencies below a measured frequency.The preference is to passives, but basic logic and opamps and such are OK. Any sort of programmable devices are considered cheatingAny ideas?

author: Rerouter
author_rank: Super Contributor
timestamp: May 11, 2015, 03:13:41 am
content: logic chip approach would be timers in series to break out your count into BCD, or a decade counter may suit you betterhave a reference crystal (e.g. 32khz clock) to act as a gate signal, at 1 second you latch in the count on the timers, then reset the timer a cycle or so later, you then use some gates to break out the timer count into the groupings,If passives are prefered, you could use some multi-pole band-pass filters to break up the groupings, then use either some transistors, or a shmitt trigger chip or an op amp to drive an output when the signal level is strong enough, in this example, it would work better with some overlap in the middle, so you always get a reading,

author: Dragon88
author_rank: Regular Contributor
timestamp: May 11, 2015, 03:41:36 am
content: When I'm told "no microcontroller", then I think of the most complicated 7400-series based middle finger possible.First thought involves flip flips. At a rising edge of the input signal, preset a flip flop for each bin. Derive an anti-phase clock and stretch it appropriately for each bin, but only one pulse per run. If the input signal fell during a bin's period, it gets cleared. At the end of the run based on the lowest bin's clock, each higher bin must have all of the lower bins cleared, or it also gets cleared. This should leave you with a single flip flop set at the end, which corresponds to the bin in which the input signal falls.Also fun would be analog filters and LC circuits for each bin. Like a coin sorting machine.

author: Rupunzell
author_rank: Frequent Contributor
timestamp: May 11, 2015, 05:01:47 am
content: Bank of bandpass filters with the center frequency of interest passed to a level detector. No digits required.Bernice

author: kripton2035
author_rank: Super Contributor
timestamp: May 11, 2015, 05:48:08 am
content: can be done with a single fast enought microcontroler chipor a big bank of analog filters for ten times the size on a board ...

author: ataradov
author_rank: Super Contributor
timestamp: May 11, 2015, 05:50:47 am
content: A bank of filters is the most obvious approach. The problem is that square wave contains a lot of harmonics, some of which will go into the neighboring bins.As far as counters go, it is way too complicated. Basically using logic ICs assumes just one IC used in some clever way. It it kind of obvious how to solve this problem with complicated circuitry, and realistically MCU will be the simplest.

author: ataradov
author_rank: Super Contributor
timestamp: May 11, 2015, 05:52:27 am
content: Quote from: kripton2035 on May 11, 2015, 05:48:08 amI agree. But it is like chess problems, practically useless, so we might as well throw all of them away.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 11, 2015, 06:24:10 am
content: "Light Organ"(plus some other things)Think I forgot to actually put a frequency sweep into it, to show how the lights detect each frequency range. But suffice it to say, that's what it does.You could also use a chain of missing pulse detectors. Only takes a few discretes if you need cheap and dirty.Digital counting with one counting register, one latch register, and a mess of magnitude comparators, would give the best accuracy.Tim

author: Kalvin
author_rank: Super Contributor
timestamp: May 11, 2015, 07:40:57 am
content: How about two or three LM311 or AD650 F/V-converters, two or three divide-by-10 or divide-by-100 prescalers and few window comparators. Log-amplifiers may help with setting the window comparators. Few logic gates for resolving the outputs. This solution is not as nice and accurate as all-digital using FPGA or microcontroller.

author: Rerouter
author_rank: Super Contributor
timestamp: May 11, 2015, 09:49:23 am
content: 10Mhz may be a stretch, but i think i have it beat for simplicity,Each stage is an RC filter that gets killed by the diode if it doesn't charge above the trigger voltage before the falling edge of the signal,You use the potentiometers to adjust the exact frequency at which each stage turns off / on, allowing you to really narrow down the transistion point,The op amps can be replaced with something like a hex schmitt trigger, which would work better for high frequencies,The main limitation of this design is you may want to buffer the input signal, as it really needs to slam hard to ground to drain through the diodes to be effective at the higher frequencies,

author: Kalvin
author_rank: Super Contributor
timestamp: May 11, 2015, 11:29:46 am
content: Quote from: Rerouter on May 11, 2015, 09:49:23 amUsing cascaded divide-by-10 dividers might help with the higher frequencies. Also, each stage would be identical in component values. Just an idea without any deeper analysis.

author: KJDS
author_rank: Super Contributor
timestamp: May 11, 2015, 11:53:26 am
content: Have a set of monostables.If the monostable resets before the next pulse is in, then the input period is shorter than the set time on the monostable. It's an approach I used years ago when I wanted to lock and internal frequency reference to either 1MHz, 5MHz or 10MHz input and needed to know what frequency was coming in.

author: Kalvin
author_rank: Super Contributor
timestamp: May 11, 2015, 01:03:03 pm
content: https://ia601802.us.archive.org/27/items/RcaCosmosIntegratedCircuitsManual/RcaCosmosIntegratedCircuitsManual.pdfPage 144, circuit no 21. Bandpass filter using two CD4047s and one CD4013.

author: ataradov
author_rank: Super Contributor
timestamp: May 11, 2015, 04:30:19 pm
content: Quote from: EmmanuelFaure on May 11, 2015, 12:45:53 pmThat's the stuff I'm talking about!