Go Down

Topic: PWM on two pins (Read 419 times) previous topic - next topic

jajos

Hi
I want to control pc fans with pwm output
I have two of them and the thing is I want to run one of them with 50% power for 12hours then rest for 12 hours and repeat
The second one I want to work with 80% power efficiency and run for 18 hours and rest for 6 hours

I really can't figure it out Soo i hope you guys(and girls) will help me.

vinceherman

You mention that you have fans.  But you have not given us any details about which kind of fans.  Battery powered fans?  Home fans that run off of main power?  Industrial 3 phase fans? (I think I am allowed 17 more questions in this game)


Do you have an arduino?
Do you have information and/or hardware for controlling your fans?
Have you written any code to try all of this?

jajos

You mention that you have fans.  But you have not given us any details about which kind of fans.  Battery powered fans?  Home fans that run off of main power?  Industrial 3 phase fans? (I think I am allowed 17 more questions in this game)


Do you have an arduino?
Do you have information and/or hardware for controlling your fans?
Have you written any code to try all of this?

I have 3 pin pc fans for 12V. I have got 12V psu. These fans are designed for pc(nothing fancy like 230v) just regular pc fan.

yes I have arduino
yes I want to control them with pwm signal from arduino. Positive to 12V, Negative to Ground and the third one to arduino.
I tried to write some code, but I cant figure out how to turn pwm on two pins for 12 and 18 hours

slipstick

Are you sure your fans can be PWM controlled? Most regular 3 pin PC fans can't. A link to a specification would be useful.

If it's just the 12 hours that's causing you a problem start by running them for 12 and 18 seconds instead (which will be much better for initial testing). Once that's working you can sort out the timing later.

Steve

jajos

Are you sure your fans can be PWM controlled? Most regular 3 pin PC fans can't. A link to a specification would be useful.

If it's just the 12 hours that's causing you a problem start by running them for 12 and 18 seconds instead (which will be much better for initial testing). Once that's working you can sort out the timing later.

Steve
Thats mine fan
https://www.silentiumpc.com/mistral-92/

I saw that fan can be controlled like that here: https://electronics.stackexchange.com/questions/62324/arduino-controlled-pwm-pc-fan

The only problem I have is the code, I really dont know how to specify it

I can use 'blink' from basic tutorial codes and put 12h in ms and thats it, but I dont know how to insert the pwm part

Wawa

You should have bough 4-pin fans.

4-pin fans already have the speed controller inside, and can be controlled directly with the Arduino (PWM).
3-pin fans don't have the controller, and you have to add a transistor (e.g. logic level mosfet) and supporting parts.

The page you linked to shows a 4-pin fan (Power, Ground, PWM, Tach).
Leo..

Grumpy_Mike

Quote
but I dont know how to insert the pwm part
That is the trivial bit. Just use an analogWrite function to set the fan going at what ever speed you want. Their is no need to keep repeating this, you just need to do one analogWrite every time you want to change speed.

slipstick

Thats mine fan https://www.silentiumpc.com/mistral-92/
That's a fixed speed 3-wire fan...no PWM wire.

I saw that fan can be controlled like that here: https://electronics.stackexchange.com/questions/62324/arduino-controlled-pwm-pc-fan
That shows how to control a 4-wire fan with a PWM wire.

It isn't the code that is your problem. Unfortunately you have the wrong type of fan for simple PWM speed control.

Steve

INTP

Your 3rd wire tells you fan speed, not control it.

Go Up