servo torque problem

hey folks. I'm building a very simple robot. Basically you press a button, and a stepper winds a cable which actuates a lever. I'm using arduino and a motor shield from Adafruit. I have everything working, except....motor doesn't have enough torque to pull the lever. the driveshaft is spinning inside the motor. I don't know much about steppers. Is there a way I can fix this with code or electrical? Or do I need a stronger stepper?

stepper: Stepper motor - NEMA-17 size - 200 steps/rev, 12V 350mA : ID 324 : $14.00 : Adafruit Industries, Unique & fun DIY electronics and kits

wiring:

mechanics

code:

/* 
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2
It won't work with v1.x motor shields! Only for the v2's with built in PWM
control

For use with the Adafruit Motor Shield v2 
----> http://www.adafruit.com/products/1438
*/


#include <Wire.h>
#include <Adafruit_MotorShield.h>

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); 

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);

const int ledPin =  13;      // the number of the LED pin
const int buttonPin = 2;     // the number of the pushbutton pin
// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status


void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Stepper test!");

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  
  myMotor->setSpeed(60);  // 10 rpm   

     // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
 
  myMotor->step(100, FORWARD, DOUBLE); 
  myMotor->step(100, BACKWARD, DOUBLE);
  delay(1000);
 } else {
  // turn LED off:
    digitalWrite(ledPin, LOW);
   //do nothing with motor
  }
  
}

IS there some reason you have pictures and have discussed EVERYTHING except how you are powering your project.

Paul

what a friendly way to ask.

It's powered by 2 12v adapters. one for the arduino and one to the motor shield, i.e. powering the stepper.

Motors need a lot of power, and to do any heavy lifting you may need a geared stepper motor. Wiring for motors also needs to be of decent size for the larger current. If the motor operates as desired unloaded, then the coding is probably correct.

zoomkat:
Motors need a lot of power, and to do any heavy lifting you may need a geared stepper motor. Wiring for motors also needs to be of decent size for the larger current. If the motor operates as desired unloaded, then the coding is probably correct.

thanks. It does exactly what I want it to when it's not loaded. with a load, the driveshaft stays still, while you can tell the motor is trying to drive it. like you can feel the motor clicking the right number of steps, but the shaft goes nowhere.

any and all suggestions on motors would be great. thanks. I need to get this figured out asap.

How much torque is needed, are you using microstepping?

[ btw the datasheet for that motor is contradictory, is says 0.35A in one place, 0.5A in another, 0.15Nm for pull-out torque yet the dynamic torque graph starts at 0.3Nm.

I also see you are using a motor shield, so you can't have microstepping, which is bad news I'm afraid, steppers perform woefully this way. A DRV8825 may get you more out of that motor, especially with microstepping enabled ]

MarkT:
How much torque is needed, are you using microstepping?

[ btw the datasheet for that motor is contradictory, is says 0.35A in one place, 0.5A in another, 0.15Nm for pull-out torque yet the dynamic torque graph starts at 0.3Nm.

I also see you are using a motor shield, so you can't have microstepping, which is bad news I'm afraid, steppers perform woefully this way. A DRV8825 may get you more out of that motor, especially with microstepping enabled ]

you can use microstepping. It's in the example code written by adafruit for the shield. It doesn't help, though. I don't know how to determine how much torque is needed.