Motor problem with Orangutan SVP1285P

I’ve got the positive lead from the motor going into M2 Out B, and the negative lead to M2 Out A. I’m using an eight AA pack with new batteries, but the motor barely runs, and within about 15 seconds stops entirely.

The solder connections look ok, no shorts or anything, and I don’t think I missed anything in the manual (although if I did I wouldn’t know it :slight_smile:. Here’s the code I’m running.

#include <stdio.h>
#include <pololu/orangutan.h>
#include <pololu/lcd.h>
#include <pololu/encoders.h>
#include <pololu/motors.h>

int main()
{
    svp_set_mode(SVP_MODE_ENCODERS);
    lcd_init_printf();
    clear();
    set_motors(100, 100);

    while(1)
    {
        int abCounts = svp_get_counts_ab();
        int cdCounts = svp_get_counts_cd();
        int abErrs   = svp_check_error_ab();
        int cdErrs   = svp_check_error_cd();

        lcd_goto_xy(0,0);
        printf("AB = %d CD = %d", abCounts, cdCounts);
        lcd_goto_xy(0,1);
        printf("abErrs = %d cdErrs = %d", abErrs, cdErrs);
    }
}

Appreciate any pointers, head slaps, etc.

Thanks

Joe

Hello goober,

Have you read Read Before You Post: General Advice for Getting Help, which is the post that sticks at the top of this forum? I’m asking because you could have simplified your code a lot more by taking out all the 11 lines relating to the LCD and the encoders (or if your motor problems are caused by those lines, then you can’t take them out but it would be important information to report).

Your current code is trying to run the motors at less than half speed. You should try running them at full speed, using this code:

set_motors(255, 255);

You should also try connecting the leads of your battery pack directly to the leads of the motor; this should produce the same result on your motor as running the code above.

Let us know the results of those two experiments.

Also, what kind of motor do you have? How much current do you expect it to draw?

–David

I’m using the Pololu 100:1 gear motor pololu.com/catalog/product/1101 with the encoders added on.

I’m not sure what happened, but I got home from work, and tried the things you say, and it’s working at 100, 200 and 255. Nothing changed, the stuff’s been sitting here on my desk all night. I did pull the wires to connect them to the battery directly, maybe I just didn’t have them seated correctly before or something. Would that have made the motors just barely go, and then stop?

Well, all’s well that ends well I guess. Sorry for the bother.

Joe