# Nema 11 stepper motor not working. Buzzing without movement

#### cvangordon

Joined Mar 28, 2016
31
So i have a nema 11 stepper motor and im driving it with a pololu MP6500 and an Arduino pro micro 5v 16mhtz version. I will be running it all on battery power later and i want to be able to run the stepper at 120rpms so i have a 5v power source connected to a DC to DC booster that is set to output 20v and that is connected to the VMOT and ground pins of the driver in series with a 25v 100 microfarad cap.

I downloaded the driver softwear for the arduino pro to work properly in the IDE and i ran the LED blinker test code to make sure it works and it did.

I have the MP6500 driver wired according to its minimum requirements as seen in the picture. I connected SLEEP to the arduino VCC pin and ground to ground. Step pin is connected to pin 14 on the arduino and direction pin to pin 15.

I hooked it all up except for the motor and set the VREF voltage just like in the tutorial video on pololu.com. The nema 11 i got has a max amp rating of 0.8A. The MP6500 says to set the current multiply VREF by 3.5. So i set VREF to .22 to set the current to .77. Then i put my multimeter in series with one of the motor coils, uploaded a code to send constant high signal to the step pin and measured the current and got .50A which is exactly what it should be because in full step mode only 70% of the set current is used: .22 x 3.5 x .70= .539. During measuring the current is when i noticed something wrong. When i would touch the probes to take the measurement the motor would start to buzz and hum like as if it was fully connected but of course one coil had one pin disconnected and my multimeter was measuring the current there.

I figured i got a good read anyway and went ahead and uploaded a code that steps the motor forward one rotation and back 2 rotations (see code below).
I connected the motor after uploading then connected the arduino back into the USB on my macbook to power the arduino. The motor makes buzzing noises and vibrates but no stepping. I did some research and found that sometimes steppers have their wires swapped and they need to be checked for proper coil pairing. I found a video on YouTube demonstrating that you can use an LED and stick it in the motor wire connectors and then turn the motor by hand and the wires that are paired will cause it to light up. I did it and it turns out that my wires were good from the start. I tried swapping the 2 in the middle anyway and tried to step the motor again and oddly it made the same sounds but actually moves this time but it was very choppy and never reversed.
I tried slowing down the speed from 500 microsecond delay to 10,000 and that seemed to make it a bit smoother but still pretty much the same.
I checked the voltages on the driver pins going to the motor and the first pin is 0v the second 20v the third is 0v and the last pin is 20v so driver seems to be working. Voltages at the step and direction pins are 5v like they should be (4.765 to be exact)
So im out of ideas on what to check for.

Code:
/* Simple Stepper Motor Control Exaple Code
*
* by Dejan Nedelkovski, [URL='http://www.HowToMechatronics.com']www.HowToMechatronics.com[/URL]
*
*/
// defines pins numbers
constint stepPin = 14;
constint dirPin = 15;
voidsetup(){
// Sets the two pins as Outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
}
voidloop(){
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
// Makes 200 pulses for making one full cycle rotation
for(int x = 0; x < 200; x++){
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW); //Changes the rotations direction
// Makes 400 pulses for making two full cycle rotation
for(int x = 0; x < 400; x++){
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000);
}

#### Attachments

• 68.8 KB Views: 12
• 197.2 KB Views: 12
Last edited by a moderator:

Joined Mar 10, 2018
4,057

#### MrSoftware

Joined Oct 29, 2013
2,015
I'm not familiar with your particular stepper driver, but if you have a scope check to be sure its pulsing the coils in sequence.

Also try ramping up the step speed. If you jump right to full speed sometimes the motor can't overcome the inertia to get to the next step and it will sit there and buzz, especially if there is a load on the motor with some extra inertia (pulley, etc..). On stepper controllers with options this is often called acceleration profile.

Joined Feb 20, 2016
3,835
As MrSoftware says, slow it down for a start.

Try..
digitalWrite(stepPin,HIGH);
delay(10);
digitalWrite(stepPin,LOW);
delay(10);

Or something like that. make sure it works before getting on to you real code.

#### cvangordon

Joined Mar 28, 2016
31
As MrSoftware says, slow it down for a start.

Try..
digitalWrite(stepPin,HIGH);
delay(10);
digitalWrite(stepPin,LOW);
delay(10);

Or something like that. make sure it works before getting on to you real code.
The original code that i posted had 500 microsecond delay between steps making it turn pretty fast so i changed it all the way to 10000 microseconds and it didnt do anything