I took an old "300 W" ATX PSU apart to see how it worked - it wouldn't power my new Athlon motherboard, so I sacrificed it to see how it worked.
Unfortunately, I've now thrown the circuit diagram I drew away, but I'm pretty sure it used a half-bridge design.
I divided the circuit it to stages:
1: Surge supression, mains filtering and PFC.
2: High voltage rectifier + reservoir capacitors
3: High voltage switching transistors (rated for 600 V) - essentially these convert the high-voltage DC into high-frequency, high-voltage AC
4: Transformer producing +/- 12V and +/-5V
5: Low voltage rectifiers and filtering inductors/capacitors
6: 3.3V regulator drawing power from +5V line
7: Feedback circuit which measures the voltage on the +5 and +12 lines and adjusts the power delievered to the transformer in stage 3.
Seperate to the main supply is a seperate supply (comprising steps 3 and 4 above) used to provide the +5V SB supply which is also used to energise the control circuits for the main supply.
Transformers which run directly off the mains supply can be used - and have been used for decades in the past. They can still be found in cheap 'pregnant plugs' and similar 'universal adaptors'. They have disadvantages though:
1: They are bulky - They need large amounts of iron, and correspondingly large amounts of copper wire wound around them.
2: They are heavy (see above)
3: They are expensive - In order to get reasonable efficiency the iron core has to be laminated, and large amounts of heavy guage copper wire are needed to keep resistance down.
4: They are noisy - transformers often buzz at 50/60 Hz as the mains voltage rises and falls.
5: You still need to have voltage regulators afterwards in order to ensure stable voltages.
Modern switching supplies work by making the transformer more efficient. They generate high-voltage DC directly from the mains, and then convert it to high frequency AC (20 - 100 kHz). At high frequencies it is possible to use much smaller transformers made of ferrite. Ferrite is much more efficient than iron as well as much lighter. (The 400 W ferrite transformer in a modern ATX PSU, is about the same size (but half the weight) of a 4W conventional transformer found in a cheap power supply). At high frequencies, any vibrations in the transformer are ultra-sonic and therefore not audible. Finally you have the other advantage of regulation - the chip that controls the switching transistors monitors the output voltages and adjusts the power input to match - no further voltage regulators are required.
I think 120vac and 220vac would fry the diodes we are talking about here
Nope - you can get high voltage diodes easily enough. The 10 A, 400 V diodes used in an computer PSU are a commodity item and available for a couple of cents each.
I've seen 20 kV diodes - they were used in a PSU which got DC by rectifying the 11,000V 3 phase supply directly. They are about a foot long. I didn't ask the price, but they're unlikely to be cheap.
<B>Mark R</B>, where did you learn about electronics. I haven't seen it described that way before.
No formal teaching since high school. Just picked up what I know by taking things apart, reading things on the web etc.
P.S. I'm looking for a reference about loop compensating SMPSs - Can't find anything useful on the web. (I'm thinking about building an-in car ATX supply - probably a 100 W flyback converter based around a UC3844 or similar).