Controlling LED on rocker switch

Thread Starter

mxw8950

Joined Aug 19, 2010
7
I have been working on a project where I need to control the speed of a 12V fan by varying the voltage from 5 volts up to 12 volts. I am using an LM317 in order to achieve a variable voltage.

I also have a SPST swtich in order to turn the fan on or off. I am using this switch from eswitch

http://www.e-switch.com/product/tabid/96/productid/113/sename/r1966-series-illuminated-rocker-switches/default.aspx

With this switch it has four terminals two for the rocker and two for the LED's. I would like the switch to work such that when the fan is on the LED is illuminated.

The problem I am facing is that since the voltage coming out of the lm317 is variable the brightness of the LED will vary as well. I was thinking of maybe using a voltage regulator off of the LM317 to get a fixed voltage but can't seem to find the right one.

Would there be a better solution to illuminate the LED on the switch?

Thanks,
Matt
 

mcgyvr

Joined Oct 15, 2009
5,394
Like this... (yes I left out the circuitry for the ADJ side of the 317, input/output caps,etc...) only the basic details for the question are shown.
 

Attachments

Top