Shop OBEX P1 Docs P2 Docs Learn Events
Using MOSFETs (or not) with Basic stamps & BS2 outputs. — Parallax Forums

Using MOSFETs (or not) with Basic stamps & BS2 outputs.

ArchiverArchiver Posts: 46,084
edited 2003-12-11 09:06 in General Discussion
> Secondly with regards to transistors I was wondering if anyone could
> help me select a sutiable transtor (incl base resistor...) that
> draws less than 5ma Base current and allows me to control a load
> that requires about 100-200 ma.


Yes, let's do that. The MOSFETS are great for switching larger currents
(and yes, I admit that I also sell them), but for your load of 100 to 200
mA, there may be a much better solution...

Three very popular small switching transistors are the 2N3904, 2N4401, and
2N7000. The first two are NPN junction transistors, and the 2N7000 is an
N-channel MOSFET. All are readily available in the plastic TO-92 case. As
you will see, one of these is a great match for your application, and the
other two aren't...

The NPN junction transistors use a small (base) current to switch a larger
load (collector) current, and the MOSFET uses a voltage applied to the gate
to control the load current.

The "gain" of the NPN transistors is an important concept, and gives an idea
how much base current it will take to effectively turn on or "saturate" the
transistor for a certain load current. More load current will require more
base current, and the amount depends on the gain.

Using a single gain figure for a given transistor can be misleading. For
example, take a look at the gain figures for a 2N3904 on the second page of
this datasheet:

http://www.fairchildsemi.com/ds/2N/2N3904.pdf

Notice in the ON CHARACTERISTICS section that the DC current gain is listed
for a number of different collector (load) currents. As you can see, the
gain peaks at around 10 mA of collector current, and goes down as the
collector current is increased or decreased. At your load current of 100 mA
or more, this device will definitely not be at its best.

Now take a look at the 2N4401 data sheet (also on page 2 in the same place):

http://www.fairchildsemi.com/ds/2N/2N4401.pdf

How about that? Peak gain at 150 mA -- right in the middle of your target
load current! This might be the one, but let's dig a bit deeper...

I just breadboarded the circuit with a 2N4401 connected in a common-emitter
configuration. In other words, the emitter is grounded, the base is
connected to the I/O pin through a resistor, and the collector is connected
to the load. The other side of the load -- which is a 25 ohm resistor -- is
connected to +5 volts. If the voltage drop across the transistor is
reasonably low when it's on or "saturated" then the load current will be
nearly 200 mA. I used a 1.0 k ohm base resistor, which will supply just
over 4 mA of base current given the base voltage of about .85 volts and the
I/O pin output of just under 5 volts.

With the transistor on, the voltage drop across the collector-emitter
(generally called Vce) is a nice 0.186 volts, which means that most of the
power is getting to your load, and not too much is turning into heat in the
transistor. Since power = volts x current, the wattage being "dissipated"
(turned into heat) in the transistor is 0.186V x 200 mA = 0.04 W -- well
under the 0.5 W allowed at ambient temperatures up to 50 deg C, as shown on
the lower graph on page 4 of the datasheet.

So, what have we seen so far? The 2N3904 is a very popular and useful
device, but for switching much more than 10 to 25 mA, it won't be as
efficient in terms of base current vs. load current as the 2N4401. The
2N4401 is nice up to 200 mA, and perhaps a bit more -- but then it will
begin to go downhill like the 2N3904 did at the lower current. It will no
longer be in its "sweet spot."

What's next if the load current is well above 200 mA? That's where the
IRL520, IRL530, IRL540, etc. MOSFETs begin to look very nice. High-gain NPN
Darlington transistors like the TIP120 are also popular, because they can
switch much larger currents without needing much base current.
Unfortunately, they have a substantial built-in voltage drop between the
collector and emitter (Vce, again) that cannot be eliminated no matter how
much base current you use. That means that there is less power available to
your load, and more heat being dissipated in the transistor. I posted a
detailed comparison between the IRL520 and TIP120 on this list last
February, and the short version is that the IRL520 blew away the TIP120 for
common low-speed switching applications at the 1,000 mA load current used
for testing.

But what about cost -- that usually needs to be considered. The 2N3904 and
2N4401 can be had at 12 for 98 cents. TIP120s for .39 each and IRL520s for
.68 each. Before the TIP120 starts looking better than the IRL520, consider
that in the test I posted last February, the TIP 120 was dissipating *three
times* the heat of the IRL520 due to that inescapable high Vce in the
Darlingtons -- so you may well need a heat sink for the TIP120 but not for
the IRL520. And that changes the economics in favor of the IRL520.

And, what about the 2N7000? If you study the data sheet:

http://www.fairchildsemi.com/ds/2N/2N7000.pdf

