I need some help in finding out how to connect zero-detector circuit to my PIC.
I do not wish to use any transformer in this circuit.

The circuit gets it's 12V from an external source which is reduced to 5V using 7805 in my circuit. I tried connecting 4 x 4.7Meg directly from mains to my PIC just to check if it works and it does, but not perfectly as I need to supply full-wave rectified voltage.

The problem:
  • I am not sure of where to connect the ground connection of the bridge rectifier.
  • Once the ground is connected to where it should, should I use the same resistance from the +ve side of the bridge to the PIC?