brutal touched on half of this subject about 8 months ago...the thread is

http://forums.gideontech.com/viewtopic.php?t=3571&postdays=0&postorder=asc&highlight=dimming+led&start=20I am basically using an LM317T (voltage regulator) and one of those 100 Ohm 5 watt pots in combination with a switch to bypass the voltage regulator for controlling fans. Along with this I am trying to get 2v leds to dim and brighten depending on the fan speed.

Yes I know it is another rheobus thread but this one is more about electronics and math to bear with me a bit.

I found this formula for working with the LM317T, a fixed resistor in series, and the pot. This is supposed to keep the working range within 6-11v.

Vout = 1.25(1+ [R2 + VR1] / R1) + (Iq * [R2+VR1])

It is from this site:

http://www.cpemma.co.uk/reg.htmlThe values he had were r2 = 1k, vr1= 1k lin pot, and r1 = 240. I don't know what Iq means but he had it listed as .00005A so I just plugged that into the formula. According to him he gets an output of 6.5v to 11.7v. I created an excel sheet and plugged the numbers in. I got the same as him so I am assuming the formula is correct.

Now I adjusted it for using a 100 Ohm pot. I had a bunch of these from back when I built a simple rheobus going off info from Cliff's site.

Unfortunately my adjustment figures look really weird. To get a range from 4.22v to 12.038v I have r1 = 16 ohms, r2 = 38 ohms. Resistor value seems low to me but I have nil electronic background. Is there something I am missing as far as basic theory?

My second question stems from that earlier thread that I mentioned. (this info came from the same site I got the LM317 formula) I obtained information on how to make an Led dim in conjunction with controlling the fan speed. He suggests using 5-6 1n4001 diodes and a series resistor of 620 Ohm to give a current forward of .65mA at 6v and a 10.3 at 12v. Basically the 6 diodes bring Vf up about .6v each. So 6 diodes would raise Vf to 3.6 and then add the Vf of the led (in this case 2.0) to make a total Vf of 5.6. I wrote the formula like this Vf=((numD1*.6)+L1).

To figure the current coming forward with the 100 Ohm pot I used the standard (Vs-Vf)/R. Now I am probably going to need my formula corrected but this is the way I wrote it down. Vs=Vout from the above formula. If = (Vout - [{numD1*.6}+L1]) / R3. With R3 = 470 my range for the current is 1mA to 17mA. Does this look correct?

Sorry for the long post. Thanks in advance for the help.