Hi,
inthis video lecture you will learn how to calculate the LED resistance for the optocouper to work in proper manner.
i will teach you step by step with the help of optocouper datasheet how you can find the optocouper parameters.
if the input voltage are 3.3Vdc, 5Vdc,12Vdc,15Vdc,24Vdc then also you can drive LED of optocouper properly without burning of optocouper.