Welcome! Log In Create A New Profile

Advanced

Stepper motor cant go fast

Posted by khiraly 
Stepper motor cant go fast
November 16, 2008 04:21PM
Hi!

I have built a stepper driver board, it only works if the speed is slow.
If I increase the speed (or simply I try to execute the stepper motor exerciser from the wiki), the motor skips steps, and at higher speeds it simply stops, and make weird noise. The motor has no torque (this is why he miss steps)

No idea why this happens. Until tomorrow I will upload a video to vimeo.com (more than 3 hours with my slow internet connection). Where you can see, what I see. The video has low audio, so you need to turn your volume up.

I tried to adjust the trimpot, no difference (except, if I turn to low, the motor cant turn at low speed either and makes no noise).

I even raise the 12V to 17V (have a stabilized power supply) but didnt help.

The motor what I buyed:
23LC051-025-8W-F10-1.0

Datasheet: [www.stappenmotor.nl]

It has 8 wires:
Yellow, Red
Black, Blue

Green, Brown
Orange, White

Each windings has 1.8 Ohm resistance.
I connected as bipolar series, so:
Yellow, blue to A,B (shortened red, black together)
Green, white to C,D (shortened brown, orange together)

So the resistence are 3.6 Ohm for each windings (A-B, C-D).

The board are single-sided (home-made), but I double-checked everything.

The weirdest thing, that at low speed everything looks correct.

Any ideas?
sid
Re: Stepper motor cant go fast
November 16, 2008 07:51PM
umm the datasheet says it's 0.9 Ohms per winding, not 1.8

afaics
your wiring on the stepperboard

should be
yellow, blue, green, white (in ABCD order)

I've read something similar to your problem a while ago in the forums, iirc it was the temp of the l297 that was mainly causing the problem.

Cool the driverchip, and reduce the power with the trimpot to the minimum value that makes the motor turn

Sorry, I cannot find the thread I'm refering to at the moment, I hope I do remember correctly.

'sid

Edited 1 time(s). Last edit at 11/16/2008 07:52PM by sid.
Re: Stepper motor cant go fast
November 16, 2008 08:20PM
I had a similar sort of problem because I was missing a jumper on one board. Not exactly as you describe, but might be worth double checking that you have a good connection across both jumpers and that you selected the right ones.
Re: Stepper motor cant go fast
November 16, 2008 11:27PM
Here is the video:
[www.vimeo.com]

Any idea is much appreciated.
Re: Stepper motor cant go fast
November 16, 2008 11:39PM
sid: I have buyed from here:
[www.aruhaz.klavio.hu]

It says the resistance are 0.9Ohm too.

I have double checked (I buyed three identical motor) all of them has 1.8 Ohm resistance per windings (yellow-red for example).

The L297 driver chip has normal temperature (I can touch it).

Adjusting the trimpot doesnt make difference (motor does not turn and the leds fade out).
Re: Stepper motor cant go fast
November 16, 2008 11:43PM
> afaics your wiring on the stepperboard
> should be yellow, blue, green, white (in ABCD order)

I connected in this order.
(you can see on the video too, but a bit hard to recognize the colors)
Re: Stepper motor cant go fast
November 16, 2008 11:51PM
> umm the datasheet says it's 0.9 Ohms per winding, not 1.8

If I connect as bipolar parallel, the resulting resistance/windings becomes 0.9Ohm.

Maybe it is an error in the datasheet.sad smiley
Re: Stepper motor cant go fast
November 17, 2008 06:28PM
Did you use any electronics not to spec? For instance, I was worried as I used regular 5404 diodes instead of UF5404's, which have a faster recovery time. It wasn't a problem for me, but that crossed my mind. Just shooting in the dark, really.
Re: Stepper motor cant go fast
November 18, 2008 01:29AM
I have used HER308 diode, datasheet: [khiraly.googlepages.com]

Im using single sided board and self-made. Maybe there is short circuit somewhere. (but I have checked many times).

