I am more of a software guy, and I want to make sure my design works before sending it off to fabrication.
I need to interface with 24V PLC I/Os. I want a simple design for now, as I can add refinements/improvements in later stages.
I went with the simplest solution of just limiting the LED's current of the opto. I've seen designs with a resistor to GNDS (between pin 1 and 2 of the opto). What use/advantage would that have?
I just noticed the LED's max. reverse voltage is 5V. So putting a diode from GNDS to pin 1 of the opto would make it safe against reversed polarity, right?
What about long cables? Could voltage spikes damage my inputs?
It felt weird putting the inputs' indicator LED next to the pull-up resistor. But I guess that getting the signal to the PCF8574 and getting the indicator LED on works like this?
I want an indicator LED at the output as well, but I was not really sure how to place it. This is what I found and I calculated the needed series resistance at around 47R. I was aiming for a current of around 5mA. According to the LED's and opto's datasheet the voltage drop is 1.8V (LED) and 1.25V (opto), so 0.25V for the resistor. At 47R that would be 5mA.
The numbers feel weird, but with the PCF8574's output set low, I should get the opto and indicator LED activated. I hope that this design is robust enough, and not prone to tolerances. If I'm not wrong, the PCF8574's outputs are standard high, so the opto is not activated at default/startup.
Here, I am not sure if I can wire the opto's transistor to the pull-down resistor like this. Shouldn't the emitter be directly at GND?
Also, the TBD62783A has a maximum gate voltage of 30V. Do I need to put a resistor between 24V and pin 16 of the opto to be safe? What about current limiting of current going into the gate?
Do you have any more tips for me on a design like this? Or any helpful resources I could study?