Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15598

Stepper motor malfunction

$
0
0

Hello! How are you doing? I wanted to ask a question. I've been experimenting with various stepper motors, and I've noticed that all of them exhibit high vibrations, elevated temperatures, and significant noise. Any idea what I might be doing wrong? It's worth noting that all the motors I've tested were salvaged from printers, and these, at least in appearance, seem to be similar to NEMA motors.

here is a video of the motor running

And this is the code I am using

#include <AccelStepper.h>

// Define the stepper motor and the pins that is connected to
AccelStepper stepper1(1, 2, 3); // (Typeof driver: with 2 pins, STEP, DIR)

void setup() {

  stepper1.setMaxSpeed(100); // Set maximum speed value for the stepper
  stepper1.setAcceleration(100); // Set acceleration value for the stepper
  stepper1.setCurrentPosition(0); // Set the current position to 0 steps

}

void loop() {

  stepper1.moveTo(300); // Set desired move: 800 steps (in quater-step resolution that's one rotation)
  stepper1.runToPosition(); // Moves the motor to target position w/ acceleration/ deceleration and it blocks until is in position

  // Move back to position 0, using run() which is non-blocking - both motors will move at the same time
  stepper1.moveTo(-300);
  stepper1.runToPosition(); // Moves the motor to target position w/ acceleration/ deceleration and it blocks until is in position
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 15598

Latest Images

Trending Articles



Latest Images