Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Dax on October 13, 2017, 07:59:47 PM

Title: Stepper motors
Post by: Dax on October 13, 2017, 07:59:47 PM
Hi Guys
Having some trouble with random missing steps, my machine stops code continues to run in Mach 3 then machine goes again obviously in the wrong place due to the stop. Motors sometimes stall when I jog so I'm thinking it may be set wrong somewhere, I am hoping someone is able to tell me what my settings should be.
my machine info is
1600 steps
8 micro steps
15 motor teeth
leadscrew 30
leadscrew pitch 2mm
hope this makes sense to somebody. Its on a fully licensedmach 3 copy (to me). Thanks
Title: Re: Stepper motors
Post by: joeaverage on October 13, 2017, 08:03:35 PM
Hi,
is this a new build machine? Or has this problem occurred in a machine that had otherwise bee working well?

Craig
Title: Re: Stepper motors
Post by: joeaverage on October 13, 2017, 08:19:36 PM
Hi,
you don't say what motion control you are using. If left to guess I would have to say parallel port with 25kHz kernel speed right?

A few calculations may be in order.

1600 micro steps per revolution with a belt reduction of 2:1 to the leadscrew= 3200 pulses per revolution of the leadscrew.
Therefore given the 2mm pitch of the screw 2 mm/3200 ppr= 0.625um per pulse.

If you are using Machs parallel port at 25kHz then the maximum speed of your motor is 25000 X0.625 um=15.625 mm/sec or 937.5 mm/min.
Do you have the velocity set higher than 937.5 mm/min, if you do Mach cannot issue pulses fast enuf to do that. You could improve this the maximum
speed but would need to make some more fundamental changes.

Craig
Title: Re: Stepper motors
Post by: Dax on October 13, 2017, 08:30:14 PM
I bought it second hand guy said he never had any issues (i'm inclined to believe him) literally had 10 hours use he didnt let me have the computer but it was on Linux anyway and I'm not a fan, its a Rhonmac as far as I know its stock and thats why I believe its a setting issue. Its on a parallel port how do I check the 25hz I'm a complete noob  
Title: Re: Stepper motors
Post by: Dax on October 13, 2017, 08:33:14 PM
Mach 3 is set to steps per 2000 velocity 438 acceleration 187.5 I take it this is not right.
Title: Re: Stepper motors
Post by: joeaverage on October 13, 2017, 09:14:13 PM
Hi,
no not quite.

First just to make sure go to Config/Select Native Units and make sure that mm is selected. You should not thereafter have to touch this setting.

Your 'steps per unit' should be easy enuf to calculate. The question is how many pulses does Mach have to issue in order for the axis to shift 1mm?
The pitch of the lead screw is 2mm per revolution, so 1mm movement of the axis requires the lead screw turn 1/2 a revolution. With a 2:1 belt
reduction the motor must turn one revolution, ie 1600 microsteps. Enter 1600 in the 'steps per' box.

We have already done the calculation for maximum speed, set that at 900mm/min, and in no case more than 937.5 mm/min. Recommend the acceleration
be kept deliberately very low. Once you've got things sorted then you start increasing it until it faults and the back off a bit. Start with accel at 180mm/sec/sec.

When you exit motor tuning do so with <SAVE AXIS SETTINGS>. Probably need to restart Mach to have the new settings take effect.

Now you need to test that axis. Let us know how you get on.

Craig
Title: Re: Stepper motors
Post by: Dax on October 13, 2017, 09:37:42 PM
Thanks I will give it a go :)
Title: Re: Stepper motors
Post by: Dax on October 13, 2017, 09:41:40 PM
900 mm min seems very fast?! twice what its currently set to
Title: Re: Stepper motors
Post by: joeaverage on October 13, 2017, 09:59:22 PM
Hi,
900 mm/min works out to 450 rpm for the leadscrew and 900 rpm for the motor. Yes it might be a bit quick but still within bounds.

I use Vexta 5 phase steppers with 10:1 planetary gearboxes on 5mm pitch screws and get 1200mm/min. That means my steppers are doing
2400 rpm. The 5 phases and the very high voltage drivers mean its perfectly possible. Most CNCers would consider 1200mm/min slow, without
gear or belt reductions and with decent steppers and drives many expect and get 5000 mm/min.

