Help with a resistor choice

Discussion in 'General Electronics Chat' started by cassity69, Feb 19, 2014.

  1. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    Greetings, i have four 7 segment displays which have to be configured with a pic microcontroller to show certain speeds and weight from a stepper motor and load cell... anyway for now im confused as to which resistor to choose whilst connecting to a 5v supply when using a 2N3904 transistor
    is this something i have to calculate because ive seen different values on different images

    any help would be great
    thanks
     
  2. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    i forgot to mention its the base resistor i need to find
     
  3. Hemi

    New Member

    Mar 17, 2012
    4
    0
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Assuming you are trying to use the transistor as a switch, the rule of thumb is to use a beta of 10, to ensure good saturation.

    This means you will design for a base current that is one tenth of the collector current.
     
  5. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    oh beta = hfe i understand so i use 10 for that
     
  6. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    ok so how do i find out the voltage drop that is all i need
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    The value of resistor will affecting the frequency response of transistor, and the duty cycle will affecting the brightness of 7-seg LEDs, if you considering the power dissipation then you can try it from 10K to 1K, and just testing form the right side of the 4 digits.
     
  8. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    and the collector current i find on data sheet?
    sorry i need to get this spot on
     
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Typical assumption is 0.65 -0.7, however, the datasheet will give you a value for the diode drop at a rated current, and, hopefully, a graph of the diode drop voltage with respect to collector current.

    And, yes, hfe is beta...

    Edit: according to this datasheet, your diode drop will probably be on the higher side of the 0.65V-0.9V range. Also, it looks like your Vce saturation voltage is around 0.2V.
     
    Last edited: Feb 19, 2014
  10. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Collector current is determined by what you want the maximum amount of current through your transistor is (e.g. the maximum current when all the LEDs are on) .
     
    JoeJester likes this.
  11. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    hmmm i havent really looked into how much current i want i just want all four displays to be able to show what i want
    a tad confused i know its simple i shouldnt be struggling with it, its the last part of my hardware build
     
  12. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    ok so the voltage drop of the data sheet is shown as the base saturation. minumum being 0.65 and maximum being 0.85 - 0.95.... so im safe to go with 0.7? so its just the collector current
     
  13. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It's nothing to be ashamed of if you haven't had to deal with it before. :)

    You will probably need to have one for each display, assuming each LED is calculated for 20mA (7 * 20mA = 140mA, and maximum collector current is 200mA). Of course, you can reduce the amount of current for each LED and maintain good brightness, thereby reducing the amount of collector current to design for.

    How are you intending to hook these up so we can give you specific help?
     
  14. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    No, this is the voltage drop from the base to the emitter at the rated currents. So, if you have Ic = 50mA and Ib = 5mA, this drop will be between 0.65V and 0.95V.
     
  15. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    oh ok :) erm basically i have four seperate 7 segs, ideally i would like 2 pairs because im intending on displaying a speed of my stepper motor which will need two digits, aswell as the weight of the load on the load cell which will need a decimal point as it will be 1-5kg but with small increments. but ill have to just do it with the 4 single ones for now so maybe there is a way of driving them as a pair so maybe only needed two transistors and two resistors?

    at the minute i have the stepper and a variable resistor ( acting as the accellerator) this is wired up correctly and i have it working.
    im using a darlington driver and a pic

    someone advised me on just using arounf a 2 k resistor as it doesnt really matter as long as its between 1.8 and 4 ish
     
  16. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    right im being kicked out of my office, ill view this thread first thing tommorow morning with the hardware in front of me . thanks for you help tshuck
     
  17. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Okay, so since you are attempting to use a NPN, is it safe to assume you are using common cathode seven segment displays?

    If so, I would imagine that you would hook it up as seen here. The link is for use with a Raspberry Pi, but don't worry, it is more or less the same.

    If, however, you have a common anode seven-segment display, you should use a PNP transistor and hook it up like this.
     
  18. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
  19. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
  20. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    ErnieM, so looking into the first design looks more like what im trying to do, im using the same pic altohugh port D is already being used ( stepper motor) this is being used with a darlington driver and i can see that port d needs to be connected with regards to the base of the transistor im using 1.8 k resistors but why is the need to connect to port d also ?
    do i need to use the darlington?
    ive connected the variable resistor into port a and stepper into port d with it fully working,i dont know why this is such a problem for me :(
     
Loading...