so after thinking about the best way to over engineer the problem i came up with a solution.
Step 1: The First Step, Make Something.
the materials i am using are simply:
.1: a 9volt 1 amp wall wart
.2:lm7805c 5 volt voltage regulator
.3:electrolytic capacitor, 35volts 10 microfarad
.4:metal film capacitor, 50volts .1 microfarads
.5: 5 100 ohm resisters
.6: 8 ultra violet leds, i forgot the specs to.
.7: brand new large breadboard, fresh out of the pack from Radioshack, the overpriced shop of wonders.
actually most everything is from Radioshack so it's not like i can complain about the price.
Step 2: Something Made.
the first step is the voltage regulator, i have it up in the corner of the board to keep it out of the way for the most part. between the input and the ground put the electrolytic capacitor making sure to keep the polarity right. then you need to hook up a metal film cap between the ouput pin and the ground.
this is supposed to smooth out the output so we have a steady five volts instead of a chaotic five volts, it isn't necessary for what i'm using it for but it makes for good practice to do it anyways.
the next step is the resisters, they are each one hundred ohms so in order to draw the amount of amps we want, roughly 160 milliamps we want to put them in parallel. this makes the equation for parallel resistance 1/(1/100+1/100+1/100+1/100+1/100)
to save you a bit of math it comes out to roughly 25 ohms or so. ohms law is i=v/r so we plug in our values, 5 volts/25 ohms=roughly 200 milliamps.
the final step in all this is the leds themselves, they are supposed to be around 3 volts and 20 milliamps each, i put them all in parallel in line with the resistors so i'm actually pushing more amps through them than i should, oh well. it works. tah dah!
now in a fit of irony or something close to it in order to demonstrate the circuit worked before my newfangled technique i actually needed to use the diode properties of leds to test which one was positive and negative.
Step 3: The Lazy Fix.
a bridge rectifier.
it's that simple really.
here look up and I'll show you a picture of it working like that.
did you see it?
now here's the reasoning, under normal usage a bridge rectifier changes ac current into dc, basically a back and forth flow into an always forth flow. so when you hook up a dc voltage to it all that the rectifier is doing is treating it like a normal ac voltage, and rectifying it to the positive and negative terminals. problem solved!