As I said in the title, I'm looking for a transistor that I could use for switching a Raspberry Pi 5v. fan. The Pi is in an unventilated case, which makes it heat up to 70°C while I would prefer maintaining a cooler temperature of ~45°C. So I'm using a small fan that works perfectly, but is quite noisy when at full load. Because the fan is mounted inside the case, I would have to manually open the case then unplug the fan to stop it. That's why I would prefer being able to control it with a GPIO pin (which is completely doable, I've seen a lot of tutorials about that).
The problem is that the GPIO pin aren't powerful enough to drive the fan (plus it would be dangerous for the Pi itself). So I need to have a transistor acting as a switch controlling the fan power.
I actually have some transistors at hand, but I'm not sure if they are suitable for this use, nor which one of them would fit the best. I'dbe glad if you could help me picking the best transistor, preferably within the ones I already have.
The transistors I have (several pieces in each case) :
The fan is a 1.5cm 2 pins fan running on 5V DC, 0.12A. I would like to control it using one GPIO pin, which delivers 3.3V.
Thanks in advance for your help !
[IMPORTANT EDIT] After having searched in my electronical stuff, I discovered that I have a bunch of BC107B transistors (Datasheet), which are NPNs, so the problem is kinda fixed now.
I did some tests with one of them, and at this point, it seems to work perfectly. I can even use PWM to control the speed of the fan. However, before atempting to make anything definitive, I would appreciate if you could tell me if I did everything correctly (ie,i'm not going to damage my Pi).
- Here is the circuit I made (extremely simple, maybe too much) :
- Can you confirm that the BC107B is suitable for this use ? (I suppose yes, but anyway, I'm not 100% sure that I'm able to understand correctly all the datasheet)
- Could I use a small capacitor in parallel with the fan to smooth its power when using PWM ?