I build the following circuit found in some websites, and the relay is on without applying any voltage to the optocoupler. These are the details:

The relay's coil resistance is 720R. As soon as I power the circuit I get 11.45V across the relay coil. At the base of the transistor I measure about .75V The input is floating (not connected). Any help would be very much appreciated.

enter image description here

  • 2
    \$\begingroup\$ Perhaps there is a problem bulding the circuit? Show a photo to verify it is built so that it matches the schematics. \$\endgroup\$
    – Justme
    Aug 26, 2021 at 14:14
  • 1
    \$\begingroup\$ What is the voltage across the 2k2 resistor? Make sure you don't have the 4N28 pins 5 and 6 connected together. \$\endgroup\$ Aug 26, 2021 at 14:20
  • 1
    \$\begingroup\$ If Vbe is 0.75V, then it is on, so check that opto is connected properly, and is not damaged. \$\endgroup\$
    – Aaron
    Aug 26, 2021 at 14:32
  • \$\begingroup\$ Please ask a specific question \$\endgroup\$
    – Voltage Spike
    Aug 26, 2021 at 14:41
  • \$\begingroup\$ I verified the pcb layout and it looks right. Voltage across the 2k2 resistor is initially around 3V with a steady decrease . After a minute it's 2.6V. Components are all new. \$\endgroup\$
    – primare
    Aug 26, 2021 at 14:51

2 Answers 2


Almost certain now that the base of the phototransistor (pin 6) cannot be left floating, and that's causing the fluctuations seen on the voltage across the 2k2 resistor.


Even though per your circuit, that you state is not accurate to reality, the base pin 6 is floating, and can provide negligent current to drive the base, it is still recommended to add 100k Ohm resistance from base to ground, even though many functioning circuits function with it floating. This will remove any uncertainty to the floating base pin. But more likely your chip is either misconnected allowing a current path to pin 6, or the optotransistor is shorted... Perhaps a quick multimeter reading in diode test of the junction would give you more certainty? If in doubt, switch the opto out for a simple 4 pin PC817, and you should have no trouble at all, since you are not using the base connection anyway.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.