I came to an impasse. It’s something we all encounter almost everyday in our workaday lives. How am I going to use my keyboard in the dark and not turn on a lamp? I felt you pain and decided that I needed to do something about it. I really wanted to make it as compact as possible so a reduction of wires was key. Since I had a keyboard with an extra USB port on one side I decided that that was the easiest and most accessible power source.
I did a little research and found that USB outputs 5V @ 100 mA. That seemed like more than I needed to make this project work.
Here is a little circuit and math work. It’s actually a lot easier than it looks.
This is the circuit working on a protoboard being powered by the keyboard.
Total cost of the projects ran about $20 with LEDs, resistors, and PC board. The USB cable was just one I had lying around in my basement. I have since added a switch as well so I could always leave it plugged in. I don’t know why that didn’t cross my mind until after I built it. Fun little project and very useful.