go_away

Author Topic: Addition of a 10k pot leads to different pwm outputs  (Read 529 times)

0 Members and 1 Guest are viewing this topic.

Offline FionnualaTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Addition of a 10k pot leads to different pwm outputs
« on: May 11, 2012, 08:49:52 AM »
Hello.
I've got a wiper motor hooked up to a motor driver getting PWM signals from a MAKE controller digital out and the following code

PwmOut_SetDuty(0,480);
Sleep(2000);
PwmOut_SetDuty(0,512);
Sleep(2000);
PwmOut_SetDuty(0,550);
Sleep(2000);

This just makes the wiper motor go clockwise for two seconds, stay still for two seconds and then go counter clockwise for two seconds.  This bit works fine.

The problem occurs when I add a 10k Pot to one of the analog inputs.  Even if the code never refers to the pot and even if the pot is set to zero, it changes the PWM output somehow so that the above code results in ONLY clockwise movement of varying speeds.  I was going to use the pot as a feedback to control the wiper motor but I need the counter clockwise movement as well.

Any ideas? 

 


Get Your Ad Here

data_list