×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Base resistors needed for saturated transistors?
8

Base resistors needed for saturated transistors?

Base resistors needed for saturated transistors?

(OP)
Are resistors needed between the transistors and the PIC microcontroller in the diagram below?


Each transistor will be driving a variable load (actually, multiplexed LEDs) from 0 A to 1.25 A in saturation.  The LEDs are connected in series to current-limiting resistors, so the current between the collector and the emitter terminals will be not be exceeded. I am worried about whether the base current would destroy the transistor, since there are no resistors... Does the base draw current when the transistor is "off" (Vc = Ve = +5V, while Vb = 0V)?

Thanks in advance!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Hi, you allways need a base resistor to limit current. In your circuit there is not enough output voltage from the pic to turn the transistors off, so your circuit wont work anyway.

RE: Base resistors needed for saturated transistors?

2
Why would you think that you could run 5V forward bias across a base-emitter junction?

TTFN



RE: Base resistors needed for saturated transistors?

(OP)
To turn the transistor off, can I TRIS the port pins to inputs, so that the pins would present a high-impedance to the transistor and thus not sink any current?

The datasheet says the maximum Vbe is 5V... I guess the low output of the PIC would be around 0.6V because of the high current? How much current would the base source?

Thanks in advance!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Max Vbe rating is REVERSE breakdown.  Base current is proportional to eVbe/(kT/q).  Vbe is normally around 0.7V; you can do the math.

I suggest that you review some basic transistor theory before wiping out a cadre of innocent transistors.

TTFN



RE: Base resistors needed for saturated transistors?

Hi, well you could do that but first check the datasheet to make sure its allowed and that the input leakage isn't too high. As you want to switch 1.5A you will find your allready at the upper limit of a PIC/single transistor output stage so you'll probably have to use a 2 transistor output anyway. You also could do with a base-emitter resistor as well unless you are prepared to tolerate dimly lit "off" leds.

RE: Base resistors needed for saturated transistors?

The only way you will turn those transistors off in that circuit is to apply +5V to the base.  (Reduce Vbe to 0). The data sheet should not say the max Vbe is 5V it should say the max Veb is 5V.  The max Vbe is always less than 1V as typically only 0.6V is needed to turn the transistor on.

RE: Base resistors needed for saturated transistors?

(OP)
Thank you all for the information. I have not had to work with transistors much. (IRstuff, I have learnt to use electronic components through their destruction. blllttt)

The reason I thought the transistors could be connected directly to the microcontroller pins was because the emittor of the first transistor in a Darlington pair is directly connected to the base of the second without any resistors.

I shall add the resistors between the PIC and the transistors. From the datasheet, I can get close to 1.25 A with around 25 mA of base current at a Vce-sat of around 0.3 V.

Will there be a current between the collector and the emittor terminals if the base is left floating (when the PIC pins are set as inputs)? How much current will be sourced or sunk by the PIC in that state?

Thanks in advance!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

This is a bad circuit and is not going to work.

You will never get those transistors to switch off until you reduce Vbe to 0, ie raise the base to 5V the same as the emitter.

It is also bad design to ever have an open circuit base as leakage current (Icbo) and noise can cause the transistor to conduct.

A practical way to make this work is to use NPN transistors, connect the emitters to ground, use a base limiting resistor and one to ground and put the collector load resistors to +5V.

RE: Base resistors needed for saturated transistors?

Brain is correct mrkenneth (like everyone else 4 that matter)  Remember just because you can draw 25mA from one PIC Pin doesn't mean you can do it from a truckload of them.  Look at the PIC specs you will see a TOTAL limit per port and per chip.

Also as you drag more current out of a pin the voltage on the pin drops rapidly.  If the PIC is sucking the current into a pin then the voltage on the pin rises ...a lot...

Just get a handful of these.  Put them in Source to ground.
Hook the Gate directly to the PICs use the Drains on your LEDs.  Add a current limit in series with the LED.  Have a blast while not thrashing the PIC.

A lot of other FETs would do to..



RE: Base resistors needed for saturated transistors?

Yup, to make it easy and simple, follow itsmoked advice, otherwise it will smoke!  P-Mosfets will enable you to do the job easily.  Search for logic-level P-Mos.

RE: Base resistors needed for saturated transistors?

I hate to be a dissident, but if the PIC is run from +5V then it should be workable (provided resistors are used in series with the PIC outputs). The PIC outputs will go all the way up to the power rail, definitely turning the transistors off. The 25mA base current is presumably only on one transtor at a time because this is a multiplexed LED drive circuit.

RE: Base resistors needed for saturated transistors?