I will upload high resolution images from the board (top and bottom side).
Im also packaging eagle file. But really, I didnt change any relevant part of the datasheet
(replaced the bipolar led with two led.
I think it is safe. And for the motor output I used bigger pads.
But that's all)

Im suspecting some errors in the etching and/or soldering process.
Re: Stepper motor cant go fast
November 18, 2008 02:48PM
jbb
Re: Stepper motor cant go fast
November 18, 2008 04:17PM
Hi khiraly

I seem to recall seeing somewhere that stepper motors have a definite upper speed limit due to their driving electronics. The issue seems to be related to motor inductance.

I apologise for the following if you already know about it, but here's a quick primer:
Inductors try to keep the current in a circuit constant. If a positive voltage is applied to an inductor, current will begin to flow and the electrical energy E=V*I*t will be converted into magnetic energy E=1/2*L*I^2. This process takes time. Rather conveniently, if we apply 1 volt to a 1 Henry inductor the current will increase at 1 amp per second. For ideal components, the current will build up for as long as the voltage is applied.

In mathematical terms: dI/dt = V/L (1)

When we add a series resistor to the circuit things become a bit more complicated. We now have a 1V source, a 1R resistor and a 1H inductor.

Therefore:
Vterminal = Vinductor + R*I (2)
and dI/dt = Vinductor/L (3)
thus Vterminal = 1/L * dI/dt + R*I (4)

We can solve this by using some calculus (sorry I'm too lazy to go through the whole thing tonight) and get:

I = A*(1-exp(-t/tau)) (5)
Where:
A is some constant
t is the time in seconds
tau is the time constant of the system.

We derive tau from the inductance and resistance values, and get tau = L/R. We calculate A by asking the simple question 'what happens at time t = infinity?' First up, we can say that exp(-infinity/tau) is going to be the same as exp(-infinity) which is zero. Therefore the final 'steady state' current of the system is going to be 'A' amps.

Back to the circuit. At time infinity, the current has stabilised and the inductor will have no voltage across it. Therefore all of the voltage is across the resistor, and the current is Vterminal/R.

Thus, A = Vterminal/R.

Overall, I = Vterminal/R * (1 - exp(-t*R/L)) (6)

NOTE: this assumes that the voltage source was suddenly switched on to a constant value Vterminal at time t = 0. If you want to calculate the behaviour for arbitrary inputs it gets a little more complicated.

[en.wikipedia.org] has more info, but it's presented in a format that isn't really 'beginner friendly.' Unfortunately this kind of info isn't readily available (it's more electrical engineering than hobbyist) but a trip to your local university library could be helpful if they let civilians in...

I thoroughly recommend the book "Electrical Engineering : Principles and Applications" by Allan R. Hambley for those who are really interested, but there are plenty of good books out there.

As people start pushing for more and more performance from their RepRap equipment, we will need to start using more sophisticated design and analysis processes. Possibly I should start a section in the Wiki about circuit analysis and control modelling?

I suggest that you measure the actual current draw of the system while running the motor - I suspect that as the speed increases the total current draw will go down. Ideally I suggest using an oscilloscope to measure the voltage on the current shunts R1 and R2 - you should see if the current falls off when the step times get shorter. Alternatively (cause scopes are expensive) you could probably get a reasonable reading with a standard DC current meter in the +12V rail.


IN ORDER TO speed up the response time, you can do three things:
1) reduce the inductance of the motor by connecting the windings in parallel rather than in series. This will mean that they draw twice the current for a given torque, but the speed should improve.
2) increase the resistance by adding external resistors. You'll need to increase the voltage a bit so that the steady state current is right, and the resistors will get hot. DON'T use wire would resistors as they have quite a lot of inductance.
3) use an increased supply voltage and get the L297 to do current switching for you - a nice elegant solution.

When increasing the supply voltage, make sure that you remain inside device voltage ratings. A good rule of thumb is to say that there should be 30% headroom on a device voltage rating, so if you have a 25V rated device it should only be operated up to 19V. This will reduce the risk of short duration voltage spikes from getting into the chips and slowly wearing them out (no really!)

Apologies for the long post.

Good luck
Re: Stepper motor cant go fast
November 19, 2008 01:12PM
jbb: thank you for your advices!

> 3) use an increased supply voltage and get the L297 to do current
> switching for you - a nice elegant solution.

I have a voltage variable power supply (0-30V), increasing the voltage does not make any differences. (apart the leds are glowing more).

I increased to 20V, and the problem still stayed there.

I'm a bit scared either increasing the 12V or connecting it as bipolar-parallel, because the L298 gets too hot.

By the way, I tried out the bipolar-parallel, but no differences.

There must be something fundamental missing.

I borrowed a velleman pcs64i dso oscilloscope, I even compiled qtdso under ubuntu (needed some source editing and include-foo).

I hope I can show you (and for others too) nice graphicon, because without it we are really stuck.

Oh, and the inductivity should be 1.5mH (if I can believe in the datasheet)
Re: Stepper motor cant go fast
November 20, 2008 06:05AM
Ok, I have installed qtDSO, and made some oscilloscope image.

Note, it looks like, the channel B (yellow) is not working, it is always looks like channel A(green) no matter what I touch with.

So it looks like, that at higher speed (step_a_full.png), there are multiple oscillation between the line voltage (about 8 volt) and GND.

And in general the signal looks really awful.

Could somebody post an oscilloscope image of the output? (signal between motor output A and GND)





