optocoupler with transistor on output

Thread Starter

imalearnin

Joined Oct 7, 2022
13
I am pretty new at this stuff and I need some help with an optocoupler. I have an HCPL2631M optocoupler. The allowable current on the output size is not sufficient for my circuit. I want to use an npn transistor whose base is connected to the open collector. I am not sure how to hook this up. Do I need 2 pull up resistors, one for the open collector of the optocoupler and another one for the transistor? I plan to hook use a 680 ohm resistor or something near that between the optocoupler collector and the base of the transistor to limit the current through the base. I am confused about how to hook up the pull up resistors. Can I use 1 pullup resistor that is connected to both the optocoupler and transistor or do I need two different pullup resistors?

Here is some more info. The circuit on the final output requires about 60mA (call it the load) and 60mA is more than I can conduct through the opticoupler. It is a 5 volt system on both sides of the optocoupler. The more I think about it the confuseder I get. I do not want or need any resistance on the final output. There is a resistance built into the device (load) that I do not have access to and its current is about 60mA if I just ground the wire. I am just trying to switch the final output on and off using an optocoupler. Maybe I am thinking about this wrong (likely as I am a begginer).
If I look at MrChips schematic it looks like what I am calling the load would be the resistor plus LED but I don't get how that works. In that case I think I would use a standard pullup on both the optocoupler and transistor (2 resistors 4.7k or whatever ) with the load connected to the transistor collector and pullup ( a T junction)? Or maybe the load acts like my pullup like what MrChips shows. I am sorry if this isn't making sense to you, I am struggling with this. It is fine if it inverts. I just need something that does a hard on off switch. The transister that I intend to use is a 2N2222A.
 
Last edited:

MrChips

Joined Oct 2, 2009
34,628
Yes. You need two different pullup resistors.
You do not need a series resistor from the optocoupler collector to the base of the external transistor.
Note that the additional common emitter circuit will invert the logic of the output.

optocoupler test circuit.jpg
 

WBahn

Joined Mar 31, 2012
32,702
More information is needed. You say that the allowable current is not sufficient for your circuit. Well, how much current does your circuit need?

Is your load connected to power or ground?

Do you need power to be delivered to your load with the optocoupler output is open or closed?

What is your supply voltage on your output side?
 

boostbuck

Joined Oct 5, 2017
1,032
You haven't specified the nature or purpose of required behaviour of your load, but I reiterate:

Note that the additional common emitter circuit will invert the logic of the output.
If you wish to retain the same logic, you could use a PNP before your NPN.
 

sghioto

Joined Dec 31, 2017
8,633
I want to use an npn transistor whose base is connected to the open collector.
Depending on how the Load is switched ON via the optocoupler.
Version#1:
In this configuration the Load is ON when the opto is not activated, meaning no voltage across A and B.
1768930102424.png

Version #2:
Load is switched ON when 5 volts is applied to A and B.
1768930134654.png
Question? Is the opto actually needed if both sides are 5 volts?
 
Last edited:
Top