The astrum doesn't use an opamp in this circuit, because the photodetector is part of a voltage divider it doesn't need voltage amplification, as all it is doing is switching the median 2.5v to 5v or 0v. I haven't used opamps successfully before so I am staying away from them if I can.
The hybrid mechanical and optical approach likewise eliminates any need for photointerrupter debouncing, as the light beam change will be treated as a Set in the SR latch terminology, if it occurs when the roller microswitch is pressed and when the roller microswitch releases, that will be treated as a reset, then wheel rotation will be incremented.
when the roller microswitch is pressed, if the light beam is not interrupted, and unpressed, wheel rotation will be decremented. This has the side effect of the encoder failing in a usable way, if the optical parts burn out, menus and weapons in games can still be cycled through, albeit in one direction only.
here is the lk switch datasheet page which bst provided. I am unsure what the function of the capacitor is, maybe noise immunity of some kind.
because the roller microswitch acts as one channel of the quadrature encoder, the other optical channel only needs a single type to get direction, the advantage here, being the hardy nature of the optical parts.
I realise it is a little hard to explain because I don't think anyone has made a hybrid encoder before.
Last edited by gipetto; 05-28-2019 at 07:17 AM.