On Sat, Jun 18, 2011 at 6:37 PM, V G wrote: > On Sat, Jun 18, 2011 at 5:45 PM, David wrote: > >> All, >> >> I have been going round in circles today considering how to drive a >> logic level FET. I have tried a few things on breadboard but don't >> trust the results, many of the weird observations could be to do with >> the breadboard. >> >> I wish to drive a IR LED at 40khz (essentially the Sony IR protocol), >> somewhere between 50mA and 100mA max LED Ifwd. In testing I have been >> using a 2N7000. >> >> I am confused around whether or not to use resistors, there is a lot of >> conflicting advice online. The options seem roughly to be: >> >> A) Connect the gate directly to the PIC pin, no resistor. Lower parts >> count, which is always useful. >> > > If you're using a MOSFET, you don't (and I think shouldn't) use any > resistors. MOSFETs have a very high input impedance and are voltage drive= n. > Drive the gate directly. > > >> B) Use a low (100Ohm or similar) resistor in series between PIC output >> and the FET. Provides some protection for the PIC. >> > > I may be wrong here, but protection from what? The gate on a MOSFET is > insulated. Theoretically infinite impedance. > > >> And for an alternative problem: >> >> Y) No resistor between gate and GND, once again lower parts count and no >> worry of the PIC having to source more current when pulling the pin high= .. >> > > If the PIC pin is configured as output, it's a driver - so it's low > impedance to either logic high, or logic low, depending on what you "writ= e" > to the port. So you don't need a pullup/pulldown resistor since the gate > will be up or down either way. > > >> Z) A high (>=3D10k) resistor between gate and GND. Most useful if the P= IC >> could ever be disconnected from the FET (which it cannot in this >> instance). However, also provides some protection during ICSP, power on >> (before TRIS is set) and will ensure the FET always turns off. >> > > If the pin is ever configured as an input (high impedance), then the gate > will be floating. What's the worst that could happen? Probably nothing. I= f > you really want to feel cozy inside knowing the gate is off by default, y= ou > can put a 10k (100k?) resistor to ground. Very low current through the > resistor. > > >> I am not particularly tight on space nor constrained by a few extra >> pennies, but it would be good to know which combination of (A|B)+(Y|Z) >> is correct and for what reasons. >> > > I vote A and Y because I don't think the resistors serve any useful purpo= se > in this case. > Note: Many people on this list consider me a total idiot and so I reserve the right to be wrong :) --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .