I've been googling info about how to install a 5V fan on a RPI but when it comes to electronic and circuitry my mind just disconnects.
Things I've read but I don't know if they're true or not:
- It's a bad idea to plug the fan connectors directly to the RPI GPIO pins because the fan needs a burst of current when it starts running and it's also dangerous when it stops because it may send a harmful current to the ground pin.
- It's a good idea to use transistors and resistors if you want your RPI to be safe.
- GPIO 18 handles PWM so it's possible to connect a 3 PIN fan and configure the fan speed depending of the CPU's % utilisation
- I've read that its important to use 2 transistors, the second one between the fan connector and the GPIO Ground pin
The thing is, I don't know anything about circuitry and electronic. I could be able to solder with tin, but nothing else. That's why I would like to have your help.
I have 2 options, a 2 pin 5V fan or a 3 pin 5V fan and I would like to plug them in the 3.3V GPIO pin due to noise issues (If I can set the 3 pin fan speed at a low speed I could plug it in the 5V pin I guess). Now, here is where I get lost:
This is the RIP3B GPIO pinout
The fan will have 5V and a maximum of 0.2A
The transistor I've read in most forums is this one
FEATURES
*Collector current up to 700mA
*Collector-Emitter voltage up to 20 V
I couldn't find info about resistors used in those forums.
If turning on and off the fan every time the system gets hot can harm the RPI after this installation, I will think about having the fan always turned on, but if the transistors and resistors can handle these current issues, I will control the fans behavior with some scripts.
My questions are, How should I connect the RPI GPIO pins + the fan connectors (in both cases if possible) + the transistors + the resistors?
Is the NPN S8050 the correct transistor for this?
If so, Which resistor should I use?
Is it safe to connect the 3rd fan pin directly to the GPIO 18 pin?
If I have to solder some fan cables and cables to the transistors and resistors pins it won't be a problem.
This is not my native language so, excuse me if I wrote some grammatical errors
