Electronic – Ardruino control for heating element

transistors

I am doing a project that requires me to control the heating element (as shown below 12V 100W). It's a PWM control from the Ardruino through a BJT transistor to control the MOSFET to the element.
My problem is the calculations for the resistors to use. With what I have done so far is to say that R1=100k\$\Omega\$ and R2=3k\$\Omega\$, but I do not know if that is correct or if there is a better layout to use. Using the S8050 and IRFZ44N.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

I'll expand a bit on computation in the comment from Stiddily.

Ignoring switching speed issues, the value of R1 should be chosen a) large enough that the current is smaller than that maximum rating of the Arduino, and b) small enough that the current is large enough to saturate the transistor.

To compute the minimum R1 value

The Arduino pin will go to 5 V or 3.3 V depending on how you power it, and I think the recommended maximum sustained current is 20 mA. At saturation, the transistor base-emitter will drop 1.2 V (from datasheet). So to stay under 20 mA with the 5 V supply, you should use (from Ohm's law) at least 190 Ω, but because it's not so critical, I'd use at least 1 kΩ, which will give about 4 mA (or 2 mA if you use 3.3 V)

To compute the minimum R2 value

The R2 value should be large enough the current going through it and the transistor is within safe limits in saturation.

The transistor drops 0.5 V in saturation (from datasheet) so the voltage drop across the resistor is 11.5 V. The maximum collector current rating of the transistor is 1.5 A. In that case the resistor would also dissipate about 17 Watts of power and probably catch fire very quickly, so the limiting factor is the power rating of the resistor.

Using a normal 1/4 W resistor, we'd like to have at most 1/8 W of power dissipation in R2. Using P=UI and Ohm's law, we find that about 1 kΩ will keep us in that limit and give a 11 mA current. So R2 should be at least 1 kΩ, but can be a little bit bigger too.

To compute the maximum R1 value

It depends on the chosen R2 value. Using the simple transistor equation Ic = h * Ib, we want R1 to be small enough that the base current Ib is larger than Ic/h. Using a conservative value of h = 100, and the 11 mA above, the base current has to be at least 110 µA. With the smaller 3.3 V supply (and the transistor drop), this means at most 19 kΩ in R1, but that's already very high.

So all in all, your R2 should be at least 1 kΩ but can be a bit higher. Your R1 depends on your R2, but with that smallest R2 value, it can be something between 250 Ω and 19 kΩ. Lower values are generally better for switching speed. I'd personally use 1 kΩ for R1 and maybe something like 1–5 kΩ for R2.