Jump to content

Freshening up a post (that seems to have gotten buried)


G+_James Hughes
 Share

Recommended Posts

Freshening up a post (that seems to have gotten buried)

 

I'm using a sn754410ne, an arduino nano, and a 10k potentiometer. The problem is that I can't get enough holding torque from the stepper. Here's the code that I'm using, it's a modified version of the MotorKnob example code:

 

/*

* MotorKnob

*

* A stepper motor follows the turns of a potentiometer

* (or other sensor) on analog input 0.

*

* http://www.arduino.cc/en/Reference/Stepper

* This example code is in the public domain.

*/

 

#include

 

// change this to the number of steps on your motor

#define STEPS 200

 

// create an instance of the stepper class, specifying

// the number of steps of the motor and the pins it's

// attached to

Stepper stepper(800, 8, 9, 10, 11);

 

// the previous reading from the analog input

//int previous = 0;

int Pval = 0;

int potVal = 0;

 

 

void setup() {

// set the speed of the motor to 30 RPMs

stepper.setSpeed(300);

Serial.begin(9600);

}

 

void loop() {

 

potVal = map(analogRead(A0),30,750,0,200);

if (potVal>Pval)

stepper.step(1);

if (potVal

stepper.step(-1);

Pval = potVal;

 

// get the sensor value

// int val = analogRead(0);

 

// move a number of steps equal to the change in the

// sensor reading

// stepper.step(val - previous);

 

// remember the previous value of the sensor

// previous = val;

Serial.print("Pot value:");

Serial.println(potVal);

}

https://photos.app.goo.gl/lyjWhVKuZrK4QunE2

Link to comment
Share on other sites

The holding torque of a stepper varies with the motor current. Motor current varies with the drive voltage. Try increasing the drive voltage (VCC2 pin 8 of the 754410, consistent, of course, with the max motor current ratings and the 36 volt and 1 amp limit of the 754410). Verify by measuring the motor current in one leg of the motor, with the motor not stepping.

 

Also, try lowering the step rate. Motors only respond so fast. If you exceed that rate, they mis-step.

 

Also, video above doesn't seem to play...

Link to comment
Share on other sites

 Share

×
×
  • Create New...