I'm designing relay optocoupler driver for PIC microcontroller and I'm bit confused. On the internet, there are lot of relay optocoupler driver schmeatics with a current limiter resistor value of 1-10k. Why is it so big? According to the PCF817 datasheet, the forward voltage is 1.2V and forward current is 20mA.
An indicator LED has 2.1-2.5V forward voltage and 20mA forward current. So we have: 5V-2.2V-1.2V = 2.6V. To get 20mA current we need 2.6V/20mA = 130 ohm resistor.
If the current limiter resistor value is 1k then the current will be 2.6V/1000Ohm = 2.6mA. That is too low for the LED.

