Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to calculate the transistor base resistor value?

Status
Not open for further replies.

AlainB

Member
Hi,

My parallel port output 4,8 volts. For instance, if I want to use a TIP121 for driving a stepper motor, I will put a 1K resistor betwen the base and the computer pin. Not because I know what I am doing, just beacause I saw it somewhere. If I don't put any resistor, it will work the same anyway.
Both ways could be good or bad, I don,t know.

Could you explain what is needed to calculate the right resistor values for any transistors used that way. I am looking for values for hard switching application only. If this information is needed, the transistors would be used as power stage for a 5,2 volts 1,4 amp. unipolar stepper motor

Here are 2 datasheets.

TIP121:
https://www.ortodoxism.ro/datasheets/stmicroelectronics/4128.pdf

BUL45:
www.onsemi.com/pub_link/Collateral/BUL45-D.PDF

Where is the informations needed on those datasheets?

Thanks for any help.

Alain
 
Hi,
The resistor is to limit the current flowing in the base of the transistor. Ib = (Vparallelout - Vbe) / Rb
Note that the output current from the parallel port is very low, I don't know how much is that.
Choose the transistor according to the current required by the motor. For example, if the motor requires 1 A, choose the NPN transistor with Ic more than 1 A. And for the current gain, beta, say it is 1000 for darlington pair, so Ib required is 1 mA. Then get the resistor according to the equation. Bear in mind that the base current, Ib cannot be more than the current sourced by the parallel port.
 
AlainB said:
Could you explain what is needed to calculate the right resistor values for any transistors used that way. I am looking for values for hard switching application only.
For switching, as a rule of thumb for regular transistors, you size the base resistor so that the base current is 0.1 of the required collector current. Since darlingtons are made from two cascaded transistors, you size the base resistor so that the base current is 0.01 of the required collector current. This will ensure that the transistor saturates when it turns on and has the lowest possible voltage drop across it.
Ib = (Vparallelout - Vbe) / Rb
As per Banana's formula above a darlington will have a Vbe of 1.4V and a regular transistor a Vbe of 0.7V. Also remember that the parallel port will probably put out less than 4.8 volts when it is loaded by the base resistor so there will be some guesstimating. ;)
 
The TIP121 datasheet specifies Vce(sat) with forced beta=250. For Ic=1.4A, you need Ib=1.4/250=5.6mA. Typical Vbe(sat) at Ic=1.4A is, from the graph below, about 1.6V. (4.8V-1.6V)/5.6mA = 571 ohms. Use 560, the next lowest standard value.
 

Attachments

  • TIP121 sat voltages.png
    TIP121 sat voltages.png
    10.1 KB · Views: 893
bananasiong said:
Can the parallel port source 5.6 mA?
**broken link removed**.
The output of the Parallel Port is normally TTL logic levels. The voltage levels are the easy part. The current you can sink and source varies from port to port. Most Parallel Ports implemented in ASIC, can sink and source around 12mA. However these are just some of the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so the least current is drawn from the Parallel Port.
I think I would try around 820 ohms to ground. If the port output voltage drops significantly, I would add a buffer. He could use a 74HCT244, keeping in mind that I am not a parallel port expert.:)

EDIT: If I was designing a product, I would definitely add a buffer.
 
Last edited:
bananasiong said:
Can the parallel port source 5.6 mA?

I'd say NO. On many mainboards all data lines into and out of the UART are terminated with 1K resistor just as a precaution not to fry the UART caused by false connections.

Connect an external 1K resistor to any data line you force high (1) and measure the voltage across it. If the 1K resistor is built in the voltage measured decreases from 4.8 to approx. 2.5V.

Use a buffer to drive the power transistor. That will be safe and won't invert the signals.

Boncuk
 
Roff
EDIT: If I was designing a product, I would definitely add a buffer
Hi,
I would also recommend a buffer, as the ports do vary in their ability to source/sink.

The drawing shows a simple way to buffer for an LED/opto, a 2N7000 fet also is an easy way to buffer, allow for the inversion in the software.
 
Last edited:
use buffer for what reason? so he can isolate his circuit from the serial port and protect the port from damage?

thanks.
 
whiz115 said:
use buffer for what reason? so he can isolate his circuit from the serial port and protect the port from damage?

thanks.

Hi Whiz,
I am speaking about the parallel port on the PC.

Some PC's have got the driving 'power' to work some external circuits correctly.:)
 
The parallel port may not provide much current, the buffer is used to obtain the same logic level and to provide much current (at least the current value is known).
 
ericgibbs said:
Hi,
I would also recommend a buffer, as the ports do vary in their ability to source/sink.

The drawing shows a simple way to buffer for an LED/opto, a 2N7000 fet also is an easy way to buffer, allow for the inversion in the software.

Just to add: with a 6N137 there are the options of wiring straight through and inversion.
 
ericgibbs said:
Hi,
I would also recommend a buffer, as the ports do vary in their ability to source/sink.

The drawing shows a simple way to buffer for an LED/opto, a 2N7000 fet also is an easy way to buffer, allow for the inversion in the software.

Just to add: with a 6N137 there are the options of wiring straight through and inversion. It requires only 7.5mA.
 
Why not just use a FET? There are lots of logic-level FET's that will turn on at >3V and no issues with current draw on the gate. Just stick a 100R resistor between the parallel port pin and the gate to limit current demand when switching.
 
speakerguy79 said:
Why not just use a FET? There are lots of logic-level FET's that will turn on at >3V and no issues with current draw on the gate. Just stick a 100R resistor between the parallel port pin and the gate to limit current demand when switching.

a 2N7000 fet also is an easy way to buffer, allow for the inversion in the software

The 2N7000 FET can also be used as an open drain to drive into a port pin, useful if you have a CMOS type ic output pin, eg: MCP3202, the PC software corrects for the inversion.
 
Status
Not open for further replies.

Latest threads

Back
Top