Maker Pro
Maker Pro

Opto-isolator basic question

paulkrasucki

Sep 8, 2011
1
Joined
Sep 8, 2011
Messages
1
I have build a standard opto-isolator (4N37) circuit with input coming in on pin 1 &2. The opto is powered by 5V to Pin5 through a 10K resistor, Pin4 is grounded, Pin6 is grounded through a 400K resistor.

When the input side of the opto is low, Pin4 has a voltage, but when the input goes high, Pin4 doesn't have voltage. It is reversed from what I would expect, the other side of the opto would only have voltage if the input was high. I'm sure this is something basic that I am missing and don't understand. Basically, the opto seems to be working as its picking up the changes in one circuit and switching but not in the manner I expect.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
That is expected. The output of the opto is an inverter.

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Connect pin 5 to +5v, pin 4 to ground via the 10k resistor, and take the output from pin 4. Pin 6 can be left as it is or simply disconnected, or perhaps tied to pin 4 via the existing resistor.

This will result in an output which is no longer inverted.

However it will now be able to source, ad no longer sink current (and this may affect what you're driving).

The connection to the base can increase the speed at which the device switches off, but this may not be an important factor (I don't know)
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Connect pin 5 to +5v, pin 4 to ground via the 10k resistor, and take the output from pin 4. Pin 6 can be left as it is or simply disconnected, or perhaps tied to pin 4 via the existing resistor.

This will result in an output which is no longer inverted.

However it will now be able to source, ad no longer sink current (and this may affect what you're driving).

The connection to the base can increase the speed at which the device switches off, but this may not be an important factor (I don't know)
Are you sure that will output close to 5V? The configuration is a voltage follower, but the input to the base is optical, so I have no idea what that would do. I wonder if the emitter voltage gets too high it will stop conducting even in the presence of light.

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yep, that will work fine. The photons have no idea where ground is :)

A resistor in the emitter would normally provide negative feedback, but not in this case. Adding a resistor from the base to ground will tend to produce behaviour similar to what you describe.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Yep, that will work fine. The photons have no idea where ground is :)

A resistor in the emitter would normally provide negative feedback, but not in this case. Adding a resistor from the base to ground will tend to produce behaviour similar to what you describe.

Thanks, I didn't know that. File away for future use!

Bob
 
Top