Hello everybody!
I need help to control motors in SVP-324. I wrote an extremely simple program
#include <pololu/orangutan.h>
int main() {
int M1_PWM = 50;
set_m1_speed(M1_PWM);
clear(); // just to remove garbage from display
while(1) { ; }
}
I cannot say it does not work, but it does not work as I expect. The program sets the speed of Motor 1 to low value (+255 is the maximum). The motor starts to spin, but non-uniformly. With period of about 2 seconds it speeds up and slows down. Speed variations are of about 80% at this speed value (M1_PWM = 50). When I increase it, the speed increases and relative variations become smaller, but still clearly noticeable. Another motor behaves exactly in the same way.
I worked wit DC motor control in my previous projects with PICs. Even without PID control motor speed was pretty constant. At least variations were unnoticeable without precise measurements. What do I do wrong? I am lost is three commands!
Just in case I provide some information about my circuit. Recently I updated SVP-324 firmware to version 1.01, because I was planning to run PID control and I have quadrature sensors on each motor. Probably, the version of the Firmware does not matter at this time, because the auxiliary PIC does not control H-bridges. I did not run this code before updating the Firmware. I have motors from Pololu (2 x #1101 100:1 Micro Metal Gearmotor HP) with encoder set (1 x #1218 Pololu 42x19mm Wheel and Encoder Set). I power my controller from 6V 1200mA adaptor. I tried to power it from 7.5V 2500 mA adaptor just to see if I have enough power. Motors behavior does not change.
Can anybody help?
Thank you.
Konstantin