Temperature controlled fan not spinning on its own


i have start off saying new arduino , code, please gentle me... in saying that, here situation:

i have put temperature controlled fan put 3d printer enclosure made. got parts , code web site, , got working. problem is, when temperature reaches point (30 degrees c in example), fan supposed start spinning @ 30% power. fan doesn't start... if flick fan fingers starts.

a friend had said maybe put line of code in start fan @ 100%, have go down 30%, in hopes 100% start fan itself. here code in question:

code: [select]
if(temp <30 ) {                 // if temperature less 30
    analogwrite(enable,0);        // 0% pwm duty cycle
    lcd.print("fan off ");      
    delay(100);
  }
  else if(temp>=30 & temp<32) {      // if temperature between 30 & 32
    analogwrite(enable, 77);         // 30% of maximum duty cycle value (255).
    lcd.print("fan speed: 30% ");
    delay(100);
  }
  else if(temp>=32 & temp<35) {      // if temperature between 32 & 35
    analogwrite(enable, 153);        // 60% of maximum duty cycle value (255).
    lcd.print("fan speed: 60% ");
    delay(100);
  }
  else if(temp>=35) {                // if temperature above 35
    analogwrite(enable, 255);        // 100% duty cycle
    lcd.print("fan speed: 100%   ");
    delay(100);
  }


"enable" set pin 5. so... right add line:

"analogwrite(enable,255)" before "analogwrite(enable,77)" in section starts fan @ 30%? read line, start fan @ 100%, read next line , reduce speed 30%?

thanks...

i think friend has idea.  trying out won't cost cent, why not try out.  motors need power started.  i'd try starting @ 100% , moving down 30 tenth of second or later. doing in 2 lines (set 100% , 30%) won't it. motor needs enough time fight inertia.


Arduino Forum > Using Arduino > Project Guidance > Temperature controlled fan not spinning on its own


arduino

Comments

Popular posts from this blog

Help with codes to add 1 more shift register and add more to matrix LED

tcp client

Can't read sms using Thinker A7 communicate with Arduino