Your right logbook, I don't think anyone thinks differently. He's still going to have trouble getting the needed output current unless he can find a high gain power transistor.

RE: Base resistors needed for saturated transistors?

(OP)
Thank you for all the advice. I am not able to run the PIC off 5 V, unfortunately, because all of the pins are used so I am using the regulated 3.3-V rails as the reference for the onboard A/D convertor.

I should have been more detailed and clear in describing my application in the original post. I have created the following schematic that I hope will clarify the circuit:


The PIC will be controlling an 8 x 8 LED matrix, with eight pins driving an 8-channel NPN Darlington IC and another eight pins driving a set of PNP transistors. (I have only shown one PNP transistor simplify the schematic.) Only one PNP transistor will be driven at any time.

Can I add pull-up resistors at the base of the PNP transistors so that when the PIC pin is set as an input, the pull-up resistor would raise Vb to +5 V? I can just use a bussed SIP resistor for all eight pins.

I am planning to use the MPS751 PNP transistor, which should be able to output 1 A from 25 mA with a Vce of under 1 V.

If the bipolar transistors do not work out, I guess I will try itsmoked suggestion to use FETs. I would prefer to use the smaller TO-92 packages and reduce the cost at the same time. smile

Thanks in advance!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Hi, 8 leds at 160ma each is 1.2A (ish). Take the datasheet for your transistor print out figure 6 and draw in the 1.2A saturation curve. Notice at 25mA base current you are on the corner of the line, you really need to be on the flatish part to the right, they are typical values imagine how much worse it is for a worst case device. Have you checked the PIC datasheet for the input leakage current for 5v input on 3.3v supply? Do you really want to run your PIC outputs at their datasheet maximums? You will need a base-emitter resistor.

RE: Base resistors needed for saturated transistors?

You need to at least 3 diodes in series with the base to come close to being able to shut off the PNP.   A pullup alone will not work.  The high-side drive in CMOS would be a P-channel device, whose drain will forward bias above about 4V on the output.  This is bad for a number of reasons.

Alternately, you need to run from an open collector driver with a pullup to 5V.

TTFN



RE: Base resistors needed for saturated transistors?

I sure understand the fixation on BJTs... and all the resistors and diodes, etc. etc.

RE: Base resistors needed for saturated transistors?

(OP)
Thanks for the analysis cbarn24050. I was interpolating Figure 6 for the Vce value too... Perhaps I will have to reduce the LED current... The LEDs will be off most of the time, so I guess they would dim when all of them turn on?

The datasheet for the PIC says that the leakage current is +/-1 uA, but only when the voltage at the pin is between Vss and Vdd...

Do you think I can place a ULN2803A "sink driver" between the PIC and the PNP transistors as an extra gain stage? The leakage current of the device at 85 degrees Celcuis is 100 uA maximum.

IRstuff, doesn't a PIC pin act like an open collector when it is set as an input?

itsmoked, sorry, I have never used FETs before... Not that I have used BJTs much either. sad I just looked at Digikey and all of the FETs that can handle 1.2 A are more than three times more expensive than BJTs. sad

I have added a pull-up resistor to the schematic below:


Thanks again to everybody!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Putting the 2803 to drive the pnp transistor will work well but any small npn transistor would do equally well.

RE: Base resistors needed for saturated transistors?

Still won't work.  The low end of R1 will be tied to about 4V.

If the output has an active pullup, then just because you tell it to turn off does not remove it from the circuit.  The drain connection to the p-channel device is still there.

TTFN



RE: Base resistors needed for saturated transistors?

A simple and cheap solution is to use Darlington PNP's instead of simple transistors. To turn them on, you will need only 3...5 mA (usual gain is over 1K) instead of 25mA - which is the maximum sink current for the PIC output.
To turn them off, I'd suggest two things:
1 - Use the TRIS register to set the port to an input and leave the data register filled with 0's;
2 - You'll still have a leakage current of about 1µA, which gives around 0.12 mA on LED's. Not a lot, but they may still be visible in the dark (you can test it); to avoid this, add some 10K? resistors between base and emitter (R10 in the previous figure).
Resistor R1 (output->base) can be 470-1000 ?, depending of the gain of the darlingtons. For ß=1000 a 680? is a good choice.

RE: Base resistors needed for saturated transistors?

(OP)
Thank you for all of the suggestions!

I have looked at some MOSFETs, but found that using a gate voltage of only 3.3 V would result in a very low drain-source current.

In the end, I am using sisif's recommendations of using Darlington transistors. Actually, I plan to use Darlington NPN transistors for the 1.2 A side and some cheap PN2907A PNP transistors for the 150 mA side, because using two Darlington transistors would result in too great of a dropout voltage. The light leakage should not be a nuissance.

