motor shield v1 and bipolar motor

by brunovianna on Mon Nov 18, 2013 11:24 pm

I'm having problems using this motor - ... 15-11C.pdf - and the original motor shield. Has anyone managed to use it without problems?

I'm using an external 12v power source. I'm connecting the yellow and red wires to M3 and brown and black to M4.

Using AccelStepper.h results in jumpy movements, the motor spins forward but turns back every now and then.

Using just AFMotor.h is a bit better - StepperTest (copied below) actually works, but it will only go forward, not backwards. Besides, the motor, the h-bridge chip on the shield and my power supply get really hot fast. I can't touch the chip for more than a second or so.

I tested in a unipolar stepper and it works like a charm, both AccelStepper and AFMotor. Maybe there's some configuration I'm missing here? I tried different wiring combinations but it only got worse.

Thanks for any insight!

Code: Select all
// Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!

#include <AFMotor.h>

// Connect a stepper motor with 48 steps per revolution (7.5 degree)
// to motor port #2 (M3 and M4)
AF_Stepper motor(48, 2);

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

  motor.setSpeed(10);  // 10 rpm   

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

  Serial.println("Double coil steps");
  motor.step(100, FORWARD, DOUBLE);
  motor.step(100, BACKWARD, DOUBLE);

  Serial.println("Interleave coil steps");
  motor.step(100, FORWARD, INTERLEAVE);
  motor.step(100, BACKWARD, INTERLEAVE);

  Serial.println("Micrsostep steps");
  motor.step(100, FORWARD, MICROSTEP);
  motor.step(100, BACKWARD, MICROSTEP);
Posts: 2
Joined: Mon Nov 18, 2013 6:11 pm

Re: motor shield v1 and bipolar motor

by adafruit_support_bill on Tue Nov 19, 2013 6:04 am

The motor specs posted are a little suspect. It is rated for 12v, but has a 4ohm coil and a current rating of 400mA. If you drive it with 12v and a non-current-limited driver, you will be putting 3A through the coils. That is WAY too much for both the motor and the L293D H-bridge chips on the shield.
User avatar
Posts: 25348
Joined: Sat Feb 07, 2009 9:11 am

Re: motor shield v1 and bipolar motor

by brunovianna on Tue Nov 19, 2013 9:23 am

Yes, that seems to be the issue. I got the motor from sparkfun, I'll post at their forum and see if anyone has managed to work this out.

Posts: 2
Joined: Mon Nov 18, 2013 6:11 pm