Stepper motor not stepping right

Hi all,

I wanted a cheap solution with four axes and stepper motors with little demand for torque.

The best I was able to find was:
1 arduino as the controller (I like programming in C)
4 drivers from futurlec with no instructions...

4 Minebea-Matsushita # 23KM-K246-01V hybrid stepper motors with no datasheets
http://www.allelectronics.com/make-a-store/item/SMT-116/HYBRID-STEPPER-MOTOR/1.html

I used the Stepper.h library and all looks just fine, but:

a) the only speed I get decent motion is at about 300 steps / second
below that I get jerky movements to both sides
above about 1000 steps / second the motor comes to a halt and
makes a much higher pitched noise.
b) the arduino, connections and everything seems to be connected well
and my suspicion is that I have the wrong power source for the drivers
(one for now). I use a 12V battery just to make sure it's stable enough
and has sufficient juice.
c) I tried moving it 50 steps forward, 50 backward, 200 forward, 200
backward at 300 steps / second and it seems to go fine forward, but
kind of stays in the same spot and vibrates on its way back
d) the heatsink gets really hot at 12V just after 20sec of working so I
must be doing something wrong

I would very much appreciate any help, but I believe I either have too big motors, bad power source for the drivers or some kind of driver power output setup.

If anybody can find the the datasheets for the motors and some kind of manual or example for the drivers from futurlec I might be able to solve the problem myself.

BTW, I doubt the connections from the arduino to the driver or from the driver to the motor are mixed up. I tried switching them around just to see if I messed up somewhere and it just got worse.

Thank you.

Without your arduino code and a schematic of how you hooked things up it's really not possible to help you much.

Did you connect Arduinos ground to the stepper controllers ground ?

How are you wiring this up? The motor looks like a bipolar one.

However there is not a specification for the coil current and the fact that it gets so hot suggests you have too high a voltage pushing too much current through it. There is nothing in the controller chip to limit the current so it is likely you are over driving it.
The main cause of :-

the only speed I get decent motion is at about 300 steps / second
below that I get jerky movements to both sides

Is you have one of the coils wired in the wrong order or the wrong way round. Despite what you say.

above about 1000 steps / second the motor comes to a halt and
makes a much higher pitched noise.

That will happen even when it works at the lower speed, it is just you have exceeded the speed you can use.

You are right. I still think all my connections are OK and the problem is more conceptual.

http://www.vigorboard.com/SMCC%20V2%20Schematic.gif

http://www.vigorboard.com/ST839672.JPG

http://www.vigorboard.com/ST839673.JPG

The connections are:

Arduino pin 8,9,10,11 signal output for stepper
+5V and GND as power source for the SMCC v2 board

SMCC v2:

left side:
+5V --- from Arduino +5V
EN1 --- +5V
EN2 --- +5V
INA --- Arduino pin 8
INB --- Arduino pin 9
INC --- Arduino pin 10
IND --- Arduino pin 11
GND --- Arduino GND

right side:
+5V --- from Arduino +5V
GND --- Arduino GND

MV+ --- battery +12V
GND --- battery 0V --- (I also connected it to the Arduino GND after taking the pictures with no effect)

OA --- wire 1 on the stepper motor
OB --- wire 2 on the stepper motor
OC --- wire 3 on the stepper motor
OD --- wire 4 on the stepper motor

The code is basic from the Motor Knob example:

simplified:

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

void setup()
{
stepper.setSpeed(300);
}

void loop()
{
stepper.step(50);
delay(500);
stepper.step(-50);
delay(500);
stepper.step(200);
delay(500);
stepper.step(-200);
delay(500);
}

The real reason might be, that the motors should work at 24V, but with the overheating of the driver I'm afraid to connect it to any more then 12V.

What do the LEDs on the motor driver board do. I can't see you doing anything with the enable input. Try pulling these up to 5V with a 10K resistor. It could be that the current limiting circuit is not working properly with a floating enable pin.
What difference does the current limiting pot have on the board. Put it at minimum, is it still getting hot?

Did you measure continuity between pairs of wires on the stepper motor to determine which pairs of wires go together?