-- particularly Fig. 2 on the upper right corner of page 4 -- you'll see
that 5 volts at the gate doesn't turn it on nearly as well as 10 volts.
According to the graph, with a gate voltage (Vgs) of 5 volts and a load
current (Id) of 200 mA (0.2 A), the on resistance will be about 1.5 ohms --
which is not too good for this application. Based on these numbers, there
would be a voltage drop across the 2N7000 of about 0.3 V in my test circuit
above -- and that's much worse than the less expensive 2N4401. Remember
that any voltage drop across the transistor represents power that the load
isn't getting -- since the available voltage is being divided between the
load and the switching device. Ideally, the switching device would have no
voltage drop when on, but that doesn't happen. Lower is better, as long as
you aren't spending a lot of $ to make it lower than necessary.

Whew... There is a lot more to this subject, but I think this is
long-winded enough. Hope it helps!

Randy
www.glitchbuster.com

PS -- there are many more good transistors available that work well in these
applications. I used the part numbers above because they are very
well-known, and represent a good value in the common switching applications
that are often discussed on this list.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-12-09 09:55
    Ah sweet i think i get the idea now [noparse]:)[/noparse]
    thnx 4 tha info

    Arridh




    --- In basicstamps@yahoogroups.com, "Randy Jones" <randyjones@w...>
    wrote:
    > > Secondly with regards to transistors I was wondering if anyone
    could
    > > help me select a sutiable transtor (incl base resistor...) that
    > > draws less than 5ma Base current and allows me to control a load
    > > that requires about 100-200 ma.
    >
    >
    > Yes, let's do that. The MOSFETS are great for switching larger
    currents
    > (and yes, I admit that I also sell them), but for your load of 100
    to 200
    > mA, there may be a much better solution...
    >
    > Three very popular small switching transistors are the 2N3904,
    2N4401, and
    > 2N7000. The first two are NPN junction transistors, and the
    2N7000 is an
    > N-channel MOSFET. All are readily available in the plastic TO-92
    case. As
    > you will see, one of these is a great match for your application,
    and the
    > other two aren't...
    >
    > The NPN junction transistors use a small (base) current to switch
    a larger
    > load (collector) current, and the MOSFET uses a voltage applied to
    the gate
    > to control the load current.
    >
    > The "gain" of the NPN transistors is an important concept, and
    gives an idea
    > how much base current it will take to effectively turn on
    or "saturate" the
    > transistor for a certain load current. More load current will
    require more
    > base current, and the amount depends on the gain.
    >
    > Using a single gain figure for a given transistor can be
    misleading. For
    > example, take a look at the gain figures for a 2N3904 on the
    second page of
    > this datasheet:
    >
    > http://www.fairchildsemi.com/ds/2N/2N3904.pdf
    >
    > Notice in the ON CHARACTERISTICS section that the DC current gain
    is listed
    > for a number of different collector (load) currents. As you can
    see, the
    > gain peaks at around 10 mA of collector current, and goes down as
    the
    > collector current is increased or decreased. At your load current
    of 100 mA
    > or more, this device will definitely not be at its best.
    >
    > Now take a look at the 2N4401 data sheet (also on page 2 in the
    same place):
    >
    > http://www.fairchildsemi.com/ds/2N/2N4401.pdf
    >
    > How about that? Peak gain at 150 mA -- right in the middle of
    your target
    > load current! This might be the one, but let's dig a bit deeper...
    >
    > I just breadboarded the circuit with a 2N4401 connected in a
    common-emitter
    > configuration. In other words, the emitter is grounded, the base
    is
    > connected to the I/O pin through a resistor, and the collector is
    connected
    > to the load. The other side of the load -- which is a 25 ohm
    resistor -- is
    > connected to +5 volts. If the voltage drop across the transistor
    is
    > reasonably low when it's on or "saturated" then the load current
    will be
    > nearly 200 mA. I used a 1.0 k ohm base resistor, which will
    supply just
    > over 4 mA of base current given the base voltage of about .85
    volts and the
    > I/O pin output of just under 5 volts.
    >
    > With the transistor on, the voltage drop across the collector-
    emitter
    > (generally called Vce) is a nice 0.186 volts, which means that
    most of the
    > power is getting to your load, and not too much is turning into
    heat in the
    > transistor. Since power = volts x current, the wattage
    being "dissipated"
    > (turned into heat) in the transistor is 0.186V x 200 mA = 0.04 W --
    well
    > under the 0.5 W allowed at ambient temperatures up to 50 deg C, as
    shown on
    > the lower graph on page 4 of the datasheet.
    >
    > So, what have we seen so far? The 2N3904 is a very popular and
    useful
    > device, but for switching much more than 10 to 25 mA, it won't be
    as
    > efficient in terms of base current vs. load current as the
    2N4401. The
    > 2N4401 is nice up to 200 mA, and perhaps a bit more -- but then it
    will
    > begin to go downhill like the 2N3904 did at the lower current. It
    will no
    > longer be in its "sweet spot."
    >
    > What's next if the load current is well above 200 mA? That's
    where the
    > IRL520, IRL530, IRL540, etc. MOSFETs begin to look very nice.
    High-gain NPN
    > Darlington transistors like the TIP120 are also popular, because
    they can
    > switch much larger currents without needing much base current.
    > Unfortunately, they have a substantial built-in voltage drop
    between the
    > collector and emitter (Vce, again) that cannot be eliminated no
    matter how
    > much base current you use. That means that there is less power
    available to
    > your load, and more heat being dissipated in the transistor. I
    posted a
    > detailed comparison between the IRL520 and TIP120 on this list last
    > February, and the short version is that the IRL520 blew away the
    TIP120 for
    > common low-speed switching applications at the 1,000 mA load
    current used
    > for testing.
    >
    > But what about cost -- that usually needs to be considered. The
    2N3904 and
    > 2N4401 can be had at 12 for 98 cents. TIP120s for .39 each and
    IRL520s for
    > .68 each. Before the TIP120 starts looking better than the
    IRL520, consider
    > that in the test I posted last February, the TIP 120 was
    dissipating *three
    > times* the heat of the IRL520 due to that inescapable high Vce in
    the
    > Darlingtons -- so you may well need a heat sink for the TIP120 but
    not for
    > the IRL520. And that changes the economics in favor of the IRL520.
    >
    > And, what about the 2N7000? If you study the data sheet:
    >
    > http://www.fairchildsemi.com/ds/2N/2N7000.pdf
    >
    > -- particularly Fig. 2 on the upper right corner of page 4 --
    you'll see
    > that 5 volts at the gate doesn't turn it on nearly as well as 10
    volts.
    > According to the graph, with a gate voltage (Vgs) of 5 volts and a
    load
    > current (Id) of 200 mA (0.2 A), the on resistance will be about
    1.5 ohms --
    > which is not too good for this application. Based on these
    numbers, there
    > would be a voltage drop across the 2N7000 of about 0.3 V in my
    test circuit
    > above -- and that's much worse than the less expensive 2N4401.
    Remember
    > that any voltage drop across the transistor represents power that
    the load
    > isn't getting -- since the available voltage is being divided
    between the
    > load and the switching device. Ideally, the switching device
    would have no
    > voltage drop when on, but that doesn't happen. Lower is better,
    as long as
    > you aren't spending a lot of $ to make it lower than necessary.
    >
    > Whew... There is a lot more to this subject, but I think this is
    > long-winded enough. Hope it helps!
    >
    > Randy
    > www.glitchbuster.com
    >
    > PS -- there are many more good transistors available that work
    well in these
    > applications. I used the part numbers above because they are very
    > well-known, and represent a good value in the common switching
    applications
    > that are often discussed on this list.
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-09 13:27
    Great Post Randy.

    As I mentioned in my original post, the IRL part is overkill in this case.
    However, I've taken to using almost nothing else for two reasons. First, the
    switching characteristics of the FET are almost perfect. The on resistance
    is very low and the gate isolation is very high. Second, I don't have to
    keep a bunch of different things on hand. The IRL part will switch up to 9A
    so I can use it for almost anything we normally handle. Yeah, it might be an
    extra buck -- and if I were building 50 units with 32 switches I might be
    worried about that buck -- but it is sure handy to have one part that
    handles almost anything I normally do. We even have standard "switch boards"
    that let you prototype more rapidly.

    Below 100mA I still favor the 2N2222. I buy those like jelly beans. But I've
    largely abandoned bipolar for switching. Darlingtons, as you mention, have
    way too many problems. Even single transistors can be problematic since the
    beta reduces under several circumstances and you wind up drawing more
    current from the Stamp.

    The 2N7000 is good, although I still favor the IRL series because the gate
    turns on at 5V (as opposed to the IRF which Radio Shack sells). Of course,
    you can use a bipolar to switch the gate voltage, but that reduces the
    benefit and increases the cost.

    So I agree that if you are designing something where you need to mass
    produce, you ought to make a more exacting pick. But for one offs, the big
    MOSFET switches are cheap enough that you can use them without a lot of
    thought process. Since you use more of them, you can buy more of them and
    drive the price down even further.

    Just my thoughts. By the way, the Stamp FAQ has two pretty good articles on
    switching that covers some of this material. Go to
    http://www.wd5gnr.com/stampfaq.htm or more specifically:
    http://www.wd5gnr.com/stampfaq.htm?article=12
    And
    http://www.wd5gnr.com/stampfaq.htm?article=13

    Note that article #12 mentions the IRF510 (which is available at Radio Shack
    although last time I looked they had them marked IFR510). This is not an IRL
    part so it does not fully switch on at 5V which is why we switched to the
    IRL part.

    Regards,

    Al Williams
    AWC
    * Floating point math for the Stamp:
    http://www.al-williams.com/pak1.htm


    >
    Original Message
    > From: Randy Jones [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=fITNl_nOtptmuNPdkIrTA_iaA6hl49vyEJ7ewWtis64het225YzJ8WfoiiW3PZnkMmiLqI4RmLI9fygwYCgR0iNt-s_SeA]randyjones@w...[/url
    > Sent: Tuesday, December 09, 2003 1:49 AM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Using MOSFETs (or not) with Basic stamps & BS2
    > outputs.
    >
    > > Secondly with regards to transistors I was wondering if anyone could
    > > help me select a sutiable transtor (incl base resistor...) that
    > > draws less than 5ma Base current and allows me to control a load
    > > that requires about 100-200 ma.
    >
    >
    > Yes, let's do that. The MOSFETS are great for switching larger currents
    > (and yes, I admit that I also sell them), but for your load of 100 to 200
    > mA, there may be a much better solution...
    >
    > Three very popular small switching transistors are the 2N3904, 2N4401, and
    > 2N7000. The first two are NPN junction transistors, and the 2N7000 is an
    > N-channel MOSFET. All are readily available in the plastic TO-92 case.
    > As
    > you will see, one of these is a great match for your application, and the
    > other two aren't...
    >
    > The NPN junction transistors use a small (base) current to switch a larger
    > load (collector) current, and the MOSFET uses a voltage applied to the
    > gate
    > to control the load current.
    >
    > The "gain" of the NPN transistors is an important concept, and gives an
    > idea
    > how much base current it will take to effectively turn on or "saturate"
    > the
    > transistor for a certain load current. More load current will require
    > more
    > base current, and the amount depends on the gain.
    >
    > Using a single gain figure for a given transistor can be misleading. For
    > example, take a look at the gain figures for a 2N3904 on the second page
    > of
    > this datasheet:
    >
    > http://www.fairchildsemi.com/ds/2N/2N3904.pdf
    >
    > Notice in the ON CHARACTERISTICS section that the DC current gain is
    > listed
    > for a number of different collector (load) currents. As you can see, the
    > gain peaks at around 10 mA of collector current, and goes down as the
    > collector current is increased or decreased. At your load current of 100
    > mA
    > or more, this device will definitely not be at its best.
    >
    > Now take a look at the 2N4401 data sheet (also on page 2 in the same
    > place):
    >
    > http://www.fairchildsemi.com/ds/2N/2N4401.pdf
    >
    > How about that? Peak gain at 150 mA -- right in the middle of your target
    > load current! This might be the one, but let's dig a bit deeper...
    >
    > I just breadboarded the circuit with a 2N4401 connected in a common-
    > emitter
    > configuration. In other words, the emitter is grounded, the base is
    > connected to the I/O pin through a resistor, and the collector is
    > connected
    > to the load. The other side of the load -- which is a 25 ohm resistor --
    > is
    > connected to +5 volts. If the voltage drop across the transistor is
    > reasonably low when it's on or "saturated" then the load current will be
    > nearly 200 mA. I used a 1.0 k ohm base resistor, which will supply just
    > over 4 mA of base current given the base voltage of about .85 volts and
    > the
    > I/O pin output of just under 5 volts.
    >
    > With the transistor on, the voltage drop across the collector-emitter
    > (generally called Vce) is a nice 0.186 volts, which means that most of the
    > power is getting to your load, and not too much is turning into heat in
    > the
    > transistor. Since power = volts x current, the wattage being "dissipated"
    > (turned into heat) in the transistor is 0.186V x 200 mA = 0.04 W -- well
    > under the 0.5 W allowed at ambient temperatures up to 50 deg C, as shown
    > on
    > the lower graph on page 4 of the datasheet.
    >
    > So, what have we seen so far? The 2N3904 is a very popular and useful
    > device, but for switching much more than 10 to 25 mA, it won't be as
    > efficient in terms of base current vs. load current as the 2N4401. The
    > 2N4401 is nice up to 200 mA, and perhaps a bit more -- but then it will
    > begin to go downhill like the 2N3904 did at the lower current. It will no
    > longer be in its "sweet spot."
    >
    > What's next if the load current is well above 200 mA? That's where the
    > IRL520, IRL530, IRL540, etc. MOSFETs begin to look very nice. High-gain
    > NPN
    > Darlington transistors like the TIP120 are also popular, because they can
    > switch much larger currents without needing much base current.
    > Unfortunately, they have a substantial built-in voltage drop between the
    > collector and emitter (Vce, again) that cannot be eliminated no matter how
    > much base current you use. That means that there is less power available
    > to
    > your load, and more heat being dissipated in the transistor. I posted a
    > detailed comparison between the IRL520 and TIP120 on this list last
    > February, and the short version is that the IRL520 blew away the TIP120
    > for
    > common low-speed switching applications at the 1,000 mA load current used
    > for testing.
    >
    > But what about cost -- that usually needs to be considered. The 2N3904
    > and
    > 2N4401 can be had at 12 for 98 cents. TIP120s for .39 each and IRL520s
    > for
    > .68 each. Before the TIP120 starts looking better than the IRL520,
    > consider
    > that in the test I posted last February, the TIP 120 was dissipating
    > *three
    > times* the heat of the IRL520 due to that inescapable high Vce in the
    > Darlingtons -- so you may well need a heat sink for the TIP120 but not for
    > the IRL520. And that changes the economics in favor of the IRL520.
    >
    > And, what about the 2N7000? If you study the data sheet:
    >
    > http://www.fairchildsemi.com/ds/2N/2N7000.pdf
    >
    > -- particularly Fig. 2 on the upper right corner of page 4 -- you'll see
    > that 5 volts at the gate doesn't turn it on nearly as well as 10 volts.
    > According to the graph, with a gate voltage (Vgs) of 5 volts and a load
    > current (Id) of 200 mA (0.2 A), the on resistance will be about 1.5 ohms -
    > -
    > which is not too good for this application. Based on these numbers, there
    > would be a voltage drop across the 2N7000 of about 0.3 V in my test
    > circuit
    > above -- and that's much worse than the less expensive 2N4401. Remember
    > that any voltage drop across the transistor represents power that the load
    > isn't getting -- since the available voltage is being divided between the
    > load and the switching device. Ideally, the switching device would have
    > no
    > voltage drop when on, but that doesn't happen. Lower is better, as long
    > as
    > you aren't spending a lot of $ to make it lower than necessary.
    >
    > Whew... There is a lot more to this subject, but I think this is
    > long-winded enough. Hope it helps!
    >
    > Randy
    > www.glitchbuster.com
    >
    > PS -- there are many more good transistors available that work well in
    > these
    > applications. I used the part numbers above because they are very
    > well-known, and represent a good value in the common switching
    > applications
    > that are often discussed on this list.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-09 13:58
    One important parameter with JBTs used in the switched mode is the
    Forced Beta.
    Normally to insure a proper saturation (lowest Vcesat) is recommended
    to drive the base with a current ten times the specs current gain.

    Also must be noted that when a BJT device is in full saturation, the
    storage times increases considerably.
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 04:19
    Hi Al,

    Yep, the IRL520 is wonderful... I use them here too even when they're
    overkill. It sure is nice to grab a "no-brainer" switching device that is
    perfectly happy with a 5 volt "no current" input and works beautifully with
    so many moderate sized loads. And it's easy to substitute the IRL530 or
    IRL540 if a lower on resistance is worth the slightly higher cost.

    The 2N2222 sure has been a workhorse for years. Interestingly, in the
    Fairchild data sheets for the 2N4401 and PN2222 (a 2N2222 in a plastic TO-92
    housing, for those who might not be familiar with it), all the performance
    graphs for the two devices appear to be 100% identical. Makes me wonder if
    they make one device that meets the extremely similar specs for both part
    numbers, and sell it under the two numbers. I replaced the 2N4401 with a
    PN2222 in that breadboarded circuit and tried some different base and load
    currents, with nearly identical readings.

    The 100 to 200 mA range seems like the place where it makes sense to go from
    a TO-92 part to the IRL520N or something along those lines. I wasn't trying
    to contradict your good suggestion about the IRL520N, and hope it didn't
    appear that way. The question about selecting and using a transistor seems
    fairly common, and I thought I'd try to address some of the considerations
    for selecting one.

    BTW, I like your new PCB book -- just picked up a copy!

    Randy
    www.glitchbuster.com


    Original Message
    From: "Al Williams" <alw@a...>
    To: <basicstamps@yahoogroups.com>
    Sent: Tuesday, December 09, 2003 5:27 AM
    Subject: RE: [noparse][[/noparse]basicstamps] Using MOSFETs (or not) with Basic stamps & BS2
    outputs.


    > Great Post Randy.
    >
    > As I mentioned in my original post, the IRL part is overkill in this case.
    > However, I've taken to using almost nothing else for two reasons. First,
    the
    > switching characteristics of the FET are almost perfect. The on resistance
    > is very low and the gate isolation is very high. Second, I don't have to
    > keep a bunch of different things on hand. The IRL part will switch up to
    9A
    > so I can use it for almost anything we normally handle. Yeah, it might be
    an
    > extra buck -- and if I were building 50 units with 32 switches I might be
    > worried about that buck -- but it is sure handy to have one part that
    > handles almost anything I normally do. We even have standard "switch
    boards"
    > that let you prototype more rapidly.
    >
    > Below 100mA I still favor the 2N2222. I buy those like jelly beans. But
    I've
    > largely abandoned bipolar for switching. Darlingtons, as you mention, have
    > way too many problems. Even single transistors can be problematic since
    the
    > beta reduces under several circumstances and you wind up drawing more
    > current from the Stamp.
    >
    > The 2N7000 is good, although I still favor the IRL series because the gate
    > turns on at 5V (as opposed to the IRF which Radio Shack sells). Of course,
    > you can use a bipolar to switch the gate voltage, but that reduces the
    > benefit and increases the cost.
    >
    > So I agree that if you are designing something where you need to mass
    > produce, you ought to make a more exacting pick. But for one offs, the big
    > MOSFET switches are cheap enough that you can use them without a lot of
    > thought process. Since you use more of them, you can buy more of them and
    > drive the price down even further.
    >
    > Just my thoughts. By the way, the Stamp FAQ has two pretty good articles
    on
    > switching that covers some of this material. Go to
    > http://www.wd5gnr.com/stampfaq.htm or more specifically:
    > http://www.wd5gnr.com/stampfaq.htm?article=12
    > And
    > http://www.wd5gnr.com/stampfaq.htm?article=13
    >
    > Note that article #12 mentions the IRF510 (which is available at Radio
    Shack
    > although last time I looked they had them marked IFR510). This is not an
    IRL
    > part so it does not fully switch on at 5V which is why we switched to the
    > IRL part.
    >
    > Regards,
    >
    > Al Williams
    > AWC
    > * Floating point math for the Stamp:
    > http://www.al-williams.com/pak1.htm
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 04:34
    I probably should have included a paragraph mentioning the importance of
    running several times the calculated base current based on the beta. Ten
    times may be good insurance for variations between component batches or even
    manufacturers when the lowest possible Vsat is required, but I've had good
    success with 2.5 to 5 times in many cases. In the example I discussed, it
    is probably about 4 times at a 100 mA load current, and about 2 times at 200
    mA load current. Feeling a little uncomfortable at the 200 mA load current,
    I tried doubling the base current -- but the Vsat only changed very slightly
    so I stayed with the original 4+ mA. For a one-off project that would not
    be operated under extreme conditions, I'd feel (barely) comfortable with
    that -- but definitely not for a product that would be subject to greater
    production and user variables.

    Randy
    www.glitchbuster.com


    Original Message
    From: "Albert Catano" <acatano2002@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Tuesday, December 09, 2003 5:58 AM
    Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic stamps & BS2
    outputs.


    > One important parameter with JBTs used in the switched mode is the
    > Forced Beta.
    > Normally to insure a proper saturation (lowest Vcesat) is recommended
    > to drive the base with a current ten times the specs current gain.
    >
    > Also must be noted that when a BJT device is in full saturation, the
    > storage times increases considerably.
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 06:35
    Hey guys,

    Any ideas on how much current the Backlight on a LCD display
    actually draws? What sort of transistor and base resistor would I
    use to drive this from a controller like a preprogrammed PIC?

    BTW thanks for hte info on using mosfets and transistors. [noparse]:)[/noparse]

    Arridh





    --- In basicstamps@yahoogroups.com, "Randy Jones" <randyjones@w...>
    wrote:
    > I probably should have included a paragraph mentioning the
    importance of
    > running several times the calculated base current based on the
    beta. Ten
    > times may be good insurance for variations between component
    batches or even
    > manufacturers when the lowest possible Vsat is required, but I've
    had good
    > success with 2.5 to 5 times in many cases. In the example I
    discussed, it
    > is probably about 4 times at a 100 mA load current, and about 2
    times at 200
    > mA load current. Feeling a little uncomfortable at the 200 mA
    load current,
    > I tried doubling the base current -- but the Vsat only changed
    very slightly
    > so I stayed with the original 4+ mA. For a one-off project that
    would not
    > be operated under extreme conditions, I'd feel (barely)
    comfortable with
    > that -- but definitely not for a product that would be subject to
    greater
    > production and user variables.
    >
    > Randy
    > www.glitchbuster.com
    >
    >
    >
    Original Message
    > From: "Albert Catano" <acatano2002@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Tuesday, December 09, 2003 5:58 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic
    stamps & BS2
    > outputs.
    >
    >
    > > One important parameter with JBTs used in the switched mode is
    the
    > > Forced Beta.
    > > Normally to insure a proper saturation (lowest Vcesat) is
    recommended
    > > to drive the base with a current ten times the specs current
    gain.
    > >
    > > Also must be noted that when a BJT device is in full saturation,
    the
    > > storage times increases considerably.
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 07:16
    Hi Arridh,

    What kind of LCD are you using... size and/or part number? I've seen some
    LCD backlights draw around 80 mA, as I recall, but yours could be quite a
    bit more or less than that.

    Do you have a multi-meter that you could use to measure the current? If
    not, but you have a voltmeter, you could place a 1.0 ohm or 0.1 ohm resistor
    in series with the power wire to the backlight and measure the voltage drop
    across the resistor. Use ohms law to determine the current: I (current) =
    V/R. So, if you read 0.095 volts across a 1 ohm resistor, you would have
    0.095 V/1.0 ohm = 0.095 A (95 mA). The idea is to use a resistor that is
    small enough so it isn't a big percentage of your main load resistance, but
    not so small that you aren't able to get a good reading with your meter.
    One ohm would probably be fine for this application.

    If you're under 100 mA, a 1 k ohm base resistor with a 2N4401, PN2222, or
    2N2222 should be fine. From 100 mA to 150 mA, you might want to increase
    the base current by using a resistor around 500 ohms or so.

    Randy
    www.glitchbuster.com


    Original Message
    From: "arridh_shashank" <arridh_shashank@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Tuesday, December 09, 2003 10:35 PM
    Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic stamps & BS2
    outputs.


    > Hey guys,
    >
    > Any ideas on how much current the Backlight on a LCD display
    > actually draws? What sort of transistor and base resistor would I
    > use to drive this from a controller like a preprogrammed PIC?
    >
    > BTW thanks for hte info on using mosfets and transistors. [noparse]:)[/noparse]
    >
    > Arridh
    >
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Randy Jones" <randyjones@w...>
    > wrote:
    > > I probably should have included a paragraph mentioning the
    > importance of
    > > running several times the calculated base current based on the
    > beta. Ten
    > > times may be good insurance for variations between component
    > batches or even
    > > manufacturers when the lowest possible Vsat is required, but I've
    > had good
    > > success with 2.5 to 5 times in many cases. In the example I
    > discussed, it
    > > is probably about 4 times at a 100 mA load current, and about 2
    > times at 200
    > > mA load current. Feeling a little uncomfortable at the 200 mA
    > load current,
    > > I tried doubling the base current -- but the Vsat only changed
    > very slightly
    > > so I stayed with the original 4+ mA. For a one-off project that
    > would not
    > > be operated under extreme conditions, I'd feel (barely)
    > comfortable with
    > > that -- but definitely not for a product that would be subject to
    > greater
    > > production and user variables.
    > >
    > > Randy
    > > www.glitchbuster.com
    > >
    > >
    > >
    Original Message
    > > From: "Albert Catano" <acatano2002@y...>
    > > To: <basicstamps@yahoogroups.com>
    > > Sent: Tuesday, December 09, 2003 5:58 AM
    > > Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic
    > stamps & BS2
    > > outputs.
    > >
    > >
    > > > One important parameter with JBTs used in the switched mode is
    > the
    > > > Forced Beta.
    > > > Normally to insure a proper saturation (lowest Vcesat) is
    > recommended
    > > > to drive the base with a current ten times the specs current
    > gain.
    > > >
    > > > Also must be noted that when a BJT device is in full saturation,
    > the
    > > > storage times increases considerably.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 10:43
    My LCD disp is a 20char X 4 line display
    Its cool I worked it out as you said
    thnx
    Arridh


    --- In basicstamps@yahoogroups.com, "Randy Jones" <randyjones@w...>
    wrote:
    > Hi Arridh,
    >
    > What kind of LCD are you using... size and/or part number? I've
    seen some
    > LCD backlights draw around 80 mA, as I recall, but yours could be
    quite a
    > bit more or less than that.
    >
    > Do you have a multi-meter that you could use to measure the
    current? If
    > not, but you have a voltmeter, you could place a 1.0 ohm or 0.1
    ohm resistor
    > in series with the power wire to the backlight and measure the
    voltage drop
    > across the resistor. Use ohms law to determine the current: I
    (current) =
    > V/R. So, if you read 0.095 volts across a 1 ohm resistor, you
    would have
    > 0.095 V/1.0 ohm = 0.095 A (95 mA). The idea is to use a resistor
    that is
    > small enough so it isn't a big percentage of your main load
    resistance, but
    > not so small that you aren't able to get a good reading with your
    meter.
    > One ohm would probably be fine for this application.
    >
    > If you're under 100 mA, a 1 k ohm base resistor with a 2N4401,
    PN2222, or
    > 2N2222 should be fine. From 100 mA to 150 mA, you might want to
    increase
    > the base current by using a resistor around 500 ohms or so.
    >
    > Randy
    > www.glitchbuster.com
    >
    >
    >
    Original Message
    > From: "arridh_shashank" <arridh_shashank@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Tuesday, December 09, 2003 10:35 PM
    > Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic
    stamps & BS2
    > outputs.
    >
    >
    > > Hey guys,
    > >
    > > Any ideas on how much current the Backlight on a LCD display
    > > actually draws? What sort of transistor and base resistor would I
    > > use to drive this from a controller like a preprogrammed PIC?
    > >
    > > BTW thanks for hte info on using mosfets and transistors. [noparse]:)[/noparse]
    > >
    > > Arridh
    > >
    > >
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "Randy Jones"
    <randyjones@w...>
    > > wrote:
    > > > I probably should have included a paragraph mentioning the
    > > importance of
    > > > running several times the calculated base current based on the
    > > beta. Ten
    > > > times may be good insurance for variations between component
    > > batches or even
    > > > manufacturers when the lowest possible Vsat is required, but
    I've
    > > had good
    > > > success with 2.5 to 5 times in many cases. In the example I
    > > discussed, it
    > > > is probably about 4 times at a 100 mA load current, and about 2
    > > times at 200
    > > > mA load current. Feeling a little uncomfortable at the 200 mA
    > > load current,
    > > > I tried doubling the base current -- but the Vsat only changed
    > > very slightly
    > > > so I stayed with the original 4+ mA. For a one-off project
    that
    > > would not
    > > > be operated under extreme conditions, I'd feel (barely)
    > > comfortable with
    > > > that -- but definitely not for a product that would be subject
    to
    > > greater
    > > > production and user variables.
    > > >
    > > > Randy
    > > > www.glitchbuster.com
    > > >
    > > >
    > > >
    Original Message
    > > > From: "Albert Catano" <acatano2002@y...>
    > > > To: <basicstamps@yahoogroups.com>
    > > > Sent: Tuesday, December 09, 2003 5:58 AM
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Using MOSFETs (or not) with Basic
    > > stamps & BS2
    > > > outputs.
    > > >
    > > >
    > > > > One important parameter with JBTs used in the switched mode
    is
    > > the
    > > > > Forced Beta.
    > > > > Normally to insure a proper saturation (lowest Vcesat) is
    > > recommended
    > > > > to drive the base with a current ten times the specs current
    > > gain.
    > > > >
    > > > > Also must be noted that when a BJT device is in full
    saturation,
    > > the
    > > > > storage times increases considerably.
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-10 10:44
    We had a product with the 4401 and 4403 on it, and I started using them
    in place of the 2N2222 and its mate -- works well.Hopefully they will
    work on the BS1 serial adapter as well.


    > The 2N2222 sure has been a workhorse for years. Interestingly, in the
    > Fairchild data sheets for the 2N4401 and PN2222 (a 2N2222 in a plastic TO-92
    > housing, for those who might not be familiar with it), all the performance
    > graphs for the two devices appear to be 100% identical. Makes me wonder if
    > they make one device that meets the extremely similar specs for both part
    > numbers, and sell it under the two numbers. I replaced the 2N4401 with a
    > PN2222 in that breadboarded circuit and tried some different base and load
    > currents, with nearly identical readings.
    >
    > The 100 to 200 mA range seems like the place where it makes sense to go from
    > a TO-92 part to the IRL520N or something along those lines. I wasn't trying
    > to contradict your good suggestion about the IRL520N, and hope it didn't
    > appear that way. The question about selecting and using a transistor seems
    > fairly common, and I thought I'd try to address some of the considerations
    > for selecting one.
    >
    > BTW, I like your new PCB book -- just picked up a copy!
    >
    > Randy
    > www.glitchbuster.com
    >
    >
    >
    Original Message
    > From: "Al Williams" <alw@a...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Tuesday, December 09, 2003 5:27 AM
    > Subject: RE: [noparse][[/noparse]basicstamps] Using MOSFETs (or not) with Basic stamps & BS2
    > outputs.
    >
    >
    > > Great Post Randy.
    > >
    > > As I mentioned in my original post, the IRL part is overkill in this case.
    > > However, I've taken to using almost nothing else for two reasons. First,
    > the
    > > switching characteristics of the FET are almost perfect. The on resistance
    > > is very low and the gate isolation is very high. Second, I don't have to
    > > keep a bunch of different things on hand. The IRL part will switch up to
    > 9A
    > > so I can use it for almost anything we normally handle. Yeah, it might be
    > an
    > > extra buck -- and if I were building 50 units with 32 switches I might be
    > > worried about that buck -- but it is sure handy to have one part that
    > > handles almost anything I normally do. We even have standard "switch
    > boards"
    > > that let you prototype more rapidly.
    > >
    > > Below 100mA I still favor the 2N2222. I buy those like jelly beans. But
    > I've
    > > largely abandoned bipolar for switching. Darlingtons, as you mention, have
    > > way too many problems. Even single transistors can be problematic since
    > the
    > > beta reduces under several circumstances and you wind up drawing more
    > > current from the Stamp.
    > >
    > > The 2N7000 is good, although I still favor the IRL series because the gate
    > > turns on at 5V (as opposed to the IRF which Radio Shack sells). Of course,
    > > you can use a bipolar to switch the gate voltage, but that reduces the
    > > benefit and increases the cost.
    > >
    > > So I agree that if you are designing something where you need to mass
    > > produce, you ought to make a more exacting pick. But for one offs, the big
    > > MOSFET switches are cheap enough that you can use them without a lot of
    > > thought process. Since you use more of them, you can buy more of them and
    > > drive the price down even further.
    > >
    > > Just my thoughts. By the way, the Stamp FAQ has two pretty good articles
    > on
    > > switching that covers some of this material. Go to
    > > http://www.wd5gnr.com/stampfaq.htm or more specifically:
    > > http://www.wd5gnr.com/stampfaq.htm?article=12
    > > And
    > > http://www.wd5gnr.com/stampfaq.htm?article=13
    > >
    > > Note that article #12 mentions the IRF510 (which is available at Radio
    > Shack
    > > although last time I looked they had them marked IFR510). This is not an
    > IRL
    > > part so it does not fully switch on at 5V which is why we switched to the
    > > IRL part.
    > >
    > > Regards,
    > >
    > > Al Williams
    > > AWC
    > > * Floating point math for the Stamp:
    > > http://www.al-williams.com/pak1.htm
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-11 09:06
    From: "Randy Jones" <randyjones@w...>
    > [noparse][[/noparse]...] any voltage drop across the transistor represents power that the
    > load isn't getting -- since the available voltage is being divided between
    > the load and the switching device. Ideally, the switching device would
    > have no voltage drop when on, but that doesn't happen.
    >
    Well, that's essentially the case with relays, but of course they deviate
    from the ideal in other ways. Like costing more...

    Gary
Sign In or Register to comment.