Use of 2N3904 instead of BC337, getting a bit hot

Thread Starter

Sandbird

Joined Sep 10, 2018
3
I've made this little project here https://hackernoon.com/raspberry-pi-temperature-controlled-fan-2aa0de72a564 to cool down my Pi3 which is running a bit hot during the summer. The only difference (or so i thought) was that i use a 5v mini fan instead of a 12v.
My setup is exactly the same, besides the use of an 2N3904 instead of the BC337 that he is using. I also use the same 1 kΩ resistor.
Everything was working fine until today, when i noticed the Transistor was getting hot every time the fan was on. I took a look at my transistors diagram and i noticed that the Emitter and Collector are reversed.
The BC337 has 1.Collector 2.Base 3.Emitter
while mine was 1.Emitter 2.Base 3.Collector
Immediately i shut down the circuit and here i am with a couple of questions :)

1) The max current the 2N3904 can take is 200mA, (same ammount as my fan), using the 1kΩ, i am down to 2.6mA [(3.3v-0.7)/1000], so that shouldnt be the problem switch the fan when the GPIO output is 16mA right ?
2) Should i use a small resistor like 180 ohms (to go up to 14.4mA) ?
3) I know its a silly question...but i should probably switch the Transistor right ? To match the collector/base/emitter specifications of the project.
4) Is it supposed to get hot ? I mean i must be doing something wrong right ? Should i just order a BC337 transistor and be done with it, or can i tweak my current setup somehow ?

I am programmer, not an elec. engineer so i am still learning here. I'd rather figure out why something is wrong than blindly follow instructions.
Thanks in advance.
-S
 

Alec_t

Joined Sep 17, 2013
10,458
Welcome to AAC!
1) It is not good practice to run a component at its maximum rated current. Always allow some leeway. The Bc337 would be a better choice than the 2N3904.
2) As a rule of thumb, the base current should be about a tenth of the collector current; so, for 200mA collector current, ideally you should be putting about 20mA through the base. This ensures that the transistor is switched on fully and so producing minimum waste heat. Because of the limited IO pin current available, you could try 10mA base current (base resistor ~270Ω) to stay well within the limit.
 
Top