Basic On/Off Switch Question
-
@lackyluuk
You guys have been so helpful...thanks so much! -
Last question...which power pin would I plug the fan into? I'm having trouble with the fan staying on after I shut down Recalbox. I would like the fan to turn off when I turn off the system. Should I use the same pin as the LED? Or...just plug it into a USB port? Thanks!
-
@xtreemsurf I am not sure how to do this. Yes, if the Power LED turns off after shutting down, then you can probably use the same pin.
What I did is using a transistor to control the fan. And the transistor is controlled by a output pin. That means if the system is off, then the pin is LOW and the fan off
-
Thanks! I was worried about powering the fan on the LED pin, since it's only 3.3v. Is that enough power for the fan? It's a small 30mm 12v brushless fan.
Which output pin did you use with the resistor, so that the fan would turn off? Did you need to edit the config file to make that work. I'm new to this, so I appreciate your help!
-
@xtreemsurf
If you have a 12v fan, then you need to have an external 12v power supply to run it. The RPi only provides 5v max.Here is a drawing how to solve it with a transistor. I just gpio14 to control it, but you can use a pin of your choice. I used a 5v fan
https://forum.recalbox.com/topic/3704/push-button-on-off-script-problems/10
-
Thanks for that I for and the drawing! Will I harm the Pi by using a 12v fan...or will the fan just run slowly, since it's only getting 5v?
-
Here's a question for anyone out there who has done this...
If I use a on/off toggle switch (not momentary), and I leave the switch in the OFF position, then unplug the Pi and plug it back in, will it automatically turn on? Or...will it always stay off when the switch is in the off position, even if I unplug it and plug it back in?
-
@xtreemsurf it will turn on.
-
Thanks! You've helped me make my decision...I'll go with a momentary switch.
-
@xtreemsurf you will not harm the pi with the 12v fan but I doubt that the fan is doing what he is supposed to do....cooling I think it will run very slowly.
Why not buy a 5V DC fan? -
You're right...I only paid about $1 for the 12v fan, so it's not much of a loss. It actually spins fast enough to cool the system slightly, but not too fast but the fan is loud. It's a speed that's quiet enough I wouldn't mind leaving it running all the time. I'm considering connecting the fan to the 3.3 V LED pin, to make it turn on/off easily with the system. This would make it run even slower.