Discriminate between 2 pulses circuit - Page 1
Forum section: electronics / projects

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2021, 12:17:47 am
content: Is there any simple circuit can discriminate between 2 different pulse trains?For example 1 is a 1.6S train and 2 is 0.5S train existing alternately on the same output.I've tried using some low and high pass filtering to reject either into a one shot, and then later with a 555.The desired result was poor at best.I want the circuit to do pulse recognition of one or the other since the other state is irrelevant. It just needs to output a continuous high or low state when the correct pulse is detected.Anyone have ideas to accomplish this in analog?I know I can do this with a micro, but I'm trying to do it old school.

author: Benta
author_rank: Super Contributor
timestamp: October 25, 2021, 04:03:09 pm
content: An idea could be a retriggerable timer, eg, MC14538/CD4538.Set it to 1.0 s (not S, that's siemens).If you have the fast pulse train (0.55 s), it won't time out, and the output will stay stable.With 1.6 s pulse train, it will time out, and you'll have 0.6 s long pulses with a 1.6 s period on the output.How you want to process this further is a separate question.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 25, 2021, 06:09:42 pm
content: You may want to give a little more details about the expected output. Also about the input signal.I suppose a "1.6 s train" is a succession of pulses with 1.6 s long "on" time. What about the off time?Obviously, pulse detection can be complete only on the falling edge of the input signal. So I suppose, the output should go to "high" on the falling edge of the input signal if the current pulse has the expected width, and to "low" otherwise. Say the input signal stops "pulsing" - stays at zero - I suppose the output should not change states? Or should it have some kind of time-out?

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2021, 06:25:09 pm
content: A steady 50% duty cycle pulse stream, one rate or the other.It can also have no pulses, but that is easy enough to detect in logic (a simple 3 input gate).A single pulse rate detector to have an output either 1 or 0 depending on which one is detected.Then a logic gate to see if it has stopped. That's the easy part.The pulse stream rate detection, that's quite a different thing.BTW all at 3.3V logic or level shifted to whatever is necessary to get the job done.

author: Benta
author_rank: Super Contributor
timestamp: October 25, 2021, 06:36:13 pm
content: MC14538/CD4538 will work down to 3.0 V.

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2021, 06:44:49 pm
content: I know that it will work, just like a 4528, 4047 etc.I just don't know how to detect a single pulse rate and ignore the other.Say 0.5s is detected and then 1.6s is now being output. I don't need to detect the 1.6s one, only the 0.5 one and reject the 1.6s one or vice-versa.Then it's a matter of simple logic. If say for instance 0.5s is detected, then it outputs a high.If it's not outputting pulses then that's another state (steady low) that's easily detected.

author: Benta
author_rank: Super Contributor
timestamp: October 25, 2021, 07:11:58 pm
content: I presume that when you say "pulse train" you mean that you either have:1: a periodical digital signal with a frequency of 1.82 Hz (0.55s)2: a periodical digital signal of 0.625 Hz (1.6 s)If the pulses are randomly mixed together, eg, 0.55-1.6-1.6-1.6-0.55-0.55-1.6-0.55... it's a completely different story.Please be clear.

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2021, 08:14:33 pm
content: As I have already stated they can be either or, but not at the same time.

author: Benta
author_rank: Super Contributor
timestamp: October 25, 2021, 08:57:17 pm
content: OK.1st 4538 timer set to 1.0 s provides a steady output at 0.55 s input, but not at 1.6 s input.2nd 4538 timer set to 2.0 s and connected to the output of #1. Its output is inactive at 0.55 s input, as no trigger is available. Goes active when 1.6 s input is there, as it's triggered by the output of #1. That's your output.Mind you, there are transient situations when changing from one to the other pulse period that you need to analyse, I leave that up to you.

author: Terry Bites
author_rank: Super Contributor
timestamp: October 25, 2021, 09:43:40 pm
content: Read thishttps://www.edn.com/one-shot-provides-frequency-discrimination/

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2021, 10:24:44 pm
content: WOW! that really helps to understand as a building block to possibly try a few things.As is says, other one-shots may produce different results, We'll see.I've spent a few days now trying to find something that would get me started.That EDN article does it.Knowing what to call the function was half the battle. A window discriminator.Now I can expand further.Thanks all for everyone's input especially the last post.

author: David Hess
author_rank: Super Contributor
timestamp: October 26, 2021, 01:01:52 am
content: Quote from: Benta on October 25, 2021, 04:03:09 pmThat is what I would consider first. Retriggerable one-shots with different time constants can detect different pulse trains.Another way I have seen it done uses a time-to-level converter to convert the period or width of the pulses to a voltage level. Then a window comparator can discriminate between different pulses. When done properly, the output of the time-to-level converter is updated on every pulse.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 26, 2021, 06:29:29 pm
content: A principle circuit with basic blocks could be something like this:

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 29, 2021, 08:54:50 pm
content: I managed to test this circuit ONLY in simulation and it works there.The bench is slowly being cleared of all the waiting on parts projects.I captured the photo from Eagle CAD.I used the 4047 because it needs only 1 cap and 1 resistor (pot) to work.Perhaps I get to breadboard it soon! (hopefully Mr. Wizard's as well).Oops, I left off a common point to the 7474 clocks! All fixed now.

author: Benta
author_rank: Super Contributor
timestamp: October 29, 2021, 09:12:34 pm
content: It would help us help you, if you could make a short list:How should the output be when there's no signal:1: like the 0.55 s signal2: like the 1.65 s signal3: like the last state/signal.And how should it be at start up?

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 29, 2021, 09:18:44 pm
content: Nothing specific, just the discernment of one of the two pulse rates, high or low steady state,It must not react to the other pulse rate.I'm not worried about the start state. That can be inverted easily.That's all.

author: Benta
author_rank: Super Contributor
timestamp: October 29, 2021, 10:17:18 pm
content: This just as idea:Output is low at 0.55 s, high at 1.6 sI'll leave timing resistors/capacitors and reset circuit up to you.

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 29, 2021, 10:32:47 pm
content: What are those MV's emulating in the real world?Clock+ and or - have no relation to the 4047's that I am using.I would like to try the circuit you have there but I need a little more.Yes the RC calculations are irrelevant for generic flow as they are MV specific.

author: Benta
author_rank: Super Contributor
timestamp: October 29, 2021, 10:43:33 pm
content: The first MMV is retriggerable with a 1 s period.The second MMV is retriggerable with a 2 s period.That's it. Grab a piece of paper and draw it out.EDIT: Sorry, I managed to remove the part numbers during schematic editing. Big Fail.The MMVs are 4538 CMOS types.

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 29, 2021, 10:53:36 pm
content: Thanks that will help a lot. I'll try to breadboard it this weekend.For now, back to the repair bench.