Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Control a USB light via software

I have a little USB-powered light. I'd like to be able to turn it on and off with software. I'll be attaching it to a Linux computer. I have an Atmel ATtiny2313 from a previous project, but I'd rather do this with a simple hack than repurpose my microcontroller.

Is this possible? I suspect this can't be done as the computer won't talk to a device without some kind of USB-compliant firmware?

I found this question, which has a comment suggesting that the OP use an LM317 voltage regulator to change the voltage of the USB out. I don't think this is applicable to me, but thought I'd mention it.

Update:

Looks like I could maybe put USBtiny on my microcontroller, then I could wire it up to the light, then I could write an app to control the controller. Sounds like a lot of work, though. I'd rather do a simple hack, but I lack experience with USB.

like image 261
Justin Force Avatar asked Aug 26 '10 20:08

Justin Force


People also ask

Can I power LED lights with USB?

In fact this light will work in any USB socket. In order to safely construct this light you need to understand the fundamentals of electricity and electrical wiring. You will also need to be comfortable with soldering.

How does a USB powered light work?

This is due to the fact that they generate ultraviolet and infrared heat, which these devices can't handle that well. The main objective of USB LED lights is to illuminate a dark area. Accordingly, they can help when used with a wide variety of objects and surroundings.


1 Answers

I don't think it is possible, because the power (Vcc) line on USB is always-on--it is not intended to be a control line.

Unless your USB light already provides a way to control itself via USB data, you are out of luck. I do not recommend trying to change the voltage of the USB power line.

like image 178
Patrick Szalapski Avatar answered Oct 06 '22 17:10

Patrick Szalapski