This is an idea I have had for a while and my entry for the USB Contest. I got the idea while taking apart a 9 LED flashlight from Harbor Freight Tools. A USB port is ideal for powering this because a USB port outputs 5V and the flashlight needs 4.5V. The only problem I can see with this is that 5V going into a 4.5V device will cause it to burn out faster than just running off batteries, but the LED module is cheap and easy to replace.
Because of the way the world is (mainly because I don't won't to be sued for some stupid reason), I am obligated to say this:
**Disclaimer. I am NOT responsible for what you do with this information. Do not do something stupid and hurt yourself or your computer.**
Step 1: What You Shall Need.
In order to make this, you will need a few things.
A Phillips Screwdriver (or something else sharp)
A Flat Head Screwdriver
A Soldering Iron (and Solder)
Desoldering wick* (not needed if you're careful)
A Helping Hands (these things are invaluable when soldering)
A Hot Glue Gun (and Glue Sticks)
A Mason Jar w/ lid (any jar w/ a lid would do, this is just what I had)
An old USB Cable
A 9 LED Flashlight from Harbor Freight.
A Switch (Optional. If you do include it, make sure it isn't momentary)
*Not pictured here was desoldering wick because I rarely need it.
I think that's it. Now Let's Get Building!
Step 2: Disassembly
First we have to take apart the flashlight. I chose to cut the case with a Craftsman Nextec Vibrating Multitool until the LED module popped out, as I just wanted to get the LED module out. Be careful though, as you don't want to break it.
After you get the LED module out, take your wire cutters and cut the female end off of the cable. If your cable doesn't have a female end, just cut off the end that doesn't plug into your computer. Also poke two holes in the top of the mason jar lid, one in the center and one off to the side.
Step 3: Reassembly
Take your wire strippers and strip off the outermost insulation on your USB cable. Take off about 2". Then their will be four smaller wires inside. We only need the two that carry power and not the two that carry data. Because every cable I've ever used had different colors, I can't tell you exactly which ones to use. If yours has red & black, then those probably carry the power, with red being positive and black being negative. If you don't have red & black, then strip 1/2" off of every wire. After that, plug the cable into your computer and touch one wire to the center of the board and a different one to the blob of solder towards the outside of the board. Keep touching different wires to these places until the LED's light up. When you find the two that light the board up, leave them alone and cut the other two down to the larger insulation.
Step 4: More Reassembly
Next thread the USB cable through the hole you made in the mason jar lid. Strip off 1/2" of the insulation if you haven't already, and fold the wires over twice to form little wire nubs. Take the two wire nubs and solder them onto the LED module in the same places I told you earlier. MAKE SURE YOU GET THE POLARITY RIGHT! I made this mistake and had to cut off and resolder. Also be careful with how much solder you use. If you use too much you could bridge connections and end up damaging your USB port.
Step 5: Finishing Touches
After you've soldered the wires onto the LED module, plug it into your computer and check to be sure that it remains constanly lit. If it glows brightly, skip the rest of this paragraph. If it's flickering, either you damaged the LED module or bridged solder connections. If you damaged the board, your going to have to get another one. If you bridged a connection, take your soldering iron and some stranded copper wire (or desoldering wick) and heat the connection while touching the wire to the solder. Try to remove some of the solder to unbridge the connection. After you've removed some solder, plug it back into your computer. If it works, Great! If it doesn't try again. Don't try to many times though, otherwise you'll burn out the LED module.
Since yours works now, take your glue gun and glue the LED module to the jar lid. Don't cover up that second hole you made,otherwise the plant will suffocate. Then glue the wire down to the top of the jar's lid.
Step 6: Making Into an Actual Terranium
Whats a terranium w/out soil and a plant? Answer: Nothing really so now we make a jar with a light more terranium-ey.
Take a few spoonfuls of your soil and put it into the jar. Dig a little hole into the soil and place your plant into the hole. Put a little more soil to bury the roots then add a little water. Screw the lid on and plug into your computer. If you put a switch on it turn that on. Now your done.
Enjoy your new USB Terranium!