Machsupport Forum

Third party software and hardware support forums. => Third party software and hardware support forums. => Topic started by: Mad Professor on April 01, 2009, 03:10:35 PM

Title: Help with Stepper Motor Tuning and Setup
Post by: Mad Professor on April 01, 2009, 03:10:35 PM
Good Day All.
I have been reading the Mach3 CNC Controller Software Installation and Configuration manual ( to try and setup my stepper motors.
I need someone to please dumb it down for me as my brain is not working today.
I have four new Astrosyn MY103H702 (, 200 step, 6.2volt, 1amp, stepper motors wired as Unipolar.
I have read you can run a stepper motor at 2 or 3 times the rated voltage happly, I have also seen pepole running low voltage stepper motors anything upto 48volts.
I contacted astrosyn and they said I can run at any voltage aslong as I don't go over the motors rated current of 1amp.
I am looking at running my stepper motors at 18-20volts.
I have been looking at ways to limit the current to the stepper motors, I have tried 5w 12v bulbs, and heavy duty resistors I had spare.
The resistors seem to work better and give the stepper motors more starting torque.
I am now looking at building a simple linear current limiter, like the one found at: ( Figure 4.3.
The controllor I am using only supports full step mode.
These stepper motors are not yet connected to a CNC unit they are just free running.
Can someone please explain to me how I setup my stepper motors for the max Speed and Torque.
Thanks for your time.
Best Regards.
Title: Re: Help with Stepper Motor Tuning and Setup
Post by: Tweakie.CNC on April 02, 2009, 12:51:04 PM
Hi Prof,

18-20 Volts is OK for your steppers, just make sure the 1 Amp current is not exceeded otherwise they will get very hot and may be damaged.

The motor settings are not really applicable to free running mode as everything will change when they are put under load driving a machine.
However, as motor torque reduces as the speed is increased - then increase the speed settings until the motor stalls when driven then back off the speed setting some 10 - 20 %. Set the acceleration to the fastest that will allow the motors to start from stationary.

Hope this helps,

Title: Re: Help with Stepper Motor Tuning and Setup
Post by: Mad Professor on April 03, 2009, 02:58:51 AM
Tweakie.CNC: Thanks for you reply.
Due to the risk of over heating and killing one or more of my stepper motors I would like to try and build a Current Limiter for each of the stepper motors.

Quote from: (
Linear Current Limiters
A pair of high wattage power resistors can cost more than a pair of power transistors plus a heat sink, particularly if forced air cooling is available. Furthermore, a transistorized constant current source, as shown in Figure 4.3, will give faster rise times through the motor windings than the current limiting resistor shown in Figure 4.1. This is because a current source will deliver the full supply voltage across the motor winding until the current reaches the rated current; only then will the current source drop the voltage.


In Figure 4.3, a transistorized current source (T1 plus R1) has been substituted for the current limiting resistor R1 used in the examples in Figure 4.1. The regulated voltage supplied to the base of T1 serves to regulate the voltage across the sense resistor R1, and this, in turn, maintains a constant current through R1 so long as any current is allowed to flow through the motor winding.
Typically, R1 will have as low a resistance as possible, in order to avoid the high cost of a power resistor. For example, if the forward voltage drops across the diode in series with the base T1 and VBE for T1 are both 0.65 volts, and if a 3.3 volt zener diode is used for a reference, the voltage across R1 will be maintained at about 2.0 volts, so if R1 is 2 ohms, this circuit will limit the current to 1 amp, and R1 must be able to handle 2 watts.

R3 in Figure 4.3 must be sized in terms of the current gain of T1 so that sufficient current flows through R1 and R3 to allow T1 to conduct the full rated motor current.

The transistor T1 used as a current regulator in Figure 4.3 is run in linear mode, and therfore, it must dissapate quite a bit of power. For example, if the motor windings have a resistance of 5 ohms and a rated current of 1 amp, and a 25 volt power supply is used, T1 plus R1 will dissapate, between them, 20 watts! The circuits discussed in the following sections avoid this waste of power while retaining the performance advantages of the circuit given here.

When an H-bridge bipolar drive is used with a resistive current limiter, as shown in Figure 4.1, the resistor R2 was not needed because current could flow backwards through R1. When a transistorized current limiter is used, current cannot flow backwards through T1, so a separate current path back to the positive supply must be provided to handle the decaying current through the motor windings when the switches are opened. R2 serves this purpose here, but a zener diode may be substituted to provide even faster turn-off.

The performance of a motor run with a current limited power supply is noticably better than the performance of the same motor run with a resistively limited supply, as illustrated in Figure 4.4:


With either a current limited supply or a resistive current limiter, the initial rate of increase of the current through the inductive motor winding when the power is turned on depends only on the inductance of the winding and the supply voltage. As the current increases, the voltage drop across a resistive current limiter will increase, dropping the voltage applied to the motor winding, and therefore, dropping the rate of increase of the current through the winding. As a result, the current will only approach the rated current of the motor winding asymptotically
In contrast, with a pure current limiter, the current through the motor winding will increase almost linearly until the current limiter cuts in, allowing the current to reach the limit value quite quickly. In fact, the current rise is not linear; rather, the current rises asymptotically towards a limit established by the resistance of the motor winding and the resistance of the sense resistor in the current limiter. This maximum is usually well above the rated current for the motor winding.

Can anyone help me work out a working design for my setup.
My power supply is rated at 20volts @ 7.5amps.
My steppor motors are rated at 6.2volts @ 1amp.
Thanks for your time.
Best Regards.
Title: Re: Help with Stepper Motor Tuning and Setup
Post by: Tweakie.CNC on April 03, 2009, 05:48:50 AM
Hi again Prof,

I fully understand what you are trying to do here, you have explained that well in other postings, but I can’t help thinking that you are ‘re-inventing the wheel’. We have moved on a lot since the early days of CNC and the advent of chips with computing powers have simplified controlling the drive requirements of stepper motors considerably. If we consider a basic CNC machine it all comes down to the need to move an axis from one place to another. Because any axis has mass this then requires a greater force to accelerate and decelerate it than it does to maintain it at a constant speed. Just considering mass and acceleration at the moment and ignoring the many other forces involved, then the greater the mass the greater the force required likewise the greater the acceleration / deceleration the greater the force required. Now steppers have the characteristic of being able to provide high torque (force) at slow speeds and low torque at high speeds which pretty much meets the requirements for moving a CNC axis. When a stepper is stationary, the torque is high so the current through its windings can, within limits, be reduced without compromising its performance (holding torque). So to drive a CNC machine well and efficiently the current through the steppers must vary in accordance with the task. Minds greater than my own have tackled this problem and for example chips, such as the Alegro SLA7024M series for unipolar and the A3982 for bipolar steppers implement the requirements to a tee. There are, of course, many other makers and chips to choose from and I recommend that you proceed in this direction. After all we must learn from and build on others experience because, as others have said, life is just no long enough to make all the mistakes yourself.

Sorry for rambling on a bit but if your ultimate goal is to build a working CNC machine why not concentrate on the mechanicals and purchase Gecko drives for the steppers – it may be a lot cheaper in the long run.

All the best,

Title: Re: Help with Stepper Motor Tuning and Setup
Post by: RICH on April 03, 2009, 09:23:40 AM
Mad Professor,
What you realy want is "power' out of your motors. That max power will be had at 1/2 the speed and torque value. Deviating from that point then is just appication specific , by which Tweakie, alreaady stated as, if you want speed than you sacrifice torque......if you want torque than you sacrifice speed. That's just the way it works.

Agree with Tweakie also on just buying a drive. A friend made his owne and they work greatand saved money, but then electronics is his thing.

Title: Re: Help with Stepper Motor Tuning and Setup
Post by: Mad Professor on April 03, 2009, 09:32:01 AM
Thanks for your replys.
The driver board I made as talked about in my last post does seem to work fine, it only support full step mode and no current limiting, as said I have had the steppers working using 12v 5w bulbs to limit the current.
I have been able to make my stepper motors work by putting ramdom numbers in the Mach3 motor setup, the figgers seem really low.
As you have said it would be best for me just to go out and buy new premade controllers for my stepper motors.
Also has you have said even if I get my motors working nice free running I will need to retune the settings once connected to a rig.
So I am going to do some more designs in CAD and build the rig within the next one to two weeks I hope.
Thanks for your time.
Best Regards.
Title: Re: Help with Stepper Motor Tuning and Setup
Post by: Tweakie.CNC on April 03, 2009, 09:53:19 AM
That's the way to go Prof.  ;D