I'm designing relay optocoupler driver for PIC microcontroller and i'm bit confused. In the internet there are lot of relay optocoupler driver schmeatics where current limitter resistor value 1-10k. Why is it too big? According to the datasheet PCF817 forward voltage 1.2V and forward current 20mA. 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 current limitter resistor value 1k then current will be 2.6V/1000Ohm = 2.6mA it's to small current for led.
According to the datasheet PCF817 forward voltage 1.2V and forward current 20mA
As you can see in the graph below the PC817 has typically a current transfer ratio of round about 500% from forward currents as low as 1 mA.
If you put 1mA into it you can reasonably expect to get significantly more than 1 mA out of it and into the BJT's base that operates the relay. This is more than enough current to drive the transistor and switch the relay on.
Regards the LEDs in series with the opto-coupler input circuit, most LEDs can easily been visible when operated at currents as low as 1 mA.