Strange Stepper Motor Rotating Behaviour with SD02B Stepper motor controller

Hi all,

I have recently get myself an arduino duemilanove and wanna to interface with stepper motor controller SD02B.This controller has an UART interface which enables me to transmit using ASCII to rotate the stepper motor in counter clockwise or clockwise direction.

To initialise, i use

void setup()
{
Serial.begin(9600);
}

In order to rotate the stepper motor,
void loop()
{
//turn on stepper motor
Serial.println(“O”);
delay(1000);

//rotate clockwise
Serial.println("<");

//run the stepper motor
Serial.println(“G”);
delay(2000);

//brake stepper motor
Serial.println(“F”);

delay(3000);
}

The code above is used for rotating stepper motor in one direction and no abnormalities were found. However, my problem comes when i
program the stepper motor to rotate clockwise first and rotate counter clockwise later in a single source code window. The problem is that while the stepper motor rotate in clockwise direction for example, it will rotate to the other direction suddenly before finishing rotating its designated direction. Is it something to do with clearing the buffer in the serial communication? i need advice, thanks

Post a link to the stepper motor controller you have. Post ALL of your code, not just the snippets you think we need to see.

A photo of your setup, or a good diagram of how things are connected/powered would be useful, too.

Typically, stepper motors only move when commanded to step, either in individual steps, or some number of steps. They don't, typically, just run until told to stop.

You got done far more than I did ! ( same shield with Arduino Mega )
Yes, some diagrams will help me to make some progress and others helping you.
Please take a photo of what you have done !
Motor type, how you powered up the shield, connected UART, all things point to a much needed diagram.

While I test my motor with the test button on the shield .. it's movement is so weak that the slightest touch on the shaft will prevent it from doing anything but jerking back and forth.

Thanks !

While I test my motor with the test button on the shield … it’s movement is so weak that the slightest touch on the shaft will prevent it from doing anything but jerking back and forth.

Your stepper motor is gasping “More current. I need more current!!!”.

I think you a right Paul! Thanks!
I was running my motor on 12V from a converted cumputer PSU unit. I thought that should be enough.
When I ran it at 23.3 V (+12,12V leads ) it behaved erratically again. I didn't push it as the limit for the motor shield is 20V in the particular mode I was running it. ( Vmotor - both the logic and the motor are fed through one power line )
Then I used + 12V with -5V which got me 17V and this seemed to be the sweet spot. Lot more torque and consistent operation.

The particulars of my quest are that I need the system working fluently with UART from Arduino Mega.
Then use a more powerful motor and make a motorized Lazy Susan with precise increments for object VRs (photography)


This particular motor that I am playing with now is a salvage from a HP Printer. Specs below.
My particular measurements gave me either 30 or 60 ohms between the 5 leads it has. I hope I got the hooking right. All wires are black.
The ground ( joined middle coil leads ) with any other ends can only give 30 ohms. The rest is trial and error.

Items M35SP-8
Rated Voltage DC 12V - DC 24V
Working Voltage DC 10.8~13.2V - DC 21.6~26.4V
Rated Current/Phase 259mA - 173mA
No. of Phase 4 Phase - 4 Phase
Coil DC Resistance 50?/phase±7% - 150?/phase±7%
Step Angle 7.5°/step - 7.5°/step
Excitation Method 2-2 Phase excitation (Unipolar driving)
Insulation Class Class E insulation - Class E insulation
Holding Torque 38.2mN·m - 42.1mN·m
Pull-out Torque 23.0mN·m/200pps - 28.4mN·m/200pps
Pull-in Torque 22.5mN·m/200pps - 27.9mN·m/200pps
Max. Pull-out Pulse Rate 580pps - 610pps
Max. Pull-in Pulse Rate 495pps - 520pps


I am looking for info on the programming above. Or UART communication to shield. Any suggestions are welcome. Serial communication is what I find to be the next challenge.
Thanks !

useful , thanks.