@stan2004 posted:What is the optoisolator you show in your schematic?
Note that if the purpose of the bridge-rectifier is AC-to-DC conversion at signal levels/currents (as opposed to power levels/currents) you might consider replacing the bridge rectifier with an AC-input optocoupler.
I've successfully used the LTV-8x4 series optocouplers with track level AC inputs behind a current limiting resistor: https://optoelectronics.liteon...0series%20201509.pdf