calculating series and pullup resistance needed

For users of Matrix Multimedia Electronics software to discuss projects, circuits and any other electronics concepts.

Moderators: Benj, Mods

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

calculating series and pullup resistance needed

Postby Ondra » Tue Jan 15, 2008 5:55 pm

I would like to know if anyone can help me. I am working on a project. And I need to get the resistance values
of a series and pullup resistor in three applications. In the first situation I am using a PIC microcontroller powered at 5V
connected to a fairchild 2N3906 PNP transistor used to control a relay drawing 30 milliamps at 5V.
In the second situation I am using a PIC microcontroller powered at 5V connected to a fairchild 2N3906 PNP transistor used to control
an LED drawing 10 milliamps at 5 volts.
In the third situation I have a active low output from a 3.6V powered modem connected to a fairchild 2N3906 PNP transistor used
to control a an LED drawing 10 milliamps at 5 volts.

Thanks in advance for any help you can give.


Ondra Simons

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: calculating series and pullup resistance needed

Postby Sean » Wed Jan 16, 2008 5:49 pm

Hello Ondra

The simple calculation for the base current of the transistor is collector current/hfe.
hfe for the 2N3906 is anywhere between 30 and 300. For your applications the transistors are being used as switches so they can be driven into saturation.
Using the hfe figure of 30, the base current needs to be 30mA/30 = 1mA for the relay and 10mA/30 = 0.33mA for the led.
The voltage across the base transistor will be 5v - 0.7v (Vbe) = 4.3v so the resistor for the relay circuit should be 4.3v/1mA = 4.3k, and the resistor for the led circuit should be 4.3v/0.33mA = 13k.
These calculations are only approximations (based on the hfe range) so resistors can be chosen from the range of preferred values.
The PIC should be capable of supplying a sufficiently high output voltage to turn the transistors off when required, but a nominal pull-up resistor between the base and emitter of each transistor (100k) can help to sort out any leakege current.
The led will require a current limiting resistor. The led forward voltage and and transistor collector-emitter voltage will account for approximately 1v from the 5v supply, so there will be roughly 4v across the resistor. 400R will give 10mA.
If the relay coil is rated for the supply voltage it will not need any additional resistance. A reverse biased diode will be required across the coil to handle any back-emf is there is no protection built-in.
The 3.6v modem is a little more difficult because the base connection of the transistor could pull the output above its supply voltage. If the modem output can not handle the higher voltage another type of circuit might be required. Is a 3.6v reference available, or could one be created (zener diode?)

tinker
Flowcode V4 User
Posts: 8
Joined: Mon Jul 02, 2007 9:35 am
Contact:

Re: calculating series and pullup resistance needed

Postby tinker » Thu Jun 19, 2008 9:24 pm

If you are a keen experimenter, then buying one of these is Β£60 well spent.
this little box with 3 leads will automatically identify the type of transisitor you connect to it, identify what each lead is, eg base collector emmitter and also the hfe and vbe. ideal for identifying those factory throw-out and junk box bits

http://www.peakelec.co.uk/acatalog/jz_instruments.html

cheers
joe