I have a 10W SMPS circuit powering a home appliance like this:
I need to extract a zero-crossing pulse from this circuit which would then be fed to a micro-controller. To this end, I am considering the following modification to the circuit:
Specifically, I have added an opto-coupler PC817 whose input LED would be driven from the rectified ~340V (0 to peak) through R16 (330k, 1/2W resistor). The maximum input current to the opto-coupler would thus be ~1mA. Considering the CTR to be 0.8, from the datasheet, the collector current would be ~0.8mA. Accordingly, I am considering a 33k resistor for R17. Have also added D10 (1N4007) to isolate it from the smoothing capacitor.
- Are the calculations correct? Will the circuit work?
- Is it okay to drive the opto-coupler LED from ~340V? Would it damage the components or make the circuit less reliable?
- How to estimate and minimize the pulse width at the zero-cross output so that it is closer to the zero-crossing?