A production CNC machine is commonly 30-40 m/min and was reading the specs of a double column machine the other day that does 96m/min and
accelerations of over 5g!

There is absolutely no harm in reducing the speed if you think it too high. Remember that what your setting here is the maximum speed your machine
can go, sometimes called rapids, or traverse speed or G0 speed. It is not generally expected that you'll cut at that speed, that's done with G1 codes
which are carried out at a fraction of the max or G0 speed.

Craig
Title: Re: Stepper motors
Post by: Dax on October 13, 2017, 10:12:51 PM
wow I know so little, just thought with it missing steps faster would be worse. I will set it and try. cheers for the info.
Title: Re: Stepper motors
Post by: joeaverage on October 13, 2017, 10:30:28 PM
Hi,
you are correct, steppers are inclined to lose steps at speed and the faster you go the worse it gets.

A stepper with a reasonable drive should do 1000 rpm. It may not have much torque at that speed so you can't expect it to drive a heavy load
unless you put outsize steppers just so that you'd have the grunt leftover at 1000 rpm.

It won't do any harm to try.

What size steppers and what torque specification are you using? What voltage are your drivers and what is the voltage of the power supply to the drivers?

When it comes to testing I suggest you do one axis at a time. Many beginners try to get everything working and they have a number of faults but because
of the confusion of all the axes and switches they can't dial in on one fault let alone all of them. In fact if you disconnected the Y and Z motors and
just got the X axis working to start with would it matter? Whats the bet that once you get the X axis working you'll understand the tricks involved and
can set the other axes up in a snip.

With the same mindset I would disable all the limit and home switches as well. You need to have the Estop working and close at hand so you can stop
a runaway axis while you are setting up and learning but the extra confusion of all those switches doesn't help you, in fact can bugger you up bigtime!

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 07:44:33 AM
Hi well I tried all the settings I could when I tried to auto step the machine in settings it failed twice on the x and once on the z. finally set up all working ran a test piece without the router or extraction heard the motor fail on the x at 30% through only a small stall but enough. I have been unable to find out what specs my motors are but they are mde by motionking 23hs1404 the control cards are CW 5045 are currently set to 1.5a at half current (wondering if this should be more) the motors are 100mm?! card set to 8 steps. hope this helps.
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 08:24:47 AM
Hi,
best guess is they are 23 size steppers, you say they are 100 mm long then my guess is that they are 4.2A units 250 N.cm rated. That works out to
325 oz.in, plenty good. The drives are capable of up to 50V. Do you have a multimeter? Can you measure the power supply voltage or can you
see some specs written on it. For best speed you want it as high as you can go, if its 24V or less then its a joke and should be swapped with one with
36V or better 48V. Best to allow for full current for all motors simultaneously so rated current ideally 12.6A or better.

You should change the current switches so that the current is closer to rated.
SW1 ON
SW2 OFF
SW3 OFF
Should result in current of 4.2A. In practice the steppers may get too hot and you'll have to consider backing the current off. Dropping it to 1.5A is
too extreme.

The full/half current switch refers to the idle current, it can be left as is.

Craig
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 08:33:30 AM
Hi,
the only other possibility I can think of is that the PC is getting interrupted. We haven't established as fact that it is a parallel port machine.
What cable connects the PC to the controller/break out board? If it is parallel port then its entirely probable that the PC will 'stutter' and
cause little stalls and other funny behaviour. Its unfortunate but its the reality of parallel ports. In the first instance turn off ALL and EVERY
program you can.

What sort of PC is it? What version of Windows is it running? Is it 32 or 64 bit?

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 08:41:24 AM
PSU is 8.5amp at 50v a great big round one.  I have just found a piece of paper (came with the machine) written on the back in pencil are the dip switches, looks like they are all wrong paper says
123 off =1.5a with a tick next to it
sw4 = on Half current
Micro step 5678
5=off
6=off
7=on
8=off
to me it looks completely transposed could this be it....
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 08:49:32 AM
Hi,
kool that power supply sounds close to spot on.

