简体   繁体   中英

Enable/Disable a USB port on a particular parameter

I am using a cooling pad to cool my laptop. I would like to make a script or a program to power on and off a particular usb port(in which the cooling pad is connected) based on a parameter such as cpu temperature. One such scenario would be suspending the usb port when the cpu temperature reaches below 50 degree Celsius and enable it again when it goes above 50 degrees.

Just plug an USB relay on your USB port, and use it to switch on/off the cooling pad. USB relays are pretty common, just choose one with an API you can use. If you choose it small enough, you can mount it inside the cooling pad.

http://www.yoctopuce.com/EN/products/usb-actuators/yocto-powerrelay

http://www.phidgets.com/products.php?category=9

Suspending or switching off the usb port is an admin privilege, which can be done using a registry edit. I think thats not a good/suggested way of controlling the usb port. You can do this by adding a simple micro-controller in between the usb port and the cooling pad.

So when the cpu temperature increases above a limit, you can send a signal to the mc using the usb port which will cut the power to the cooling pad.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM