PDA

View Full Version : Dip Switch settings on the M542 stepper motor drivers



manofgresley
15-06-2014, 12:06 PM
Hi all.

My newly built CNC milling machine is now moving in Mach 3. I have encountered a problem i am not sure how to deal with. I have 3 Stepper motors, each with it's own Leadshine M542 controller, i can move all my Axis + and - but the movement is not accurate, if i move say X axis 20mm + using the DRO readout in Mach3, i get say 33mm actual movement on the machine!!

I understand it may be the Dip switch positions on the M542 Drivers, can anyone advise pleased as of correct positions, or know were i can get relevant paperwork.

Ray

JAZZCNC
15-06-2014, 12:25 PM
Ray there is no Correct position. You set the switches according to the amount of micro stepping you want to use.

Usually on the top of the drive they will show differant combinations of switch positions for each micro step setting you want.
if you set to micros stepping to 800 or 1600 you'll be ok. This may be shown on the drive as 4x and 8x.

I've got a M542 here and 1600 would be switch 5=on 6=on 7=off 8=on
800 would be 5=on 6=off 7=on 8=on
This doesn't mean yours will be the same as there are lots of copy's that don't always use same settings so I'd check the drives or the manual you got with them.

Now this is not the end and why your getting the wrong amount of movement.?

You need to set the Steps per unit in Mach3 motor tuning. To do this divide the micro step amount by the pitch of your lead or ballscrew.

manofgresley
15-06-2014, 03:28 PM
Ray there is no Correct position. You set the switches according to the amount of micro stepping you want to use.

Usually on the top of the drive they will show differant combinations of switch positions for each micro step setting you want.
if you set to micros stepping to 800 or 1600 you'll be ok. This may be shown on the drive as 4x and 8x.

I've got a M542 here and 1600 would be switch 5=on 6=on 7=off 8=on
800 would be 5=on 6=off 7=on 8=on
This doesn't mean yours will be the same as there are lots of copy's that don't always use same settings so I'd check the drives or the manual you got with them.

Now this is not the end and why your getting the wrong amount of movement.?

You need to set the Steps per unit in Mach3 motor tuning. To do this divide the micro step amount by the pitch of your lead or ballscrew.

Thanks Jazz, i'm just a bit confused again.
My spec sheet for the Stepper motors say's that they are 1.8 degrees, so my maths say's that for every 360 degree rotation, requires 200 steps of the motor, the motors are wired Bipolar Parallel.where on the drive does it indicate 4x & 8x

Ray

deannos
15-06-2014, 03:42 PM
Thanks Jazz, i'm just a bit confused again.
My spec sheet for the Stepper motors say's that they are 1.8 degrees, so my maths say's that for every 360 degree rotation, requires 200 steps of the motor, the motors are wired Bipolar Parallel.where on the drive does it indicate 4x & 8x

Ray

http://www.leadshine.com/UploadFile/Down/M542d.pdf

look at the bottom right of the pdf

manofgresley
15-06-2014, 05:04 PM
http://www.leadshine.com/UploadFile/Down/M542d.pdf

look at the bottom right of the pdf

Many Thanks Deannos, i have this paperwork, it still confuses me -

My motor spec sheet say's 200 step @1.8 degrees each (360 degrees)

eg, the datasheet say,s Microstep 2 = 400 steps per rev, does this mean the driver has double the speed of my motor?

Ray

Neale
15-06-2014, 05:11 PM
Quick bit of explanation that might (or might not!) help. Stepper motors usually are built to do 200 steps per rev. This is based on the internal physical layout of the coils and magnetic poles. A simple driver will only allow the motor to move between these "simple" steps. However, most drivers, like the M542, can do something clever in their electronics so instead of energising just one set of coils, they can provide current to both sets of coils but at different levels. Simple case is supply both sets of coils with same current, and the motor will move to a position halfway between the internal poles, so you get a total of 400 steps/rev. By juggling currents, you get "microstepping", where the electronics can move the motor to multiple steps between the 200 mechanical steps. Typical settings are 800 or 1600 microsteps/rev, but this is set purely by the driver and there is nothing on the motor that you change or need to take account of. However, the driver settings generally talk about "x4" or "x8" because whatever motor you use, the number of standard steps/rev is multiplied by this number. We use 200step/rev motors so often that it's easy to forget that there are, for example. 400step/rev motors around, which would give 1600 or 3200 microsteps/rev with the same driver settings.

manofgresley
15-06-2014, 06:22 PM
Quick bit of explanation that might (or might not!) help. Stepper motors usually are built to do 200 steps per rev. This is based on the internal physical layout of the coils and magnetic poles. A simple driver will only allow the motor to move between these "simple" steps. However, most drivers, like the M542, can do something clever in their electronics so instead of energising just one set of coils, they can provide current to both sets of coils but at different levels. Simple case is supply both sets of coils with same current, and the motor will move to a position halfway between the internal poles, so you get a total of 400 steps/rev. By juggling currents, you get "microstepping", where the electronics can move the motor to multiple steps between the 200 mechanical steps. Typical settings are 800 or 1600 microsteps/rev, but this is set purely by the driver and there is nothing on the motor that you change or need to take account of. However, the driver settings generally talk about "x4" or "x8" because whatever motor you use, the number of standard steps/rev is multiplied by this number. We use 200step/rev motors so often that it's easy to forget that there are, for example. 400step/rev motors around, which would give 1600 or 3200 microsteps/rev with the same driver settings.

Many Thanks. i now understand.

Ray

JAZZCNC
15-06-2014, 06:36 PM
Hi Ray.

Ok well Neale explination says it all really just went round the houses a bit. .Lol