I will post the high resolution image of the boards too.
Re: Stepper motor cant go fast
November 20, 2008 06:43AM
Here are the photos of the board (top and bottom):



You can see it at higher resolution at:
[khiraly.googlepages.com]
[khiraly.googlepages.com]
Re: Stepper motor cant go fast
November 20, 2008 06:50AM
It's a chopper circuit so there should always be oscilations around 20kHz unless you have the current set higher than the motor can draw. The last cycle of the middle picture is the only that looks right.

When the motor is stationary the outputs should be oscilating with a mark space ratio that keeps the current to the right value, set by the preset pot.

When a step is performed the output should initially stop chopping until the current builds up and then start chopping to keep it there. As you go faster the percentage of the waveform that has chopping will decrease and at high speeds it will never have time to reach the target current so all chopping will disapear leaving just the phase switching.


[www.hydraraptor.blogspot.com]
VDX
Re: Stepper motor cant go fast
November 20, 2008 06:50AM
Hi Khiraly,

... you need much, much bigger heatsinks for your driver!

Look here: - [bp1.blogger.com] - it's the lower norm for higher heat-dissipation ...

Viktor
Re: Stepper motor cant go fast
November 20, 2008 07:17AM
Ok. I was expecting something stupid and simple (like a short circuit, or open circuit).

