I'm trying to troubleshoot why my salvaged bipolar stepper motor isn't rotating--it's just sort of hiccuping back and forth, and then pauses for 500 ms before doing the whole jittery thing again. Could it be because my code
#define motorSteps = 200 isn't correct? I don't know how many steps make up the 360 degree rotation on this thing.
I'm using the stepper tutorial and code found in the Arduino library.
I've double and triple checked the wiring diagram for the h-bridge and the bipolar stepper motor ( from igoe's Physical computing) and I know my set up is correct. For some reason the stepper won't turn--it pulses forward one step and then back one step. The motion is hardly perceptible. I'm thinking it has to be a code thing, but I'm using code from the library.
I was reading on another website about someone having the same problem but using a different microcontroller? I posted that info below:
[I have the MakingThings stepper motor (Jameco P/N 237454). When I send a command like "/stepper/0/positionrequested 1000" it just flips back and forth instead of continuing in one direction for 1000 steps.
Motor specs call for 9.6V at 0.5A. The wall wart I have hooked to VExt1 is 6V at 0.4A. I figured that was close enough, but I have no idea what I'm doing.
So why does it just turn back and forth?
Re: Why does my stepper just turn back and forth?
Posted by Aaron Tunell at January 25. 2008
is it moving back and forth real fast? like a vibration almost? If so, you'll need to turn up the duty and fiddle with the speed maybe. I got fine results after i turned the duty up to full blast.
Before i did so, though, i got poor response.]
Any ideas? My motor is doing the same thing. Does anyone know what "duty" is? (giggle--no seriously)
Thanks.
Duty is probably the dutycycle of a squarewave that pulses the stepper controller circuit.
How long do you keep the pins that control the two halfes of the H bridge high ? That would correspond to the dutycycle mentioned.
Are you absloutely sure you hooked up the wires correctly ? Did you meassure the wires to make sure you know which of the wires belong to the two coils ? You can't take the colorcoding of the wires for granted.
From the picture send to me i could see that The Arduino board ground was not connected to the ground of the powersupply used for the stepper motor. I don't know if this solved the problem. But the two grounds should definitly be connected