SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By JohnLash
#179219
Please be patient with me as I am new to Arduino but I have found my self in the position of coach for a middle school robotics team and need some help.

The robot the team is building uses four Nema 16 steppers, we were told that they could all be controlled with an UNO and a quadstepper. We learned later that we really should have gotten a Mega instead of an UNO as the quadstepper library only works with the Mega.

Before we invest more of our scarce resources into into a Mega I was wondering if there is any way to use what we have.

So far we have written a short piece of test code but have not gotten the results we were looking for. Here is the code:

#include <Stepper.h>

Stepper stepper(200, 5, 6); //pin 5 dir pin 6 step

void setup ()
{

pinMode (4, OUTPUT);
digitalWrite (4, LOW); // enable
stepper.setSpeed(90);

}

void loop()
{
stepper.step(100);
delay (500);
stepper.step(-100);
delay (500);

}

We paired off the motor leads and attached them to the terminals for channel 1, connected pin 4 to channel 1 enable, pins 5 and 6 to channel 1 step and direction. The ground from the Uno was connected to the ground on the quadstepper.

The results we got were a small amount of chattery movement in one direction then a small amount of chattery movement in the other direction.

We swapped around the motor leads trying all possible combinations, that resulted in either no movement or chattery movement.

We have also tried swapping around the step, direction and enable leads. We got mixed results but nothing anywhere near smooth movement of the stepper.

We also found that writing the enable pin HIGH results in no stepper movement at all.

Any thoughts, suggestions or advice would be very much appreciated.

Thank you,
John
By hneve
#179323
Technically you don't need a microcontroller at all with the quadstepper if I understood my 2 second googling. It has a input for direction and a input for step for each of the 4 possible motors.

So if I imagine correctly you could test this board with 8 buttons. Or a UNO, whatever's your fancy.