Electronic – 24V signal to drive led

ledopto-isolatorplc

I have a PLC which gives 24V DC output. I would like to drive an external LED using 24V.

Is this the correct way to drive an led?
Which is the right method let me know any changes needed.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

Really all you need is a single series resistor.

schematic

simulate this circuit – Schematic created using CircuitLab