Maker Pro
Maker Pro

Driving a relay from a PLC output

BHEKI

Aug 28, 2014
24
Joined
Aug 28, 2014
Messages
24
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 motor20141122-0011.jpeg
 

Frenoy Osburn

Nov 20, 2014
64
Joined
Nov 20, 2014
Messages
64
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.
 

Frenoy Osburn

Nov 20, 2014
64
Joined
Nov 20, 2014
Messages
64
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.
 

BHEKI

Aug 28, 2014
24
Joined
Aug 28, 2014
Messages
24
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.


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.
 

Frenoy Osburn

Nov 20, 2014
64
Joined
Nov 20, 2014
Messages
64
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.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
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.
 

Frenoy Osburn

Nov 20, 2014
64
Joined
Nov 20, 2014
Messages
64
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.
 
Top