Jump to content

LED USING PWM FAN HEADER

Go to solution Solved by Lrz0r,

Ok, it's an old thread, but this is topic has a good shelf life, so here we go. I'm thinking about doing something similar myself, with a 12V LED strip.

 

I'm guessing that the reason why PWM can't feed your LEDs directly, is because the PWM pin is only outputting the signal at TTL level (up to 5V).

 

What should work then, is to use an NPN transistor, e.g. a 2N2222. Connect the base (via a resistor) to the PWM pin. Connect the emitter to ground. Connect the LED(s) and current limiting resistor(s) between 12V and the collector.

 

If I'm not mistaken, this configuration should be able to give you some ~11.4V of ~25 kHz PWM goodness at up to ~800 mA. 

 

In other words, enough voltage to drive three LEDs in series, and enough current to drive a bunch of them in parallel too. The brightness should now be proportional to the set fan speed, and not inverted. Because of the PWM control, the brightness should also be somewhat linear, instead of dropping off a cliff at lower "fan speeds".

Hello, Is it possible to control 4 LEDs to dim depending on the CPU temperature using the CPU Fan PWM Socket together with the fan?

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

You have to set the fan curve on that socket, but yeah.  My one LED fan connected to my fan controller dims as I slow the fan speed down.  Lower the voltage and the light should dim.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, stconquest said:

You have to set the fan curve on that socket, but yeah.  My one LED fan connected to my fan controller dims as I slow the fan speed down.  Lower the voltage and the light should dim.

But in this case the LEDs are connected and are using the PWM Voltage and the Ground, so the LEDs are getting power from the motherboards PWM socket. Will it work?

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Keanu Lorenzo said:

But in this case the LEDs are connected and are using the PWM Voltage and the Ground, so the LEDs are getting power from the motherboards PWM socket. Will it work?

Why would it not?  Try it.  Get Speedfan to control the socket and slow the speed down.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, stconquest said:

Why would it not?  Try it.  Get Speedfan to control the socket and slow the speed down.

Yeah i'm gonna try it now, I'm headed to the electrical store to buy some stuffs for this project. I can't seem to find this type of fan that lights up depending on its speed so I will be making it myself. I already talked with another person here but in different thread and gave me schematics for this build so I'm good to go. I just wanted to know if this will actually work. :D:D:D

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Keanu Lorenzo said:

Yeah i'm gonna try it now, I'm headed to the electrical store to buy some stuffs for this project. I can't seem to find this type of fan that lights up depending on its speed so I will be making it myself. I already talked with another person here but in different thread and gave me schematics for this build so I'm good to go. I just wanted to know if this will actually work. :D:D:D

As long as you can control the voltage, the light's brightness should act accordingly. 

 

Best of luck!  :)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, stconquest said:

As long as you can control the voltage, the light's brightness should act accordingly. 

 

Best of luck!  :)

Thank you :D:D:D 

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

Uhm... no. some strips have

1 hour ago, stconquest said:

As long as you can control the voltage, the light's brightness should act accordingly. 

 

Best of luck!  :)

Uhmm no.  It would depend on the led strip. 

Some strips are made of fixed segments of 3 leds plus one resistor to limit the current going through, these will dim slightly as you turn the voltage down but only up to a point. When the voltage drops below something like 10v, the leds will not light up anymore.

Other strips for example the ones using 5v RGB leds with data channel will need 5v to run and turn off or on depending on the commands they receive through the data wires.

A 4 pin fan connector will no adjust speed of fan by adjusting the voltage, they adjust speed by sending a signal to the fan through the fourth wire in the connector. If I remember correctly, it's a series  of pulses at around 38kHz meaning about 38 thousand times a second, the motherboard sends a pulse through that wire. By measuring how many times that pulse shows up on the wire in a second, you have the percentage of time the strip should stay on.

You can measure that pwm signal using even a tiny 50 cent - 1$ microcontroller and make the microcontroller to turn on or off a classic 12v strip for periods of time using a mosfet for example. But for a one time thing, it's kind of expensive, because you'll probably need a programmer for the microcontroller as well and to learn some basic C to write the code.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, mariushm said:

Uhm... no. some strips have

Uhmm no.  It would depend on the led strip. 

Some strips are made of fixed segments of 3 leds plus one resistor to limit the current going through, these will dim slightly as you turn the voltage down but only up to a point. When the voltage drops below something like 10v, the leds will not light up anymore.

Other strips for example the ones using 5v RGB leds with data channel will need 5v to run and turn off or on depending on the commands they receive through the data wires.

