Maker Pro
Maker Pro

Controlling fans with PIC µcontroller - Transistor current rating issue

Maximo

Jan 25, 2015
2
Joined
Jan 25, 2015
Messages
2
Hi,
I am having trouble getting my circuit to work, any help would be appreciated :)

Here is my setup :

I want to control 3 PC fans via a PIC using Pulse Width Modulation (PWM).
I will use one of my micro-controller outputs to open/close a transistor used as a switch. All three fans should be controlled together. With all three fans running full blast, they consume about 900mA altogether.
The problem is that the transistor i wanted to use (NPN 2n2222) only has a collector current rating of 600mA.

I have TIP31 (NPN) and TIP32 (PNP) transitors available also but the micro-controller has a maximum output of 20mA, which is not enough to saturate them.

Any ideas ?

I was thinking of wiring 2 transistors together as a "Darlington pair", could that work ?

PS: I would like to avoid using one transistor for each fan for ease of wiring.µp fans v2.png
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hi Maximo and welcome to Electronics Point :)

Yes, you can connect two transistors together as a Darlington pair, but you will lose a bit of voltage that way.

Here's the Darlington option.

272430-1.001.GIF

All voltages marked on the diagram are approximate.

When RB7 is high, Q1 will have enough base voltage and current (via RB) to saturate. In saturation, its collector-emitter voltage VCE will be around 0.2V. It then has to provide about 0.7V to the base-emitter junction of Q2 to turn it ON.

This means that if Q1's collector voltage dropped below 0.9V there would not be enough voltage for Q2's base-emitter junction. Since Q1's collector is connected to Q2's collector, Q2 is unable to pull its collector voltage down below about 0.9V because doing so would rob it of base current.

Q2 can never saturate in a Darlington configuration because of this fact. In your circuit, at 100% duty cycle, Q2 would have about 0.9V across it, and about 0.9A flowing through it, so it would dissipate about 0.8W. That is a bit too much for a TO-220 transistor to dissipate without a heatsink. A small heatsink would be enough to keep it at a reasonable temperature.

272430-2.001.GIF
This is my suggestion. It is similar to the first one, but Q1 and Q2 are not connected as a Darlington; instead, Q1 is used as an emitter follower to provide enough current to saturate Q2.

When RB7 is high, there will be 5V on Q1's base. Q1's collector is connected to the output circuit's positive supply rail, so it can pull its emitter up to about 0.7V lower than its base, i.e. 4.3V. Q1 then provides the base current for Q2; this current is set by the value of RB to ensure ample base current to saturate Q2 at the maximum possible collector load current.

RB's value can be calculated using Ohm's Law: R = V / I where V is the voltage across RB (about 3.6V) and I is the desired Q2 base current in amps. For example if you want 50 mA base current, RB should be about 72Ω (68Ω closest preferred value).

With this arrangement, the maximum power dissipation in Q2 is reduced from 0.8W to 0.2W and heatsinking is not needed.

I've also shown a diode across the load. This is needed if the load is inductive (and motors are inductive) to protect Q2 from the inductive kickback from the motors' inductance when Q2 turns OFF. A 1N400x (where x is 1~7) will be fine unless your PWM is very fast, e.g. over 1 kHz, in which case a faster diode would be better.

For more on saturation in bipolar junction transistors see https://www.electronicspoint.com/resources/how-a-bjt-transistor-works-base-current-version.37/ and https://www.electronicspoint.com/resources/saturation-in-transistors-bjts-why-and-how.28/.

Finally, these days MOSFETs are preferred over BJTs for this kind of thing because they have lower losses and are easier to drive. Digi-Key (http://www.digikey.com) have the NTD4906N for under USD 1.00; it has an ON resistance of 8 mΩ when driven with a gate-source voltage of 4.5V so it would dissipate about 0.007 watts! And it's smaller than a TIP31. It can be driven from the microcontroller with just a series resistor (around 33Ω).
 

Maximo

Jan 25, 2015
2
Joined
Jan 25, 2015
Messages
2
Thanks so much for your help, your suggestion is exactly what i needed. I will look into buying a MOSFET, but your solution should work great for now. I've also got a couple diodes on hand so i'll look into their switching speeds.

Also, those links you posted will help me determine each transistors base resistor !

Edit : Just to confirm, with this configuration do i need a base resistor on Q1 (2n2222) ? It is my understanding that i don't since when 5v is applied Vbe=0.7 V, and Rb then provides current to Q2
 
Last edited:
Top