# Relay optocoupler driver

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.

• How about IN1-IN4 LEDs? 1mA current too small Feb 13, 2017 at 10:26
• You can see a lot of LEDs with just 1 mA or less current. Feb 13, 2017 at 10:27

as suggested by @Andy aka, there are LEDs available at low current rating, if you need to use more current shift the LED to the other side of the opto-couplers 817C can drive up to 30 mA

To get 20mA current we need 2.6V/20mA = 130 Ohm resistor.

why do you want to drive it at 20ma?

... = 2.6mA it's to small current for led.

Yes, for lighting LEDs.

No, for signaling LEDs.