Electronics > Projects, Designs, and Technical Stuff
RfC: window detector with glitch filter
(1/1)
technix:
The purpose of this window detector is to check if headphone is inserted into its jack, and generate a 5V CMOS logic output reflecting that. Logic 1 if headphone is present, else 0.

The power amplifier I used is a Class-D amplifier that is designed to use direct-coupled outputs, Nsiway NS4248. (The circuitry on its datasheet should not be used directly, as this logic output controls not only this amplifier, but also other circuitry that expects a logic input.) The output pin of a Class-D amp should flip between 5V and 0V. As of the headphone jack, the detect pin is connected to one of the signal pins when a headphone is removed, and floated then a headphone is inserted.

The idea here is to bias the detect pin to 1/2Vcc, then use a window detector to check if the detect pin is within 1/3Vcc and 2/3Vcc. If the headphone is removed, the amp output would override the bias and make the window detector output low. When a headphone is inserted, the now floating detect pin would be biased towards 1/2Vcc, and the window detector output high. This design has the risk that there may be glitches when the output signal itself crosses the detection window, so a glitch filter is needed. The comparator in question is LM393, which has open drain outputs. The outputs are tied together as wire-AND and pulled high, a capacitor is added between the output and the ground as a low-pass filter, then a Schmitt trigger buffer finishes the glitch filter.

As of the bias resistors, that stack of 4.99k is a reference to a certain chip that also has a window comparator-ish structure in it.
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod