# Designer circuit using optocoupler

I have a raspberry pi trying to drive an intercom system.

The intercom has a 12V output which when connected to ground opens the door.

What I want to do is have the raspberry pi 3V GPIO switch drive the optocoupler and this will ground the intercom opening the door, like below.

simulate this circuit – Schematic created using CircuitLab

The issue I have is not enough current is passing through the transistor side of the optocoupler to the emitter, with R1 being 150ohm, only 15mA passes through.

The optocoupler I'm using is: http://www.cel.com/pdf/datasheets/ps2501.pdf

I'm assuming I'm using the wrong optocoupler or its something to do with the CTR, but I'm at a loss as to interpret what the issue is.

• Is the base of the transistor supposed to be disconnected from the left side of the circuit?
– user103380
Feb 6, 2018 at 6:00
• @KingDuken: I assume D1 and PHT1 are parts of the optocoupler. Feb 6, 2018 at 6:07
• Take a look at the Ic vs Vce graph in the datasheet Piers. I don't think the phototransistor could drive 50 mA with 12 volts across it. Feb 6, 2018 at 6:11
• Do you really need isolation in this application? Why not just use a MOSFET, save space, save money. Feb 6, 2018 at 6:23
• @jramsay42: Yeh I was thinking that might be the case, wondering if an easy solution is to get one that can drive 50ma. Feb 6, 2018 at 6:35

PHOTOCOUPLER PS2501-1,-4,PS2501L-1,-4 CTR = 80% to 600%

You must use the worst case 80%

Typically If input is listed in the tables here, If=10 mA @ Vf=1.14V

So you only expect 8mA out and or even 80% of your 15mA.

Generally for Q2 if need Ib=5~10% of Ic when Vce=Saturated

So an additional transistor is needed. and then configure as a Darlington.

simulate this circuit – Schematic created using CircuitLab

You can drive the opto with 10mA from PIO port on Anode or cathode depending on power on state or preference for positive or negative logic.

I assume you have decoupled V+ nearby and a reverse clamp diode for the Q2. The funny schematic just shown here ( dont draw yours this way) just add a note to minimize the loop area. (twisted pair or short wires.)

• Thanks Tony, is it possible to pass through the 53mA from the source without having to create a darlington circuit. The reason being, 1) there is sufficient current from the source 2) I want to avoid additional circuitry if possible. Feb 6, 2018 at 7:35
• Unless you were able to locate a part with binned CTR values ( by part number suffix) and got one in the high range of 300% such that you could drive 53mA with an input of 53/3 = 18mA ...NO ... but people usually buy the 4 channel relays on a card cheap.... Feb 6, 2018 at 14:28