Control LED Power Supply

  • Hi,

    I have my hyperion setup working fine so far. I power most of the setup via the USB Ports of the TV. Only the LEDs have a separate power supply which I would need to switch manually.

    Does any one have a clever idea how to control the power supply with the raspberry pi? Basically I am looking for a solution to power it on when the raspberry pi powers up and cut power when the raspberry is also loosing power.

    Any idea?


  • go for a 5v relay module, depending on the power supply for the led's you may need 2 channel relay to split the load if your LED's are pulling more than 10A which shouldn't be a problem tho as you will probably have at least 2 power lines going to the led strip anyway - better safe than sorry.

    Simple script to set gpio pin to pull high @ reboot then when pi powers down relay looses signal and switches the lights off

  • Anyone have a tutorial how to use a 5v relai module with raspberry pi 3+
    When pi powers down relay looses signal and switches the lights off

    What relay module do you have? They are pretty generic as at the end of the day its just a switch controlled by something else, usually with a voltage.

    Wire the supply and load up so that it is normally open, then when pi powers down the leds are off.

    I thought the pi didn't really have the ability to power off, more like a zombie state, but its something ive never looked into as mine have all run 24/7 when in use but either way id imagine the GPIO would kill the supply, but if your pulling the plug or physically killing the power supply to the pi the crudest most effective way would be hook the relay signal wire into a 3.3vpin on the GPIO then you wouldn't need to bother with any startup or shutdown scripts to pull the desired GPIO pin because as soon as the pi gets power again the relay will activate and bring the lights on.

    Going the other way with a startup and shutdown script is no big deal either, just depends on how your powering down the pi

  • Thank you very much for your reply.

    What you suggest? I don't know if it will be a good idea to leave the raspberry pi on 24/7.
    I have see also a tutorial to put a button on off switch following this tutorial.

    External Content
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Regarding for the LEDs I think when raspberry are off the light are in mode off mode also

  • Down to your preference bud, Yeah that would work, modify the script as needed to control the relay board.

    Nah if they were meant to be switched off they would have a button for it , less chance of SD card corruption and i aint got time to wait for the pi to boot to use it, I want to press the button and it be sitting waiting for me :D

  • So if I leave the raspberry on 24/7 I won’t have any problems with over heating? Then regarding to the led strips they will be connected at the same power supply so they mean they will always on also, but when the tv is off the leds are off ? It doesn’t spend electricity?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!