Skip to main content
10 events
when toggle format what by license comment
Apr 30, 2016 at 19:07 comment added DimP I am not talking about speed, I am talking about what is the correct way to do it in the general case. Do you have some reference explaining why it is better to leave the BJT base in the tristate instead of pulling it down? Because as far as I know, after the raspberry pi shuts down, the GPIOs are not still connected to the ground. It may not have a big effect here, but in a different scenario, some parasitic current could cause problems.
Apr 30, 2016 at 2:28 comment added Milliways If it is a 5V fan it needs 5V to run. If you put a resistor in series it will get a lower voltage. With 100Ω it is unlikely to run. No it is not "good practice" all the 47kΩ does is reduce the drive. As an Electrical Engineer with 50 years experience I can assure you it is unnecessary. The supposed reason "helps to turn the BJT off fast(sic)" is spurious. In this case speed is irrelevant, but if you (for some reason) you want to speed up switching use an active pulldown. Effectively when the Pi output goes low the 4.7kΩ is effectively connected from base to Gnd.
Apr 29, 2016 at 9:12 history edited DimP CC BY-SA 3.0
Updated image with flyback diode and R2 reduced to 10Ω from 100Ω
Apr 29, 2016 at 8:57 comment added DimP The 100Ω resistor is just an indication, but you are right, I will change the value. I still believe a series resistor is needed (5Ω-10Ω), as otherwise the fan could draw too much current. You are right on the flyback diode, will add this. Why don't we need the 47kΩ? Does the Raspberry Pi have internal pull-downs? Because it is usually a good practice to use a pull-down at the base, even with BJTs. (ref: electronics.stackexchange.com/questions/56010/…)
Apr 29, 2016 at 7:18 vote accept The Garage Chemist
Apr 29, 2016 at 0:54 comment added Milliways The fan is unlikely to run on <50mA. Ditch the series resistor. The fan probably has a brushless motor but you should still include a flyback diode. There is no need for the 47kΩ resistor (but it does no harm).
Apr 28, 2016 at 22:42 comment added DimP Hello! R2 is just to limit the current in case the fan's resistance is too low. As I am saying above "given the resistance of the fan is large enough to limit the current it draws; otherwise include one".
Apr 28, 2016 at 22:39 comment added Ghanima Hello and welcome! What's R2 for?
Apr 28, 2016 at 22:38 review First posts
Apr 29, 2016 at 6:58
Apr 28, 2016 at 22:36 history answered DimP CC BY-SA 3.0