PDA

View Full Version : Motor tuning and switches



glynster
13-03-2015, 12:34 PM
Hi, I'm bench testing my motors - they are all wired up correctly and I can get them to turn when I run the roadrunner code in mach3, so I assume all connections are good. I am using this kit from cnc4you.co.uk http://www.cnc4you.co.uk/CNC-Kits/Digital-Stepper-Kits/Nema23-Stepper-Motor-Digital-Kit-3.1Nm-x-3-Axis

Problem is I have no idea what settings I should be using. The motors seem to be turning very slowly. I have set up in mm's and in the motor tuning section I can change the velocity etc but I havent got a clue what I should be setting things at - I wonder if somebody could suggest some settings as a starting point? Seems the max mm's per minute I can set is 700 - even at that the motors dont spin fast to be honest - even at that speed a full 360 degree revolution of the spindle takes approx 3 seconds which doesn't seem right even to a newbie like me. I dont know what to set the "steps per" or "step pulse" etc under motor tunings too. I think also maybe I should be setting the switches on the driver - details are all below

Quick stats:

PSU outputs at 36v

motors Nema 23 3.1nm / 60BYGH301B (http://cnc4you.co.uk/resources/Stepper%20Motor%20Nema%2023%2060BYGH301B%203.1Nm.p df)
http://www.mycncuk.com/attachment.php?attachmentid=14858&stc=1

Driver CWD556 digital driver - switch setting chart below

http://www.mycncuk.com/attachment.php?attachmentid=14859&stc=1

http://www.mycncuk.com/attachment.php?attachmentid=14860&stc=1

http://www.mycncuk.com/attachment.php?attachmentid=14861&stc=1

Instructions that came with the kit show the settings for getting the motors to work ports and pins/ motor outputs and input signals and I have followed them to the letter - but there's no word on setting up anything else.

Any help much appreciated.

komatias
13-03-2015, 01:47 PM
change the steps per unit to 200 and see what happens.

glynster
13-03-2015, 01:56 PM
Well, it certainly seems to run the motors more nicely - more of a deeper smoother sound - less of an angry wasp buzz about it. Now I have up to 7500 mm's per minute at my disposal but I am still not sure what to do with them

komatias
13-03-2015, 02:53 PM
There is not much else you can do unless you assemble them into a system. Speed of rotation is not really of much use because as soon as you put it on the machine you will start seeing the effects of inertia and friction.

Clive S
13-03-2015, 03:42 PM
OK First you need to state what all the dip switches on the drivers are set at. So that the current can be set up correctly etc. Have you set up Mach3 in mm or inches

Like has been sad already before you can tune the motors they need to be on the machine. ..Clive

glynster
13-03-2015, 04:49 PM
OK First you need to state what all the dip switches on the drivers are set at. So that the current can be set up correctly etc. Have you set up Mach3 in mm or inches

Like has been sad already before you can tune the motors they need to be on the machine. ..Clive

I set mach3 up in mm during the install wizard. It is not so much that I wish to tune the motors to correct mm measurements along the axis etc, it is rather that I need to set the correct switches on the driver but am confused as to what they do. I see from the spec that when wired in parallel (which is what I assume they are since they are not in series) that the current should be 4.2 amps. There is no exact setting for 4.2 amps on my drivers - the closest is 4.3 which I assume is fine. That is sw1 on, sw2 off, sw3 on - if thats all I need to do and it's correct I am fine with that. I also get that sw4 is an option in that it determines whether the holding torque of the motors is 50% or not - I have sw4 set to "off" since that sounds "sensible" to me.

It is sw5, sw6, sw7 and sw8 that confuse me - I dont know what microsteps are or what effect these settings will have - so I cant make a guess at which setting to choose from the chart above and how this affects the "steps per" value in mach3 "motor and tuning setup screen". The default of steps per was 2000 - I reduced it to 200 as per the advice above but I still dont know why exactly. The following chart shows even more info...

http://www.mycncuk.com/attachment.php?attachmentid=14862&stc=1

Am I to assume from the above chart that the "step/rev" column of values is what I should be entering in the mach3 "steps per" field? If so, whay am I choosing one lot of settings over another? What's the difference?

JAZZCNC
13-03-2015, 08:51 PM
Ok well here goes lets hope this sheds some light.!!

Starting with motors and series or parallel wiring.?
This is a choice based on how you arrange the 8 wires. In your case for parallel wiring they should be as below.
Phase A+ = Red + Blue
Phase A- = Yel + Blk
Phase B+ = Wht + Brn
Phase B- = Org + Grn

Setting the drives:
SW 1, 2 , 3 you are correct about and understand correctly.
SW4 Reduces current to Half the Motor current (sw 1,2,3) but only when motor is stood still. This reduce heat build up in motors and should be used so OFF.

SW 5,6,7,8.!! . . . Now this is where it gets interesting and little more complicated. Your motors have 200 FULL steps per revolution so 1.8deg per step.
Micro stepping breaks these FULL steps down into micro steps.
It's here where it gets confuddling for people due to the fact they state 2,4,8,16 etc Microsteps on the drives.??. . . What this actually means is each revolution is ie 8 x 200 = 1600 micro steps per revolution.

Now Micro stepping is often misunderstood by people thinking that it's used for increasing resolution, which it does to some degree, but it's most useful use is for smoothing motor performance. You'll notice your drives can actually Micro step down to some silly figure like 256 so 256 x 200 = 51200 micro steps per rev.
Setting to this degree is pointless as typical stepper motor can only resolve to around 3200 and make real use of them the rest are wasted.
Not only are they wasted they also put excess stress on the PC or Motion control device. This is because more Pulses are required by a factor of the microstepping amount to turn same one revolution. ie 8x micro stepping needs 1600 pulses for one revolution 256x needs 51200 pulse for same revolution.

This brings us nicely to Motor tuning and Micro steps Inside Mach3.?

STEPS PER setting in mach3 motor tuning is How many steps are needed to move ONE UNIT OF MEASUREMENT in your case with mm's units how many steps to move 1mm.
This is detemined by a calculation taking the Microstepping amount and dividing by PITCH of the ballscrew or how far ONE revolution of moves that particular axis.
So assuming 10mm pitch ballscrews and 8 x 200 =1600 micro steps the STEPS PER 1mm would be 1600/10=160

This will mean 160 steps moves 1mm.

Now Velocity and acceleration are limited by the number of pulses the Motion control device can output. This is known as the Frequency or Kernal speed in Mach3.
The parallel port is quite limited and safe frequency would be 25Khz or 25,000 pulses per second/per axis. This means frequency directly affects the Maximum velocity in this case mm/per min you can achive from the axis. So working with 1600 micro steps we get 25000x60/(1600/10)= 9375mm/min Max velocity.

Now if we use less microstepping so 4x micro steps(800) Max velocity changes to 25000x60/(800/10)=18750mm/min max velocity.!!

So has you can see going high on Microstepping does have an impact on speed. But going to Low on micro stepping can affect how motors run and can make for very rough running motors. So typical micro stepping values range between 4x and 8x upto max 16x often 10x is used which gives 2000 micro steps like you orginally entered.

Motor tuning is a balance between Micro stepping, Velocity/acceleration, Pulse quality/frequency along with many factors like machine stiffness and resonance all playing some small part. This means each machine is slightly differant in how it's tuned so Motor tuning needs to be done with everything on the machine with each axis tweaked and setup individually. This is why you can't set motor tuning accurately on the bench as it will all change on the machine.

Know this is a lot to digest but take the time and it will all make much more sense.

Clive S
13-03-2015, 09:06 PM
Dean I could not have put it better myself:whistle::beer: ..Clive

JAZZCNC
13-03-2015, 09:11 PM
Dean I could not have put it better myself:whistle::beer: ..Clive

Well unlike you I haven't started on the Vino yet. . :dejection:

Clive S
13-03-2015, 09:21 PM
Well unlike you I haven't started on the Vino yet. . :dejection:

Is it that obvious

glynster
14-03-2015, 12:11 AM
Jazz, that was an excellent explanation and it couldn't have been more clear, concise and illuminating - you should write a book, seriously.

Just so I know, how would you describe the observable characteristics of a motor which is running "rough" as opposed to one that is running well?

In the Motor Tuning window of Mach3, should the "step pulse 1 - 5 us" and the "dir pulse 0 -5" be left at zero? How do those values affect performance.

Thank you for such a great explanation - it's cleared up a myriad of questions - and created a few more :cocksure:

JAZZCNC
14-03-2015, 01:00 AM
Just so I know, how would you describe the observable characteristics of a motor which is running "rough" as opposed to one that is running well?

Now that is a difficult one to answer because it's more sound than visual, thou it can be seen at very low speeds. Rough would be growly low pitch sound and notchy action to movement.
Nice running motors will have higher pitch hum and smooth action. Running a motor at really low speed ie 50mm/min for test is a good indicator. Nicely setup motor will smoothly turn, rough running will have a notchy action.

The machine and how it's built can play big part in how motors react with different micro stepping . Resonance of the machine affects how motors work and different frequency's don't always suit some Micro stepping settings so it's not uncommon for higher settings to work worse than lower settings or vise versa.

It's all about finding a balance that works best for your machine. To be honest with newer Digital drives Resonance is becoming less of a issue has they are so much better at handling resonance. But not so long ago with old analog drive technology resonance could reduce a motor to perform at half it's capabiltys and for people to not even know they had a resonance issue at all.!! . . . To a trained ear it was obvious but not so if your not aware of resonance.

If you want to experiment and get a feel for how Micro stepping and Resonance affects your machine then play with different MS settings and tuning. This way you'll find the sweet spot that suits your motors.
Resoance is also one reason why you can't run or tune a motor on the bench. It's very common for motor just sat on a bench to sound like a bag of marbels and jump all over the place but run sweet when bolted down.!


In the Motor Tuning window of Mach3, should the "step pulse 1 - 5 us" and the "dir pulse 0 -5" be left at zero? How do those values affect performance.

This depends on the drives you use. Some drives will state direction pulse be so many micro seconds in front of the Steps or vise versa but in general just leave at 0. If you feel your lossing steps then playing with these settings can help.

GEOFFREY
14-03-2015, 09:26 AM
Ok well here goes lets hope this sheds some light.

This brings us nicely to Motor tuning and Micro steps Inside Mach3.?



Know this is a lot to digest but take the time and it will all make much more sense.

Dean, I think that that is one of the most informative posts that I have read on this forum, and I read every single post.G.

JAZZCNC
14-03-2015, 11:01 PM
Dean, I think that that is one of the most informative posts that I have read on this forum, and I read every single post.G.

Thank you Geoffrey anybody think I'd done a bit of this CNC malarky before wouldn't they.!! . . .:joker:

Clive S
14-03-2015, 11:06 PM
Thank you Geoffrey anybody think I'd done a bit of this CNC malarky before wouldn't they.!! . . .:joker:Nah You must be on the sauce :thumsup:

JAZZCNC
14-03-2015, 11:27 PM
Nah You must be on the sauce :thumsup:

Well actually I've just come out of workshop 10mins ago where I've been since 7am and just cracked open tin of the black stuff. Which if do have to say so my self, (because there's no bugger else here to say it) I bloody well deserve and just hope it numbs brain from computing tomorrows dealings before I wake up again and start all over again.!! (With a quick Pit stop to watch Grand Prix)