Stepper motor doesn't run

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Stepper motor doesn't run

Postby aerosam » Thu Apr 26, 2012 7:27 am

Hi

I am using the motor shield and the PF35T-48L4 stepper motor that i got from adafruit.
I determined that the 2nd and 5th wires are the center taps and connected them to ground on the shield.
I connect coil 1 to M1 and coil 2 to M2. Power up the shield with a 5V power supply, the green LED glows. Loaded the following sketch onto Arduino UNO.

#include <AFMotor.h>


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

motor.step(100, FORWARD, SINGLE);
motor.release();
delay(1000);
}

void loop() {
motor.step(100, FORWARD, SINGLE);
motor.step(100, BACKWARD, SINGLE);

motor.step(100, FORWARD, DOUBLE);
motor.step(100, BACKWARD, DOUBLE);

motor.step(100, FORWARD, INTERLEAVE);
motor.step(100, BACKWARD, INTERLEAVE);

motor.step(100, FORWARD, MICROSTEP);
motor.step(100, BACKWARD, MICROSTEP);
}
Nothing happens :(
I got the servo and dc motors to run like a charm.

What am i doing wrong?

Thanks
Sam
aerosam
 
Posts: 10
Joined: Sun Mar 20, 2011 1:11 am

Re: Stepper motor doesn't run

Postby aerosam » Thu Apr 26, 2012 7:30 am

Forgot to mention that i changed
AF_Stepper motor(48, 2); to
AF_Stepper motor(100, 1); This is because i am using port 1, (i.e. using M1 and M2). I set the value 100, because the motor is supposed to be a 3.6 degrees/step motor.
aerosam
 
Posts: 10
Joined: Sun Mar 20, 2011 1:11 am

Re: Stepper motor doesn't run

Postby adafruit_support_bill » Thu Apr 26, 2012 7:47 am

I set the value 100, because the motor is supposed to be a 3.6 degrees/step motor.

Where does it say that? That motor is 7.5 degrees/step. In any case that value is only used to calculate speed. The motor should still run.

Does the motor appear to be getting any power? Does it hum or try to move at all?

It sounds like you have correctly identified the center-taps. You should have brown and black wires for one coil and yellow & orange for the other. If you post photos of the front & back of the shield we will check over your assembly.
User avatar
adafruit_support_bill
 
Posts: 16644
Joined: Sat Feb 07, 2009 9:11 am

Re: Stepper motor doesn't run

Postby aerosam » Fri Apr 27, 2012 2:21 am

There was a loose contact in my soldering. It works fine now.
I thought step angle was 3.6 degrees based on
http://www.allelectronics.com/make-a-st ... IRE/1.html
aerosam
 
Posts: 10
Joined: Sun Mar 20, 2011 1:11 am

Re: Stepper motor doesn't run

Postby adafruit_support_bill » Fri Apr 27, 2012 4:54 am

The data sheet for the PF35-48 motor we sell is here. The "48" in the model number refers to the number of steps/rev.
User avatar
adafruit_support_bill
 
Posts: 16644
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: No registered users and 3 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]