DC Fan module speed control
Hi,
I'm using a dc fan module as below.
http://www.uctronics.com/l9110-fan-moto ... duino.html
I connected it to D5 (one of GPIO pins which supports PWM) on lattepanda board and uploaded following code.
#define Fan 5 //define driver pins
void setup()
{
pinMode(Fan,OUTPUT);
Serial.begin(9600); //Baudrate: 9600
}
void loop()
{
int value;
value=225;
analogWrite(Fan, value); //PWM
Serial.println(value);
delay(200);
}
However, it doesnt work. But if I set value=0, it has max speed, if I set value=197 it is min speed. I expected 0 is min, 225 is max. Am I missing something?
I'm using a dc fan module as below.
http://www.uctronics.com/l9110-fan-moto ... duino.html
I connected it to D5 (one of GPIO pins which supports PWM) on lattepanda board and uploaded following code.
#define Fan 5 //define driver pins
void setup()
{
pinMode(Fan,OUTPUT);
Serial.begin(9600); //Baudrate: 9600
}
void loop()
{
int value;
value=225;
analogWrite(Fan, value); //PWM
Serial.println(value);
delay(200);
}
However, it doesnt work. But if I set value=0, it has max speed, if I set value=197 it is min speed. I expected 0 is min, 225 is max. Am I missing something?