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 a relay using a phototransistor

  1. Feb 1, 2010 #1
    I am trying to use some 6 volt phototransistor sensors as inputs to a plc. Can someone tell me how come the relay will not energize when the phototransistor is conducting? Thank You RELAY2.jpg
  2. jcsd
  3. Feb 1, 2010 #2


    User Avatar
    Science Advisor

    The relay needs quite a large current to make it work and the phototransistor has too much resistance, even in bright light, to let that much current flow.

    So, you need an amplifier like this:

    http://dl.dropbox.com/u/4222062/Relay%20driver%203.JPG [Broken]

    Although you might need a bit more than 6 volts (maybe 9 volts) and you might need a resistor in series with the phototransistor (maybe 1000 ohms). But it might work well enough as shown.

    The transistor can be a small power transistor like a TIP31 or a BD139.
    Last edited by a moderator: May 4, 2017
  4. Feb 1, 2010 #3
    Thank You So Much! Sauce
  5. Feb 1, 2010 #4


    User Avatar
    Science Advisor

    Thanks for the personal mail.

    To reverse the action, you would need to use a circuit like this:
    http://dl.dropbox.com/u/4222062/Relay%20driver%204.JPG [Broken]

    To find out the right values for the resistors, R1 and R2 you will need to find out the value of base resistor that gives enough collector current to pull the relay in.

    Suppose you found that 4700 ohms instead of R1 and R2 would make the relay pull in.
    (You would do this without the phototransistor.)
    Then you could make R1 and R2 both 2.2K.
    R1 should equal R2 and the two should add up in value to the total resistance you found would turn the transistor on.

    If the phototransistor is on, (in bright light) then the junction of R1 and R2 will be low causing the transistor to turn off and the relay to drop out.
    When the phototransistor is off (ie in darkness) the relay will pull in because the transistor will get normal base current.
    Last edited by a moderator: May 4, 2017
  6. Feb 1, 2010 #5
    Thanks Again! Sauce
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook