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 [2021/01/05 16:56] – lbrpdx | add_powerdevices_rpi_only [2025/08/21 22:30] (current) – [Argon One] command line to get current temperature lbrpdx | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Add Powerdevices and Buttons to your Raspberry ====== | + | ====== Add Powerdevices and Buttons to your Raspberry |
| + | |||
| + | **The Raspberry Pi 5 uses new GPIO code, the details below are not applicable for these boards, except for Argon One V3 at the bottom of the page** | ||
| To keep the price down, the Raspberry Pi board doesn' | To keep the price down, the Raspberry Pi board doesn' | ||
| Line 6: | Line 8: | ||
| * 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 ===== |
| - | Here are the values you can put as '' | + | - Download |
| + | - Save this to '' | ||
| + | - Set executable bit with '' | ||
| + | - Setup your power device according to further below | ||
| - | ^ Device Name ^ system.power.switch | + | <code bash| custom.sh> |
| - | | ATXRaspi | + | #!/bin/bash |
| - | | Mausberry Circuits | + | # custom.sh - place to /userdata/system |
| - | | Pimoroni OnOffShim | + | # by cyperghost 23/11/19 |
| - | | msldigital PiBoard r2013 | REMOTEPIBOARD_2003 | + | # |
| - | | msldigital PiBoard r2015 | REMOTEPIBOARD_2005 | + | |
| - | | UUGear Witty Pi | WITTYPI | + | |
| - | | Retroflag Cases | RETROFLAG | + | |
| - | | Retroflag Cases with button | RETROFLAG_ADV | + | |
| - | | Argon One for RPi4 | ARGONONE | + | |
| + | if [[ $1 == stop ]]; then | ||
| + | batocera-es-swissknife --emukill | ||
| + | fi | ||
| + | </ | ||
| - | ==== Simple pushbutton or switches | + | ===== Commercial Cases & Power Switches ===== |
| - | It is possible to add a button to turn on and turn off your BATOCERA console properly! But how? | + | Here are some commercial power switches/ |
| - | ==== Which button to use? ==== | + | Here are the values you can put as '' |
| + | |||
| + | ^ Device Name ^ system.power.switch | ||
| + | | Argon One for RPi4 (v1/ | ||
| + | | Argon One for RPi5 (v3) | 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 | ||
| + | | Pironman Raspberry Pi 5 Case | PIRONMAN5 | ||
| + | |||
| + | ===== Simple push-button | ||
| + | |||
| + | It is possible | ||
| + | |||
| + | ==== Which GPIO PIN should I use? ==== | ||
| - | You can add a power button to switch on/ | + | 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. | ||
| Line 54: | Line 84: | ||
| ===== 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 62: | Line 98: | ||
| * 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 ==== | ||
| Line 84: | Line 111: | ||
| - Enable the **Safe Shutdown Switch on the PCB**! This small switch depends on the used housing, refer to the shipped manual from Retroflag how to do this. | - Enable the **Safe Shutdown Switch on the PCB**! This small switch depends on the used housing, refer to the shipped manual from Retroflag how to do this. | ||
| - 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 101: | Line 128: | ||
| ==== Argon One ==== | ==== Argon One ==== | ||
| - | Activate the Argon One fan by adding '' | + | <WRAP center round info> |
| + | Until Batocera 40, only ArgonOne V1/V2 cases for Raspberry Pi4 are supported. | ||
| + | |||
| + | **Batocera 41** introduces support for **ArgonOne V3 for Raspberry Pi5**, additionally to ArgonOne V1/V2 for Raspberry Pi4. | ||
| + | </ | ||
| + | |||
| + | Activate the Argon One fan by adding '' | ||
| + | **Don' | ||
| + | |||
| + | By default, the fan starts at 55 degrees Celsius. Here is the default fan curve configuration: | ||
| + | |||
| + | <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, | ||
| - | By default, the fan starts at 55 degrees Celsius. Your can define own temperature/ | + | You can define own temperature/ |
| - | # Configuration file for Argon One Pi4 case | + | To check that the temperature is correctly reported, you can log into [[access_the_batocera_via_ssh|Batocera through SSH]] and run the command '' |
| - | # 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.1609865796.txt.gz
- Last modified: 5 years ago
- by lbrpdx