Let's say you have a device which is fed by AC line voltage and features an isolated SMPS. The switcher outputs 5 VDC, and that powers a PIC micro. I'm curious how is the Microchip's ZCD (Zero cross detection) module supposed to work here? In the technical brief (TB3138), they give the following diagram:
However that assumes the AC and the PIC share the same ground, which is not the case. Probably they assume the PC will be on the non-isolated side, or that the isolation would be a 50/60 Hz transformer. I've searched Microchip's app notes on this topic, and I couldn't find any mention of this scenario.
Any ideas about how to interface the AC to the ZCD pin, is it even feasible?
(And yes, I know those opto-couplers cost pennies).