Jump to content

An unusual meathod of controlling fans on a timer?

FlpDaMattress

I really can't go into much detail here, but I have a very specific project i'm working on. I need a way to control a fan (most likely an older AMD Cooler Master stock fan) not by temp, but to ramp up linearly on a timer, And it needs to be controlled by software. I can't find an easy way to do this with a Raspberry Pi, and I can't find any fan controllers that would let me do this on Ebay/Amazon. Could anyone offer some guidance?

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, FlpDaMattress said:

I can't find an easy way to do this with a Raspberry Pi

You could've just googled, there are plenty of results. Literally the first one I came across was this: https://www.digikey.fi/fi/maker/blogs/2019/how-to-control-a-dc-fan-using-the-raspberry-pi

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, WereCatf said:

You could've just googled, there are plenty of results. Literally the first one I came across was this: https://www.digikey.fi/fi/maker/blogs/2019/how-to-control-a-dc-fan-using-the-raspberry-pi

That gets me a PWM output, But will it supply enough voltage? Also, I put all my points in hardware, Coding and I never got along.  I can generate a signal, but how do I control it?

Link to comment
Share on other sites

Link to post
Share on other sites

IF you can you can design a circuit and print it using something like pcbway. Raspberry pi sounds like overkill: Cant you just connect it to a regular computer?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, FlpDaMattress said:

That gets me a PWM output, But will it supply enough voltage? Also, I put all my points in hardware, Coding and I never got along.

The voltage source can be anything (ex: Molex connector), you'll still be able to control the fan speed by the PWM signal from the Raspberry Pi, or you could leave it at 100% and just set a timer

Quote or Tag people so they know that you've replied.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Wictorian said:

IF you can you can design a circuit and print it using something like pcbway. Raspberry pi sounds like overkill: Cant you just connect it to a regular computer?

It would need to be through USB. The fan is for a project I really can't talk about that has nothing to do with a PC.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Syn. said:

The voltage source can be anything (ex: Molex connector), you'll still be able to control the fan speed by the PWM signal from the Raspberry Pi, or you could leave it at 100% and just set a timer

It absolutely needs to gradually raise in RPM over a set amount of time. again, this isn't going inside a PC case. I need this for controlled testing.

Link to comment
Share on other sites

Link to post
Share on other sites

Again a custom circiut sounds like a good option if you can do that. An ardunio would do fine I think. Also there should be devices that control the voltage

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, FlpDaMattress said:

That gets me a PWM output, But will it supply enough voltage? Also, I put all my points in hardware, Coding and I never got along.  I can generate a signal, but how do I control it?

If you'd actually look at the link, they are controlling a DC-fan, not a PWM-fan. The PWM-signal is for pulsing 12V-line, not for controlling a fan's internal PWM-circuit.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, WereCatf said:

If you'd actually look at the link, they are controlling a DC-fan, not a PWM-fan. The PWM-signal is for pulsing 12V-line, not for controlling a fan's internal PWM-circuit.

 

3 minutes ago, Wictorian said:

Again a custom circiut sounds like a good option if you can do that. An ardunio would do fine I think. Also there should be devices that control the voltage

There really is no turn-key solution to this huh.

Link to comment
Share on other sites

Link to post
Share on other sites

Will RPM increase for a time and decrease? OR will it iinstantly drop to zero and then increase? Can you explain the whole process?

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, FlpDaMattress said:

There really is no turn-key solution to this huh.

Not one I am aware of. I could make you one, but I'd charge for parts, shipping and $30/hour, so...

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

14 minutes ago, FlpDaMattress said:

It absolutely needs to gradually raise in RPM over a set amount of time. again, this isn't going inside a PC case. I need this for controlled testing.

You can definitely do that with the Raspberry Pi I didn't say otherwise, and I think an Arduino should work fine as well, you only need to generate a gradually increasing duty cycle, if it's a PWM fan then that makes it much easier as you don't need other parts

 

correct me if I'm wrong

Quote or Tag people so they know that you've replied.

Link to comment
Share on other sites

Link to post
Share on other sites

If it's a PWM fan, an arduino would be easiest way, you can send the PWM signal directly to the fan and adjust its rpm... you can read the rpm back from the fan ... you can read the rpm at various pwm levels and store it in the program and map it to 0..100%.

 

Another very easy way to control any fan including a basic 2 wire or 3 wire fan would be using a LED driver IC to limit the current going to the fan. Yeah, it's not the reason led driver ICs are designed for, but it would work perfectly fine.

The beauty of them is that they monitor the current going through the load (the leds, but fan is also a load) and most will give you a way to adjust that current through PWM or an analogue input.

For example, have a look at AL8860 , the datasheet is here :  https://www.diodes.com/assets/Datasheets/AL8860.pdf

 

image.png.75ceeeccbd01b82226c73d4695996295.png

 

As you power it from 12v, the fan's voltage will be limited to 12v. 

The L1 inductor is 33..100uH (with peak current that should be at least 1.5-2x the current rating of fan) but a standard simple and cheap 33-47uH would work perfectly fine.

The D1 is a plain diode, schottky ones would be best... for example 1n5817.. 1n5819 would work fine.

Rs sets the maximum current the LEDs (or fan in this case) will receive ... the controller will limit current to this maximum (this level becomes 100% internally in the chip).

 

image.png.4f8f9b60442c477505788396af2b2864.png

 

Most 120 mm fans or bigger will have a current of 0.15-0.25 A, so a 0.3 ohm resistor would be fine to set the top limit (basically put 3 1 ohm resistors in parallel to get 0.33 ohm)

 

This chip allows you to control the output current (which in turn will slow down or speed up the fan) either by an analogue voltage input (0.3v .. 2.5v = 0% .. 100%)  or by PWM signal :

 

image.png.d7f2c479c9e09632d603a0ee47369a37.png

 

So if you're afraid of PWM, you can use an arduino with a DAC chip - send the 8..16 bit value to DAC chip through i2c or spi and the DAC will output a voltage that you can put on that CTRL pin and the led driver IC will limit the current to a percentage of that maximum current configured through Rs ... so if the Rs limits peak current to 333 mA, 1.1v  50% will limit fan to 150mA

Here's examples of cheap and simple to use DACs, you send the value from arduino through i2c and you're done.

10bit ( 0..1023  = 0v..5v), so between 0.3v and 2.5v you have quite a few steps : https://www.digikey.com/product-detail/en/microchip-technology/MCP4716A0T-E-CH/MCP4716A0T-E-CHCT-ND/2684987

12bit (0..4095 = 0v..5v) : https://www.digikey.com/product-detail/en/microchip-technology/MCP4725A0T-E-CH/MCP4725A0T-E-CHCT-ND/1817328

 

Here's a SPI chip : https://www.digikey.com/product-detail/en/texas-instruments/DAC101S101CIMK-NOPB/DAC101S101CIMK-NOPBCT-ND/953475

 

Now back to PWM dimming, datasheet says the stuff below... so again simple... just use arduino pwm output to adjust the current :

 

image.png.f172cbfee2f9143321c6cdcafe91593c.png

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

×