stepper motor not releasing
Moderators: adafruit_support_bill, adafruit

stepper motor not releasing

by darlakitty on Sun Oct 14, 2012 11:17 pm

I have an Arduino atmega328 with motor shield using the AF_Stepper library, and I am powering two stepper motors with it.
motor1 pulls in one direction while motor2 should release; then, motor2 pulls in the opposite direction and motor1 should release.

Everything is working great, but for some reason, even though I've included the release command in my code, it seems that the steppers are not fully released. Both motors spin much more freely when the power is off completely. Because they are not fully released, it is causing problems for other motor trying to pull too hard.

Any troubleshooting suggestions? I'm fairly new to this but I am working with an experienced person who could not figure out what is wrong. Here is the main part of the code and a possibly unhelpful photo of my board:
Image

Code: Select all | TOGGLE FULL SIZE
void loop()
{
  motor2.release();
 
  for (i = 0; i < _steps; i++)
  {
    motor1.onestep(FORWARD, SINGLE);
    delay(2000);
  }
  motor1.release();
 
  for (i = 0; i < _steps; i++)
  {
    motor2.onestep(BACKWARD, SINGLE);
    delay(2000);
  } 
}
darlakitty
 
Posts: 3
Joined: Sun Oct 14, 2012 10:40 pm

Re: stepper motor not releasing

by adafruit_support_bill on Mon Oct 15, 2012 5:03 am

With the motor released, measure the voltage across the output terminals for each coil.

Steppers do not spin freely when released. There is some 'cogging' effect from the permanent magnets on the rotor.
User avatar
adafruit_support_bill
 
Posts: 29093
Joined: Sat Feb 07, 2009 9:11 am

Re: stepper motor not releasing

by darlakitty on Mon Oct 15, 2012 7:11 pm

When the motors are released, I checked the voltage on the coils. There is about 0.27V on M3, while M1, M2 and M4 are all reading zero.

I have two identical motors, one releases fine, yes, with some 'cogging' :)
M3 is connected to the motor that is the one that is not fully releasing.

Thanks so much!
darlakitty
 
Posts: 3
Joined: Sun Oct 14, 2012 10:40 pm

Re: stepper motor not releasing

by adafruit_support_bill on Mon Oct 15, 2012 7:32 pm

0.27v is pretty small, but it could create some holding torque on the motor. Is this voltage measured with the other motor pulling it, or totally released and not moving?
User avatar
adafruit_support_bill
 
Posts: 29093
Joined: Sat Feb 07, 2009 9:11 am

Re: stepper motor not releasing

by darlakitty on Mon Oct 15, 2012 7:55 pm

Measured when the motor is totally released and not moving.
When the Arduino is OFF, the motor turns freely.
darlakitty
 
Posts: 3
Joined: Sun Oct 14, 2012 10:40 pm

Re: stepper motor not releasing

by adafruit_support_bill on Tue Oct 16, 2012 4:54 am

If you post post photos showing all the soldering, we can take a look. But I suspect this is just some leakage through the L293D. I'd suggest swapping L293D's to see if the problem follows the chip. But it looks like you built the shield without the sockets. I'll test a few L293Ds here later today.
User avatar
adafruit_support_bill
 
Posts: 29093
Joined: Sat Feb 07, 2009 9:11 am