IR sensor to PLC connection

Thread Starter

db000

Joined Apr 27, 2022
5
I plan to use an IR transmitter and receiver with 24V supplied by the PLC, I'd then attach the output from the transistor to one of the PLCs digital inputs.
Was wondering whether the circuit included would work okay? If not how can I improve it?
Cheers

20220428_003734.jpg
 

MrSalts

Joined Apr 2, 2020
2,767
The voltage at the collector of your transistor will always be at 24v and the emitter will always be at ground. Why is the transistor there?
 

Thread Starter

db000

Joined Apr 27, 2022
5
The voltage at the collector of your transistor will always be at 24v and the emitter will always be at ground. Why is the transistor there?
Would I not require a level shifter? Or would the digital input pin still read it without ?
 

MrSalts

Joined Apr 2, 2020
2,767
Is the 24v turning on and off to send some digital signal to the PLC, or is it an analog value between 0-24v? Or is there a 4-20mA signal?

Then your output is to a logic level (0-5v or 0.3.3v) and please specify if it is digital or analog.
 

Thread Starter

db000

Joined Apr 27, 2022
5
I'm supplying a constant 24V to the IR LED and photodiode to sense movement. I want to send a digital high input to the PLC when movement is detected.
 

Sensacell

Joined Jun 19, 2012
3,432
What is missing is a resistor in the collector circuit.
Add a 4.7 k resistor there and take the signal off the collector.

What kind of physical range are you expecting from this sensor?
 

Thread Starter

db000

Joined Apr 27, 2022
5
thanks will do

not expecting anything spectacular as far as range goes, its just for proof of concept at the moment
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
You could connect the collector of the 2N2222 to the opto isolator in the PLC input terminal.
What do you need the LED indicator for, there is normally a status LED in the PLC input.
Does the PLC sink or source inputs?
 

MrSalts

Joined Apr 2, 2020
2,767
You'll be lucky to get an 8" (20 cm) range. Ir sensors like a garage door opener safety system pulses at 38k Hz and the receiver has a high gain amplifier that filters out all signals that are not 38kHz.
 

MrSalts

Joined Apr 2, 2020
2,767
You could connect the collector of the 2N2222 to the opto isolator in the PLC input terminal.
What do you need the LED indicator for, there is normally a status LED in the PLC input.
Does the PLC sink or source inputs?
It's not an LED indicator, it is his IR emitter to sense motion (beam interruption) to his photodiode.
 
Top