Greetings! Hope you're doing great!
On a project I'm developing, I need a sinking digital output from the PLC, wiring it to my ESP8266 module. In other words, my input will be, either an Open circuit (with the proper pull up resistor to 3V3 included), or a connection to GND.
The problem is, that the PLC provides a Sourcing Digital Output of 24 VDC.
I know this can be solved by switching an output properly. Thus I've 2 options:
-
Use a relay, it's simple, but since I may have fast switching sometimes, I wouldn't like to rely on it.
-
Use an electronic switch, to which a transistor circuit will do just fine. All I want is to have my 24V output from the PLC as a control input to the transistor, obviously wired an regulated properly. I don't know what kind of circuit could I use for this, or how to set the resistor values. I'll apretiate any kind of help.
