Power problem

Thread Starter

Dan2

Joined Oct 16, 2008
19
i am having a very similar problem. i am trying to drive 2 5v relays and a pic off a single 5v regulator. the relay coils are controlled by the PIC via 2n2222 transistors. the PIC works fine until i try to activate a relay, then it also freezes. i hav a LED across the regulator and that stays on (shows that 5v is stil present)

if i remove the PIC from the circuit and manually activate the relay (5v from the reg to the base of the transistor) it works perfectly, however as soon as i put the PIC back into the circuit, and try to activate the relay manually again (not connected at all to the PIC), it seems to short out the regulator.

Please help, it really makes no sense to me.
 

beenthere

Joined Apr 20, 2004
15,819
Greetings! And welcome to AAC!

I've moved your post into its own thread, where it will draw more responses.

Please refrain from "hijacking" existing threads with tangent or off-topic questions. You can create new threads for new questions using the "New Thread" button on the upper left of the page.

You probably need to post up your circuit. Do you have current limiting resistors in series with each transistor's base?
 

mik3

Joined Feb 4, 2008
4,843
Check for solder splashes under your pcb, maybe the output of a relay is shorted accidentally to one of the PIC's pins.
 

SgtWookie

Joined Jul 17, 2007
22,230
Use a 220uF and a 0.1uF cap across the power supply.
Use a 0.1uF cap across the PIC's supply pins.

PICs can source or sink up to 25mA from their I/O pins. You need a resistor from the I/O pin to the base of the transistor. I suggest 220 Ohms or more, which will allow 22.7mA current.

Use diodes connected in reverse across the relay's power leads. This is important for suppression of the reverse EMF when the relay is de-energized. You could use 1N4148 diodes or 1N4001 through 1N4007 diodes. You may also need to connect a small capacitor, perhaps 330pF, across the diode to slow the rise time of the reverse EMF pulse.
 
Top