Calculate base resistor, for transistor

Discussion in 'The Projects Forum' started by tigerapna, Mar 13, 2012.

  1. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    How do I calculate the base resistor value?

    I saw a formula:

    Rb = (V(ic supply) x hFE) / (5 x I(load))

    and also I saw

    Ic/Ib = hFE

    and I heard:

    Ib should be a tenth of Ic but if the gain is 100 than it should be a hundredth?

    I'm very confused.

    I have attached the schematic.

    My output to the transistor base is a quad AND gate IC which will operate a 24VDC relay.
     
    • rb.jpg
      rb.jpg
      File size:
      55.9 KB
      Views:
      64
    Thinn likes this.
  2. #12

    Expert

    Nov 30, 2010
    16,239
    6,723
    It's about 2200 ohms.

    V fromMM74 will be a bit below 5 volts and the transistor base to emitter will use up about .65 volts. The current to the base should be one tenth of the load current to get a nice saturation of the transistor.

    (4.5v - .65V)/1.67 ma = 2310 ohms.
     
  3. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Thank you for clearing that up!

    Can I add a resistor and LED to the output of the 74hc08n? to indicate the transistor is on?
     
  4. #12

    Expert

    Nov 30, 2010
    16,239
    6,723
    There's only about .003 amps left in the chip. That would make a dim LED. Better to put the LED and resistor in parallel with the relay coil. That would have the .01 to .02 amps needed for a bright LED and actually indicate that the transistor is on instead of indicating that the chip is telling the transistor to be on.
     
  5. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Thank you for your assistance #12, everything worked like a charm.

    One last question:

    If I hookup 110VAC through the 8A relay contacts, will it effect any of my low voltage logic circuit? Or is it completely isolated?
     
  6. #12

    Expert

    Nov 30, 2010
    16,239
    6,723
    It's isolated.

    That's the main purpose of a relay...to keep two different circuits from talking to each other.
     
  7. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    One last last question:) :

    Which combo of diode and transistor should I use?
    I'm using 1n4148 and PN2222A and either the diode or the tansistor keeps blowing.

    The relay is. 24dc 16.67ma
     
  8. #12

    Expert

    Nov 30, 2010
    16,239
    6,723
    It's the diode. A 1N4148 is a signal diode. Inductors kick like crazy when you try to shut them off quickly. Try a power diode like a 1N4001 to 1N4007 or a power Shottky if you have one.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    16.7mA and 24V should be no sweat for 1N4148 or PN2222. Something else is wrong.

    EDIT: DO you have power and the load connected to the relay contacts when the devices fail?
    What is the load on the contacts?
     
    Last edited: Mar 14, 2012
  10. #12

    Expert

    Nov 30, 2010
    16,239
    6,723
    Darn. I got another one wrong.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Inductors do create a high voltage spike if the current is interrupted, and has no place else to go. The diode is there to provide an alternate current path.
    When the tranny turns off, the voltage across the inductor abruptly reverses, but is clamped by the diode. The initial diode current is equal to the current that was flowing in the transistor, i.e., 16.7mA. The diode reverse voltage is 24V when the tranny is on. The transistor collector voltage goes to ≈24.7V when it first turns off. These are the maximum stresses on the semiconductors.
    I occasionally hear of mysterious relay driver failures like this. I wonder if it is due to voltage induced on the coil due to high current transients in the contacts. Maybe other forum members can comment on this.
     
  12. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    I don't have anything connected to the relay contacts when it fails. (the N/O and NC switches right?)

    I just have power going to the relay through the transistor.

    I have a resistor and LED in parallel to the coil.
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Are you sure you have the diode connected correctly? If it were reversed, either the diode or the transistor would fail. If the transistor collector and emitter were swapped, that could also cause problems.
     
  14. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    I will triple check the connections when I get a chance. The diode connection is 100% correct. I'll take a look at the PN2222A data sheet again for E B C

    It doesn't fail right away. It will work for some time and then when I try to test it randomly the diode or transistor will fail.

    would the transistor still work if the collector and emitter were swapped?
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Some transistors still work when reversed, but beta will be very low, and the "collector" (emitter, actually) will break down at around 6 to 8 volts.

    Can you provide a link to the relay datasheet, or, failing that, the part number?
     
  16. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    I attached the data sheet.

    thanks so much for your help on this.
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    That datasheet has a lot of part numbers on it. In the table at the bottom, which one is yours?
     
  18. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    TE Connectivity
    RTE24024
     
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    OK, thanks.
    Do you have good power supply decoupling? I would have at least 10uF in parallel with a 100nF ceramic cap from +24V to ground, mounted as close to the positive end of the relay coil as possible.
     
  20. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    No I do not have any power supply decoupling on the 24 volt line.
     
Loading...