Thank you all again!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

I checkd the microchip site but I cant find the part no you quoted, however all the other pics have a diode between the output pin and vdd which means you will not be able to switch off the darlington transistors.

RE: Base resistors needed for saturated transistors?

(OP)
Sorry, the actual part number of the microcontroller is PIC16F687 (datasheet: http://ww1.microchip.com/downloads/en/devicedoc/41262a.pdf)

You are right about the clamp diode to Vdd and to Vss! I guess I will have to power the PIC from the same 5-V supply as the LEDs.

Thank you cbarn24050 for the reminding me of the diode. (Too bad I can only give each member one star...) I was already starting to design the circuit.

Thanks again to everybody!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Oh, yeah... In addition to the substrate diode, the I/O pins would have the ESD protection diodes.

TTFN



RE: Base resistors needed for saturated transistors?

Oh, here's that graph I did on the current loading of a PIC's output pin.  You might find it useful in your calcs.



Keith Cress
Flamin Systems, Inc.- <http://www.flaminsystems.com> - kcress@<solve this puzzle>

RE: Base resistors needed for saturated transistors?

(OP)
Thank you itsmoked! Very useful data! Too bad Microchip does not include these characteristics in their 300+ page datasheets. The voltage drop is more than I expected... I guess the curve would be similar for the DIP package and for the low output.

What happened after 25 mA? blllttt

Thanks again!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

<What happened after 25 mA?>

Not a lot, the bond wire melted. clown

RE: Base resistors needed for saturated transistors?

That's what I was expecting ...  They're like 60AWG..

Keith Cress
Flamin Systems, Inc.- <http://www.flaminsystems.com> - kcress@<solve this puzzle>

RE: Base resistors needed for saturated transistors?

It would be nice if MC would put a little star on their datasheet and a footnote mentioning something simple, like "Output voltage will drop approximately 60mV per mA of output current." , but that would be too unscientific ;)

Dan
Owner
http://www.Hi-TecDesigns.com

RE: Base resistors needed for saturated transistors?

HI Macgyvers, my data sheet for the PIC16F870 has numerous graphs showing the output characteristics for various conditions. I can't speak for the others but I would be suprised if they didn't show them as well.

RE: Base resistors needed for saturated transistors?

(OP)
Thank you Yashu! Using those would make my project so much easier and even reduce the cost! One of the TPIC costs less than eight discrete transistors/FETs, and I save the resistors too! Why is the TPIC listed under the category of Temperature Sensors and Control ICs? The ICs seem better suited for the Logic or the Interface category...

It looks like they only offer open-drain devices though, so I guess I would still have to use some PNP transistors or P-channel FETs.

Quote (cbarn24050):

my data sheet for the PIC16F870 has numerous graphs showing the output characteristics for various conditions.
This is the first time that I have seen such graphs from Microchip! All of the other PICs that I have used (PIC16F687, PIC18F4520, PIC18F4550, and others) just say:
"Graphs and tables are not available at this time." under the section DC AND AC CHARACTERISTICS GRAPHS AND TABLES. Shouldn't all of the PICs have similar characteristics?

Thanks all!

---------------------------------------------------------
Operation Radiation: http://www.mrkenneth.com

RE: Base resistors needed for saturated transistors?

Well I guess I must have been lucky, you could allways download it to use as a guide untill microchip update the datasheets for your device. I didnt think there were any TPIC devices that would answer your problem, certainly not as cheaply, bear in mind that many of these devices are not made anymore.

RE: Base resistors needed for saturated transistors?

mrkenneth; have you got your circuit sorted out?

I think you're very close with the last schematic you posted. Just stick a driver IC (the TI part would work) between your PIC and the PNP transistors like you first questioned. All else can stay the same and this will compensate for the voltage difference.

The last display circuit I looked at was connected to a PIC16C77. It used a common anode display (the +ve terminal is common to all segments). There was a MMBT3906 transistor with a 1k base resistor connected to the PIC that switched the positive side. There were 8 - 220ohm resistors from each segment to the port pins for the negative side. This was a 3 segment display that was multiplexed and it worked fine. The PIC and display were both connected to the same 5V power supply.


RE: Base resistors needed for saturated transistors?

Mrkenneth,
I have a suggestion to simplfiy your circuit:

Get rid of all the transistors.
Replace the 2903 (I actually worked on this part a long
time ago when I was at Allegro).  It was designed for a printer source driver for the inkjet heads.  
If you search www.allegromicro.com you'd find they have LED drivers that can sink a lot current.  They are designed for driving LEDs and relays.  They come with serial or parallel inputs.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources