SMPS designs should have clear line or patch of isolation for product safety and long term reliability. If you use opto-couplers they need to have 5kV or better isolation and 10mm between pins. The Live circuitry and the output circuitry should not… more »