# Relay optocoupler driver

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.

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 Commented Feb 13, 2017 at 10:26
• You can see a lot of LEDs with just 1 mA or less current. Commented 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

5 - 2,2 - 1,2 = 1,6 :-) 1,6/0.02 = 80 Ohm if 20 ma needed. With 1k Ohm, it gives 1,6 ma current. Out of figure, it is more or less at maximum ctr.

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.