Connect with us

Driving a relay from a PLC output

Discussion in 'General Electronics Discussion' started by BHEKI, Nov 22, 2014.

Scroll to continue with content
  1. BHEKI

    BHEKI

    24
    1
    Aug 28, 2014
    Excuse my ignorance, I have a problem with the system that im working on, I have a 5V relay which is suppose to be triggered through a 24VDC signal from the PLC. Now the relay switches ON the moment I turn the 5V from my external 5VDC supply,it doesn't wait for my signal from PLC and I don't want that. I don't know if maybe my connection is wrong or what. The 5V supplied to N.O terminal of the relay is meant to drive the motor 20141122-0011.jpeg
     
  2. Frenoy Osburn

    Frenoy Osburn

    64
    24
    Nov 20, 2014
    The connections seem Ok to me.

    Could you probe the voltage at the base of the transistor before applying the signal to turn the relay ON?

    You should actually define the pin as an output and ensure it is held low when no command is issued. One way to do this is to place a pull-down resistor between the base of the transistor and ground. 10K should be fine.

    But I'd like to know the voltage at the base when no command is issued before doing anything else.
     
  3. Frenoy Osburn

    Frenoy Osburn

    64
    24
    Nov 20, 2014
    What you could also do is this:

    Connect the relay input wire to GND, the relay should turn OFF.

    Now remove the wire from GND and connect the same to 5V. The relay should now turn ON.
     
  4. BHEKI

    BHEKI

    24
    1
    Aug 28, 2014

    I discovered this problem after I totally disconnected the base of the transistor from 24V PLC signal,the motor kept on running without the signal.
     
  5. Frenoy Osburn

    Frenoy Osburn

    64
    24
    Nov 20, 2014
    What happens when you apply 0V to the base? Does it turn OFF?

    I can't think of a reason why it would continue to remain ON if there is no signal to the base. Could you test to see if the transistor hasn't been damaged?

    Refer the following if you don't know how to test it.

    http://www.wikihow.com/Test-a-Transistor

    It would also be nice to know the value of R1 and the transistor being used. I assume you performed some calculations to determine if the transistor can handle 24V at the base. Also state the part number of the relay.
     
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    As Frenoy said, that circuit should work, although it's good practice to add a resistor between the base and emitter of the transistor. In this case I would use a 10k resistor from the PLC output to the base (R1), and a 470Ω resistor between the base and emitter of the transistor.

    With the current circuit, you can try a test: short the base and emitter of the transistor together. If the relay doesn't turn OFF, the transistor is faulty or there's a wiring error. If the relay does turn OFF, measure the voltage on both ends of the base resistor (R1) when the relay should be OFF, and post them here, along with the value of that resistor, or change the circuit to be like I described - 10k from PLC to base, and 470Ω from base to emitter.
     
  7. BHEKI

    BHEKI

    24
    1
    Aug 28, 2014
    Frenoy you were spot on, my transistor was damaged. THANK YOU
     
    Frenoy Osburn likes this.
  8. BHEKI

    BHEKI

    24
    1
    Aug 28, 2014
    THANK YOU GUYS
     
  9. Frenoy Osburn

    Frenoy Osburn

    64
    24
    Nov 20, 2014
    It's good you found out the fault. But try to analyze what made it go bad. It would be better to re-check the current ratings and resistors.
     
    KrisBlueNZ likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-