Help with a resistor choice

tshuck

Joined Oct 18, 2012
3,534
A PM from the OP:
im going to just use a resistor of around 2k due to someone advising me it doesnt really matter and 2k will be fine.
im going to wire the displays in pairs so am i right in sayin i will only need two transistors and two resistors?
I don't like responding to technical questions via PM, as it prevents others from being able to learn from your questions and the answers you get, so I will respond here.

First off, you will need current-limiting resistors on each LED (each segment), to limit the current through each LED to an acceptable value that won't make them go pop. These resistors can be a wide range of values (depending on your supply voltage, I usually use between 300 and 1.5k ohms - use: (Vsupply - Vled)/Rl = Iled, where Vsupply is your supply voltage, Vled is your LED's forward voltage (probably ~1.2V-1.6V), Rl is the current-limiting resistor, and Iled is the current through the LED).

Now then, I already showed that if you use 20mA/LED, you would need one transistor per seven-segment display, as you would be nearing its maximum current rating. If you want to drive the LEDs with less current, you can recalculate that for the values, but remember that you need to leave some room for deviations from ideal conditions (e.g. don't attempt to drive them at their maximum ratings).

For the base resistor (which is what I think you are referring to as the 2k ohm resistor), use the collector current you will have calculated by summing the individual LED currents that the transistor controls and divide by ten - this gives you the base current you want to drive the transistor at. Using this information, use: (Voh - Vbe) / Rbase = Ibase, where Voh is the output voltage of the PIC when outputting a "1", Vbe is the base-emitter diode voltage (typically ~0.7V, though I think in your case, I had seen something closer to 0.8V-0.9V), Rbase is the base resistor value, and Ibase is the value given by using 10% of the collector current(see above).

You may be able to drive two transistors from a single pin, enabling you to drive the four display transistors from just two pins, on the PIC, but you would need to check that the output pin can source that much current.

Hope this helps.
 
Last edited:
Top