Fan is startup slowly after switched on

Thread Starter

enesene

Joined Mar 3, 2020
29
Arduino-PWM-Fan-Controller-Schematic.jpg

This is my circuit. When 12V switched on the fan is suddenly spinning slowly and after any command from arduino it reaches its maximum speed as it should be.
But i want this fan not spinning initially until my command. What should i do?

Code:
int led = 9;
String x;
int val;

void setup(){
  Serial.begin(9600);
  pinMode(led, OUTPUT);
}
 
void loop(){
  if(Serial.available()>0)
  {
    x=Serial.readStringUntil(',');
    val=x.toInt();
    analogWrite(led, val);
  }
}
(it's associated with visual studio)
 

vanergr

Joined Nov 23, 2020
10
Hello,
Couple of things to consider:
For the slow start of the fan part
a) does your fan's control sense is logic levels or voltage level and what is the min and max. The Arduino PWM is not much.
PWM Voltage = (Duty cycle/ 256)*5V.
b) Is the current enough to drive the coils?
c) I would personally put a transistor or a mosfet as driver and have the Arduino drive the Base/Gate.
For not starting as soon as the Arduino is on you have to initialize your output as 0 some time if not specified it can cause unwanted behavior.
 

Ya’akov

Joined Jan 27, 2019
9,069
Hello,
Couple of things to consider:
For the slow start of the fan part
a) does your fan's control sense is logic levels or voltage level and what is the min and max. The Arduino PWM is not much.
PWM Voltage = (Duty cycle/ 256)*5V.
b) Is the current enough to drive the coils?
c) I would personally put a transistor or a mosfet as driver and have the Arduino drive the Base/Gate.
For not starting as soon as the Arduino is on you have to initialize your output as 0 some time if not specified it can cause unwanted behavior.
If you parse the TS carefully you will see that he is complaining the fan starts at power up and he wants it not to do that until his program controls it.

"On power up it spins at a slow speed and I want it to stay off until the program sends a particular PWM signal" is my translation. If this is incorrect, I expect @enesene will correct me...
 

Thread Starter

enesene

Joined Mar 3, 2020
29
If you parse the TS carefully you will see that he is complaining the fan starts at power up and he wants it not to do that until his program controls it.

"On power up it spins at a slow speed and I want it to stay off until the program sends a particular PWM signal" is my translation. If this is incorrect, I expect @enesene will correct me...
Correct. first of all i made a scroll bar with c# and i used a LED instead of fan motor so i can control led's brightness. it worked perfect. the led stays off until i scroll bar right side and after i scrolling it's getting brighter.
I mean at the start of the program there's no scroll so led is off. But with this 12v pwm fan it starts with a slow spinning.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
If you parse the TS carefully you will see that he is complaining the fan starts at power up and he wants it not to do that until his program controls it.
I made that conclusion also!
It seemed that it could be a floating output until output turned on.
Didn't realize he was not using a Mosfet?
 

vanergr

Joined Nov 23, 2020
10
If you parse the TS carefully you will see that he is complaining the fan starts at power up and he wants it not to do that until his program controls it.

"On power up it spins at a slow speed and I want it to stay off until the program sends a particular PWM signal" is my translation. If this is incorrect, I expect @enesene will correct me...
On his own title he is saying slow startup. That is why I assumed he has two issues, and I did read the hole post and code that is why I broke my suggestions into two.
 

vanergr

Joined Nov 23, 2020
10
Correct. first of all i made a scroll bar with c# and i used a LED instead of fan motor so i can control led's brightness. it worked perfect. the led stays off until i scroll bar right side and after i scrolling it's getting brighter.
I mean at the start of the program there's no scroll so led is off. But with this 12v pwm fan it starts with a slow spinning.
I gave you some ideas to help out both with the slow spin and the erratic behavior. I'm sorry if my suggestions didn't get to be communicated correctly
 

Thread Starter

enesene

Joined Mar 3, 2020
29
Typical mosfet connection.
Rin = 100R, Rgs 10k.

View attachment 237030
can i use transistors instead of it?
- i use tip121 power transistor, 2.2k res and uf4007 diode
it works kow but at low voltages it doesn't spin and it's making buzz noise.
I have to scroll up the bar at least 35% to make it spin but after it started to spin it's spinning slowly if i scroll down to like 15% and it stops at %1 as it should be.

thank you
 

vanergr

Joined Nov 23, 2020
10
can i use transistors instead of it?
- i use tip121 power transistor, 2.2k res and uf4007 diode
it works kow but at low voltages it doesn't spin and it's making buzz noise.
I have to scroll up the bar at least 35% to make it spin but after it started to spin it's spinning slowly if i scroll down to like 15% and it stops at %1 as it should be.

thank you
It sounds like the Base-Emitter(on) Voltage isn't sufficient from the Arduino output to turn it on. In that case I would try an optocoupler if your goal is to have that much of control at low speeds. The Arduino can easily drive the LED in those and in theory you could have the control you want to achieve.
 

dendad

Joined Feb 20, 2016
4,451
If you remove the Arduino and connect a 1K resistor between the control pin and gnd, does the fan start?
Assuming 0V is off, that is.
If so, just a resister added to hold the pin at 0V while the Arduino powers up may fix it.
Iff +5V is off, add the resister from control to +5V instead.
 

Thread Starter

enesene

Joined Mar 3, 2020
29
Can i ask you something?
I just connect Fans + and - pins with transistor to arduino. I didn't connect PWM pin anywhere. This fan is designed to be controlled with a PWM signal and increase or decrease its RPM so maybe i should connect pwm pin to somewhere? But i don't know where.

Ekran görüntüsü 2021-04-29 013115.png
 
Top