Most standard steppers are indeed 200 steps per revolution. Which we can then break down into further Micro steps using the drives micros stepping capabiltys. So drives often come with preset micro stepping options. These are 200 which would be classed as full stepping Ie each pulse would move one full step. Then 400, 800, 1600, 2000, which could also be called 1x 2x 4x 8x 10x etc and beyond often upto 256x.
Now in reality there's no point going any higher than 10x(2000ms) as the motor can't resolve to much more than that. Also it it requires many more pulses from the parallel port so your putting stress on the computer for no gain.

If you set the drives to 1600 and then set the steps per to 1600/screw pitch then you won't have any issues with incorrect distance movement.

Tom J
03-01-2021, 08:37 PM
Ok, old thread but what to do if we use direct drive via coupling from stepper motor to ballscrew
Ballscrew pitch 5mm
200steps (one revolution) = travel 5mm or 0.025mm per step.
1600 steps/rev will give travel 0.003125 per steps
Is this going to be ok for cut smoothness - final surface quality etc?

I personally always use gear not direct drive, however all the MC on my work place use direct drive but with servo motors which should not be compared to steppers.

JAZZCNC
03-01-2021, 09:58 PM
Ok, old thread but what to do if we use direct drive via coupling from stepper motor to ballscrew
Ballscrew pitch 5mm
200steps (one revolution) = travel 5mm or 0.025mm per step.
1600 steps/rev will give travel 0.003125 per steps
Is this going to be ok for cut smoothness - final surface quality etc?

I personally always use gear not direct drive, however all the MC on my work place use direct drive but with servo motors which should not be compared to steppers.

You really shouldn't mistake micro-stepping as resolution as it doesn't always translate that way and very much depends on the stepper motor quality. Most can't resolve each step to that degree and accurately hold it repeatably.
MS is better thought of as helping with smoothness and yes with 1600MS it gives a nice smooth action, 3200 gives better action but now you risk stressing the motion control device, also torque drops as MS increases so voltage/current comes into play.!! . . As with life, there is always a price to pay for anything worth having.

Tom J
04-01-2021, 02:03 PM
Dean
I use only good quality digital drivers like Leadshine EM503 and CSMIO/IP-M controller.
I agree some driver can't cope with accuracy and repeatability.
For example this heap DM542
29335 cost 23% price of Leadshine EM503
29336 with exactly same parameters.

I personally tested both drivers under same travel speed for torque value.
Motor 8 leads connected parallel (low inductance and higher torque @ higher speed)

Results:
Cheap driver was stalling with much less speed and can't hold same torque - hence the price difference.

My observation regards torque drops vs micro stepping were not according to what I knew from data.

I disregards motors tested on bench - only connected to the machine via 5M HTD belt and spindle not running.
There are few YT clip showing same experiment. I found 16MS 3200 will not drop torque to ~10% of nominal
29337
I think driver send more current to winding when micro-steps are used hence motor can lift much more than 10% of theoretical value.
Will try to make video when get proper torque gauge display or mini scale

Doddy
04-01-2021, 07:19 PM
You don't understand that table.


Draw a sine-wave, and cosine-wave. Divide each quadrant by the number of micro-steps you set. Now step those waveforms by one for each step (in the number of micro-steps). That will describe the current driven into each of the X/Y coil (using the simple analogy of a 4-pole 90 degree stepper). Where as at 1/256 would present 0.006 x current on one coil, the other would be at 0.999 x current (just read off the sine-value and the cosine value along the graph, those represent the currents passed into each of the two coils). The extreme example of 256 micro-steps, applying force tangentially to the spindle, the 0.006 holding torque is in the one axis - the other axis is near full holding torque (0.999). the next step - the sine-wave value increases, the cosine-wave value decreases, and so on.This helps to describe the potential to lose accuracy with high microsteps as silly-small drive currents on individual coils cannot translate to linear motion under aggressive loads. If - "you think" the drive sends more current - to balance the forces across the coils to the rotor this would have to apply equally to both coils - and you'd quickly burn your stepper out.

JAZZCNC
04-01-2021, 08:00 PM
Dean
I use only good quality digital drivers like Leadshine EM503 and CSMIO/IP-M controller.
I agree some driver can't cope with accuracy and repeatability.
For example this heap DM542
29335 cost 23% price of Leadshine EM503
29336 with exactly same parameters.

I personally tested both drivers under same travel speed for torque value.
Motor 8 leads connected parallel (low inductance and higher torque @ higher speed)

Results:
Cheap driver was stalling with much less speed and can't hold same torque - hence the price difference.

My observation regards torque drops vs micro stepping were not according to what I knew from data.

I disregards motors tested on bench - only connected to the machine via 5M HTD belt and spindle not running.
There are few YT clip showing same experiment. I found 16MS 3200 will not drop torque to ~10% of nominal
29337
I think driver send more current to winding when micro-steps are used hence motor can lift much more than 10% of theoretical value.
Will try to make video when get proper torque gauge display or mini scale

Tom, I'm not sure of the point of this post as I was only pointing out that Micro stepping shouldn't be thought of as increasing resolution because it doesn't.

Regards the two drives then I've fit 100's of the EM series and a fair good number of the DM series and the main difference is how the EM handles the motor resonance, which is why you will be seeing a difference on what I presume is the same motor with the same voltage, etc. The EM series is much better when it comes to handling resonance and light years better than DM copies that are often bought.

m_c
04-01-2021, 09:10 PM
The issue with microstepping is, it's essentially holding the motor's rotor in balance between two electromagnetic 'springs'.

I'd very much doubt even at high microsteppings settings, that the drives are actually translating that through to the output.
They certainly won't be as motor speed increases, as the drives simple won't be able to switch fast enough, and it'll gradually reduce microstepping. This is where digital drives provide benefits, and the higher spec drives (such as the EMs) dynamically change the switching points as they monitor how the motor is reacting.