A 4 pin fan connector will no adjust speed of fan by adjusting the voltage, they adjust speed by sending a signal to the fan through the fourth wire in the connector. If I remember correctly, it's a series  of pulses at around 38kHz meaning about 38 thousand times a second, the motherboard sends a pulse through that wire. By measuring how many times that pulse shows up on the wire in a second, you have the percentage of time the strip should stay on.

You can measure that pwm signal using even a tiny 50 cent - 1$ microcontroller and make the microcontroller to turn on or off a classic 12v strip for periods of time using a mosfet for example. But for a one time thing, it's kind of expensive, because you'll probably need a programmer for the microcontroller as well and to learn some basic C to write the code.

So if you just ignore the 4th pin (PWM) and manage the voltage control pin (2nd?, 1st?), you should get some sort of reaction. 

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, stconquest said:

So if you just ignore the 4th pin (PWM) and manage the voltage control pin (2nd?, 1st?), you should get some sort of reaction. 

Can anybody manage the 12V Pin in the CPU FAN HEADER? I guess the fan uses the 4th pin(PWM) to control the speed of the fan and the 12V pin will just remain as it is. So if my idea is true, you can only control the LED's using the 4th pin which is the PWM, and not altering the 12V Pin(if this is even possible).

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Keanu Lorenzo said:

Can anybody manage the 12V Pin in the CPU FAN HEADER? I guess the fan uses the 4th pin(PWM) to control the speed of the fan and the 12V pin will just remain as it is. So if my idea is true, you can only control the LED's using the 4th pin which is the PWM, and not altering the 12V Pin(if this is even possible).

My level of expertise is 100% limited to trial and error.  Sadly I do not have a PWN LED strip or fan.  =/

 

All I know is that I have a 3-pin fan in my fan controller.  When I have my fans at 30% the light is dim.  As I speed it up, it gets nominally brighter.  ;)

 

@Keanu Lorenzo  Many motherboards do have voltage control for fans on the 3-pin sockets, so they act as a fan controller would.  It depends on the motherboard.

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, stconquest said:

My level of expertise is 100% limited to trial and error.  Sadly I do not have a PWN LED strip or fan.  =/

 

All I know is that I have a 3-pin fan in my fan controller.  When I have my fans at 30% the light is dim.  As I speed it up, it gets nominally brighter.  ;)

 

@Keanu Lorenzo  Many motherboards do have voltage control for fans on the 3-pin sockets, so they act as a fan controller would.  It depends on the motherboard.

Yeah some motherboards do support altering the voltage of a fan header to simulate fan speed control. But that's only available on a 3-Pin Fan Header and most of the time its a CHASSIS FAN HEADER. However, in this case, I will be using the CPU FAN HEADER and it is a 4-Pin Connector which it can only control the Fan's RPM by using PWM. So in order to control the LED's in this case, I can only use the PWM and there is no other way.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Keanu Lorenzo said:

Yeah some motherboards do support altering the voltage of a fan header to simulate fan speed control. But that's only available on a 3-Pin Fan Header and most of the time its a CHASSIS FAN HEADER. However, in this case, I will be using the CPU FAN HEADER and it is a 4-Pin Connector which it can only control the Fan's RPM by using PWM. So in order to control the LED's in this case, I can only use the PWM and there is no other way.

I am curious to know if it works.  When you try it, please come back.  :)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, stconquest said:

I am curious to know if it works.  When you try it, please come back.  :)

I am working on it as we speak :D:D

I'm excited to

And also nervous

