Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Ac power source for PIC 22-v 50Hz

Not open for further replies.


Junior Member level 1
Jun 3, 2002
Reaction score
Trophy points
Activity points
Ac power source for PIC.

What kind of supply design is safety for pic from 220v 50 Hz ac lines.
I need of 5vdc and 30 mA for a 1 ms duration.

Thank advance.

My advice is to use a switching regulated power supply (buck converter)
I recommand you TOP family from P o w e r Integration, Inc. (h**p://w*

hi,just buy a 2w transformer,and then use a LM7805.these are very chip.the smps is more expensive,but more can use in a wide range input AC voltage and more efficiency.
good luck.

Ultra cheap design. Use a full wave rectifier to get dc and then a large resistor. If the current from your circuit is characterised you can select the resistor to give you the desired voltage. Be aware of transients! These can and will destroy a PIC.
A linear regulator off this supply could solve help this. Alternativelty use the above resistor/rectifier method and use a shunt regulator. These draw a constant current irrespective of load current.



Supply design depends on the accuracy and stability needed (and on other requirements too). Safety reasons do not demand isolation. SMPS for such a small power is throwing money away and lowering reliability. Mains transformer is also unnecessary if isolation is not required for some other reason than safety. Full wave rectifier and resistor in bagster's reply are good, but opposite order is more cheaper and reliable. Or, use just a diode-resistor series connection for rectification. Zener diode and electrolitic capacitor in parallel with PIC are inevitable, as your PIC obviously works in the pulse mode, otherwise the PIC would be polarized with mains voltage amplitude during sleep.
For higher power, use capacitor instead of the resistor.

As I already wrote in my reply to your previous post, you can find usefull info in app notes of ST and Phillips.



An other option would be to use a .1 to .33/400v polyester cap in series with the mains, a diode (IN4007) and a 3-4 k /1w current limiting resistor in series. After that you can shunt it with a zener (5v1) and filter cap (220/10) to produce the required voltage. This way you can avoid the high wattage resistor needed to make the drop.


Ooopps... Sorry didn't fully read the previous reply, as the cap was mentioned.
I'll leave it though as I have some practical values to use if you decide to go this way.

:sm2: Work very good with

In the circuit you have, the zener needs to be placed after the rectifier.



In that case you have to use the rectifier of the bridge type, to allow for the AC current through the 220nF capacitor.


Hi all,

I think it's enough to put zener diode after D1 (if not voltage at C2 will be 4volt). At the positive cicle C2 will be charged with 4,7v (defined by the zener). At negative cycle D1 it's opened and C2 will maintain the load (4,7 v).


Not open for further replies.

Part and Inventory Search

Welcome to