JFET/MOSFET and IR LED control

Discussion in 'The Projects Forum' started by leonhart88, Sep 5, 2011.

  1. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Hey guys,

    I have a square wave signal from 3V to 0V. When the signal is 3V, our two IR LEDs are off. When it is 0, the LEDs are on.

    I'd like to use a transistor or FET to control the LEDs (the IC which generates the signal also acts as a current sink) so we can put more current through the LEDs without burning the chip.

    Most applications of FETs and transistors I've seen have the FETs used as switches that are normally open and only close when a voltage is applied to the gate. In my case, I want the exact opposite. I want the switch to be open when 3V is applied to the gate, and I want it to be closed (LEDs on) when 0V is applied. I'm using this for infrared communication at approximately 38400 baud rate.

    There are many types of FETs out there...what is the best type of FET for this? A JFET? A depletion mode MOSFET? I do not have too much experience with FETs so I will be doing some research, but thought maybe someone here could give me a head start or at least some suggestions.

    Thanks!
     
    Last edited: Sep 6, 2011
  2. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Jfets won't offer anything that a mosfet or bipolar transistor can offer, apart from being more awkward to use in this application.

    You could use either of the afforementioned transistors to do what you want by using them to rob your leds of current, rather than supplying it:

    Suppose your leds are connected to your positive supply via current-defining resistor. You could connect a collector (or drain) to the resistor/led junction, and drive the base (or gate) from your ic (with the emitter or source grounded).

    You'll need to choose a current capability for the transistor sufficient to handle the current drawn by the resistor when it has the full supply voltage across it. The other consideration is how the device is driven. Is the driving ic an open-collector type output? If so, you'll need a pullup resistor which allows sufficient base current to turn the driver transistor fully on (you can see I'm happier with a bipolar transistor here, though there's no reason you couldn't use a mosfet - just pay attention to gate turnoff voltage and device capacitances).
     
  3. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Just realised I used the wrong terminology here: it should be "gate threshold voltage" rather than "turnoff". I've been out of the game a long while (that's my excuse anyway!).
     
  4. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    What you want is an N-channel enhancement mode MOSFET. They even come in logic-level variety.
     
  5. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Thanks for the suggestions. I will look into them in more detail when I have time.

    It`s been a while since I have dealt with transistors, but what is the difference (application-wise) between N and P channel, and depletion mode or enhancement mode. In other words, how did you know that an N-channel enhancement MOSFET is what I want?

    Thanks.
     
  6. wayneh

    Expert

    Sep 9, 2010
    12,093
    3,031
    The N-channel is sort of the "default" choice, unless you specifically need p-channel. They (Ns) are generally more efficient - lower Ron - and cheaper, all else equal.

    And a MOSFET is a good choice over a BJT for power conservation, because they don't suffer the ~0.7V drop of a typical BJT. If there's much current involved, that small voltage drop can represent a power loss. If turned fully on, then, the MOSFET will dissipate little waste heat. But there's the rub of a MOSFET, you need to drive it fully on with an adequate voltage to its gate. Otherwise its advantage is gone. I'm not so sure even a logic-level FET is fully on at 3V. You may need careful shopping to assure that.
     
  7. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    It occurs to me that you might not know if your driving ic has an open-collector (or open drain) output (if it's an unknown ic). Also, if you're operating from a 3V supply (I'll guess that it's a couple of AA cells), you'll want to be careful about battery drain; the "current-robbing" method I described would be a bit power-hungry (though this could be minimised by putting an appropriate resistor or diode in series with the transistor's collector).

    So, my alternative method would be to go upside-down, as it were, and use a pnp (or p-channel) transistor (the first suggestion assumed npn or n-channel). Assuming a bipolar device, you'd need to connect the base to the driving ic via a suitable resistor, and you'd need a resistor between base and emitter (the emitter will connect to the positive supply).

    The base-emitter resistor is important, because it is required for a decently fast turnoff. I'd suggest 100 ohms, which would imply 7mA turnoff current. The other resistor would need to supply 7mA plus the transistor's base current, which could be around 2mA, say, giving a total current of 9mA and implying a resistor value of about 270 ohms.

    By the way, the best solution is more about circuit topology than device selection: if you're current-robbing then you'll need a n npn (or n-channel); if you're supplying current, then you'll need pnp (or p-channel). As has been said, use of a mosfet might be more problematic when you're using low supply voltages (do note that the bipolar saturated switch descibed here will have a much lower drop than 0.7V - more like 0.2V in fact; the 0.7V figure is the base-emitter voltage, which is another matter entirely).
     
  8. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Thanks guys, your replies were helpful. Sorry for the late response, I've been very busy with work.

    The pin from the IC is a open-drain (MAX3131). I also believe I need to supply current rather than rob it (due to power reasons & IR LED lifetime).

    The previous schematic given to me used an N-channel, enhanced MOSFET (see attached diagram). However, I do not know what the TXD signal looks like. I assume it is a square wave that goes from 3V to 0V (where 0V turns the IR LED on), like in my circuit. I have attached a picture of my circuit and the square wave output as well (the yellow wave is the signal going to the IR LED cathode).

    From my understanding, an enhanced mode MOSFET means the Drain-Source channel is "off" @ 0V. In my case, I want the LED on at 0V, so doesn't this mean I need a depletion mode device? Also, n-channel means that as the gate voltage increases, the current/conductivity of the drain-source increases. So in my case, I would need a p-channel device. Is this right? My understanding of FETs may be a little rusty.

    What is confusing is the MOSFET used in the old schematic. That one is a N-channel, enhanced-mode MOSFET. If what I said was correct before, then why was a N-channel used in that previous version? I have the circuit and it does work, so I'm a little confused.

    Thanks again for the help.

    *EDIT: the schematic without any FET is the new one I am making, the one with the MOSFET is the old schematic.
     
  9. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    I've been running a few simulations in multisim with different types of FETs.

    I can't actually find any MOSFETS that are depletion mode AND p-channel. JFETs do exactly what I want, but I can't find a suitable one. I stumbled across a p-channel power MOSFET and it looks like it may work.

    Attached is a simulation I ran. The LED turns on and a current is generated only when the pulse is low.

    To be honest, I was playing around with switching the source/drains, and I don't really understand why this seems to work, but I am looking into it.

    *EDIT: I correct VCC to 3V and now it doesn't work the same....back to the drawing board!
     
    Last edited: Sep 12, 2011
  10. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    First of all, yes, you're absolutely right about the p-channel fet (or pnp bipolar). It doesn't matter if it's enhancement or depletion, if it's n-channel it won't do what you want. Depletion mode fets are especially inappropriate, since to turn them off you need the gate to be taken negative with respect to the source (i.e. below ground) for an n-channel - or positive (i.e. above 3V) for a p-channel device.

    Turning to the circuits, the one with the mosfet is REALLY nasty. I say this because of the 1 ohm resistor. What's happening here is that most of the job of defining the led current is taken by the on-resistance of the fet - extremely dodgy practice! So it may have worked, but more by luck (or tweaking!) than judgment. Regarding the logic polarity of the led output, if this is OK for this circuit, then I would conclude that TXD must be the inverse of the ic output (either that or the receiving circuit doesn't care about polarity - which may be the case; if it is the case, I would recommend just using an npn transistor with base 390 ohm pullup resistor).

    I'm assuming (from the other circuit) you want to run the led at about 80mA, (looking at the datasheet, the Vf for that led will probably be about 1.5V). I wouldn't use a mosfet - use a pnp transistor. Look for a general-purpose pnp with 500mA to 1A max collector current.

    As I don't really have a means of drawing even simple circuits, I'll describe it in words: connect the ic output to a 120 ohm resistor; connect other end of the resistor to the base and a 51 ohm resistor; connector the other end of the 51 ohm resistor and emitter to +3V; connect collector to 18 ohm resistor; connect other end of 18 ohm resistor to led anode; connect led anode to ground.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You have Q3 installed upside-down. As a result, current will flow through the body diode, and your gate won't control the MOSFET as you'd like.

    With a P-ch enhanced MOSFET, the source terminal goes towards the more positive voltage, drain terminal towards the more negative voltage.

    Also, you have your XMM1 set as an ammeter, and you are measuring the current incorrectly - you should have the LED in series with the meter; instead you have removed the LED from the circuit entirely and replaced it with the meter. As a side note, in the "real world" it is safer to measure current by measuring the voltage drop across a 1 Ohm resistor; since E=I/R, your readout in voltage will also be Amperes.

    You are going to have a difficult time finding a P-ch MOSFET with a low enough Vgs specification for your application. Ignore the threshold specification; that is where the MOSFET just barely starts to conduct; 250uA or so. You want to look at the Vgs specification where Rds(on) is specified. Note that P-ch Vgs is usually specified as a negative number; when Vgs=0, the MOSFET is off - and where Rds(on) is specified, Vgs is some negative number, like Vgs=-4.5v

    N-channel MOSFETs are preferred, as the gate charge for P-ch MOSFETs is ~2.5 times as high as for an equivalent N-ch MOSFET. This makes P-ch MOSFETs much harder to turn on and off quickly.

    If you can find one with low enough operating voltage, you could use an inverting MOSFET driver IC to control the gate of an N-ch MOSFET.
     
  12. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Thanks for the reply Hi-Z. I believe the reason a 1 ohm resistor was used there is to boost intensity of the IR LED. In order to meet the IRDA standard for infrared communication, the intensity of the LED has to achieve a certain mW/sr. The LED we are using (VSMF3710) needs a lot of current in order to reach that intensity. I have suggested a different LED to my supervisor, but he wants to stick with the same one. In the new design, we want each LED to operate with ~400mA in order to reach the minimum intensity required. The LED has a forward voltage drop of ~1.4V. This means, I'll need a resistor value of something like 3 or 4 ohms.

    Thanks for the suggestion of the transistor. Out of curiosity, what is your reasoning for using the bipolar pnp rather than a MOSFET? What are the pros/cons if I can find a MOSFET that turns on and off fully at my voltage levels?

    Thanks again, I appreciate your help!

    *EDIT: I like the suggestion of the inverting MOSFET driver by SgtWookie. Would you still prefer a pnp over this method?
     
    Last edited: Sep 12, 2011
  13. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Thanks for the advice SgtWookie. I'm a little confused...I had the drain connected to ground and the source to the LED cathode. If what you said is true (drain to the more negative), isn't this wired correctly? Anyhow, I've reversed the MOSFET, but now the LED is always on. This behaviour seems strange to me, as at 0V shouldn't the MOSFET be off (unless it is a depletion-mode FET)? I have attached a picture of the circuit.

    And thanks for pointing out the multimeter...silly mistake on my part.

    Yes, I've had a hard time finding suitable p-channel or depletion MOSFETs. Most of the FETs are n-channel enhancement mode. If N-channel are preferred in many applications, what are p-channel FETs used for?

    I like the idea of using a inverting MOSFET driver. I was actually thinking of something like this last night, but I didn't know what they were called. I will look into these.

    Thanks for your help, greatly appreciated!
     
  14. colinb

    Active Member

    Jun 15, 2011
    351
    35
    In my view you might prefer an n-channel to a p-channel FET for an application, but in many applications a p-channel MOSFET is the most appropriate choice. Consider logic operations (inverter) and high-side load switching.

    CMOS logic gates consist of p-channel and n-channel FETs used together.

    [​IMG]
    Figure 1. CMOS Inverter. It consists of a p-channel FET an an n-channel FET.


    For instance, high-side switching usually best done with a p-channel MOSFET rather than an n-channel MOSFET.
    See also Vishay Siliconix AN804 (“P-Channel MOSFETs, the Best Choice for High-Side Switching”):


    The EE Times Article “A primer on high-side FET load switches”
    has some good suggestions on choosing the high-side FET type, concluding with the following rule of thumb:

    For an inverting power MOSFET driver, you could use something like the
    MCP1401.

    For your application, I have to imagine that you could find a suitable p-channel MOSFET. You could use a MOSFET driver IC for simplicity, or you could make a discrete MOSFET- or BJT-based driver. For a truck-load of information, see “Design And Application Guide For High Speed MOSFET Gate Drive Circuits” by Laszlo Balogh.

    It's certainly complicated to choose the right FET since you have so many options and variables to consider: enhancement mode, depletion mode, n-channel, p-channel, vertical (power MOSFET) and lateral construction, gate charge versus on-resistance tradeoff, gate voltage for full turn-on, maximum gate-source and drain-source voltage, and more.
     
  15. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    I prefer bipolar in this application because fets tend to have a problematic on-resistance. If you can get one with very low on-resistance at the gate voltages you'd be providing, it'll be a big one, and they are difficult to turn on and off at speed. In fact, you've already noticed this with your high current led driver, which seems to be pretty much totally dpendent on getting exactly the right on-resistance for your target led current. This is not good! You should be defining the led current using a resistor - otherwise you'll end up with wildly varying current, which is what you want to avoid (since you're sailing close to the wind anyway).

    Bipolar saturated switches are much better behaved, but may involve slightly more complexity.

    My circuit for two 400mA leds would consist of a pair of npn pre-drivers, followed by a pair of npn led drivers. Plus a handful of resistors.

    Trouble is, I don't have any sort of drawing software - does anybody know of any drawing (or schematic capture) freeware?
     
  16. colinb

    Active Member

    Jun 15, 2011
    351
    35
    I use the open source gEDA suite for my designs (I run the Ubuntu operating system, on which gEDA installs with just a single click; on Windows you might try Peter Baxendale's installer see this note from Peter.)

    The other main open source tool is KiCad. It seems to have better Windows support than gEDA.

    (EAGLE has a free-of-charge version, but it is crippled by various limitations and I prefer an open source tool anyway so I'm not dependent on a single vendor in the future.)
     
    Hi-Z likes this.
  17. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Thanks for the info, Colin. I've downloaded the Eagle software, so now it's just a case of getting to know how to drive it...
     
  18. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    How about a Darlington PNP?
     
  19. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Thanks for all the info guys, appreciate it.

    I tried an inverting MOSFET driver that can run on 3V. However, the turn on and turn off time was way too slow for my frequency & duty cycle. I am using 38400 baud rate and each HIGH bit is only 1/16 of a cycle long.

    I have a nice logic level N-channel FET that has a RDS_on of 0.06 at 10V. Couldn't I just use an inverter and an op amp to invert the signal and bump the voltage up to 10V?
     
  20. leonhart88

    Thread Starter Senior Member

    Feb 23, 2007
    118
    1
    Oops, I just realized that's not possible with a 3V supply...

    I'd still like to stick with the N-channel FET I have...I guess I will look for more FET drivers.
     
Loading...