0

I have a project that requires a fan to keep the Pi cool due to the terrible ventilation. It's a 5v 0.6w fan. So I thought I could use this wiring here: enter image description here

Instead of 12v it would be 5 from a UBEC, and that same UBEC would also be powering the raspberry pi through the GPIO. Would this work? If so, for the transistor do I use an NPN or PNP? I have a PN2222A. Lastly, how do I find which resistor to use for the base of the transistor.

NULL
  • 2,130
  • 7
  • 24
  • 49
  • 1
    Isn't this covered somewhere in the many similar if not identical questions? – joan May 13 '16 at 14:43
  • @joan I looked at those. I believe my application is different because of the UBEC. Also, I don't want to risk frying something :-). – NULL May 13 '16 at 15:05
  • 1
    "_that same UBEC would also be powering the raspberry pi through the GPIO_" wow wait, what do you actually mean by that? – DimP May 13 '16 at 15:31
  • @DimP I mean the UBEC 5v output is wired to the 5v and ground GPIO pins to power the Pi. It is also wired to the fan where 12v is shown in the diagram. – NULL May 13 '16 at 15:57
  • @DimP This is what I am using: http://www.amazon.com/Ship-Hobbywing-Switch-mode-UBEC-Lowest/dp/B008ZNWOYY/ref=sr_1_1?ie=UTF8&qid=1463155087&sr=8-1&keywords=ubec – NULL May 13 '16 at 15:58
  • Please check: http://raspberrypi.stackexchange.com/questions/32837/plug-a-5v-fan-to-gpio-1-and-2 http://raspberrypi.stackexchange.com/questions/8830/adding-5v-fan-to-gpio-2-and-6 http://raspberrypi.stackexchange.com/questions/27500/powering-5v-fan-gpio-1-3 – Ghanima May 13 '16 at 19:28
  • Also: that **wrong** (yet somewhat viral) circuit has a major drawback: the transistor on the *high-side* (near + voltage) is not a useful circuit with an NPN transistor. Connect the emitter (the arrow) to ground and put the load (fan) between collector and +5V. See http://raspberrypi.stackexchange.com/questions/27928/power-a-5v-relay-from-gpio-pins – Ghanima May 13 '16 at 19:29
  • In that case, it should be fine to power the raspberry pi from the 5V pin. But bear in mind that you bypass the polyfuse this way, so be sure that's a quality UBEC. You have plenty of answers to your actual question, but here is one more, written by me: http://raspberrypi.stackexchange.com/questions/46598/how-to-operate-a-cooling-fan-using-gpio-pins-rasppi2/46601#46601 – DimP May 14 '16 at 18:43
  • Thank you for your help! I wired it and it works. I voted to close the question. – NULL May 27 '16 at 14:22

0 Answers0