2

I am currently using an Adafruit motor shield on my arduino uno for the first time. The idea is turning the stepper motor with basicly 1RPM. But i just cant do it.

This is the first time working with this setup, and i dont know what to do. Can you people help me?

i'm using the Arduino Uno with ADAFRUIT motorshield. The steppermotor is 48steps / rev DATASHEET

The code i have at the moment:

#include <AFMotor.h>

AF_Stepper motor(48, 1);

void setup() {
  Serial.begin(9600);

  motor.setSpeed(1);

  motor.step(48, FORWARD, DOUBLE);
  motor.release();
  delay(10);
}

void loop () {
  motor.step(48, FORWARD, DOUBLE);
}

Greetings from Holland.

  • 2
    You'll need to provide more inout if you want to get some useful answers: source code uploaded to your board? Board type? Stepper references with link to datasheet? Power supply? What have you done so far? – jfpoilpret Oct 1 '14 at 20:20
  • When you execute this program, what happens? Nothing at all? Most of the time, when encountering problems with stepper motors, the root cause is the wiring: did you check it twice? – jfpoilpret Oct 1 '14 at 22:25
  • 3
    That's not a 48-step stepper. That's one with 64 steps per revolution and with 64 reduction gearing inside. So you end up with 64*64=4096 steps per revolution of the outer shaft. So it's moving 85 times too slow. Hope that helps. Greetings back from the Netherlands. – Gerben Oct 2 '14 at 16:08
  • I wonder if employing a motor with 180 steps which is divisible by 60 would be of any advantage? Here is a reference page which may assist you in evaluating the best component for your design: Introduction to Stepper Motors – Orbmanelson Nov 2 '14 at 20:16
  • But i just cant do it. - can't do what? I don't understand what you are asking. What is your question? How is it wired? What happens when you run the code? I'm going to close this question. Feel free to edit it with new information. Thanks for your understanding and cooperation! – Nick Gammon Jan 30 '16 at 5:33
0

If the stepper gives you 48 steps and an hour has 60, you need to provide 1,25 rounds in one hour given you only move the minute hand. Then with some gearing you should be able to move the hour hand every round there.

So the best way to do this is to is either to move the hand once and then delay 1 minute, 1 minute = 60 seconds x 1000 milliseconds.

You then need to figure out what it requires of the stepper motor to make 1 step, with some stepper motors you need to move forward 1 cycle and then back a half. to make a step. You should find all this in the documentation.

Please provide feedback in the comments below so we can improve the answer.

  • Most stepper drivers can do microstepping. – Gerben Oct 2 '14 at 15:56
0

Unsure what you need help with, but this might help:

I believe that the 28BYJ-48 has a lot more steps per rotation, around 4000 I think. I had a few problems myself getting this to work. It also has four steps to cycle through, not 2.

Take a look at this library which has the 28BYJ-48 set to default. CustomStepper

Not the answer you're looking for? Browse other questions tagged or ask your own question.