• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Power Supply Problem

Status
Not open for further replies.

Suraj143

Active Member
Hi, here is my simple power supply for PICs. I want to use the ON/OFF switch as it is in the diagram in the input side of the transformer.

When I switch OFF and ON, the PIC won’t reset. Sometimes it takes long time to reset.

Can somebody tell me what are the missing points in the power unit? Is it happening due to the noise in the wall mount switches?

Note: I want to use the ON /OFF switch in the input side of the transformer not in the output side of the regulator.

 

justDIY

Active Member
that big honkin 470uf cap is probably the culprit ... depending on how much power your PIC circuit draws, it could continue to power the chip for several seconds after you turn the AC off.

better place for the switch would be after the 5v regulator.

i recommend something in the range of 1-10uf on the output of the regulator, in addition to the 0.1uf you have already.
 

gramo

New Member
Yeah 10uF either side will be suffice.

Also, putting a diode in reverse bias from Vout to Vin on the reg will ensure the Reg is not damage because of capacitive loads on the circuit when swithing on and off

Also, a 0.1uF Tantalum capacitor will help smooth out any transients (it really helps out for timing sensitive applications). It's best place as close as possible to the PIC's Vss and Vdd

 

kchriste

New Member
Forum Supporter
Note: I want to use the ON /OFF switch in the input side of the transformer not in the output side of the regulator.
As noted by justDIY, it is probably due to the low current draw of the PIC not discharging the 470uF cap. You could put a 1K resistor across the 470uF cap to properly discharge it on power off.
 

Suraj143

Active Member
Thanks just DIY I must place the cap.

Thanks gramo for your diagram and for the useful information.

After making a complete PIC product with the 5V power supply (included transformer) where to place the ON/OFF switch.

If I place near the regulator, after switch OFF, the transformer is working all the time.

If I place the switch in the transformer side I cannot reset the PIC smoothly it takes long time to reset.
(If the user switches OFF from the AC outlet it will be a big problem because the PIC won’t reset)
 

Suraj143

Active Member
kchriste said:
As noted by justDIY, it is probably due to the low current draw of the PIC not discharging the 470uF cap. You could put a 1K resistor across the 470uF cap to properly discharge it on power off.
Oh I see I must give a try like that.
 

Suraj143

Active Member
Hi bananasiong I have checked with all the fuse settings but still I’m having the resetting problem with this power supply.

Because lot of time I’m switching OFF by the AC wall mount switch.

I want to switch off the circuit with that AC wall mount switch. I must give a try as earlier mentioned methods.
 

Pommie

Well-Known Member
Most Helpful Member
Use an LED as a power on indicator and that will drain the capacitor (you want it to draw about 20mA). Also, turn on Brown Out Reset (in config) on your pic chip, this will ensure that the chip will reset when the supply voltage drops below 4V.

Mike.
 

Sceadwian

Banned
PWRT is for power on, not power off.
 

bananasiong

New Member
Oh, the reset that I said is not the reset that you meant :p
If your circuit doesn't draw much current, can you use smaller value of the filter capacitor? Also, turn on the brown off reset.

BTW, what is PWRT for?
 

bananasiong

New Member
The typical power up timer period of PIC16F877A is 72 ms, 132 ms msx. Can the time be set? What happen if the power supply system takes more than 132 ms to achieve 4 V? As I know, some boost regulator takes some time to be boosted up (but not 132 ms long).
 

Sceadwian

Banned
This could be easily solved by using a DPST switch with sufficient voltage issolation to switch both the mains HOT wire and the 7805's positive output at the same time. If you're paranoid about passing both mains and regulated voltage through the same switch you can always use two seperate SPST switches physically ganged together.
 

Hero999

Banned
I wouldn't switch the 470:mu:F capacitor for 10:mu:F because it might create problems with ripple.

A small 12V filament light bulb across the 470:mu: capacitor would do the trick.

Another question is why does the switch have to be on the primary side of the powe supply? Can't you put it on the 5V supply to your PIC?

Then all you need to remember is that when the light has turned fully off (which won't take long) the PIC has been reset.
 

Sceadwian

Banned
Power consumption when mains is switched off is lower. Again switching both is the ideal sollution if he still wants to be able to switch mains off.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top