I am using a Freetronics Eleven Board with a H Bridge Shield to control a bipolar stepper motor. The stepper is an Anaheim Automation 17Y202S-LW4. The program that I've written to control the motor seems to function normally but I'm experiencing what I can only describe as a rapid pulsing or knocking sound coming from the motor (tried two separate motors so am reasonably sure that it's not a motor fault). I am also confident that the sound is not mechanical as running the motor by itself (not connected to any drive pulleys etc) produces the same issue. While this sound is not that bad in itself -particularly if the motor is suspended in "free air", it resonates badly through the aluminium framing to which it is attached. Unfortunately, it is something that I can't afford to live with as the product I am making is intended for sale to market.
The following information may also be helpful:
[*] program is written to simply drive a stage (linear ball bearing) back and forth along one axis
[*] I've tried adjusting the motor speed and this has just changed the frequency of the pulse/knock
[*] I've adjusted the current limit from 0.6A to 1.2A to 2A with no change
[*] I initially thought that this may be due to the speed of loops in my code so I wrote a simple code as shown below to test this theory. It produced no change with the pulse/knock still being there.
[*] I previously tested the exact same mechanical set up with the Ocean Controls Step Pulser and EasyDriver and experienced no knocking or pulsing whatsoever.
[*] I'm using the standard pins on the H-Bridge (4,7,3,2) with Enable pins 5 and 6 as per the example code shown in the H Bridge guide.
Simple code as referred to above:
Code: Select all
void loop() {
digitalWrite(enableA, HIGH);
digitalWrite(enableB, HIGH);
myStepper.step(500);
digitalWrite(enableA, LOW);
digitalWrite(enableB, LOW);
delay(2000);
digitalWrite(enableA, HIGH);
digitalWrite(enableB, HIGH);
myStepper.step(-500);
digitalWrite(enableA, LOW);
digitalWrite(enableB, LOW);
delay(2000);
resetWatchdog();
}
void resetWatchdog() {
digitalWrite(watchdog, HIGH);
delay(20);
digitalWrite(watchdog, LOW);
}
Thanks for your help
Sean