Problem with stepper motor with Adafruit Arduino Shield V2.3

Hello everyone,

I'm a newbie with Arduino and electronics, and I'm having problems simply by running the Stepper Test from Adafruit Motor Shield. Would appreciate your help.

I am powering via the UNO board through a 12V 5A adapter. I don't know if this is the first mistake and I should power direct through the shield, but I don't have the piece that diverges the adapter jack into the + and - cables.

I've tried with two motors and none of them work, a SM-42BYG011-25 which runs with 12V and 0.33A and a SY28STH45-0674A which is 4.5V and 0.67A

As additional info. I haven't soldered the headers connections between the UNO and the shield since I'm waiting for the stacking headers to install other shield above. But since the power is being transmitted (led light on) I think the headers are working OK.

The project at the end should drive 4 stepper motors (that's why I should stack another motor shield above) but achieving this test would be a good first step for me.

Thank you! :slight_smile:

Juan

this is the code from Adafruit Stepper test library:

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); 

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);


void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Stepper test!");

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  
  myMotor->setSpeed(10);  // 10 rpm   
}

void loop() {
  Serial.println("Single coil steps");
  myMotor->step(100, FORWARD, SINGLE); 
  myMotor->step(100, BACKWARD, SINGLE); 

  Serial.println("Double coil steps");
  myMotor->step(100, FORWARD, DOUBLE); 
  myMotor->step(100, BACKWARD, DOUBLE);
  
  Serial.println("Interleave coil steps");
  myMotor->step(100, FORWARD, INTERLEAVE); 
  myMotor->step(100, BACKWARD, INTERLEAVE); 
  
  Serial.println("Microstep steps");
  myMotor->step(50, FORWARD, MICROSTEP); 
  myMotor->step(50, BACKWARD, MICROSTEP);
}

Without a wiring diagram it is impossible to give advice. A photo of a pencil drawing will be fine.

Motors should never draw power from an Arduino board.

AFAIK the Adafruit motor shield (you have not provided a link) is really intended for controlling DC motors. If so you really should get some proper stepper motor driver boards. They make everything about steppers very much easier.

I have some of the SM-428 motors and I control them with Pololu A4988 stepper driver boards with a 20v power supply - though they will work with 12v.

...R

Hi, thaks for your reply.

This is the wiring diagram from the shield I have:

and is connected mounted direct over the Uno as explained here...

So this is the tutorial I'm following and it's not working, thank you.
Tutorial

I just tried by powering direct the shield with 12V but also didn't work.

Could it be because I haven't soldered the connections with the Uno?

Thanks

I did not want the internal wiring of the shield. What I want to know is how YOU have wired things up - especially your power supplies.

The other link you provided was more useful. As I thought, that motor shield is far from ideal for stepper motors.

...R

Hi, sorry, I don't know how to draw electronic diagrams, but I know to take photos :stuck_out_tongue: I hope is useful.

this was yesterday with the power supply through the Uno,

And today with direct supply to the shield and stacking headers connecting both:

thanks!

Sorry but photos don't really convey any info beyond colours.

Just do a pencil drawing showing how everything is powered up - what is being powered by what - and post a photo of the drawing.

Is the Arduino being powered from the USB port?

You say you have a 12v 5A power supply but I can't figure how it is being used. Your two pictures are different.

If you were using a proper stepper motor driver board I would have more advice and test code but I have so far avoided having anything to do with shields.

...R