Electronic – Detecting Specific PWM Signal Without Programming (Only Electronics Components)

active-componentscircuit-designpassive-componentspwm

I want to detect a specific PWM signal by electronic circuit components i.e. transistors, opamps, capacitors.
update:
I want to build simple ID system. I want to detect specific PWM signal for example 65% with 5% resolution at 1kHz. If 65% PWM signal comes as an input I want to make output circuit on. Other than 65% with 5% accuracy, I want to make output circuit off(low).

Best Answer

You need a low pass filter follwed by a window comparator.

Here is a low pass filter:

This will greatly attenuate the 1 kHz pulse frequency leaving mostly its average value. The rolloff frequency of a single 10 kΩ 1 µF low pass filter is 16 Hz. The PWM frequency is about 63 times higher, so will be attenuated by about 63. Two of these in series will attenuate by the square of that, or by about a factor of 4000. For 5 V PWM in, the ripple should be less than 2 mV out.

To get a signal that indicates this smoothed output is between 60% and 70% of the supply, use two comparators to compare it to 60% and 70% of the supply. A resistor divider chain can make these reference signals:

Feed OUT and 70% into one comparator, and OUT and 60% into the other. A little hysteresis on each comparator is in order. You want it to be more than the remaining ripple on OUT at a minimum. Maybe 10 mV would be good.

Now you only need the appropriate logic gate to take the two comparator signals and make a single signal that indicates OUT is between the two thresholds. What kind of gate depends on what polarity you connected the inputs of the compartors with. For example, if OUT goes into the + input of both comparators, then you want a XOR gate. The output will be high when the outputs of the two comparators differ, which only happens when OUT is in between the 60% and 70% reference levels.