How to Turn Off and On a Raspberry Pi via TV USB
#1
Greetings,

Yes the title is exactly how you read it. After trying to find a simple easy way to turn off and more importantly a Pi via the TV, not wanting to use a manual power switch or the popular plug in and unplug the power supply to the Pi I devised a relay switch.

Preface: I have all my movies on a 4TB portable hard drive that is connected to a Raspberry Pi 4B via USB 3.0 (any version of a Pi would work) and have the Pi's video out go to the TV's HDMI in. I am using LebreELEC and only have Kodi installed. 
Turning Kodi off is fine via the O/S but the issue was that the Pi remains powered which is useless in that you can not turn it back on either, so being powered has no real purpose other than wasting power even though it's very very low, I prefer to have it completely off (I don't care about the time management). I also saw there were add on boards, and IR's diodes that can be added but all weren't ideal. 

So the idea was to use the TV's 5V USB port as a trigger. Yes I can run the hard drive directly through the TV but the media center the TV has built in is awful, a far cry from being able to manage anything or be useful as a media center. I can run the Pi off the TV USB port, but only by itself as the port nor the Pi can not supply enough current to run and a hard drive all off the same port off the TV. 

The solution was this relay switch: https://www.amazon.com/gp/product/B0721M...UTF8&psc=1

DZS Elec 5V-30V 1 Channel Wilde Voltage 0-24s Adjustable Delay Internal/External Trigger Relay Board with Timer Delay Conduction Delay Circuit Switch with USB to Micro USB Power Line.

All that is needed to be modified on the relay switch itself is to remove the momentary button trigger and solder a wire across the switch to have a continuous closed contact across the switch. This will keep the relay switch on as long as there is 5V input via the Micro USB port.
Image
Setup: Connect a USB cable from the switch's Micro USB input 5V to the TV's USB port. That's the most easiest part. The second part is to take the power cable you are using to power your Pi and tap or cut it. You only need to tap or cut/use one line. Either the Red or Black, but not both!! All other wires may be left alone or taped off. Again, you only need ONE of the lines. Take the ONE line (Black or Red), and connect one side of that line to the COM (common) terminal on the relay switch and the other side of that line to the NO (normally open) terminal. You will not use the NC (normally closed terminal on the relay switch). You do not need to worry about the relay time setting of 0~24 as it will be bypassed due to closing the button trigger switch. You do not need to connect a trigger line to the TRIG line or use any of the other terminals labeled input + or - as they are not necessary just an alternate power input.

Running/Using: Plug the power cable into the power supply that was powering the Pi (on both ends) and connect the relay switch's 5V USB input power supply to the TV's USB port. When you turn on the TV, the USB port of the TV will energize the relay switch and power it on via the Micro USB input 5V. The light on the relay will turn on and stay on, this will power up the Pi. 

After you are done for the day/night and ready to power off Kodi, use the O/S to power off and then when you turn off the TV, it will turn off the TV's USB port removing power to the relay switch which will power off the Pi.

I hope this helps someone who is looking for a simple inexpensive reliable solid way to turn on and off their Pi.

Enjoy!
Reply

Logout Mark Read Team Forum Stats Members Help
How to Turn Off and On a Raspberry Pi via TV USB0