The quadrature detector consists of;:arrow: 2 inputs and 2 outputs .
"perfection, depends on how you define the specs with details, for error free- performance, as in noisy data streams BER, here is the BEE ERROR RATE." nothing simple is perfect!:roll::roll::!:
Let's call inputs A & B valid when both are blocked "1" then unblocked "0" to detect one bee going through by choosing a threshold of light and then using hysteresis around this threshold such as a comparator with positive feedback or a Schmitt trigger.
Filtering of the edge of a bee through an infrared transmission block can be done with analog continuous light and LPF analog noise filters with hysteresis or pulsed light and a digital filter , gating(And) consecutive states to be the same. This must be designed to reject false noise counts and only detect true bee body counts and not wing flaps.
Pulsed-IR hasthe advantageof higher SNR at lower average power. IR with daylight blocking fliter on the Detector gives better SNR. Narrowtunnel apertures for emitter/detector path gives more SNR from blocking stray paths (multipath distortion) e.g.5mm parts with black heat shrink over them will give higher pulse SNR & better signal level stability to give more precise threshold detection at 25 to 50% of average peak level so thatAGC is not required.
:arrow:
The output is either Direction and Count pulse or Count up & Count Down is determined by the which edge is detected first.
Validation or filtering improves detection when the bee goes past the two quadrature detectors in the same direction, mean both go "1" then "0" in the same sequence, otherwise the pulse is rejected as noise.
There are literally hundreds of different implementations of the above rules, where the tradeoff is often false & missed count error rate vs complexity or technique of digital filtering noise, so there are can be simple effective ways and also exotic single chip solutions that measure direction and speed.
Let me see if you understand so far and browse these possible
flip flop https://www.google.com/search?tbm=i...wn quadrature decoder count&tbm=isch&imgdii=_methods
It can also be done with one shots and gates with feedback .
**broken link removed**