586,035 active members*
3,712 visitors online*
Register for free
Login
IndustryArena Forum > Community Club House > General Off Topic Discussions > Help needed!!!!!! Unable to calibrate stepper motor in Mach 3
Results 1 to 11 of 11
  1. #1

    Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    Hello everyone. Sorry if im posting in the wrong section coz im new here and I need help badly in tunning stepper motor running with mach3. I started this project as a 3 axis mini cnc milling. I will post pictures if I succeed.

    I constructed its bed first, that is the Yaxis and decided to try with mach3 before constructing the other axis. This is when my problem started, in motor tuning 'steps per' I entered 800, Calculation of steps per unit setting: 200steps x20 microsteps ÷ 5mm ball screw pitch = 800

    please correct me if im wrong.

    The slide moved very slowly and I measured its movement with mitutoyo depth vernier,if i moved it 1mm it moved 0.300 mm (or something close to it)

    Now here is the problem, if I try to calibrate the movement with mach3 steps calibration where it moves the axis and later asks how much did it move, that figure is more than 4 times my calculation I.e. 800 and never in round figure like 3324.221242. Every time i auto calibrate the axis, the steps per unit keeps on changing as it never moves a fix amount, sometimes it will go 51.2 when moved 50mm or 99.5 when moved 100mm or go overtravel 3 or 4mm when i enter y0.0 in MDI mode.

    Some machine specs,

    Mach3 running P4 pc with XP3 SP3, on board Parallel port
    Chinese 3axis controller from ebay
    Stepper motor 1.8 deg 200 steps 4 lead 18.9 Kg cm
    3a stepper driver with microstepping from1/2 to 1/64
    Hiwin 5 mm pitch ballscrew with nut
    Nachi 7201 Angular contact bearings
    with locking checknuts on back.

    When I use low microsteps like1/2 the motor starts vibrating, makes a whining sound and doesnt rotate at all so I use 1/20 microstep setting. There is no physical backlash and slide moves freely when the screw is rotated by hand, so im stuck as I dnt know where the problem is.If it is a missing steps problem how do i check it and what is the remedy to correct it.

    Thanks in advance.

  2. #2
    Join Date
    Apr 2004
    Posts
    5737

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    It sounds like your steps per unit settings are correct. When you ask it to move 100mm, what does it do? Do the motors sound like they're missing? Moving a millimeter at a time won't tell you much. It sounds like your motor tuning is off, so that it's missing steps in the calibration routine. What are your velocity and acceleration settings? It sounds like the velocity could go up, since it's moving so slowly. When you've done that, if you notice problems, try reducing the acceleration until the motors turn smoothly in half-stepping mode. Microstepping makes things go smoother, but it could be fooling you.

    You seem to be building a high-quality machine, with nice ballscrews and bearings anyway. Why did you cheap out when you went for the controller ? People here have nothing but problems with those things; we hear about it all the time, but you might search this site under the part number of the controller and driver you've got to find out what other people ran into with them, and how they dealt with the issues that came up.
    Andrew Werby
    Website

  3. #3
    Join Date
    Mar 2003
    Posts
    35538

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    Make sure your default units are set to mm, and that mach3 is in mm mode when you calibrate.

    However, 8000 should be the correct number. I'd start at 8000, see how close it is, and then make small adjustments from there. If the distance traveled is off by a large margin, then you must have some settings wrong somewhere.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  4. #4

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    Hello Everyone again,
    I have attached pictures of the slide for your comments and suggestion, please don't mind the rust as some of the parts are made up of MS and excuse the picture quality as my iphone is broken, below the slide is just an aluminium frame to temporarily support the slide while testing.

    Attachment 245496
    Attachment 245494

    Ger21, its already set to MM. and i tried calibrating it more than 100 times but, this problem wont go away

    Awerby i tried 1/2 micro stepping mode today. In the Steps per unit I entered 80 (2 microstepping X 200 steps= 400 steps / 5mm pitch = 80 )

    The results didnt improve. I believe generic stepper motors don't exceed 150 rpm or 200 rpm so i tried different velocities ranging from 250 to 1000 mm per minute and same goes for acceleration but to no avail. By looking at the rotation of the motor shaft it was clear that its movement was not continuous and it stalls or takes tiny pauses, I don't know what this means either missing steps or inadequate current from stepper driver? I have attached the video of the slide which shows these slight pauses, please have a look and suggest as i am stuck here, do i need to upgrade to a bigger stepper driver? Currently running at 3 amps. Please dont mind the ambient noise in the video as it is not from the motor, it is caused by the spark of the edm wirecut machine. and i cheaped out on controller because previously i was building a casual DIY cnc mill with lead screws and other cheap stuff but all those things increased my headache, so i changed to premium parts one by one to remove the problems. The Aluminium stand which you see below the slide was the a previous attempt to make y axis from aluminum channels which resulted in failure due to its uneven surface.

    Thanks a lot

  5. #5
    Join Date
    Apr 2004
    Posts
    5737

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    If you've got an EDM spark going on while you're testing, you could be seeing the effects of RF interference. Have you tried doing this without the EDM going? Also, the smoothness with which that stage operates depends on those shafts being aligned perfectly with the screw and each other, and lubricated effectively. How well does this move when you slide it back and forth by hand? When you turn the screw by hand, does it seem really smooth, or are there places where it's harder to turn than others?
    Andrew Werby
    Website

  6. #6
    Join Date
    Feb 2009
    Posts
    95

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    What controller/driver are you using?

  7. #7
    Join Date
    Jun 2007
    Posts
    190

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    In the video we can see some obvious binding of the lead screw. The stepper stalls in the same place in the rotation which indicates that your lead screw or shaft alignment is not straight. Using a flexible coupling for the stepper instead of the rigid one might be all it takes. If the lead screw itself is binding you will need to float one end of the shaft to fix that.

    Once you fix the binding problem then you can move on to travel speed limit testing and then calibration. If the distance traveled is wrong that's OK as long as it is the same every time. If the distance keeps changing then you are missing steps and no amount of tinkering with the calibration is going to help.

    So, fix the binding and then it's time for some diagnostic testing. (You should do something like this as a first test of each axis.)

    1) Make your pitch calculations and connect up your axis.
    2) Put a mark on the stepper drive coupling and some sort of pointer so you can accurately see full revolutions. (This will be more accurate than measuring the axis travel)
    3) Zero the axis with the coupling mark lined up.
    4) Set you manual step rate very slow and move the axis until the mark lines up again after many turns. (Use a low step rate, be patient, and get at least 10 turns).
    5) Using the distance Mach3 says the axis traveled, write a small program that that:
    a. Slowly moves that distance out.
    b. Stop.
    c. Return to zero.
    d. Stop.
    e. Increases the feed a little and repeat.

    Verify that the mark lines up at each stop and do a complete out and back before increasing the feed rate. The loading may be different for each direction, especially on your Z-axis. This will tell you whether or not you have a stepper drive problem and what your maximum reliable step rate is.

    Note that it's better to use the max step rate in your speed calculations rather than the max feed rate. The max feed rate will change every time you adjust the numbers that affect pitch while max step rate will remain the same.

    You can tinker with the drive to achieve better performance but trying to calibrate without setting appropriate rate limits is a waste of time.

    Pete

    Here is G-code program that works with EMC. I don't know if it needs any editing to run on Mach3 but I tested it on my machine, which is imperial units, so you will need to change feed numbers to be reasonable for your machine.

    %
    ; X Axis Ramped Speed Test

    ; The feed starts with a very low value to ensure accurate steps
    ; then ramps up sinusoidally. Feed rate changes start large
    ; and become smaller as they approach the limit.

    ; Set distance mode ( G90=Absolute G91=Relative)
    G91

    ;Set feed rate variables
    #<_Feed> = 0.25 #<_StopFeed> = 30

    ; 10 degree Angle steps to 90 degrees
    #<_Angle> = 0 #<_AngleStep> = [90/10]

    ; Set Distance variable
    #<_Distance> = 2

    ;---------------------------------------------------------

    o100 while [#<_Angle> LE 90]
    G1 X#<_Distance> F#<_Feed>
    M0
    G1 X[-#<_Distance>] F#<_Feed>
    M0
    #<_Angle> = [#<_Angle> + #<_AngleStep>]
    #<_Feed> = [#<_StopFeed> * SIN[#<_Angle>]]
    o100 endwhile

    M30
    %

  8. #8

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    Hi everyone,

    The mechanics of the slide shown above are in perfect order. When held vertically, the slide starts falling downwards. Now this time i shut down the EDM for any kind of resonance or interference

    So, to be perfectly sure, i disconnected the motor from the slide, and gave it a test run. Please see the video and suggest what to do further, as the motor is missing steps. I gave the command y 10.0 followed by y0.0 in mdi mode then again y10.0 and y 0.0, but the motor never completed one full revolution anytime (shown in video), it either overshooted or undershooted each time and also makes weird noise and vibration which is NOT constant as it should be, it was held in hand while recording the vid so that the sound of the motor could be heard. This time there is no ambient noise in the video. Please friends help me out through this one. I think i should upgrade the drive with larger current.

    Thanks in advance

  9. #9
    Join Date
    Jun 2007
    Posts
    190

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    First off, you probably can't run that fast if you are doing 20x micro-stepping. 20x micro-stepping cuts your motor torque down to about 5% of the motor's rating.

    Full Step = 100%
    1/2 Step = 70.17%
    1/4 Step = 38.27%
    1/8 Step = 19.51%
    1/16 Step = 9.80%

    Let's start you off on the right track.

    The driver board probably has DIP switches to change the drive current, decay mode, and micro-stepping.

    1) Set the micro-stepping to 1/2. You can try more steps later but that's asking a lot from that little motor. Half stepping should have enough torque to lift your carriage without gearing down the motor.

    2) Set the decay to 25%. What the decay does is set how quickly the motor coil is discharged after a step. Slow Decay shorts the coil to discharge it and Fast Decay applies a burst of reverse voltage to drain the coil as fast as possible. The faster the coil discharges, the sooner the motor is ready for anther step. The drawback of fast decay is greater power consumption (and therefore heat) and more noise. I find 25% to be a good compromise in most cases.

    3) Set the current to maximum. This is the starting point. The driver should be at least as good as the chip manufacturer's reference design so it should have no problem running at maximum current. You only need to reduce the current if your steppers are overheating.

    4) Now cut your step rate way down and try it again. When you try to manually stop the shaft, it should be hard to force the motor to miss any steps. As you increase the step rate you will reach a point where it gets noticeably easier to make the motor skip steps. Back off about 20% and that's a good maximum rate for your fast moves. You will also need to set your acceleration so the stepper has ample time to ramp up to that speed.

    Pete

  10. #10

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    Hi Pete,

    Some facts about the video of motor i posted, in respect to your suggestions:

    1. Motor driver was already set 1/2 micro stepping mode. In steps per unit i wrote 80 (200 steps x 1/2 microstepping = 400 / 5mm pitch of ball screw = 80 steps per unit). I tried different accelerations from 250 to 1000 mm per minute same result everytime.

    2. There are no decay settings of any type on the motor driver.

    3. The motor driver is already set to max current that is 3amps, There are two options for the current selections on the motor driver: 2amp or 3amp. The input current of the driver is 24volts, from a 250 watt power supply. At this time the power supply is used to power only this motor driver.

    4. Even at max current, i can force the rotor to stop by holding it tightly by hand, fairly easy. No sign of stepper heating up even if run continously.

    Now do i need to upgrade to a bigger motor driver with current larger than 3amp???? If yes, can you point me in the right direction????

    Thanks

  11. #11
    Join Date
    Jun 2007
    Posts
    190

    Re: Help needed!!!!!! Unable to calibrate stepper motor in Mach 3

    3 amps should be more than enough. When you enable the driver, the motor should lock and you should need pliers to turn the shaft. If you can turn the shaft with your fingers you have a problem.

    Put an amp meter in series with the power supply to see if it really is drawing the appropriate current.

    Pete

    P.S. It sounds like you have everything set correctly and it should be capable of running your axis so I suspect that the motor coils are split across the output phases. That will cause the situation you are experiencing where the motor runs but is erratic and has no power. Ohm out the coils to be sure you have the wires connect to the correct terminals.

Similar Threads

  1. MACH 3/Gecko G540 Stepper motor hesitation - VFD Noise?
    By GeoffDuniam in forum Gecko Drives
    Replies: 1
    Last Post: 02-27-2015, 05:49 PM
  2. Mach 3 interface to stepper motor driver
    By dhookings in forum Machines running Mach Software
    Replies: 8
    Last Post: 05-28-2014, 05:48 PM
  3. mach 3 slave motor(stepper) turns only one direction??
    By xkadet in forum Machines running Mach Software
    Replies: 0
    Last Post: 01-03-2013, 09:59 PM
  4. unable to drive stepper motor
    By Syphonics in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 08-19-2010, 03:24 AM
  5. Help needed for mach 3 motor tuning
    By Grandad in forum DIY CNC Router Table Machines
    Replies: 18
    Last Post: 04-25-2006, 11:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •