Jump to content

LED Power from USB


PeterT

Recommended Posts

I've decided to make up a hacked USB keyboard as a Multiplay/ Qlab remote (space, esc, arrows etc.). I could use just any old push to make switches as my buttons but I though backlit ones would be better for a theatre environment. I know USB can supply 5v DC@ 500mA but how would I wire it up to the buttons so they were permanently illuminated and is it possible to put a variable resistor in there to vary the brightness of said buttons as well?

 

The switches I'm thinking of are here...

 

http://www.maplin.co.uk/p/illuminated-green-push-to-make-switch-n08ar

 

The USB cable has 4 wires +screen thus:

 

Red VCC

White D-

Green D+

Black GND

 

Thanking the clever electronics people in advance.

Link to comment
Share on other sites

You just need to put a resistor between +5V and the positive side of the LED, about 150-330 ohms depending how bright you want it. Negative side of LED to ground.

 

You don't say how many buttons you're using but as each button takes 20mA a variable resistor might overheat. Each LED would create about 60mW of heating effect in the variable resistor so you'd need to find one with a suitable rating - a 1K 1W one would do it but put a 150R resistor in series as well so you can't over drive the LED

Link to comment
Share on other sites

USB may be spec'd to supply 500ma but that may be divided between several sockets and the device will need some power. A friend had a modem that plugged into USB and dropped out everytime another usb item used power, answer was a powered hub. Keep the power requirements sensible. According to location you may want only say 1 or 2ma flowing to keep the brightness down to workers level.
Link to comment
Share on other sites

I know USB can supply 5v DC@ 500mA

 

This is technically wrong (the best kind of wrong!)

 

USB devices can only draw 100mA unless they have permission from the host computer.

 

If they require more current, then the device has to ask for the amount they want - up to a maximum of 500mA

 

The host computer is allowed to say no, in which case the device is not allowed to draw more than 100mA and must either shut itself down or run in a reduced-power state.

- Eg by not charging, limiting backlight brightness etc.

 

If the device draws more anyway, then the host may choose to turn it off.

 

Finally, in many motherboard and USB hub designs several USB ports share the same power switch, so turning off one port also turns off others.

Link to comment
Share on other sites

 

 

Finally, in many motherboard and USB hub designs several USB ports share the same power switch, so turning off one port also turns off others.

If this does happen how do you the power switch back on?

I have a laptop that I accidentally overloaded the USB ports. Got message, in Windows, that the ports had been overloaded ( or words to that effect).

Since then none of the USB ports supply any DC voltage. I now have to use a powered USB hub.

Cheers

Gerry

Link to comment
Share on other sites

  • 4 months later...
Finally, in many motherboard and USB hub designs several USB ports share the same power switch, so turning off one port also turns off others.

If this does happen how do you the power switch back on?

They should reset automatically.

Depending on the design, it will either reset by unplugging the faulty USB device, or by turning off the entire computer for a few seconds, then back on.

- For 'standby-charging' ports, you may need to unplug wall power/remove the laptop battery.

 

If they don't reset, then you've killed the USB port - either its supply or monitoring.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.