0

stepper vibrations
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

stepper vibrations

by bmp1066 on Sat May 02, 2015 1:17 am

Hi there,

I have an Uno board connected to a v2 motor shield running a NEMA 17 12V 350mA stepper motor (Canakit). The shield is powered by a 9v 500 mA DC power adapter.

I am running the StepperTest sketch that came with the new library for the v2 motor shield.

I cannot get the motor to run smoothly in any setting. Changing RPMs from 10 to 150, trying all 4 step modes (single, double, microstep, interleave) has no significant effect. The motor turns as commanded but very shaky and vibrating with an unhealthy sound. Any idea as to what this could be?



I am also curious about this line from the sketch:

AFMS.begin(1600); // create with the default frequency 1.6KHz
//AFMS.begin(1000); // OR with a different frequency, say 1KHz


What does this control? Does it have an effect on the running of the motor? I couldn't discern any.


Thanks for any advice offered!

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Sat May 02, 2015 6:55 am

Is the motor free-running, or connected to a load? This type of motor typically runs best in DOUBLE or INTERLEAVE mode. MICROSTEP mode can work also, but at slower speeds and may need the ful 12v for adequate torque.

The frequency setting is to adjust the PWM frequency. This will have little effect on that motor.

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Sat May 02, 2015 2:56 pm

The motor is free-running. I have also tried it with a 12V power supply, but still runs very rough. In DOUBLE mode, the vibration is very bad, in INTERLEAVE, it is not as bad as SINGLE, but still quite loud and vibrating.

I have attached the same motors and power supply to an older v1 motorshield and everything runs smoothly up to 175 rpm, but the v2 won't run smoothly at any speed. Down at 10 rpm it sounds like it is skipping steps (with nothing on the motor shaft).

Does the AccelStepper library need to be updated? The one I am running was downloaded several years ago.


Thanks!

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Sat May 02, 2015 3:13 pm

We have not made any recent changes to AccelStepper. How does the motor run using the StepperTest example sketch?

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Sun May 03, 2015 5:37 pm

The StepperTest is what i've been running the whole time (both the Uno board and the motorshield are fresh out of the box).

I've also tried Accel_ConstantSpeed and Accel_MultiStepper. The motor is still vibrating.

Strangely, when running StepperTest, the motor runs at about 60% of the set speed (approx 1.5 secs/revolution if setSpeed is 60),
but when running Accel_ConstantSpeed, the motor only runs at about 30% of the set speed (3 secs/revolution if setSpeed is 60).

Both sketches define the motor as 200 steps/rev and that is the spec of the motor.


Thank you very much for the help!

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Sun May 03, 2015 7:32 pm

There is some i2c communication overhead and with a high step-count motor this is more significant. I don't use AccelStepper, so I don't know why it is more than the Adafruit library.

it is possible to speed up the i2c communication and minimize the i2c overhead. For more detais see this thread:
viewtopic.php?f=31&t=57041

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Sun May 03, 2015 8:57 pm

That thread is definitely useful information for maxing out the speed by minimizing the overhead, but i'm not sure it will help here. The motor is still very wonky when using just the StepperTest sketch which does not use AccelStepper. There is only one stepper motor and even at speeds below 10 rpm, it runs very roughly and sounds like steps are being skipped.


When I first attached the board (brand new) to a laptop running the Arduino SDK , a warning message popped up saying that it was not from a certified manufacturer and that if I had problems, then I would not be able to get any customer service help. The Uno is an Arduino Uno and the motorshield is an Adafruit product (purchased from Amazon). Is it possible I have a bad and/or counterfeit board?

The Uno board works on its own (the blink LED sketch works). The same motor runs smoothly on a v1 motorshield setup. Does the v2 just run a stepper much more roughly than the v1 motorshield?

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Mon May 04, 2015 5:58 am

The Arduino warning message is due to an ongoing trademark dispute betwen Arduino.cc and Arduino.org. There are counterfeit UNOs out there, but if you purchased from a reputable source, you can ignore that warning.

There are lots of clones of our V1 shield on Amazon and eBay, but I am not aware of any clones of the V2. If you post some close-up photos of the front and back we can look it over.

I can't think of any reason why a V2 shield should run rougher than a V1 shield. I could understand if you had a lot of other i2c communication interleaved with the motor control, but that does not seem to be the case here.

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Mon May 04, 2015 7:13 pm

ms_top.JPG
ms_top.JPG (674.17 KiB) Viewed 1078 times
ms_bottom.JPG
ms_bottom.JPG (577.31 KiB) Viewed 1078 times

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Tue May 05, 2015 1:59 pm

That looks like an authentic shield. Does the rough behavior happen on both the M1/M2 and M3/M4 ports?

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Thu May 07, 2015 3:24 am

Yes, it does. I've tried with just one motor in either M1 or M2 and then with a motor in each. I've tried reversing the coils, which reverses the direction, but still every arrangement and position runs steadily rough.


I appreciate the help!

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Thu May 07, 2015 6:16 am

Hmmm. If it was only happening on one side, i'd suspect a problem with one of the bridge chips. But if it works the same on both sides, swapping boards is not likely to make any difference.

From your earlier post.
Does the AccelStepper library need to be updated? The one I am running was downloaded several years ago.

There was an update about 2 years ago that might help. There was an error in the original version that did cause some uneven stepping behavior. Let us know if that makes any difference.

https://github.com/adafruit/Adafruit_Mo ... V2_Library

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Re: stepper vibrations

by bmp1066 on Wed May 13, 2015 2:58 am

Hi again,

I did update the Accel Stepper library and also updated the IDE to Arduino 1.6.3 (from 1.6.2) to no effect. I also tried a different Arduino UNO board and the motors still run identically rough. SINGLE and INTERLEAVE modes both run rough, DOUBLE and MICROSTEP are a little smoother, but they still sound like steps are being skipped.


Thanks!

bmp1066
 
Posts: 8
Joined: Sat Mar 10, 2012 5:28 pm

Re: stepper vibrations

by adafruit_support_bill on Wed May 13, 2015 8:05 am

We can try replacing the shield. If you contact support@adafruit.com with a link to this thread they can send one out to you.

adafruit_support_bill
 
Posts: 81937
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.