SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By fredriknyman
I'm looking at the example at ... _Drive_LED but I'm not sure I follow it.

Could someone please check my understanding?

Given: Vcc = 3.6V on the EXP-MSP4320G2 board

First off, from the article, "When picking a transistor, its datasheet must be analyzed for its characteristic values.".
Any idea why was the PN2369 chosen? I'm not sure what characteristics the author was looking for when he chose that part.

Second, Ra is the current limiting resistor. Formula: Ra =(Vcc - Vf - Vcesat) / If
Vf and If are from LED datasheet, let's call it 2V and 10 mA using the article examples.
Vcesat is from the transistor datasheet. For the PN2369 used, the datasheet says that it's 0.25V max.

Plugging in the numbers, we get Ra = (3.6V - 2.0V - 0.25V) / 0.010 A = 1350 ohm

Is this right -- that is, do I plug in the maximum Vcesat value from the datasheet?

Third, Rb is the base resistor sitting between the transistor base and the MCU GPIO.

From the formula, Rb = [(Vcc - 0.3) - Vbe] / Ib

Where (Vcc - 0.3) comes from the processor datasheet, Voh = high-level output voltage on output ports.
Vbe is given in the transistor datasheet as 0.7 V min, 0.85 V max, so let's call it 0.8 V
Beta is given in the transistor datasheet as 5 (listed as Hfe)

Ib is the current the MCU can drive (source) and the reason we're fussing with the transistors in the first place.
Ib isn't given, but in the linked article and the datasheet (for the msp430g2553), we read that "The maximum total current, I(OHmax) and I(OLmax), for all outputs combined should not exceed ±48 mA to hold the maximum voltage drop specified." Let's assume worst case and have 24 output pins, which would give Ib = 48 mA / 24 output pins = 2 mA

This gives Rb = (3.6 - 0.3 - 0.8) / 0.002 = 1250 ohm

But in the article, a 2K2 resistor is used. Where did I go wrong?

Fourth, if I work backwards and compute Ib = Ic / Beta and use Beta = 5 (from transistor datasheet) I still get Ib = 2 mA and the same result as above.


User avatar
By viskr
When you are driving LEDs or loads that are typically on or off, you just want to saturate the transistor.

As to why they chose the PN2369, you would have to ask the author as it is not very common. A more common choice would be a 2N2222 which is made by everyone and can be found lots of places including here at SF.

So the DC beta at 10 mA is spec'd at 75, but most of the time you just overdrive the base, and 2.15K was shown, though 2.2K would be the standard.

The max value would be
Voh - Vbe / 10 mA *75
more like 22.5K
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]