2 pins stepper driver

264 views
Skip to first unread message

Juan Ignacio Martinez Abadias

unread,
Feb 13, 2015, 8:23:28 PM2/13/15
to accels...@googlegroups.com
Hello, i can't get my stepper motor work with AccelStepper library.
Here is an example that actually works using the Stepper library from Arduino:


#include <Stepper.h>

const int pasosPorRevolucion = 200;  

Stepper motor(pasosPorRevolucion, 8,9); 

const int pinEnable = 10;

int RPM = 5;

void setup() {
  .
  .
  .
  pinMode(pinEnable, OUTPUT);
  
  
}

void loop() {

    motor.setSpeed(RPM);
    motor.step(-pasosPorRevolucion/100);

}


But with AccelStepper library it doesnt do anything just like when the enable pin is disable.

#include <AccelStepper.h>

AccelStepper stepper(1,8,9);

void setup()
{  
   stepper.setMaxSpeed(1000);
   stepper.setSpeed(50);
   stepper.setEnablePin(10); 
}

void loop()
{  
  
  stepper.runSpeed();
}

Im using ArduinoMega 2560 and a stepper motor driver v3.3 from MakerBot (http://www.ebay.com/itm/MakerBot-RepRap-Stepper-Motor-Driver-v3-3-/281088644420)

I hope the information is sufficient to get an idea of the problem. 
Sorry about my bad English . 
I appreciate any help with this issue.

Regards,
Juan

Jose Manuel Gonzalez Martinez

unread,
Feb 14, 2015, 6:34:06 AM2/14/15
to accels...@googlegroups.com
Hola Juan Ignacio. Yo soy un aficionado a arduino y he trabajado con esa librería para manejar 9 motores al mismo tiempo. Tengo un blog sobre mis proyectos y uno es sobre steppers y accelstepper. Aquí te la dejo por si te sirve:

http://proyectos-arduino-geometriaemocional.blogspot.com.es/2014/04/motores-paso-paso.html

Un cordial saludo.

José Manuel González

http://cargocollective.com/geometriaemocional



Date: Fri, 13 Feb 2015 17:23:28 -0800
From: 123...@gmail.com
To: accels...@googlegroups.com
Subject: [accelstepper] 2 pins stepper driver
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

J. Ignacio Martinez Abadias

unread,
Feb 14, 2015, 12:39:25 PM2/14/15
to accels...@googlegroups.com
Spanish:

Hola Jose, tu blog es muy interesante y lo voy a seguir visitando.

Con respecto al problema que tengo con la libreria AcellStepper sigo sin entender porque el motor no se mueve. He leido toda la informacion en la web oficial de la libreria y sigo sin encontrar mi error.
Te comento que necesito mover mi stepper de una forma que no bloquee el flujo normal de mi scketch, por eso mi necesidad de usar los metodos non-blocking que tiene esta libreria.

Por favor si ves algun indicio de qué puede llegar a estar fallando te agradeceria me lo hagas saber.


Enghish:

Hi Jose, your blog is very interesting and I will keep visiting.

Regarding the problem with the AcellStepper
library, I still dont understand why the motor does not move. I have read all the information on the official website of the library and I still could not find my error.
Just so you know I need to move my stepper in a way that does not block the normal flow of my scketch, so my need for non-blocking methods that this library has.

Please if you see any indication of where the fault is, I appreciate you let me know.


Best Regards, Saludos cordiales,
Juan Ignacio Martinez Abadias



Juan Ignacio Martínez Abadías

--
You received this message because you are subscribed to a topic in the Google Groups "accelstepper" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/accelstepper/a_3lt_jLimk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to accelstepper...@googlegroups.com.

Mike McCauley

unread,
Feb 14, 2015, 4:27:01 PM2/14/15
to accels...@googlegroups.com
Hello,

you did not set a target position.
Suggest you look at the examples and test them first.

Cheers.

On Saturday, February 14, 2015 11:34:04 AM Jose Manuel Gonzalez Martinez
wrote:
> Hola Juan Ignacio. Yo soy un aficionado a arduino y he trabajado con esa
> librería para manejar 9 motores al mismo tiempo. Tengo un blog sobre mis
> proyectos y uno es sobre steppers y accelstepper. Aquí te la dejo por si te
> sirve:
>
> http://proyectos-arduino-geometriaemocional.blogspot.com.es/2014/04/motores-> paso-paso.html
>
> Un cordial saludo.
>
> José Manuel González
>
> http://cargocollective.com/geometriaemocional
>
>
> Date: Fri, 13 Feb 2015 17:23:28 -0800
> From: 123...@gmail.com
> To: accels...@googlegroups.com
> Subject: [accelstepper] 2 pins stepper driver
>
> Hello, i can't get my stepper motor work with AccelStepper library.Here is
> an example that actually works using the Stepper library from Arduino:
>
> #include <Stepper.h>
>
> const int pasosPorRevolucion = 200;
>
> Stepper motor(pasosPorRevolucion, 8,9);
>
> const int pinEnable = 10;
>
> int RPM = 5;
>
> void setup() { . . . pinMode(pinEnable, OUTPUT); }
> void loop() {
> motor.setSpeed(RPM); motor.step(-pasosPorRevolucion/100);
> }
>
>
> But with AccelStepper library it doesnt do anything just like when the
> enable pin is disable. #include <AccelStepper.h>
> AccelStepper stepper(1,8,9);
> void setup(){ stepper.setMaxSpeed(1000); stepper.setSpeed(50);
> stepper.setEnablePin(10); } void loop(){ stepper.runSpeed();}
> Im using ArduinoMega 2560 and a stepper motor driver v3.3 from MakerBot
> (http://www.ebay.com/itm/MakerBot-RepRap-Stepper-Motor-Driver-v3-3-/2810886
> 44420) I hope the information is sufficient to get an idea of the problem.
> Sorry about my bad English . I appreciate any help with this issue.
>
> Regards,Juan

--
Mike McCauley VK4AMM mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com
Phone +61 7 5598-7474

Reply all
Reply to author
Forward
0 new messages