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!

enter image description here

  • \$\begingroup\$ This is probably most easily done in software on a microcontroller. \$\endgroup\$
    – DKNguyen
    Apr 29, 2019 at 0:14
  • \$\begingroup\$ 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. \$\endgroup\$
    – Mattman944
    Apr 29, 2019 at 1:28
  • \$\begingroup\$ @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. \$\endgroup\$
    – Alina
    Apr 29, 2019 at 1:45
  • \$\begingroup\$ @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? \$\endgroup\$
    – Alina
    Apr 29, 2019 at 1:47
  • \$\begingroup\$ 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. \$\endgroup\$
    – Mattman944
    Apr 29, 2019 at 2:11

1 Answer 1


This problem fondly reminded me of the old 'watermelon box' device at the (sadly) long gone Bell Labs! Given everything you have available, here is a starting hint:

Circuit hint

I am assuming your 4 input pulses are arriving on 4 separate lines (i.e., wires). If so, connect the top wire to the circuit as shown, i.e., where it says 'First pulse in'. Nothing is going to happen until that pulse arrives. The PNP and NPN are simply a 'homemade SCR', i.e., a device with PNPN regenerative feedback. The pulse will cause the 'SCR' to latch, so that is the memory. The latched 'SCR' turns on the upper PNP transistor, lights the LED and gives you a new power supply to use, so now you have only three remaining tasks. I hope this helps!


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.