I will do the following things:
- mount a much bigger heatsink (for Viktorwinking smiley,I thought that without load,
it is not THAT important the size of heatsink.

- write test programs for different speeds. It will not switch the direction or increase the speed. It will be constant.

- I will make images of the outputs (A,B,C,D) and the Rsense. (does any other make sense?)

- I modify the test program for other speed, and repeat the above steps.

What else can I do?

So finally it should be some wrong settings on my part?

Cant be some wrong soldering or wrongly mounted parts or something?
Re: Stepper motor cant go fast
November 20, 2008 07:22AM
I have a variable voltage power supply, at which voltage do you want that I repeat the steps? (8?,12? 17?)

I will do the experiments at this evening.
Re: Stepper motor cant go fast
November 20, 2008 07:30AM
By load I assume you mean mechanical load. Steppers take the most power when they are stationary so it does not depend on mechanical load.

The circuit should work fine at 12V. As you increase the voltage the chopping mark space ratio will decrease. The time to start chopping at the start of a step will also decrease. You should be able to go faster with more voltage.

Edited 1 time(s). Last edit at 11/20/2008 07:49AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Stepper motor cant go fast
November 20, 2008 12:54PM
nophead: yes, I meant mechanical load. Good to know, it is not really related.

Viktor: I have mounted a bigger heatsink (It was a video card's heatsink).


Re: Stepper motor cant go fast
November 20, 2008 02:21PM
nophead: I think I get the idea.

I have played a little bit.

Here is my simple code:
#define stepPin 4
#define dirPin 5

void setup()
{
  Serial.begin(9600);
  Serial.println("Starting stepper exerciser.");

  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);

  digitalWrite(dirPin, HIGH);
  digitalWrite(stepPin, LOW);
}

void loop()
{
        digitalWrite(stepPin, HIGH);
        delayMicroseconds(2);
        digitalWrite(stepPin, LOW);
        delayMicroseconds(1300);
}

Going one step means: raise the stepPin for 2 microseconds.

So my highest speed is going one step in each 1.3 ms.
I can not raise it more (ex: delayMicroseconds(1200)), because
the motor just stalls and makes weird noises.

This is my upper limit of these stepper motors.

I also see what is the goal of the potmeter (R3). (it is exactly how nophead described it, I will post pictures about it.)
Re: Stepper motor cant go fast
November 20, 2008 02:33PM
If that is full stepping then 1.3ms / step would be ~150 mm/s on a Darwin, which is about the speed I get without any ramp up. To go faster you may need acceleration.

How fast were you expecting them to go?


[www.hydraraptor.blogspot.com]
Re: Stepper motor cant go fast
November 20, 2008 02:45PM
If somebody are interesting, here are a bit of tutorial what the potmeter is for.

When there are no step command (the drive is idle) the waveform is looking like this:


When there is not enough torque to even turn the motor, it looks like this:


When the motor turns, but I can hold it with my fingers, to waveform is like this:


If I raise a bit more, and I cant anymore hold the motor with my hands, it looks like this:


If it is overregulated (draws more current than necessary):


And this is the full torque (if you raise the potmeter more, it will do nothing or at high speed will deform the waveform):



In summary:
* I have built the stepper driver board without error. So it IS a normal behaviour
* I have a weak stepper motor, where the upper speed limit is 1.3ms/step
(769 Hz)
* the driver chip is really hot (even with the big heatsink), I can hardly touch it
* the stepper motor itself is extremely cold. It is like a piece of metal (below room temperature)

Is it right?
Re: Stepper motor cant go fast
November 20, 2008 02:55PM
> If that is full stepping then 1.3ms / step would be ~150 mm/s on a
> Darwin, which is about the speed I get without any ramp up. To go
> faster you may need acceleration.

> How fast were you expecting them to go?

I have no idea. I have just built a single sided stepper motor driver board following the wiki. [reprap.org]

And there are an exerciser code at the end. And my setup just could not handle it (the motor made noises without moving), and I began to wondering if i mis-soldered something or have a short-circuit.

And at the end turns out that everything is fine, just my motors are weaker than Zach's.

So (responding to your question) I do not want to go fast.
If everything is normal, and I built without errors, and these are the upper speed limit of the motors, I can live with this limitations.
Just wondered why there are so much (speed) difference.
VDX
Re: Stepper motor cant go fast
November 20, 2008 03:02PM
Hi Khiraly,

what motors did you use?

I have some old unipolar and bipolar motors which are specified at something like 0,2 to 0,3Nm torque and max 1kHz stepping speed at fullstep but with normal 1IC-fullstep-drivers i got only 750Hz - with halftstep they run with 1,5kHz with weak load.

The bigger bipolar motors are from 0,5 to 3Nm, nominal speeds until 2kHz in fullstep but i run them until 6kHz with halfstep and until 10kHz (can't faster) with microstepping ...

Viktor
Re: Stepper motor cant go fast
November 20, 2008 03:06PM
It seems right apart from the last line. I would expect the motor to also get very hot if you run it anywhere near its maximum rating. It will take a long time to warm up though.

I don't think you have a weak motor, 1Nm is the same as mine and I certainly can't hold them at 30% current where they are plenty powerful enough for a Darwin.

The motor is only getting about 8V because of the two Darlington drops in the L298, which is a very old chip. That is why your heatsink gets so hot.

Normally the chopping frequency would be chosen to be about 20KHz so that it is inaudible. You also want it considerably faster than your step rate.

Steppers never go very fast, that is why you either need lead screws with a big pitch or belt drive. You should be able to go considerably faster if you include some acceleration. Raising the input voltage should also increase your top speed and parallel should be about 4 times faster than series.


[www.hydraraptor.blogspot.com]
Re: Stepper motor cant go fast
November 21, 2008 05:36AM
> Normally the chopping frequency would be chosen to be about 20KHz so
> that it is inaudible. You also want it considerably faster than your
> step rate.

Is it changeable? I think the 20kHz is hardwired into the l297 chip.

Finally, I fried 2 of 3 l297 chips.I dont know how I did it.
This is the most expensive part of the whole driver board.


I will also try connecting as bipolar parallel and see, if I can increase the speed.

> I would expect the motor to also get very hot if you run it anywhere
> near its maximum rating. It will take a long time to warm up though.

It is running since 20 minutes, and the temperature stayed below room temperature. It is cold, not even lukewarm.
Re: Stepper motor cant go fast
November 21, 2008 06:01AM
The chopping frequency is defined by R6 and C7, the formula is in the datasheet.

I am very surprised the motor does not get hot. That would imply the current is very low compared to its spec, but then the chip is getting hot so that implies significant current.

The current is set by the voltage on the test point divided by the sense resistor value.

I run my motors at 30% the maximum current, which is about 1/10 power dissipation and they still get to over 40C. The rating for a stepper motor is basically the temperature rating of the windings. At full power, without and heatsinking, they generally run over 80C. At its maximum rating the chip also gets very hot, IIRC about 80C even with a substantial heatsink.


[www.hydraraptor.blogspot.com]
VDX
Re: Stepper motor cant go fast
November 21, 2008 08:00AM
Hi khiraly,

avoid disconnecting and/or connecting the motors when the board is powered or your drivers (mostly both 297/298-IC's) will break down - they're extremely sensitive with abrupt changes in load!

Viktor
Re: Stepper motor cant go fast
November 21, 2008 08:45AM
Thank you guys for the tips. I have post also two more pictures.

The motor is running at 3000us(down), 2us up. So its about 1.5ms/step.

Placing the oscilloscope on either A,B,C or D makes identical waveform.
(too bad, that I can only use one channel).

The waveform on the output A looks like this:


And the waveform on Rsense (either A or B,again its the same waveform) looks like this:


So on the Rsense resistor (0.5 Ohm), the signal goes up until 50mV, so the peak current is: 50 mV/0.5 = 100mA

I think it is not too much. Am I miss something?
Sorry, only registered users may post in this forum.

Click here to login