How to get the +5V (30mA) and +12V (20mA) directly from the main 220V (AC)? I need a simple circuit, not to much loses, and avoid of using transformer.
Hi,
If you want a little efficiency, you'll have to use some magnetics. A transformer is not always necessary, but you must use a coil. In this case you will not have electrical isolation between your circuit and mains. Try TOP family from www.powerint.com , and at their site you will find design examples with schematics which does not require a transformer.
8) You can use a capacitor fed rectifier circuit fallowed by two regulators to power your circuit.
WARNING: CAPACITOR FED RECTIFIER CIRCUIT IS A NON ISOLATED POWER SUPPLY AND MAINS VOLTAGE WILL BE PRESENT IN THE CIRCUIT,
ONLY USE THIS TYPE OF CIRCUIT IF THE LOAD DOES NOT COME IN CONTACT WITH THE EXTERNAL WORLD.
Older power supplies had this behaviour. Newer power supplies starts with no peripherals connected. Do not forget that the cooler inside is also a device which consume some current, so even if no peripheral is connected, the power supply is not loadless.
USE two 400VAc/1-3UF capcitor serie in circuit,after rectifier,then use 7812 and 7805 to get +5V and +12V voltage.
But it is not safty isolation,So you should be careful in using.