... This circuit could be connected to the ATX P/S PCB at the point where the AC line voltage is already being filtered by the capacitor-common mode choke circuit that directly connects to the bridge rectifier of the ATX supply.
Ian.M: My circuit requires an optoisolator that can be salvaged from an old ATX supply or from any other SMPS equipment at zero cost. Buying a rarer breed of back to back LED optoisolator would be a more expensive way to accomplish the goal here. Also the size of and cost of the 250RMS capacitor for the voltage divider is a factor. Also, using just a capacitor voltage divider seems to be a simple solution, but this circuit idea will likely cause a clock to run fast as there will be spurious timing pulses generated because of not filtering out mains voltages glitches.
There is no need to buy a new ATX power supply either, as it takes no more time to add this mod to an used power supply than to a new one. If the ATX power supply was previously probably working fine powering a PC, it would be foolish to discard it simply because it is used but working well and also opening the case and modding a new ATX supply would void its warranty.
So your circuit can use the PSU's in-built line in filtering and MOV protection but you wont allow mine the same privilege, even though I specified connection at the bridge rectifier?
You wire the optocoupler back to back, it doesn't come that way. Either use two singles or a dual. The whole point is to minimise the component count on the live side. You can use a pure resistive dropper, but to get a good low impedance output needs a reasonable LED current, so that's three resistors running moderately warm. A cap dropper using a 0.047uF X2 cap isn't large or expensive, nor is a 6K8 resistor, and that will deliver you approx 3.5mA RMS through the LEDs. Spikes only matter if they occur close enough to the zero crossing to reverse polarity to the LEDs, and if such a glitch even makes it accross the isolation barrier (due to the response time of the LEDs and phototransistors) is easily filtered out on the low voltage side in software or hardware.
On the subject of used PSUs. New, they are commodity products, and you don't need a gold plated one. If the used or s--tty PRC PSU fails, assuming it doesn't take out your custom MCU board, you've got all the hassles or stripping it down to retrieve your opto module, getting a replacement, and refitting the module. For a one-off, initially fitting it is likely to take something like half an hour, if you are doing the job right with all wiring properly secured. Unless you value your time at less than minimum wage, it just isn't worth using crap. I *MIGHT* consider a lightly used premium brand PSU, but the standby supply in a modern PC leads a fairly hard life, and IMHO its better to start from new. On the warranty issue, sure its voided, but that's what burn-in testing is for. Stick a good load on it or stick it in a system and run it for a few days before cracking it open.