this project was inspired by the following web page:http://www.i-hacked.com/content/view/62/44/
that said, there are unlimited numbers of things that can be powered by usb. with the holidays coming up, why not christmas lights? i've added a switch to the original design to allow me to turn them on and off without unplugging the usb cable. The whole thing is mounted into an enclosure (altoids tin, of course), purely for aesthetics.
Step 1: Get Your Equipment
i began with a battery operated set of christmas lights, and the male end of a usb cable. i cut off the c battery holder, taking care to mark which wire was positive and which was negative. frankly, this may not matter in this case, but i wasn't completely sure, and i'm a better safe than sorry kind of guy. i stripped the ends of the wires and twisted them to keep them together. i then stripped the outer sheathing off the usb cable and located the red and black wires. these are the only ones we will need. if you're following along with me, strip them too. for an enclosure, i chose--of course--an altoids tin. this, however, is the first project i've seen inside an altoids smalls tin. (at least that's something)
oh, i also use a small toggle switch and some solder and what not.
Step 2: Get Funky I
drill a hole in the side of the tin closer to the base than the top. i used a much smaller bit and then used a precision file to work it up to size. it wasn't a perfect circle, but it allows you to move the hole a bit to get the fit right so the lid will still fit on. besides, the nut to hold the switch in place on the enclosure will cover it once it's on.
Step 3: Get Funky II
i used the same technique to fashion a hole in one end for a usb cord, and a hole in the other for the christmas lights.
as you can see, i tied a knot in the light's cord and placed a zip-tie on the usb cable inside the case. this will keep you from pulling the internal workings out of place during use. i will anchor it further, but that's another step.
so, without further ado, another step. . .
Step 4: Get Funky III
solder the negative wire of the lights, to the black wire of the usb cable. then solder the positive wire from the lights to one pole of a spst toggle switch. the red wire from the usb cable will be soldered to the other pole. this is not the clearest picture, but this is about as easy as it gets, so i'm not worried. if you can't figure out what i'm talking about, you're in the wrong place.
Step 5: Get Funky IV
i've used white electrical tape to insulate the soldered ground wires. color doesn't really make a difference, but please, please! don't EVER use red!! just kidding.
hot glue helps to imobilize the wires and therefore protect your soldered joints. you want as little as possible to move inside this thing. usb cables have tiny wires, a.k.a. they break easily.
Step 6: Testing
this is an easy project. i am way overdocumenting, but even though it is easy, i still wanted to test it before plugging it in to one of my computers. they ain't worth much, but they're what i got, right?
i hooked this bad boy up to a portable 9v usb charger that i had constructed with the aid of a multitude of instructables, etc. it worked.
everything's cool and i have some snazzy lights for the holiday season, or whenever i need some quick lighting without an outlet. all powered from a 9v battery.
and by the way, it also worked when plugged into my computer's usb port. =)
p.s. next pic is the inside of my 9v usb charger.
Step 7: 9v Usb Charger
this may be my next instructable. it's been done, though.