View previous topic :: View next topic |
Author |
Message |
wordizlife
Joined: 08 Mar 2012 Posts: 38 Location: Canada
|
|
Posted: Wed Apr 18, 2012 8:08 am |
|
|
I have a RFD3055LE at my disposition. This should do the trick, question is what resistance values would be needed? How do you determine the value for the pull down resistor? |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed Apr 18, 2012 8:22 am |
|
|
The series gate drive resistor is there strictly for the protection of the PIC i/o driver.
The pull down is there to prevent turn on glitches and should draw less than 1 ma max current when the pic is delivering +5v. With 20k of course we are wasting only 250 ua . At power on - the pic I/Os will all be configured as inputs for a brief interval and that is enough time for the mosfet to POTENTIALLY turn on and glitch power to its load.
BTW: this floating I/O issue with driving "relays"
is a prime reason i always use #fastio
and declare OUTPUT as early as i can in my pic init code.
This may be corrected now, but in much older versions , The CCS "adjust TRIS on the fly" aspect can leave such outputs floating as inputs until the first time you do an output . This is not so cool if one of those outputs is driving a load you can't afford to glitch......
i have not bothered to test if this is handled well now because i abandoned complier auto- TRIS the first time it bit me and never looked back.
if anyone knows better please update..... |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Apr 18, 2012 8:17 pm |
|
|
Whether you use fast_io, fixed_io, or standard_io the output is going to float until the first output instruction to that port. And that first instruction is not going to be executed at least until the crystal is stable and RESET goes away, which can be many tens of milliseconds. That is more than enough time to do some serious damage if you have not set up pull-up resistors properly.
I would not count on anything involving software to establish a safe turn-on sequence. I have used fast_io or fixed_io very rarely in past 15 years or so I have used the CCS compiler. I recommend beginners stay with standard_io until they know they need to do something different. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Wed Apr 18, 2012 8:20 pm |
|
|
In critical situations, I have a large resistor to transistors/MOSFETs that puts them in the (safe) condition I want at power up.
Then for the drive from the PIC to the GATE/BASE, I have a series resistor.
Good (safe) stuff...
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
wordizlife
Joined: 08 Mar 2012 Posts: 38 Location: Canada
|
|
Posted: Thu Apr 19, 2012 6:00 am |
|
|
Well the MOSFET did the job perfectly. Thanks for the help guys! |
|
|
|