Hi all,
I'm building a very simple project - a desklamp consisting of 9 LEDs. They draw up to 20mA each at 3.2V, so that's 180mA total.
I was planning to power this off 5V from USB, so use a 100Ω resistor on each one to drop the 1.8V, giving me 18mA, or 162mA total.
Then, having chopped the end off a USB cable, I started having second thoughts.
1) Do I need to talk to the computer to negotiate how much power I want to draw?
2) If not, do I still need to terminate the data lines somehow to keep it happy?
3) If I got keen later and used a microcontroller or something to PWM the LEDs, will the USB port be happy with the interrupted current draw, or do I need a capacitor to smooth it out? And then do I need to prevent the capacitor feeding back into the port when the computer is turned off?
Any tips most welcome.
Richard
I'm building a very simple project - a desklamp consisting of 9 LEDs. They draw up to 20mA each at 3.2V, so that's 180mA total.
I was planning to power this off 5V from USB, so use a 100Ω resistor on each one to drop the 1.8V, giving me 18mA, or 162mA total.
Then, having chopped the end off a USB cable, I started having second thoughts.
1) Do I need to talk to the computer to negotiate how much power I want to draw?
2) If not, do I still need to terminate the data lines somehow to keep it happy?
3) If I got keen later and used a microcontroller or something to PWM the LEDs, will the USB port be happy with the interrupted current draw, or do I need a capacitor to smooth it out? And then do I need to prevent the capacitor feeding back into the port when the computer is turned off?
Any tips most welcome.
Richard