# How do I detect a pattern of 4 pulses from 4 different signals?

How do I detect a pattern of 4 pulses from 4 different signals? I want to be able to detect every time I see for example the pattern circled in blue. When I detect this pattern, I want to output a digital high signal. The pulses can come in different orders (as can be seen by the middle group of 4 pulses). I can only create my circuit using transistors, capacitances, resistances, current sources and voltage sources.

I plan to use a hysteresis comparator in some fashion to compare the signals to some threshold voltage (so as to account for a small amount of noise after filtering). But I don't know how I can compare 4 signals at the same time.

Any help would be greatly appreciated! Thank you so much!

• This is probably most easily done in software on a microcontroller. Apr 29, 2019 at 0:14
• If the 4 pulses can occur in any order, you really aren't looking for a pattern, instead, you are looking for all 4 signals to be active within a specified time period. If you weren't given a time period, you may need to assume one. Apr 29, 2019 at 1:28
• @Mattman944 I am given a time period of 0-2 seconds. I am given a reference "pattern" of four signals. The pulses can occur in any order but part of my task is to detect a time when the pulses occur in the same way as the reference pattern. By "same way" I mean, same order and same time spacing among the four signals as the reference signal. Apr 29, 2019 at 1:45
• @Toor Thank you for your advice. However for my project, I can only use 200 transistors maximum and I have a feeling implementing a microcontroller might be too complicated for my circuit. Are there any other ways to accomplish my task? Apr 29, 2019 at 1:47
• OK, I didn't understand the problem completely. You not only need logic elements, you need memory elements to remember the reference pattern. i agree with Toor, you should use a microcontroller. If a microcontroller is not allowed, then this is an unfair exercise. You will need to build memory elements from transistors, nobody does this in the real world anymore. Apr 29, 2019 at 2:11