Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
add_powerdevices_rpi_only [2020/09/13 16:56] – section RETROFLAG added lala | add_powerdevices_rpi_only [2024/02/25 03:12] (current) – [Table] dmanlfc | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Add Powerdevices and Buttons to your Raspberry ====== | + | ====== Add Powerdevices and Buttons to your Raspberry |
- | To keep the price down, the Raspberry Pi Baird doesn' | + | **The Raspberry Pi 5 uses new GPIO code, the details below are not applicable to these boards** |
+ | |||
+ | To keep the price down, the Raspberry Pi board doesn' | ||
If you don’t want to build your own, several popular commercial options are available. They will add a power switch to your Raspberry Pu, sometimes provide a temperature-controller fan... and add a stylish look to your board. | If you don’t want to build your own, several popular commercial options are available. They will add a power switch to your Raspberry Pu, sometimes provide a temperature-controller fan... and add a stylish look to your board. | ||
* Commercial Power Switches | * Commercial Power Switches | ||
- | * provide | + | * Provide |
- | * costs are around 10-25 USD | + | * Costs are around 10-25 USD |
- | * usually | + | * Usually |
* Simple Buttons or latching switches | * Simple Buttons or latching switches | ||
- | * very simple setup | + | * Very simple setup |
- | * low cost | + | * Low cost |
- | * no powercut possible | + | * No powercut possible |
- | ==== Why is a Raspberry Pi power button important? ==== | + | ===== Why is a Raspberry Pi power button important? |
- | You should never " | + | You should never " |
- | >Note: When we "shut down" the Pi, it will send it into a halt state, which still consumes a very small amount of power. This is similar to how all modern computers work. In this guide walk through the process of adding a power button that will both halt and wake the Pi up from a halted | + | <WRAP center round info> |
+ | When Batocera | ||
+ | </ | ||
- | ==== Commercial Power Switches ==== | + | This method gives the best user experience if you use the GPi-case from Retroflag for example. This nice housing only has one button switch to simply turn on/off the Raspberry. Since Batocera 5.25 the OS is best prepared for all kinds of power devices connected to the Raspberry. But you will lose your game SRM save (your in-game save file) if you just trigger the power button //inside// a game session. |
- | Here are some commercial powerdevices that are currently supported. These offer a real power cut, that means the Raspberry is really switched off. Usually these small power devices are plugged on top of the Raspberry using it's 40 Pin header. For further install instruction use the links provided. | + | ===== Save data protection ===== |
- | ^ Device Name ^ system.power.switch | + | - Download the provided script below |
- | | ATXRaspi | + | - Save this to '' |
- | | Mausberry Circuits | + | - Set executable bit with '' |
- | | Pimoroni OnOffShim | + | - Setup your power device according to further below |
- | | msldigital PiBoard r2013 | REMOTEPIBOARD_2003 | + | |
- | | msldigital PiBoard r2015 | REMOTEPIBOARD_2005 | + | |
- | | UUGear Witty Pi | WITTYPI | + | |
- | | Retroflag Cases | RETROFLAG | + | |
- | | Argon One for RPi4 | ARGONONE | + | |
+ | <code bash| custom.sh> | ||
+ | #!/bin/bash | ||
+ | # custom.sh - place to / | ||
+ | # by cyperghost 23/11/19 | ||
+ | # | ||
- | ==== Simple pushbutton or switches ==== | + | if [[ $1 == stop ]]; then |
+ | batocera-es-swissknife --emukill | ||
+ | fi | ||
+ | </ | ||
- | It is possible to add a button to turn on and turn off your BATOCERA console properly! But how? | + | ===== Commercial Power Switches ===== |
- | ==== Which button to use? ==== | + | Here are some commercial power switches/ |
- | You can add a power button to switch on/ | + | Here are the values you can put as '' |
+ | |||
+ | ^ Device Name ^ system.power.switch | ||
+ | | Argon One for RPi4 | ARGONONE | ||
+ | | ATXRaspi | ||
+ | | DeskPi Pro case | DESKPIPRO | ||
+ | | Mausberry Circuits | ||
+ | | msldigital PiBoard r2013 | REMOTEPIBOARD_2003 | ||
+ | | msldigital PiBoard r2015 | REMOTEPIBOARD_2005 | ||
+ | | OneNineDesign Powerhat | ||
+ | | Pimoroni OnOffShim | ||
+ | | UUGear Witty Pi | WITTYPI | ||
+ | | Retroflag cases | RETROFLAG | ||
+ | | Retroflag cases with buttons | ||
+ | | Retroflag GPIO case | RETROFLAG_GPI | ||
+ | | Kintaro Super Kuma/ | ||
+ | | Pironman Raspberry Pi 4 Case | PIRONMAN | ||
+ | |||
+ | ===== Simple push-button or switches ===== | ||
+ | |||
+ | It is possible to add a button to turn on and turn off your Batocera console properly! But how? | ||
+ | |||
+ | ==== Which GPIO PIN should I use? ==== | ||
+ | |||
+ | You can add a power button to switch on/ | ||
Note on the push buttons: some GPIO have resistors pull-up built-in (resistors connected to the + 3.3V), so it is preferable to use switches normally open (abbreviated NO) with these pins. | Note on the push buttons: some GPIO have resistors pull-up built-in (resistors connected to the + 3.3V), so it is preferable to use switches normally open (abbreviated NO) with these pins. | ||
{{ batocera_pin56.png? | {{ batocera_pin56.png? | ||
- | to connect the switch to the Raspberry Pi GPIO, plug a PIN on the GPIO3 (physical PIN 5 above on the left) and another on the mass located just to the right on the right (physical PIN 6): | + | to connect the switch to the Raspberry Pi GPIO, plug a PIN on the GPIO3 (physical PIN 5 above on the left) and another on the mass located just to the right on the right (physical PIN 6) |
===== Activation of the switch ===== | ===== Activation of the switch ===== | ||
- | ==== Manual ==== | + | ==== GUI Menu Mode ==== |
+ | |||
+ | Get a terminal window by quitting EmulationStation with a Keyboard or get a [[access_the_batocera_via_ssh|access to terminal by SSH]]. Now enter ''/ | ||
+ | |||
+ | {{ 65899397-ef014600-e3b3-11e9-9465-ce7629125e19.png? | ||
+ | |||
+ | ==== Manual | ||
Check in the table above what is the type of power switch you need. | Check in the table above what is the type of power switch you need. | ||
Line 59: | Line 96: | ||
* For a latching switch edit batocera.conf with your preferred text editor and add '' | * For a latching switch edit batocera.conf with your preferred text editor and add '' | ||
* Reboot the system | * Reboot the system | ||
- | * Alternatively, | + | * Alternatively, |
- | batocera-settings --command | + | batocera-settings-set system.power.switch PIN56ONOFF |
- | + | ||
- | Your BATOCERA | + | then reboot. |
- | + | ||
- | ==== GUI Menu Mode ==== | + | |
- | + | ||
- | Get a terminal window by quitting EmulationStation with a Keyboard or get a [[access_the_batocera_via_ssh|access to terminal by SSH]]. Now enter | + | |
- | * '' | + | |
- | * ''/ | + | |
- | and you will see a terminal windows like in picture down. From there you can select and activate your power or switch device. The script will show you an already activated device (**ONOFFSHIM** in this case) and will later show you a small message box, if the value setup was successfully setted up. After this reboot the device and everything should work fine. | + | |
- | + | ||
- | {{ 65899397-ef014600-e3b3-11e9-9465-ce7629125e19.png? | + | |
==== Retroflag ==== | ==== Retroflag ==== | ||
- | Retroflag is the manufacturer who takes focus on retro case for Raspberry | + | Retroflag is the manufacturer who takes focus on retro case for Raspberry |
- | Besides the nice looking there are **always** working buttons for power and reset possible. But you have to take a few steps there. | + | Besides the nice looking there are **always** working buttons for power and/or reset possible. But you have to take a few steps there. |
- | - Enable the safe shutdown mode. This small switch depends on the used housing, refer to the manual how to enable the switch | + | - Enable the **Safe Shutdown Switch on the PCB**! |
- Edit '' | - Edit '' | ||
- | | + | |
- | | + | |
- | | + | |
- Activate or Select the correct powerswitch '' | - Activate or Select the correct powerswitch '' | ||
- Reboot, this will activate the Safe Shutdown feature | - Reboot, this will activate the Safe Shutdown feature | ||
- | <WRAP center round info 80%> | + | <WRAP center round info> |
**For the NESPi 4 case only** | **For the NESPi 4 case only** | ||
Line 94: | Line 122: | ||
</ | </ | ||
+ | Also, for the NESPi4 case, you might experience some sluggishness using the HDD/SSD " | ||
==== Argon One ==== | ==== Argon One ==== | ||
- | By default, the fan starts at 55 degrees Celsius. | + | Activate the Argon One fan by adding '' |
+ | |||
+ | By default, the fan starts at 55 degrees Celsius. | ||
+ | |||
+ | <file - argonone.conf> | ||
+ | # Configuration file for Argon One Pi4 case | ||
+ | # temperatures are in Celsius | ||
+ | # fan_speed are from 0-100 percent | ||
+ | # syntax is: temp_threshold=fan_speed | ||
+ | # default is: | ||
+ | 45=0 | ||
+ | 55=10 | ||
+ | 60=55 | ||
+ | 65=100 | ||
+ | </ | ||
+ | |||
+ | With this fan curve configuration, | ||
+ | - At lower than 55°C, the fan is off | ||
+ | - At 55-59°C, the fan runs at 10% speed | ||
+ | - At 60-64°C, the fan runs at 55% speed | ||
+ | - At 65°C and higher, the fan runs at 100% speed | ||
+ | |||
+ | From the vendor recommendations, | ||
- | # Configuration | + | You can define own temperature/ |
- | # temperatures are in Celsius | + | |
- | # fan_speed are from 0-100 percent | + | |
- | # syntax is: temp_threashold=fan_speed | + | |
- | # default is: | + | |
- | 45=0 | + | |
- | 55=10 | + | |
- | 60=55 | + | |
- | 65=100 | + | |
- | With this ladder, fan starts at 10% when reaching 55 degrees, and rises up to 100% when reaching 65 degrees Celsius. | ||
- | From the vendor recommendations, |
- add_powerdevices_rpi_only.1600009003.txt.gz
- Last modified: 4 years ago
- by lala