Power dissipation in a Darlington built with an optocoupler and NPN

I have implemented a PWM control over a relay from an Arduino. To isolate both circuits I have used an optocoupler 4N35 from Vishay. Since it cannot provide enough current flow to drive the relay, I have used a BC548B transistor creating a Darlington structure with the internal output transistor of the 4N35.

The problem is that I have simulated the circuit but then, when I try to calculate the currents in the circuit I am unable to achieve the simulated values. I don't know how to achieve the $V_{CE(OK3)}$ neither $I_F$. $$I_{K1} = \frac{+12V_{PS2}-V_{CE(Q4)}}{K1}$$
$$I_{K1}=\frac{I_{C(Q4)}}{\beta _{Q4}}\frac{\beta _{OK3}}{(\beta _{OK3}+1)}+I_{C(Q4)}$$
$$V_{CE(Q4)}=V_{CE(OK3)}+V_{BE(Q4)}$$
$$P_{OK3}=I_FV_D+I_{C(OK3)}V_{CE(OK3)}$$
$$P_{Q4}=I_{C(Q4)}V_{CE(Q4)}$$ I hope you can help me,

SOLUTION: Take the $V_{CE(OK3)}=0.2V$ as a standard bjt in saturation region and all the rest came easy. Calculations and simulations matched perfectly.

• Why are you driving a relay with PWM? – Wesley Lee Feb 28 '17 at 14:06
• Relays have a limited lifespan in terms of number of conmutations. Even with a very low PWM frequency you can easily wear out the relay pretty quickly. You should use a MOSFET instead. – Enric Blanco Feb 28 '17 at 14:32
• The PWM is a very very low frequency in this case. Nonetheless, the matter is how to calculate the power dissipation of this circuit. Can you help me with this? – Salus Feb 28 '17 at 16:44
• Thanks for posting your solution, but realize the stackexchange is not a forum. It is a Q & A site. If you have an answer to your question, please post it as an answer and leave your question as just a question. – Bort Mar 1 '17 at 13:05
• @Salus Don't forget to accept your own answer! – user1890202 Mar 1 '17 at 13:41

The simplest answer is that you should not use this configuration. Instead, try simulate this circuit – Schematic created using CircuitLab

A few notes:

You can calculate the opto current from the input current times the CTR, which you get from the data sheet. Then, since this is PWM, Q2 will be switched hard on and off, and in the on condition will only have a gain of 10 to 20 (it's called being in saturation), so you can calculate the load current from that.

Knowing the opto current in mA, multiply by about 11 to get power in mW. Voltage times current, right?

If you want to reduce opto power, place another resistor from +12 to the collector of the opto, sized to drop about 9 or 10 volts at the opto current.

• Hi WhatRoughBeast, First of all, thanks for your answer. The thing is that the circuit is the one I added in the figure, there is no possibility to change it. I should calculate the power dissipation but I'm not able to modify the circuit. – Salus Feb 28 '17 at 14:57
• Sure you can modify it. You cut pin 5 on the 4N35 right at the pcb and lift the lead stub, then solder a short piece of 30 ga wire from the stub to +12. Easy peasy. It'll take you less than 5 minutes. – WhatRoughBeast Feb 28 '17 at 19:10
• Jaja, I correct my words, I want to keep it as it is shown. Anyway, I have solved the problem by taking a Vce = 0.2V for the OK3, then, using the formulas given in the main post, the rest of the values come easy. – Salus Mar 1 '17 at 12:34