I think you are right...all those switch positions sound wrong. I found the driver manual:
http://cnc4you.co.uk/resources/CW5045.pdf (http://cnc4you.co.uk/resources/CW5045.pdf)

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 08:53:41 AM
right the way I see it is the power is set to 4.5a half power is off 568 are on and 7 is off that = 256 steps
so is 4.5a ok or too high?
microsteps should be 8 not 256 (would this cause my issue, expect it woulb tbh)
thanks for the manual craig
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 08:55:58 AM
Hi,
the piece of paper doesn't match the picture. I would leave all switches 4-8 alone and reverse switches 2 and 3 only.

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 09:02:58 AM
just found motor rated at 4.2amp so is 4.5amp ok? 123 all on
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 09:05:03 AM
Hi,
can you double check that the motors are 100mm long? If they are then I'm fairly confident that they are 4.2A units.
If they're not then they could get hot and/or blow up. Given that I live I New Zealand I figure that I'm far enuf away you couldn't
hurt me anyway!

Until and unless you can get these motors sorted you machine is useless right? So are you going to take a chance to get them to work?

Craig
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 09:08:32 AM
Hi,
the picture you posted shows 1,2,3 as ON,ON,ON which is 1.5A.
What you want is 1,2,3 as ON,OFF,OFF which is 4.2A

Notice the 'ON' icon and arrow on the dip switch block...

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 09:11:18 AM
Series Model Step Angle (°)   Motor Length (mm)   Rated Current (A)   Phase Resistance (Ω)   Phase Inductance (mH)   Holding Torque (N.m Min)   Detent Torque (N.cm Max) Rotor Inertia (g.cm²)   Lead Wire (No.)   Motor Weight (g)
23HS0405 1.8   41   0.62   12   24   0.55   2.5   150   4   470
23HS0408   1.8   41   2.0   1.2   2.5   0.55   2.5   150   4   470
23HS4412   1.8   45   0.62   12   26   0.8   2.8   190   4   520
23HS4425   1.8   45   2.5   1.0   2.2   0.8   2.8   190   4   520
23HS5406   1.8   51   0.62   13   28   1.0   2.8   190   4   520
23HS5425   1.8   51   2.5   1.2   3.2   1.0   2.8   190   4   520
23HS6602   1.8   56   1.5   3.2   5.5   0.9   3.5   280   6   590
23HS6430   1.8   56   3.0   0.8   2.4   1.1   3.5   280   4   680
23HS6404   1.8   56   4.2   0.4   1.2   1.1   3.5   280   4   680
23HS7401   1.8   64   1.0   7.5   20   1.5   5.0   380   4   850
23HS7430   1.8   64   3.0   0.8   2.3   1.5   5.0   380   4   850
23HS7404   1.8   64   4.2   0.55   1.2   1.5   5.0   380   4   850
23HS8430   1.8   76   3.0   1.0   3.5   1.8   6.0   440   4   1050
23HS8404   1.8   76   4.2   0.6   1.8   1.8   6.0   440   4   1050
23HS1430   1.8   100   3.0   1.4   5.5   2.5   10   680   4   1250
23HS1404   1.8   100   4.2   0.8   3.0   2.5   10   680   4   1250
23HS2430   1.8   112   3.0   1.6   6.8   2.8   12   800   4   1400
23HS2404   1.8   112   4.2   0.9   3.8   2.5   12   800   4   1400
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 09:11:59 AM
Hi,
as I said earlier try reversing switches 2 and 3 only.

Craig
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 09:18:53 AM
Hi,
I didn't find that exact table but that is the model I think it is you have, so 4.2A is correct.

I think you are confusing the direction of the switch and it on position. Looking at the icon printed on the switch block 'ON' is with the toggle
to the right. The picture shows 123 as on,on,on.

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 09:19:25 AM
yup changed it to 1=on 2=off 3=off  now 4.2a steps same power save off
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 09:21:33 AM
Hi,
kool, let it rock...

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 10:04:25 AM
its rocking moving smoother noticed the motors are warm but not hot.. yet?! will keep you all posted thanks for your help feeling positive.
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 11:07:48 AM
well tried to make another box today more fire wood, still messing about motors got quite warm so think I might drop the voltage a bit. So checked the PC its running xp pro service pack 2 barely any services switched of all networking as well as its in my workshop, anyone any ideas? motors (mainly X but not exclusively) sometimes just squeal instead of moving until next command is sent then moves on to destroy the work. Cant think whats left to check slowed it right down as well low acceleration speed etc. HELP!
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 01:31:25 PM
Hi,
if you can't hang on to the motors they're getting too hot and you should reduce the current, a bit....say from 4A to 3A.
If they are not going above 50 degrees Centigrade then leave them alone.