It almost sounds like you do not have the wires connected in proper phase order.

Did you measure continuity between pairs of wires on the stepper motor to determine which pairs of wires go together?

The motor wires are connected fine. It works fine at some speeds so the phase order is OK. I even tied switching the cables around, but this is the only way it works at all.

What do the LEDs on the motor driver board do. I can't see you doing anything with the enable input. Try pulling these up to 5V with a 10K resistor. It could be that the current limiting circuit is not working properly with a floating enable pin.
What difference does the current limiting pot have on the board. Put it at minimum, is it still getting hot?

Very good questions! I haven't seen the LEDs light up even once and since I have no manual with the driver I don't know what they are supposed to do. In my opinion they should light up when the current is being limited.

The current limiting pot seems to have almost no effect on the torque, maybe very little, but I cannot say for sure.

The enables were both connected to +5V.

I tried with a 5V power supply from a PC and after adding some capacitors to stabilize it a little I made much progress. Now it works fine in both directions and at speeds up to 300 steps/sec. The driver however still heats up, although a lot less than before, and I can leave it running for about a minute before it gets really hot. The trimmer seems to have some effect on the heat buildup, but as I mentioned 1 minute is about the maximum I can get. What I don't understand is why I get so much heat on a driver that should withstand 50V/4A with such low power demands.

OK! At last I figured it all out. The overheating problem is because the motor resistance is 0.6 ohm, so even at 5V I get 8.3A per phase. I'm thinking of just placing a 3ohm/10W resistor in series with each winding. That way it should get around 1.4A/phase, 2.8A total, safe below the 4A limit.

The question that comes to my mind now is, should really the resistors dissipate 5x as much power as the motor?

I'm thinking of just placing a 3ohm/10W resistor in series with each winding.

no get the current limiting of the driver working. Dis you try the pull ups. The LEDs should be lit all the time, if not the current limiting isn't working.

Thank you all for your help!

no get the current limiting of the driver working. Dis you try the pull ups. The LEDs should be lit all the time, if not the current limiting isn't working.

Well, no doubt you are right, but I tried adjusting the trimmer to both limits, with and without load and I wasn't able to make light up the LEDs. Under what condition should the LEDs light up?

Here is the schematic:
http://www.vigorboard.com/SMCC%20V2%20Schematic.gif

Got it working!!!

It was the

Try pulling these up to 5V with a 10K resistor.

that I missed the first time (I had connected the enable pins directly to +5V).

However, although I got the current limiter working and with only 5V and the limiter around 30% (the minimum to get the motor working right) it still heats up and I can leave it on for about 2 minutes before I have to disconnect it. I could probably solve this by a much bigger heatsink and fans, but I'm starting to think, that the motors are just too big and will have to replace them with something smaller.

Another issue is, that the current limiter seems to be limiting more one loop than the other, can I just play with the pull-up resistors to compensate for this?

If you look at the schematic you will see that normally the LED is off and the enable pins are being driven externally or are floating. When current is drawn through the motor it flows through the sense resistor and develops a voltage across it. This is connected to the negative input of the op amp and when this exceeds a voltage generated by the pot the op amp's output goes low. This does two things, it turns on the LED and it disables the motor drive. Then as the motor drive is disabled current stops flowing through the motor and so the voltage across the sense resistor drops below that given by the pot. That makes the output of the op amp go high turning off the LED and enabling the motor again.

Thus the circuit oscillates and keeps the current within limits.

It sounds like this is not happening, I think this might be because it's minimum value must be too high for your motors. The way to reduce the current limit is to increase the value of the sense resistor, the schematic says this is 0.5R so if you increase this to 1R you will half the current it takes to kick this current limiting circuit off.

OK, so now it's working!

The L298N must have been damaged during all my experiments. I used a second driver and it worked perfectly. I tried swapping the LM358N between the two drivers and the original one was still limiting one coil more than the other. I adjusted the resistance of the sense resistors. It helps, but I'm afraid I'll have to change the L298N.

Thanks for the help. When I have time, I will place a little guide here, so others can use this board without burning anything.