martinayotte wrote:In my own design, I would have placed the LED (along with it's own limiting resistor) completely in parallel with the relay supplied on the 5V side, not on the input side of the opto-coupler ! ...
Agree the design as-is is probably marginal @3v3. I made the following additional measurements with the input grounded:
@Vcc = 3v3
Voltage across indicator LED 1.763V
Voltage across current limiting resistor 0.492V
Voltage across opto-isolator LED 3.3 - 1.763 - 0.492 = 1.045V
Current through opto-isolator 0.492/988 = 0.5ma
@Vcc = 5.0V
Voltage across indicator LED 1.835V
Voltage across current limiting resistor 2.054V
Voltage across opto-isolator LED 5.0 - 1835 - 2.054 = 1.111V
Current through opto-isolator 2.054/988 = 2.1ma
My relay boards use a 817c opto-isolator. This basic design has been cloned a zillion times, who knows what they use. The 817 spec sheet indicates that driving this with only half a ma may not generate enough collector current to reliably operate the relay. Mine happen to work, YMMV. Using a level shifter, shorting out the indicator LED or using a smaller current limiting resistor would help.