That squeal is a stall. It doesn't sound great but it doesn't hurt the motor at all. From your description it sounds like the stall occurs when
the machine is instructed to move at G0 rate, ie maximum. Sounds like its struggling for acceleration.

What are your current velocity and acceleration settings?

Run DriverTest.exe and post a screen shot if possible.

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 03:21:57 PM
so power now down from 4.2amp to 3.2amp motors ok heat wise. Steps are 1600 speed down from 900 100 acc recomended to 700 acc 50 this stall happens under load or not I actually tried to stop the machine by hand to put it under strain no chance. stall can happen on any axis but mostly x . I ran the driver test computer came back excellent, no background programs running cut out all nonessential services its so fast. I'm running out of ideas
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 03:46:42 PM
Hi,
it sounds like you steppers are just operating at their maximum. Can you post some pics of your machine? I'm wondering if its so heavy
that in effect the steppers are to small. The speed and particularly the acceleration look very low, should be easy going for them.

There is still the possibility that the PC is intermittently stopping. It only needs to stop or pause for a few milli seconds and when it starts
again the motor has already slowed to the extent that it can't accelerate back to speed and therefore stalls with a squeal. Not quite
sure how to go about either proving or disproving that yet.

There was at one time a document floating around the forum that had a whole list (30-40 items) of things that you could set/disable/remove
from you PC to have it operate well under parallel port. Your PC is not a laptop is it? Parallel ports were always a bit picky about the PC.

One possibility is to get away from the parallel port altogether and use an external motion controller. They are very much more tolerant
of different PCs. It would of course require you buy another board. Good ones, don't go near the Chinese crap, start at $120. The ESS suchas
I have is $180. Does your budget allow for that sort of investment?

Craig

Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 03:57:08 PM
Hi Craig
I built the PC specifically for the CNC its a dell desk top Ive removed just about as much as I dare but you could be right the machine is a beast it has a heavy router mount so once again cant rule it out but I did try and stop it myself it pushed me no problem the steppers are 100mm it is a professionally built machine bed is 600 X 900 in fact heres the advert of the actual machine http://www.mycncuk.com/threads/10773-3-axis-Rhonmac-R1824-%28460mm-x-610mm-x-75mm%29-bench-top-router-for-sale 
I'm afraid the budget at the moment is not good but I would like to try and solve it without throwing money at it at least not yet.
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 04:33:14 PM
Hi,
your machine looks pretty good and I would have guessed the steppers are adequate for the job.

Can you post your <profile>.xml, maybe we can spot a weakness or fault. You'll need to rename it to something like daxprofile.xml
and attach it to  a post with the Addition Options feature.

Craig
Title: Re: Stepper motors
Post by: Dax on October 14, 2017, 06:02:59 PM
Been looking into the PC put in a new (old) graphics card changed the lpt to epp no stalls on jog yet will run a full test tomorrow fingers crossed. dont understand the xml stuff sorry for being a noob
Title: Re: Stepper motors
Post by: joeaverage on October 14, 2017, 06:18:00 PM
Hi,
the xml file is the profile that you provide Mach necessary to set it up. If you look in the lower right hand corner you will see the profile Mach is using.
In the Mach3 folder find the file <profile>.xml and rename it to daxprofile.xml

Post to this thread on the forum and hit <Additional Options> to the left of the text window and you will be able to browse to the Mach3 folder
and attach your renamed xml file.

Craig
Title: Re: Stepper motors
Post by: Dax on October 17, 2017, 03:25:43 PM
 ;D ;D Its working after a complete computer rebuild new graphics card I have ran it for 2 days with not once did it make that awful sound in fact it ran for 3 hours constant today it didnt put a foot wrong so thank you everyone for the information and help, now how do I make money with it  ::)
Title: Re: Stepper motors
Post by: joeaverage on October 17, 2017, 04:14:24 PM
Hi Dax,
good news. Parallel ports can be very cranky...it was much of the impetus for people to make external motion
controllers.

Craig