RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    How to power LEDs only when rPi is on?

    Scheduled Pinned Locked Moved Help and Support
    7 Posts 4 Posters 2.1k Views
    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.
    • briankrossB
      briankross
      last edited by

      Setup: rPi 3 and PowerBlock 1.1

      I have a number of 5v LED lit buttons that I would like to only be on when the rPi is on.

      The current of the LED string adds up to 200 mA, and my power supply is 5.1VDC at 3A.

      Right now, I just have the LED string powered directly from the power supply. The rPi gets it's power through the PowerBlock barrel connector, also wired to the power supply. The PowerBlock also has a SPST switch and indicator LED wired.

      I'm not well versed in what we can do with the GPIO and PowerBlock 1.1, so I'm looking for someone to guide me in the right direction. My initial thought was to have a relay receive a signal from either the GPIO or PowerBlock that the pc board has power then close the LED string circuit... but I'm looking for ideas on how this goes.

      • Brian
      1 Reply Last reply Reply Quote 0
      • obsidianspiderO
        obsidianspider
        last edited by obsidianspider

        I can't speak to a PowerBlock specifically, but I've been noodling around with LEDs a bit and this may be a place for you to start. You'd just want to tell the code to start automatically with the Pi and not timeout after a second as in the tutorial code.

        📷 @obsidianspider

        briankrossB 1 Reply Last reply Reply Quote 1
        • briankrossB
          briankross @obsidianspider
          last edited by

          @obsidianspider

          Very nice, thank you for that part of the puzzle.

          Now to find out how to do this with an externally powered circuit.

          • Brian
          1 Reply Last reply Reply Quote 0
          • darthpaulD
            darthpaul
            last edited by

            I used transistors attached to the GPIO pins to turn on my LEDS, this way you don't need to power the LEDS through the PI.

            1 Reply Last reply Reply Quote 1
            • C
              challenger2010
              last edited by

              5v? Can't you just splice into a USB wire and plug it into a USB port on the PI? PI on, LEDs on!

              briankrossB 1 Reply Last reply Reply Quote 0
              • briankrossB
                briankross @challenger2010
                last edited by

                @challenger2010 said in How to power LEDs only when rPi is on?:

                5v? Can't you just splice into a USB wire and plug it into a USB port on the PI? PI on, LEDs on!

                The LED string will eventually draw more current, but I like the idea :-).

                • Brian
                1 Reply Last reply Reply Quote 0
                • briankrossB
                  briankross
                  last edited by

                  Quick update:

                  Since I'm using a switch for the PowerBlock, I'll change it to a DPST ON-OFF switch (rather than SPST), this should control both circuits with one actuator and light up the LED's when the rPi is powering up.

                  I'm not sure why I didn't think of this earlier. :-)

                  Thanks to all that responded.

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

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.