Raspberry Pi 4
For information, Recalbox IS NOT compatible with Raspberry Pi 4 yet.
Pour information, Recalbox N'EST PAS encore compatible avec le Raspberry Pi 4.
The Recalbox Team.
Basic On/Off Switch Question
I was reading the basic switch info outlined here, where it talks about editing the .conf file:
"*system.power.switch=PIN56ONOFF for a latching switch
system.power.switch=PIN56PUSH for a momentary switch
I had hoped to use a momentary switch, but have a couple questions.
When using the switch/shutdown process outlined in the above article by editing the .conf file, does it do a safe/proper shutdown when the power button is pressed, or does it just turn the power to the Pi off and potentially cause corruption on the SD card?
According to this article, an LED can be used, but it only mentions an LED being used when paired with a latched switch/reset button combo. Can an LED be used in combination with a momentary switch (with no reset button)?
Thanks in advance for any tips/advice!
Substring last edited by
@xtreemsurf hey pal !
A quick answer :
- Yes it shutdowns properly that's thz reason it was made
- I guess it is independantof the power switch config as gpio14 should provide a voltage only when the pi is on (i guess, couldn't verify by now)
That's great news...thanks! This means I can use a simple switch, rather than buying one of those advanced power/switch boards to control the shutdown process. I ordered a switch and it's on the way...thanks again!
One last question. I'm thinking of adding a fan, which would use pin 6 for ground. With the switch in this diagram, can I use pin 9 for ground instead of pin 6...or any other ground pin? Thanks!
@xtreemsurf All Grounds are connected to each other internally. You can use every GND-Pin that you want.
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!
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
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.