Electrical – optocoupler H22A2 driving a plc input

opto-isolatorplc

https://www.vishay.com/docs/83741/83741.pdf example 2

I have existing H22A2 optocouplers that I am trying to run 12vdc through to get a plc input to turn on and off. I am using a 1k resistor on the 5vdc LED. I am using a 2.7k resistor on the OPTOTRANSISTOR side with the 12vdc. I can get the input to turn on and off, but the voltage drop is so minimal that it is way to sensitive to be consistent. Any ideas?

plc model from automation direct BX-DM1E-18ED13 specs https://cdn.automationdirect.com/static/specs/bxdm1e_18ed13.pdf

H22A2 datasheet https://media.digikey.com/pdf/Data%20Sheets/Fairchild%20PDFs/H22A1,2,3.pdf

I will have 4 of the optos going to 4 separate inputs.

'>9.0vdc ON <2.0vdc OFF for inputs

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

Your question is quite unclear but I suspect that you think that the PLC requires a pull-up or pull-down resistor as shown in the Example 2 of your link. This is not the case.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1.

The PLC input can be connected directly to ground in the case of a current-sourcing type or directly to positive supply in the case of a current-sinking type. Typically about 10 mA will flow and ensure adequate illumination of the internal opto-coupler which isolates the inputs from the internal logic.

For your circuit you wire the opto-isolator's transistor as shown depending on input type.

The current-sinking type of input is often called a PNP input as it would work with PNP-type three-wire industrial sensors. Since you are using a "two-wire" opto-transistor the NPN transistor works in both configurations.


Update after links posted.

enter image description here

Figure 2. The PLC accepts sinking, sourcing or AC configuration.

That means that there are back-to-back diodes or a rectifier on the inputs.

schematic

simulate this circuit

Figure 3. Options for interfacing your opto-switch.

Choose (a) or (b) to suit other switches in the system.


Update 2:

schematic

simulate this circuit

Figure 4. Redrawn OP's schematic.

Corrected version of your schematic is above. Note that this is the same as I drew in Figure 3b.

enter image description here

Figure 5. Correct schematic with current path highlighted.