PDA

View Full Version : burning pins



lerameur
- 5th October 2008, 05:48
hello
I am using a pic to control some relays, the coils is activated with 12v supply . The pin output the 5v to the gate of mosfet which turns on the relay.
Also the problem is that pins from the LCD output are also burning, any idea why that is?
when the circuit is active and if I disconnect the 12v that goes to the coils, then there are few squares that appear in the LCD.. it goes away after a second or two..

ken

skimask
- 5th October 2008, 06:09
hello
I am using a pic to control some relays, the coils is activated with 12v supply . The pin output the 5v to the gate of mosfet which turns on the relay.
Also the problem is that pins from the LCD output are also burning, any idea why that is?
when the circuit is active and if I disconnect the 12v that goes to the coils, then there are few squares that appear in the LCD.. it goes away after a second or two..

What do you mean, burning? Like actually hot, like going to go up in smoke type burning?
Could you post up your actual schematic?

lerameur
- 5th October 2008, 07:15
what I mean is that the pin is not putting out 5v anymore. Nothing is coming out..
I will post schematic tomorrow

ken

skimask
- 5th October 2008, 07:21
what I mean is that the pin is not putting out 5v anymore. Nothing is coming out..
I will post schematic tomorrow

A piece of good advice...
Whenever you're driving anything external to the PIC, it's a good idea to throw an in-line resistor between that pin and the device. Generally, a PIC's output is limited to about 25mA, therefore, at 5v, you'll want about a 200 ohm resistor on there, just for protection, limits the current to right at 25mA @ 5v. Not only will it protect the pin quite a bit, but it'll help stifle some noise/ringing, that sort of thing.
Of course, it always depends on what you are driving, but, I keep a bunch of 100ohm DIP resistor packs handy just for that purpose alone.
And another thing, if you did fry the output high driver, chances are you can still use that pin if you put a pullup on it, treat that 'dead pin' like an open-drain output. At least you'll get the use out of it again.

lerameur
- 5th October 2008, 07:45
I did add 5k resistor between the pin and the gate. I also added a 100k resistor to the ground from the gate so that it stays at zero volt when not used. I found out that some relays where turning on for no apparent reason, with the 100k resistor it fixed that problem.
could there be spikes from the ground coming from the coil in the relay when it collapse. (shutting down)

k

mackrackit
- 5th October 2008, 12:36
could there be spikes from the ground coming from the coil in the relay when it collapse. (shutting down)

YES
Do you have a "flyback"diode across the relay coil?
http://en.wikipedia.org/wiki/Flyback_diode
http://www.4qdtec.com/catch.html

lerameur
- 5th October 2008, 14:54
flyback .. no

ok here are the parts I have
pin----5.1k-----gate
drain ----100k-----source
source----ground
12v---coil----220ohm-----drain

I will add a flyback thanks

k

skimask
- 5th October 2008, 17:11
Doin' good so far...'cept for the missing flyback diode :) always use one...make sure you get it in the right way!
Are you using an N-channel MOSFET? Using the PIC to add a ground to the coil? The 100k resistor is bleeding off any leakage coming thru the MOSFET. N-channel aren't so bad for this, P-channel's are worse (and you have to pull the gate the other way)...that's probably why the MOSFET would turn on for no apparent reason.