Table of Contents

2020-05-28 - USB power relay

for some time now i use 4k LCD as a monitor in a living room (3D printer camera preview, music player, movies, internet, etc…). since old laptop that is connected to it has fans, i hibernate it whenever it is not in active use, to reduce noise-pollution (especially important at night time!). when i do so, LCD is out of signal, but still displays “waiting for input” window, bouncing back and forth the screen for 5 more minutes, before deciding to power off itself. this was super annoying when you go to sleep and just hibernated laptop. i just ended up turning on and off LCD manually each time PC was turned of or off. looked like a great place for automation, and since it is covid-19 time – there was extra time for such details!

this is how USB power relay project has started.

electronics

the important part was to get parts that i already have at home. this was early in into a pandemic, so i wanted to minimize risk and keep traveling/ordering things to a bare minimum. the idea was simple – use 5V relay, power from USB port of a laptop. if laptop hibernates, power is lost and relay disconnects LCD power cable. when it gets back on, relay re-connects the power and LCD is back on.

PCB concept

old power supply cord and a random universal PCB from a closed + a relay and diode… and we're good to go! :)

mounted on a cable insulation of wires

USB cable the board

enclosure

… or the killer app for 3D printing! :) quick model in OpenSCAD, and we're good!

OpenSCAD enclosure model

opened enclosure closed enclosure

tadam!

and we're basically done! :)

final product

after connecting to the laptop, it all worked like a charm! :) the device happily works for well over a month now. hail the new, home automation! ;)