motor shield v1 and bipolar motor
Moderators: adafruit_support_bill, adafruit

motor shield v1 and bipolar motor

by brunovianna on Tue Nov 19, 2013 12:24 am

I'm having problems using this motor - http://dlnmh9ip6v2uc.cloudfront.net/dat ... 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 | TOGGLE FULL SIZE
// 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);
}
brunovianna
 
Posts: 2
Joined: Mon Nov 18, 2013 7:11 pm

Re: motor shield v1 and bipolar motor

by adafruit_support_bill on Tue Nov 19, 2013 7: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
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v1 and bipolar motor

by brunovianna on Tue Nov 19, 2013 10: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.

Thanks!
brunovianna
 
Posts: 2
Joined: Mon Nov 18, 2013 7:11 pm

Re: motor shield v1 and bipolar motor

by mccarthybergeron on Tue Jul 22, 2014 10:52 am

So out of curiosity, will this motor have a better time running on Motor Shield v2?
mccarthybergeron
 
Posts: 20
Joined: Thu Jun 19, 2014 9:35 am

Re: motor shield v1 and bipolar motor

by adafruit_support_bill on Tue Jul 22, 2014 10:55 am

Can't say without accurate data on the motor. As noted above, the specifications don't add up. Assuming that 12v and 4 ohm numbers are accurate, 3A is higher than the continuous load rating for the V2 shield.
https://learn.adafruit.com/all-about-st ... he-stepper
User avatar
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v1 and bipolar motor

by mccarthybergeron on Tue Jul 22, 2014 1:46 pm

Awesome Bill - thanks a lot, already answered a future question of mine. :)
mccarthybergeron
 
Posts: 20
Joined: Thu Jun 19, 2014 9:35 am

Re: motor shield v1 and bipolar motor

by jimmitt on Sat Nov 01, 2014 7:07 pm

We are trying to use the same setup and have been experiencing lots of problems as well. I confirmed that it is 4-ohms per coil, and I saw the draw maxing out at 3A (probably trying to reach 6A since I had two motors attached). Is there either another comparable stepper or another shield that someone can recommend?
jimmitt
 
Posts: 7
Joined: Sun Apr 06, 2014 8:39 pm