Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Basic On/Off Switch Question

    GamePad/GPIO/USB encoder
    basic onoff switch
    4
    16
    5462
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • xtreemsurf
      xtreemsurf @Substring last edited by

      @Substring

      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!

      https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)

      lackyluuk 1 Reply Last reply Reply Quote 0
      • lackyluuk
        lackyluuk Translator @xtreemsurf last edited by

        @xtreemsurf All Grounds are connected to each other internally. You can use every GND-Pin that you want.

        NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

        xtreemsurf 2 Replies Last reply Reply Quote 0
        • xtreemsurf
          xtreemsurf @lackyluuk last edited by

          @lackyluuk
          You guys have been so helpful...thanks so much!

          1 Reply Last reply Reply Quote 0
          • xtreemsurf
            xtreemsurf @lackyluuk last edited by

            @lackyluuk

            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!

            1 Reply Last reply Reply Quote 0
            • lackyluuk
              lackyluuk Translator last edited by

              @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

              NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

              xtreemsurf 1 Reply Last reply Reply Quote 0
              • xtreemsurf
                xtreemsurf @lackyluuk last edited by

                @lackyluuk

                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!

                1 Reply Last reply Reply Quote 0
                • lackyluuk
                  lackyluuk Translator last edited by lackyluuk

                  @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

                  NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

                  xtreemsurf 1 Reply Last reply Reply Quote 0
                  • xtreemsurf
                    xtreemsurf @lackyluuk last edited by

                    @lackyluuk

                    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?

                    1 Reply Last reply Reply Quote 0
                    • xtreemsurf
                      xtreemsurf last edited by

                      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?

                      paradadf 1 Reply Last reply Reply Quote 0
                      • paradadf
                        paradadf Staff @xtreemsurf last edited by

                        @xtreemsurf it will turn on.

                        If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                        xtreemsurf 1 Reply Last reply Reply Quote 0
                        • xtreemsurf
                          xtreemsurf @paradadf last edited by

                          @paradadf

                          Thanks! You've helped me make my decision...I'll go with a momentary switch.

                          1 Reply Last reply Reply Quote 0
                          • lackyluuk
                            lackyluuk Translator last edited by

                            @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? 🙂

                            NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

                            xtreemsurf 1 Reply Last reply Reply Quote 0
                            • xtreemsurf
                              xtreemsurf @lackyluuk last edited by

                              @lackyluuk

                              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.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post

                              Want to support us ?

                              69
                              Online

                              99.7k
                              Users

                              28.1k
                              Topics

                              187.1k
                              Posts

                              Copyright © 2021 recalbox.com