I can break this motherboard if I do it wrong :(

But I already started creating a whole from the fan for the LED's and soldering things up so there's no turning back lol

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

My first attempt was a failure. I used the PWM as a voltage source for my 4 LEDs and it doesn't work. So I tried to connect only one LED which turns it on but not as bright as if you would supply it a 2V from a PSU. So I finally get things to work. I used the 12V Fan Connector as my Voltage Input. I used 4 LED's and a 56Ω resistor connected in series. And I used the PWM Connector as the Ground. The LED's will be dimmer every time the Fan is closing to its full speed because of my settings in the ASUS Ai Suite 3's Fan Xpert

And this is what it looks like(partially) when the Fan is turning:

On.png

 

And when the fan is at its lowest:

Off.jpg

 

I will remove the resistor to make the LED's brighter.

I didn't put the LEDs to the Fan yet to further test it out.

Not what I've expected but this is only what I can do. I will probably add an NPN or PNP transistor to make this efficient and maybe this will do the job.

I'm not that happy with the results sooooooooo...... :|:|:| But at least it worked 50% of what I want.

That's it for today....... :) 

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

@Keanu Lorenzo  Why do the lights get stronger when you slow the fan?  Did you set it that way?  I would have thought the lights get stronger as the CPU heats up and the fans starts moving faster.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, stconquest said:

@Keanu Lorenzo  Why do the lights get stronger when you slow the fan?  Did you set it that way?  I would have thought the lights get stronger as the CPU heats up and the fans starts moving faster.

That's what I want for my project but It is impossible because the PWM can't supply enough power to light the LEDs up. But to answer your question: It is because when the fan is at its maximum, the PWM gives a 100% Duty Cycle or in short giving a 5V. So when the PWM is 5V and the voltage source is 12V so 12-5=7V. So it only gives 7V and the LEDs needs at least 8V to work properly. That's why it shuts itself down whenever the Fan Speed Increases.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

Here's some basic electronics for you guys.

 

LEDs are not like incandescent bulbs, they don't have a fixed voltage.

Incandescent bulbs are basically resistors, a wire heats up due to current flowing through it and it heats so much that it produces light, but the wire doesn't break. 

LEDs generate light when current flows through them, as soon as the voltage goes above a threshold. But, if the current flow is not limited in some way, the led will be damaged, it will break.

That minimum voltage from where the LED will start producing light is called "Forward voltage", and is not a precise value, it varies a bit from led to led due to manufacturing process, and it also varies a bit with temperature. For a red led, typical forward voltages are 1.7.. 1.9v and for white or blue LEDs the forward voltage is usually around 2.8v .. 3v

 

So if you connect a LED directly on the 12v of the power supply, the LED will be damaged because the voltage is much higher than the minimum forward voltage of the LED and there's no way of limiting the current going through the led. That's why you add a resistor in series with the LED, to restrict the current flow through the led. 

The formula is very simple :

 

Resistor value = [ Input voltage - ( Forward Voltage x number of leds in series )  ]  /  Current

 

So if you have 4 LEDs in series, each with a forward voltage around 2v and you want to power them from 12v and have the whole chain of four leds use 10mA (0.01A) then the formula becomes :

 

Resistor = (12v - 4x2v ) / 0.01A  = 4/0.01 = ~ 400 ohm

 

The resistor will dissipate some power, which can be determined with the formula P = I x I x R = 0.01 x 0.01 x 400 = 0.04 watts, which means you can use a basic 0.125w rated resistor and not worry about it.

 

This means you can plug this series of four leds + resistor to 12v and the led strip will light up and be bright, it will use 10mA.

 

However, what happens if you won't have 12v ?  Let's say when you adjust the fan speed using software, the motherboard will lower the voltage sent to the fan to 9v. 

Our resistor will still be 400 ohm , we'll still have 4 leds with 2v forward voltage for each one, so what will change will be the input voltage of 9v and the only thing that will also change will be the current

 

Resistor =  ( input voltage - 4 leds x forward voltage ) / current   .- > Current  = ( 9v  - 4 x 2v) / 400 = 1 / 400 =  0.0025 A or 2.5mA 

 

The strip of leds may still light up with only 2.5 mA flowing through it, but you can't be sure.

 

It's also important to note that human eyes don't perceive variations in brightness that well, what I mean is that you may not even notice change in brightness between 10mA and 20mA .. so even if your motherboard will adjust the voltage slightly, let's say between 8v and 12v, you may notice little variation in the brightness of the leds.

If you want a much finer control over the brightness of the LEDs, it makes more sense to adjust the perceived brightness  by turning the leds on and off for different periods of time. Above a certain threshold, human eyes will perceive the LEDs as always on even if they actually blink thousands of times a second, but the brightness can be adjusted with a finer degree.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, mariushm said:

Here's some basic electronics for you guys.

 

LEDs are not like incandescent bulbs, they don't have a fixed voltage.

Incandescent bulbs are basically resistors, a wire heats up due to current flowing through it and it heats so much that it produces light, but the wire doesn't break. 

LEDs generate light when current flows through them, as soon as the voltage goes above a threshold. But, if the current flow is not limited in some way, the led will be damaged, it will break.

That minimum voltage from where the LED will start producing light is called "Forward voltage", and is not a precise value, it varies a bit from led to led due to manufacturing process, and it also varies a bit with temperature. For a red led, typical forward voltages are 1.7.. 1.9v and for white or blue LEDs the forward voltage is usually around 2.8v .. 3v

 

So if you connect a LED directly on the 12v of the power supply, the LED will be damaged because the voltage is much higher than the minimum forward voltage of the LED and there's no way of limiting the current going through the led. That's why you add a resistor in series with the LED, to restrict the current flow through the led. 

The formula is very simple :

 

Resistor value = [ Input voltage - ( Forward Voltage x number of leds in series )  ]  /  Current

 

So if you have 4 LEDs in series, each with a forward voltage around 2v and you want to power them from 12v and have the whole chain of four leds use 10mA (0.01A) then the formula becomes :

 

Resistor = (12v - 4x2v ) / 0.01A  = 4/0.01 = ~ 400 ohm

 

The resistor will dissipate some power, which can be determined with the formula P = I x I x R = 0.01 x 0.01 x 400 = 0.04 watts, which means you can use a basic 0.125w rated resistor and not worry about it.

 

This means you can plug this series of four leds + resistor to 12v and the led strip will light up and be bright, it will use 10mA.

 

However, what happens if you won't have 12v ?  Let's say when you adjust the fan speed using software, the motherboard will lower the voltage sent to the fan to 9v. 

Our resistor will still be 400 ohm , we'll still have 4 leds with 2v forward voltage for each one, so what will change will be the input voltage of 9v and the only thing that will also change will be the current

 

Resistor =  ( input voltage - 4 leds x forward voltage ) / current   .- > Current  = ( 9v  - 4 x 2v) / 400 = 1 / 400 =  0.0025 A or 2.5mA 

 

The strip of leds may still light up with only 2.5 mA flowing through it, but you can't be sure.

 

It's also important to note that human eyes don't perceive variations in brightness that well, what I mean is that you may not even notice change in brightness between 10mA and 20mA .. so even if your motherboard will adjust the voltage slightly, let's say between 8v and 12v, you may notice little variation in the brightness of the leds.

If you want a much finer control over the brightness of the LEDs, it makes more sense to adjust the perceived brightness  by turning the leds on and off for different periods of time. Above a certain threshold, human eyes will perceive the LEDs as always on even if they actually blink thousands of times a second, but the brightness can be adjusted with a finer degree.

 

 

The first attempt that I did which I used the PWM as a voltage source for my LEDs, I can only see the brightness changed twice. But after I changed the circuit and used the 12V as the voltage source and the PWM as the ground, I can now see 10 different brightness levels.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

You shouldn't use the PWM wire  as the ground for your led strip. The chip that controls that wire for the PWM signal in the connector is not designed for that, and the specifications only allow up to 5mA - there's no guarantees with higher amounts of current. You may damage the motherboard.

 

Have a look at inte's cpu fan specs, it may help clear some things:  http://www.formfactors.org/developer\specs\rev1_2_public.pdf

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, mariushm said:

You shouldn't use the PWM wire  as the ground for your led strip. The chip that controls that wire for the PWM signal in the connector is not designed for that, and the specifications only allow up to 5mA - there's no guarantees with higher amounts of current. You may damage the motherboard.

 

 

I won't. I will put a NPN transistor to protect the motherboard and allow higher current to pass through. :D Any idea on what NPN transistor should I use?

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

Ok just to mention something you cannot control LED's that are the 12V strip version via PWM based fans control as the header only outputs a constant 12V, the PWM pin on the 4th pin is what controls the switching rate for the speed of the fan.

 

If you used DC voltage control however that would work as long as you a splitter had one fan within that header and limited the low end to be no less than 7V for a 12V LED strip which would allow it to vary it's brightness under load. Also just note with that method to not overload the header with too long of and LED strip. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, W-L said:

Ok just to mention something you cannot control LED's that are the 12V strip version via PWM based fans control as the header only outputs a constant 12V, the PWM pin on the 4th pin is what controls the switching rate for the speed of the fan.

 

If you used DC voltage control however that would work as long as you a splitter had one fan within that header and limited the low end to be no less than 7V for a 12V LED strip which would allow it to vary it's brightness under load. Also just note with that method to not overload the header with too long of and LED strip. 

Yeah, I know. I used those single LEDs. Thanks.

Intel Core i5 4460 3.2GHz / Asus B85M-Gamer / Palit GeForce GTX 950 / Kingston Hyper-X Fury 1600MHz 8Gb x4 / Aerocool Strike-X 600W / Corsair H80i / Western Digital 1TB Black

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 months later...

Ok, it's an old thread, but this is topic has a good shelf life, so here we go. I'm thinking about doing something similar myself, with a 12V LED strip.

 

I'm guessing that the reason why PWM can't feed your LEDs directly, is because the PWM pin is only outputting the signal at TTL level (up to 5V).

 

What should work then, is to use an NPN transistor, e.g. a 2N2222. Connect the base (via a resistor) to the PWM pin. Connect the emitter to ground. Connect the LED(s) and current limiting resistor(s) between 12V and the collector.

 

If I'm not mistaken, this configuration should be able to give you some ~11.4V of ~25 kHz PWM goodness at up to ~800 mA. 

 

In other words, enough voltage to drive three LEDs in series, and enough current to drive a bunch of them in parallel too. The brightness should now be proportional to the set fan speed, and not inverted. Because of the PWM control, the brightness should also be somewhat linear, instead of dropping off a cliff at lower "fan speeds".

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×