mini Projekt Recalbox (Raspberry Pi) Power Switch

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • mini Projekt Recalbox (Raspberry Pi) Power Switch

    Ich kann bis heute nicht verstehen warum ein Raspberry Pi keinen Hardware Power Switch hat. Ist doch voll blöd seine Recalbox anzuschmeißen in dem man den USB Stecker immer reinstöpseln muss.
    Ebenso wie bei den großen Rechnern sollte man sein System in einen definierten Zustand versetzen (runterfahren) bevor man die Stromversorgung killt.

    Aber gut das die Jungs von Recalbox ,eventuell auch bei Retropi, mitgedacht haben und ein Script integriert haben die es ermöglicht den Pi runterzufahren und auch wieder zu starten über ein Signal an den GPIO Headern.

    Ich hatte mir als Gehäuse dieses Transparente ausgesucht weil es so gut zum bereits vorhandenen transparenten PS3 Controller passte. Deshalb dachte ich mir da muss jetzt auch ein wenig Bling Bling rein und nicht nur eine langweilige Power LED.

    Hab also mir eine kleine PCB entworfen die den Power Button in das Gehäuse integriert und einen kleine Bootanimation enthält. Da ich nicht wirklich viel Ahnung von Microcontrollern hab fällt was selber Programmieren aus.
    Da ich aber gut im Recyceln bin, da kommt der kleine Chinese in mir durch, viel mir wieder das "SNES animierte Logo" ein. Vielen Dank an dieser Stelle an borti4938 und den jensma.
    Ich habe die Beschaltung ein wenig verändert und die Anzahl der LED für meinen Einsatz angepasst.

    Rausgekommen ist dann das:






    System starten

    PCB mit Boot Animation




    System herunterfahren

    PCB mit Boot Animation






    Wem das gefällt und er das selber nachbauen möchte stelle ich gern die PCB Daten kostenlos zur Verfügung.

    PCB mit Boot Animation
    oshpark.com/shared_projects/hJrZL2gD

    Code für den Attiny45
    Logo_Animation.rar

    Als Taster kommt zur Verwendung: MARQUARDT 3006 ( hier z.B. erhältlich: ebay.de/itm/141924047634?_trks…geName=STRK%3AMEBIDX%3AIT)




    Aktivierung des Powerbuttons in der Konfiguration der Recalbox

    - euer Raspberry Pi muss eingeschalten und mit euer Heimnetzwerk per WLAN oder LAN verbunden sein
    - schaut am besten in eurem Router nach welche IP die Recalbox zugewiesen bekommen hat. In meinem Beispiel ist das die 192.168.2.208
    - Öffnet euren Webbrowser und gebt in der Adresszeile diese IP ein. Jetzt sollte der Recalbox Manager aufgerufen werden.
    - im Recalbox Manger wählt ihr "Lesen und editieren der Recalbox Konfigurations-Datei" aus.



    - unter System Options in der Konfiguration sollte nur noch folgende Konfiguration drinnen stehen. Bitte löscht alle anderen Powerbutton Konfigurationen und gebt acht das die richtige Konfiguration nicht noch aus kommentiert ist.



    - jetzt ganz runterscrollen und abspeichern.



    - danach nur noch die Recalbox (an der Recalbox) via Software runter fahren.

    Nachdem die Recalbox herunter gefahren ist kann sie jetzt jederzeit per kurzem Knopfdruck gebootet oder herunter gefahren werden.

    Hinweis: Nachdem der Pi runtergefahren ist leuchtet ständig die Power und die Activity LED. In meinen Pi´s habe ich die abeiden LED´s entfernt damit die Recalbox nicht wie ein Weihnachtsbaum leuchtet wenn sie runtergefahren ist.

    Nach einem Stromausfall oder Anstecken des Netzteil fährt der Raspberry Pi automatisch hoch. Mir ist bisher auch keine Möglichkeit bekannt wie man das unterbinden kann.

    Dieser Beitrag wurde bereits 14 mal editiert, zuletzt von srdwa ()

  • Super Arbeit!

    Ich hätte noch ne kleine Alternative (nur zum Hochfahren).
    Auf der PCB ist ein Bereich (2 Vias) mit RUN beschriftet.
    Wenn man diese Verbindung schließt führt der Pi einen reset aus.
    Da man den Pi aber bei Retropie/Recalbox eh über das Menü runterfahren kann sorgt das dann im ausgeschalteten Zustand dafür das der Pi wieder hochfährt.

    Hab ich an meinem Pi3 so im Einsatz und funktioniert prima und man muss ebenfalls nicht mehr den Stecker ziehen :)
    Bilder
    • image.jpeg

      840,51 kB, 1.936×1.936, 125 mal angesehen
    -Play and have fun!-

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von SegaMan ()

  • Also mit Linux kenne ich mich jetzt gar nicht aus. Allerdings weis ich das deine Recalbox Version voll kompatibel zum Powerbutton ist.
    Kannst mal einen Screenschot von der Konfigurationsdatei machen?
  • Spoiler anzeigen

    Brainfuck-Quellcode: recalbox.conf

    1. # System Variable
    2. # You can configure your recalbox from here
    3. # To set a variable, remove the first ; on the line
    4. global.videomode=CEA 4 HDMI
    5. # ------------ A - System Options ----------- #
    6. # Uncomment the system.power.switch you use
    7. ;system.power.switch=ATX_RASPI_R2_6 # http://lowpowerlab.com/atxraspi/#installation
    8. ;system.power.switch=MAUSBERRY # http://mausberry-circuits.myshopify.com/pages/setup
    9. ;system.power.switch=REMOTEPIBOARD_2003 # http://www.msldigital.com/pages/support-for-remotepi-board-2013
    10. ;system.power.switch=REMOTEPIBOARD_2005 # http://www.msldigital.com/pages/support-for-remotepi-board-plus-2015
    11. ;system.power.switch=PIN56ONOFF # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
    12. system.power.switch=PIN56PUSH # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
    13. ;system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
    14. ## Recalbox Manager (http manager)
    15. system.manager.enabled=1
    16. ## Recalbox API (REST)
    17. system.api.enabled=0
    18. ## EmulationStation menu style
    19. ## default -> default all options menu
    20. ## none -> no menu except the game search menu
    21. ## bartop -> less menu, only needed for bartops
    22. system.es.menu=default
    23. ## Emulator special keys
    24. ## default -> default all special keys
    25. ## nomenu -> cannot popup the emulator menu
    26. ## none -> no special keys in emulators
    27. system.emulators.specialkeys=default
    28. ## Show or hide kodi in emulationstation (0,1)
    29. kodi.enabled=0
    30. ## Start kodi at launch (0,1)
    31. kodi.atstartup=0
    32. ## set x button shortcut (0,1)
    33. kodi.xbutton=1
    34. ## Kodi can wait for a network component before starting
    35. ## waithost is the ip or hostname that must answer to a ping to validate the availability
    36. ## waittime is the maximum time waited when kodi boots
    37. ## if waitmode is required, kodi will not start if the component is not available
    38. ## if waitmode is wish, kodi will start if the component is not available
    39. ## if waitmode is not set or has another value, kodi will start immediately
    40. ;kodi.network.waitmode=required
    41. ;kodi.network.waittime=10
    42. ;kodi.network.waithost=192.168.0.50
    43. # ------------ B - Network ------------ #
    44. ## Set system hostname
    45. system.hostname=RECALBOX
    46. ## Activate wifi (0,1)
    47. wifi.enabled=1
    48. ## Wifi SSID (string)
    49. wifi.ssid=
    50. ## Wifi KEY (string)
    51. ## Escape your special chars (# ; $) with a backslash : $ => \$
    52. wifi.key=
    53. ## Samba share
    54. system.samba.enabled=1
    55. ### Virtual Gamepads
    56. system.virtual-gamepads.enabled=1
    57. ### SSH
    58. system.ssh.enabled=1
    59. # ------------ C - Audio ------------ #
    60. ## Set the audio device (auto, hdmi, jack)
    61. audio.device=jack
    62. ## Set system volume (0..100)
    63. audio.volume=100
    64. ## Enable or disable system sounds in ES (0,1)
    65. audio.bgmusic=1
    66. # -------------- D - Controllers ----------------- #
    67. # Enable support for standard bluetooth controllers
    68. controllers.bluetooth.enabled=1
    69. ## Please enable only one of these
    70. # -------------- D1 - PS3 Controllers ------------ #
    71. ##Enable PS3 controllers support
    72. controllers.ps3.enabled=1
    73. ## Choose an driver between official, shanwan and gasia if you have dualshock clones (official,shanwan,gasia)
    74. controllers.ps3.driver=official
    75. # ------------ D2 - XBOX Controllers ------------ #
    76. ## Xbox controllers are already supported, but xboxdrv can solve some compatibility issues
    77. ## Enable xboxdrv driver, disable this if you enabled ps3 controllers (0,1)
    78. controllers.xboxdrv.enabled=0
    79. ## Set the amount of controllers to use with xboxdrv (0..4)
    80. controllers.xboxdrv.nbcontrols=2
    81. # ------------ D3 - GPIO Controllers ------------ #
    82. ## GPIO Controllers
    83. ## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
    84. controllers.gpio.enabled=0
    85. ## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
    86. controllers.gpio.args=map=1,2
    87. ## DB9 Controllers
    88. ## Enable DB9 drivers for atari, megadrive, amiga controllers (0,1)
    89. controllers.db9.enabled=0
    90. ## db9 arguments
    91. controllers.db9.args=map=1
    92. ## Gamecon controllers
    93. ## Enable gamecon controllers, for nes, snes psx (0,1)
    94. controllers.gamecon.enabled=0
    95. ## gamecon_args
    96. controllers.gamecon.args=map=1
    97. ## XGaming's XArcade Tankstik and other compatible devices
    98. controllers.xarcade.enabled=1
    99. # ------------ F - Language and keyboard ------------ #
    100. ## Set the language of the system (fr_FR,en_US,en_GB,de_DE,pt_BR,es_ES,it_IT,eu_ES,tr_TR,zh_CN)
    101. system.language=de_DE
    102. ## set the keyboard layout (fr,en,de,us,es)
    103. ;system.kblayout=us
    104. ## Set you local time
    105. ## Select your timezone from : ls /usr/share/zoneinfo/ (string)
    106. ;system.timezone=Europe/Paris
    107. # ------------ G - UPDATES ------------ #
    108. ## Automatically check for updates at start (0,1)
    109. updates.enabled=1
    110. # default : stable ; set to beta to get the next version currently being tested. set to unstable at your own risk to get the development version.
    111. updates.type=stable
    112. # ------------ H - HERE IT IS - GLOBAL EMULATOR CONFIGURATION ------------ #
    113. ## The global value will be used for all emulators, except if the value
    114. ## is redefined in the emulator
    115. ## Set game resolution for emulators
    116. ## select your mode from the command : tvservice -m [MODE]
    117. ## CEA 5 HDMI : 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced
    118. ## CEA 4 HDMI : 1280x720 @ 60Hz 16:9, clock:74MHz progressive
    119. ## use 'default' for using the default resolution
    120. ## (string)
    121. global.videomode=CEA 4 HDMI
    122. ## Shader set
    123. ## Automatically select shaders for all systems
    124. ## (none, retro, scanlines)
    125. global.shaderset=retro
    126. ## Once enabled, your screen will be cropped, and you will have a pixel perfect image (0,1)
    127. global.integerscale=1
    128. ## Set gpslp shader for all emulators (prefer shadersets above). Absolute path (string)
    129. global.shaders=
    130. ## Set ratio for all emulators (auto,4/3,16/9,16/10,custom)
    131. global.ratio=auto
    132. ## Set smooth for all emulators (0,1)
    133. global.smooth=0
    134. ## Set rewind for all emulators (0,1)
    135. global.rewind=1
    136. ## Set autosave/load savestate for all emulators (0,1)
    137. global.autosave=0
    138. ## Enable retroarchievements (0,1)
    139. ## Set your www.retroachievements.org username/password
    140. ## Escape your special chars (# ; $) with a backslash : $ => \$
    141. global.retroachievements=0
    142. global.retroachievements.username=
    143. global.retroachievements.password=
    144. ## Set retroarch input driver (auto, udev, sdl2)
    145. ## If you don't have issues with your controllers, let auto
    146. global.inputdriver=auto
    147. ## If you do not want recalboxOS to generate the configuration for all emulators (string)
    148. ;global.configfile=/path/to/my/configfile.cfg
    149. # ------------ I - EMULATORS CHOICES ----------- #
    150. ## You can override the global configuration here
    151. ## Here is the snes example
    152. ;snes.videomode=CEA 4 HDMI
    153. snes.core=snes9x_next
    154. ;snes.shaders=/recalbox/share/shaders/shaders_glsl/mysnesshader.gplsp
    155. snes.ratio=4/3
    156. ;snes.smooth=0
    157. ;snes.rewind=1
    158. ;snes.autosave=0
    159. snes.emulator=default
    160. ;snes.integerscale=0
    161. ## If you do not want recalboxOS to generate the configuration for the emulator :
    162. ;snes.configfile=/path/to/my/configfile.cfg
    163. ## Default cores for RPi2
    164. snes.core=snes9x_next
    165. gba.core=mgba
    166. mame.core=default
    167. nes.core=fceunext
    168. ## NeoGeo emulator
    169. ## You can use pifba or a libretro core (fba2x,libretro)
    170. neogeo.emulator=libretro
    171. ## If you set libretro as neogeo.emulator, the line below sets the retroarch core (fba,imame4all)
    172. neogeo.core=fba
    173. ## N64 emulator is configured to display a screen with a 640x480 resolution (native n64 resolution)
    174. ## So you must use one of these video modes (DMT 4 HDMI,CEA 1 HDMI).
    175. ## If your screen is not compatible with one of these video modes, please check the recalbox's wiki.
    176. n64.videomode=DMT 4 HDMI
    177. ## If you are using a CRT screen, please change the setting above with this one :
    178. # n64.videomode=default
    179. ## Configurations generated by Recalbox
    180. nes.ratio=4/3
    181. nes.emulator=default
    182. gb.emulator=default
    183. gb.ratio=auto
    184. gb.core=gambatte
    185. mame.emulator=default
    186. mame.videomode=CEA 4 HDMI
    187. mame.ratio=16/9
    188. mame.integerscale=0
    189. fbalibretro.videomode=CEA 4 HDMI
    190. fbalibretro.ratio=16/9
    191. fbalibretro.integerscale=0
    Alles anzeigen

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von NeoRame ()

  • Schönes Projekt! Ich benutze für meinen Pi bisher immer so ein Teil (war bei meinem Gehäuse mit dabei):



    Dafür muss der Pi aber natürlich immer noch "von Hand" runtergefahren werden. Da gefällt mir die Lösung mit der PCB viel besser. :)
    Games-Sammlung:Zuletzt analog gespielt:
  • Ok, Lösung gefunden. ich hab immer gestartet wie oben empfohlen. 2-3 sek gedrückt zum runter und hoch fahren.... das war der fehler. beim runterfahren macht das ganze kein problem.
    beim hochfahren hingegen ist beim start bin 5 und 6 connceted (da klemmt ja auch der button dran) und somit wird der pi angewiesen in den safemode zu starten, was die fehlermeldung zur folge hat. starte ich hingegen mit einem normalen kurzen tip auf den knopf ist alles tutti.

    hatte auch versucht via "avoid_safe_mode=1" bzw NULL das ding zu deaktivieren. leider ohne erfolg.... aber nicht so schlimm ich finde es eh besser das ganz mit einem normalen tipp zu starten und stoppen (denn da reicht auch ein tipp) und nicht erst 2-3 sek draufhalten

  • Es freut mich das du eine Lösung gefunden hast. Ich muss das bei mir gleich mal testen, bin mir aber fast sicher das bei mir ein kurzer Tasterdruck zu keiner Reaktion führt.

    Edit: Ja es funktioniert mit einem kurzem Tipp. Ich korrigiere das mal gleich oben.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von srdwa ()

  • ich hab ja gerade ein raspberry in n64 gehäuse in arbeit. ich habe mir gedacht, wenn i h mittels on/off schalter die Hauptstromversorgung kappe, aber mit resetbutton hoch & runterfahre, müsste das dann ja klapppen oder überseh ich was?