In all the computer power supplies and other power supplies I've taken apart, I've noticed they are fully isolated from the mains. Galvanic isolation through transformers, and often optical isolation for feedback. There is usually a very visible gap in the traces between the primary and secondary sides, at least 8mm across. Why is it important that these supplies be isolated?
Because the mains supply is very unpredictable, and can do all sorts of things outside its nominal specification, which might damage components or at least break the nominal design assumptions. A non-isolated design also has all its voltages referenced to one of the mains conductors, which might or might not have a useful/safe relationship to other potentials in your environment (like earth/ground, for example).
If the only stuff on the low-voltage side is inaccessible electronics, then non-isolated supplies are fine - they tend to much be cheaper/simpler than isolated supplies, and lots of household equipment uses them. Even things like televisions used to work like this, if you go right back to before the time when they had external video/audio connections. The antenna connection was the only external socket, and that was capacitor-isolated.
If a human being or 3rd party piece of equipment needs to interconnect with the low-voltage side of your design, then an isolated supply both gives you a clear barrier across which dangerous voltages won't pass, even in the case of component failure, and it means your circuit is now 'floating' relative to the mains. In turn, that means you can arrange for all the electronics to operate near ground potential, with all your interconnected equipment having at least roughly the same voltage reference to work from.
Short answer (oooh, this is a pun, wait for it...): safety. What would the effect of a short from 240V or higher to... well, anything, be? Low voltage devices? Dead! House? On fire! Lawsuit? Pending! Isolation at least makes a direct short to wall voltage impossible and an indirect short less dangerous and less likely. For instance, if the wall voltage totally fries everything on one side of the transformer you have a non-working transformer. A non-working transformer means no coupling and no voltage on the other side, so no damage. Plus there are more protection options for the lower voltage side (less expensive protection options anyhow).
I can think of a few:
- Helps isolate the outputs from dangerous line-level events (lightning strikes, surges, etc.) since most transformers are step-down in commercial power supplies
- Allows you to use the chassis of the equipment as a safety shield, by earthing it (any conduction from the mains to the chassis will instigate a fuse blow or breaker trip, rapidly disconnecting the fault)
- Ensures that sufficient margin exists in the design to prevent arc-over from primary to secondary even under less-than-clean environments (toner dust is a particularily nasty gap-bridger)
- Reduces the 'stiffness' of the power source - a small transformer will saturate out much more quickly than the mains, which also has the effect of driving the primary current higher and activating some sort of safety device (fuse, breaker, etc.)
- Regulatory organizations require it in most applications: IEC 60950, CSA C22.2, etc.
In addition to the safety issues mentioned, there's also a practical issue: even if one knew that the neutral AC supply leads would always be at ground potential, it would be difficult to design a transformerless low-voltage DC supply which drew current equally on the two halves of each line cycle without the DC side having a significant common-mode voltage swing relative to the neutral supply line. Even if the voltage swing on an exposed "ground" would be low enough not to pose an electrocution risk, connecting the DC-side grounds of different devices could still be likely to disrupt their behavior.
Using transformers to float a supply is not really any more difficult than making the DC ground coincide with the AC supply neutral. There's not really any disadvantage to having low-voltage DC supplies float relative to both power input leads, and in practice having the DC ground tied to AC neutral would introduce some needless safety hazards. Those arguments together form a pretty compelling argument in favor of isolating low-voltage DC supplies from the AC line.
We can't rely on either of the supply conductors being safe for several reasons.
- In some countries you can't rely on which conductor is live and which is neutral either because the sockets are unpolarised, because the installers don't pay much attention to polarity or because use of extensions/adapters that may not correctly maintain polarity is common.
- Wires can break, if the neutral wire breaks and there is load on the system then the neutral wire will come up to mains volts.
- Even in normal operation with correct polarity there can be voltage on the neutral due to volt drop. While the voltage is low the impedance is also very low, so it can be a fire risk.
As a result of this modern appliance standards generally treat both the live and neutral conductors as potentially hazardous. This leaves appliance vendors with two main options for protecting the uses.
- Insulate and touchproof all electrical parts, that works ok for simple devices but it's not really practical for things like computers with a bunch of user-accessible ports.
- Put an isolation barrier in the power supply so that the low voltage part is safe to touch.