1. 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.
    Dismiss Notice

3904 NPN transistor to drive a relay

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by spestis, Jul 26, 2006.

  1. spestis

    spestis New Member

    Joined:
    Jun 23, 2006
    Messages:
    12
    Likes:
    0
    I have built this very simple circuit (image) but the relay will not engage after the switch is closed. I can feel the relay begin to engage but it does not latch closed. The relay is 36 ohms, 71mA @ 5V. An npn 3904 should supply up to 800 mA. Am I missing some thing? I have tried several transistors. And tested the relay.
     

    Attached Files:

  2. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    You're missing the base resistor to limit the base current so you've probably destroyed every transistor you tested it with.
     
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,203
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    You need a resistor feeding the base, otherwise as soon as you press the switch the transistor will blow - if you've tried several transistors, you now have several dead transistors.

    Also, it's important that you fit a diode across the relay coil, cathode to the top - otherwise the transistor will be destroyed when you release the switch.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Analog

    Analog New Member

    Joined:
    Jul 18, 2006
    Messages:
    483
    Likes:
    4
    Location:
    Michigan USA

    pretty much what was said. If the relay is used for switching a higher current load, you may want to consider using simply a power bjt or mosfet and dump the relay.
     
  6. spestis

    spestis New Member

    Joined:
    Jun 23, 2006
    Messages:
    12
    Likes:
    0
    How do I know what size resistor to use to feed the base?
     
  7. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
  8. k7elp60

    k7elp60 Active Member

    Joined:
    Oct 21, 2003
    Messages:
    1,148
    Likes:
    18
    Location:
    Utah
    Spestis, the values you give for the relay are not correct. If the coil is 36 ohms the current at 5V would be 5/36 = 139Ma. My data sheet says the maximum collector current for the 2N3904 is 200Ma. If the relay in fact only
    needs 71Ma then I would use the beta of the 2N3904 @ 100Ma is min of 30.
    Base current would be 71Ma/30 =2.3Ma. The resistor would be (5-0.7)/2.3Ma
    =1.869K. I would use a 1.5K ohm resistor to insure collector saturation.
     
  9. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Or, use an N-Channel MOSFET with negligible gate current as another poster mentioned.

    [​IMG]
     

    Attached Files:

  10. spestis

    spestis New Member

    Joined:
    Jun 23, 2006
    Messages:
    12
    Likes:
    0
    Thank you guys for your help.
     
  11. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    Ma is meaningless in this context, you mean mA. Capitalisation is important, Ma actually means the instantanious current in Mega amps.
     
  12. kurrodu

    kurrodu New Member

    Joined:
    Aug 3, 2009
    Messages:
    41
    Likes:
    0
    Pic 16F54 Needs to drive a 5v Relay

    I am using a pic 16f54 and need to trigger a 5V relay.

    Coil Voltage of the relay is 5V Dc.
    Coil Resistance = 63 Ohms.

    So, My guess is the relay needs a current of 5/63= 79mA.

    I am using an Smps (rating 5vdc and 1 amp current).

    Can someone draw a small circuit showing me the transistor the resistors required.

    P.S I have only 5v dc not 12 V.

    Pardon my ignorance.

    Thank You
     
  13. giftiger_wunsch

    giftiger_wunsch New Member

    Joined:
    Jun 15, 2009
    Messages:
    813
    Likes:
    3
    Location:
    Kent, England
    Perhaps you should create your own thread rather than appending your question to a thread over 3 years old.
     
  14. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,434
    Likes:
    933
    Location:
    Canada, of course!
    The old thread is wrong anyway.

    The tutorial talks about hFE being used in a calculation for the value of the base resistor for a switching transistor.
    One of our members talks about using beta in the calculation for the value of the base resistor for the switching transistor.
    They are wrong.

    The base current must simply be 1/10th the collector current for the 2N3904 transistor and for most other transistors.
     
  15. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    [​IMG]
    Use 5V rather than 12V.
     
    Last edited: Aug 3, 2009
  16. kurrodu

    kurrodu New Member

    Joined:
    Aug 3, 2009
    Messages:
    41
    Likes:
    0
    Thank You, I still have unresolved issue though

    The Circuit works. But, when the circuit is powered on for 1 day, then the relay does not get triggered.

    If I power off the circuit and power it back on it works for a while. Later it stops.

    My friend says its the back emf. But It is not clear for me. Someone please help me resolve this.
     
  17. BrownOut

    BrownOut Banned

    Joined:
    Jun 10, 2009
    Messages:
    4,630
    Likes:
    60
    Location:
    Huntsville, Alabama USA
    It's not back emf. Try another relay.
     
  18. kurrodu

    kurrodu New Member

    Joined:
    Aug 3, 2009
    Messages:
    41
    Likes:
    0
    I have 2 boards with relays on each.

    Both have same issue
     
  19. BrownOut

    BrownOut Banned

    Joined:
    Jun 10, 2009
    Messages:
    4,630
    Likes:
    60
    Location:
    Huntsville, Alabama USA
    Grab a meter and start measuring voltages. The transistor in your curcuit can be thought of as a switch. When the "switch" is off, you will measure close to 0V across your relay's coil. When the switch on on, you'll measure close to the power supply voltage across your relay's coil. If these conditions are validated, and you are getting the same result, then your relays are defective.
     
    Last edited: Oct 7, 2009
  20. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    What is the value of your base resistor? What type transistor are you using?
     
  21. kurrodu

    kurrodu New Member

    Joined:
    Aug 3, 2009
    Messages:
    41
    Likes:
    0

Share This Page