Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to Activate Relay using Transistor?

  1. Jan 18, 2015 #1
    The title already said the question of this thread.
    As I searched the internet, transistors were configured in common-emitter configuration. They also show me that in order to activate the relay, the transistor should be operated in saturation and cut-off mode. How to make my BC547 Transistor operate to saturation mode (using common-emitter configuration) in order to activate my 24 VDC Relay using 24 VDC Source? How to decide proper Resistor Values?
  2. jcsd
  3. Jan 18, 2015 #2


    User Avatar

    Staff: Mentor

    Hi nicy12. Your research covers a lot of the details. One more detail you need to supply is the source of the switching signal. What will you be using to control the switching transistor? A microswitch? A logic signal from some circuit? How many volts?

    Your relay opeartes off 24VDC, but how much current does its solenoid draw while in operation?

    Not enough information provided yet.

    BTW, you'll also need a protection diode, because solenoids generate a spike in the voltage across the winding when you switch the current off
  4. Jan 18, 2015 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    here's a couple of ideas I did for some one else
    it will give you a starting point
    BUT you need to answer NascentOxygen's questions so transistor type etc can be suggested


  5. Jan 18, 2015 #4
    Most of your project sized 24 V relays need about 60 ma, 150 ma on the outside. The transistor should be fairly tough. A 2N2222 has a 500ma limit, which is pretty tough.
    The following is a good starting point and can be tweeked to fit your needs:


    Note that you'll need to supply at least 2 ma at 3.3V to be sure of driving a 150 ma coil.
  6. Jan 19, 2015 #5
    Sir NascentOxygen I want my 24 VDC Source to be the source of relay as well as transistor. The circuit should use only one Voltage Source. Regarding Relay, I don't know what details in the data sheet I downloaded (my relay is MY4N-J) were needed to be used so I will post an image so you can help me about this:

    MY relay specification and contact rating 2.JPG

    I think the current you're asking about is 37.7 mA.
    The Relay I am going to used has LED inside the casing that serve as an indicator so I think it also serve as a flyback diode.
  7. Jan 19, 2015 #6
    This is the circuit (which I designed) I really want to build:

    Relay driver circuit.JPG

    As much as possible I don't want to replace the Transistor but if it was really needed so I will follow. The LDR values given was tested by me so it should be fixed.
  8. Jan 19, 2015 #7


    User Avatar

    Staff: Mentor

    Yes, that 37.7 mA looks to be the current the relay coil needs.

    But before going further, can you confirm that you already possess that LDR? They are not used so much now, I seem to recall them having limited long-term reliability. More common now are phototransistors.

    If you have purchased that LDR, then you may require more than one transistor. You'll need to test the LDR for its dark and light resistances, under the light conditions you'll be relying on. Those R values in the schematic are probably just examples in a textbook figure.

    Whatever the LED indicator does, you should not rely on it. Add the protection diode.
    Last edited: Jan 19, 2015
  9. Jan 19, 2015 #8
    Yes I already bought one. The LDR values given were tested according to the situation or place where it will be placed. I am the one who tested it using multimeter ( I taped the LDR in the probes of my tester and measure its resistance at the location when there is light and when there is no light).

    I used 10 M ohm Resistor because it will give me approx. 0.4 V at the base when there is light and approx. 3 V when there is no light ( greater than 0.7 of Vbe)

    I have no idea on using phototransistor so research should be done in order to build circuit regarding that. I first want the LDR-Relay combination to this home project. I used transistor becuase my research says that transistors are also used in driving Relays.

    If I am going to add 1N4001 Diode, Where it would be placed in the circuit?
  10. Jan 19, 2015 #9
    Sir Davenn does your circuit really drive the 24 VDC relay? Because you are only using 6 VDC as Vcc. Please explain.
  11. Jan 19, 2015 #10


    User Avatar

    Staff: Mentor

    I can't get your circuit to work with even a pair of BC547s. I think it can be made to work by substituting a JFET for the BC547. The FET won't load down your divider network.

    I don't have any favourite FETs for this voltage, but the 2N7000 seems available and should do the job.


    Are you in a position to purchase that FET?
  12. Jan 19, 2015 #11
    I am afraid to use FET because I haven't understand the BJT cleary in terms of practice. I have a little idea about BJT's in terms of theory where the type of transistor don't matter because needed parameters are given to solve the problem. To be specific, I don't know what details in the data sheet should be considered thus, I don't know what type of transistor should be used. I just found that BC547 as part of Dark Sensor Circuit here:
    So I searched for the data sheet of that transistor here:
    I found out that BC547 has maximum Emitter-Base Voltage of 6 V (I think that would be the maximum Vbe) and the minimum Base-Emiiter On Voltage was 0.55 V ( I believe that it was the needed Vbe to turn the transistor ON).

    My problem now is I don't know what kind of transistor is going to be used so that I can drive the 24 VDC 3.7 mA Relay. Some website says that I should make my transistor to operate in Cut-off and Saturation Region. Operating in Cut-off is easy, I just need to Cut the supply in base (or supply it with less than 0.7 V). But operating in Saturation Mode makes me feel dumber given that I have already resistor values in the circuit.

    I also don't want to use FET because I don't have any idea about it except it switches faster than BJT. Well, I don't want to mess in FET while I am having trouble to BJT.

    One more thing, I honestly don't get it:
    "I can't get your circuit to work with even a pair of BC547s. I think it can be made to work by substituting a JFET for the BC547. The FET won't load down your divider network."
  13. Jan 19, 2015 #12


    User Avatar
    Science Advisor

    Just off the top of my head - that 10M resistor seems way too large. Try removing the LDR (simulating "extremely dark") and see if the circuit energizes. I suspect it will not. The trouble lies in the current amplification of the BC 547. 24V through 10Mohm results in a current of 2.4μA. If the β of BC 547 is 200, then the collector current will be 4.8mA - this not nearly enough to energize the relay (the spec sheet says 37.7mA at 24V).
  14. Jan 19, 2015 #13


    User Avatar

    Staff: Mentor

    It's all very well to look at the two resistor divider alone, but when you connect it to the transistor base that transistor must draw some current from the divider, and this messes up your calculations. The base needs a lot more current than your network can provide, so the resistor values are no good, and then the light vs. darkness voltage variations won't be what you'd hoped. Alas, it just won't work.

    A FET is simpler, it doesn't need much gate current at all, so it will work just like you'd hoped!
  15. Jan 19, 2015 #14
    Why should I removed the LDR if I am going to simulate an "exteremely dark" situation if I can substitute it to be 3 M ohm (as I tested it in very very dark location)?
    [tex] \frac{3x10^6 x 24}{10 x 10^6 + 3 x 10^6} = 5.54 V[/tex]
    It is enough to turn the transistor on without burning it (since the maximum is 6 Vdc)
  16. Jan 19, 2015 #15


    User Avatar
    Science Advisor

    That is correct - if you look at the resistor string alone. But the transistor base will lock at 0.7V and from there it is a question of supplying enough base current to the transistor. In order to turn on the relay, the transistor has to supply 38mA. Assuming a conservative β of 100, you need to supply 0.38mA into the base. 24V/0.38mA equals 63kΩ. 10MΩ is therefore way too large.

    You could use an extra BC 547 as a source follower in front of your existing BC 547. Again assuming a β of 100, you need to supply 3.8μA into that base - which lets you get away with 6.3MΩ. Still less than 10MΩ, and you are now using a base current of the order of the leakage currents.

    A FET draws no gate current at all, but it has other problems. A JFET needs to operate with a negative gate voltage and it has no defined "turn-on" point. An "enhancement-mode" MOSFET will work with a positive gate voltage, but it still has no clearly defined "turn-on" point.

    Personally, I would have used a comparator and fed the comparator output into the BC 547 base.
  17. Jan 19, 2015 #16
    My little brain will going to burn! I can't make any circuit that comply the requirements.. If I will consider the voltage in Base-Emiiter Junction, there will be no enough current. If I'll consider the current, the voltage in Base-Emitter Junction is high that will burn the transistor. What should I do?

    Can you provide me the circuit Sir?
  18. Jan 19, 2015 #17


    User Avatar
    Science Advisor

  19. Jan 19, 2015 #18
    I tried to use the 6.3 M ohm you said and this is the circuit I produced. Please tell me if I made it correctly:
    Relay driver circuit 3.JPG

    7.018 mA is also not enough to activate my Relay. If I will going to add another, this will activate the relay but it is not convenient because three (3) transistors were used.
    Last edited: Jan 19, 2015
  20. Jan 19, 2015 #19


    User Avatar
    Science Advisor

    Sorry. The first transistor has to be connected as an emitter-follower, which means: Collector to +24V, base as you have drawn it and emitter connected to the base of the other transistor (with a 10kΩ resistor to ground).

    Also see my answer above.
  21. Jan 19, 2015 #20
    How about this new circuit I draw:
    Relay driver circuit 4.JPG

    Is it correct now? If not please tell me so I can do it again so that the circuit will be working.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: How to Activate Relay using Transistor?
  1. Relay re-activating (Replies: 1)

  2. Transistor as a relay (Replies: 3)