Welcome to Our Community

Some features disabled for guests. Register Today.

Stepper Driver Settings

Discussion in 'Motors' started by Metalguru, Jan 11, 2016.

  1. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    Hi Guys:

    I just got my Arduino all set up and running, everything seems to work well with GRBL. I have an arduino with a screw terminal shield, and several SainSmart single axis stepper driver boards.

    The issue is I am not sure what to use for settings on the driver boards. They have a set of switches for coil current setting, which is straightforward. They also have switches for microstep selection, which is also straightforward.

    The ones I have some difficulty with are the switches labelled Torque and Decay Mode. Not sure what these do. Doesn't seem to make much difference what I set them to, except for motor noise when stopped.

    The datasheet for these controllers is in Chinglish, so it's impossible to decipher.

    Anyone have some insight?

    Oh, and also the motor seems to work well when running at full speed, but seems to have some missing pulses or something on accel and decel. You can hear the thing hiccuping as it accelerates to full speed and decelerates from full speed. I don't have the actual Nema 23 motors I am going to use yet, I only have a small but powerful Nema 17 motor for test purposes.

    Any ideas?

    Thanks.
     
  2. Steve Fox

    Steve Fox Well-Known
    Builder

    Joined:
    Feb 22, 2015
    Messages:
    129
    Likes Received:
    21
    I have one set of controllers that has those switches. I did a search on the model number and found a sheet someplace that had the English translation. I can't find it right now, but I'll keep looking. I think the bottom line was don't adjust them unless you have a really good reason.

    As for skipping, that usually means that your acceleration variable is too large. Adjust it lower now and wait until you get your final motors to spend a lot of time on it. I think the recommendation is to set it until it works and then drop it 10%. I think mine are up to full speed after about 8" or so. Put a couple of marks on each of your pulley/shaft combinations to verify that they aren't slipping.
     
  3. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    Cool Steve.

    I found out that the motor controllers use a Toshiba IC I think, I'm going to look up the datasheet and see also if they have any App Notes on the device.
     
  4. Steve Fox

    Steve Fox Well-Known
    Builder

    Joined:
    Feb 22, 2015
    Messages:
    129
    Likes Received:
    21
    I've got the sheet on a different computer, but I can't find it online right now.
    I know it's not the same board, but it has the same switches and descriptions on it.
     
  5. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    After playing with it a bit, some disturbing things.

    Slowing down the accel/decel settings to half in GRBL made no difference. Increased the pulse width on GRBL from 10 to 25 uS. Made a slight difference.

    I put a tape flag on the motor shaft. Using Universal G-Code Sender, If I do 50 units to the right, then 50 units left, the tape flag ends up in a different place.

    Motor definitely makes grinding sounds and jumps around during accel/decel. You can feel something is not right if you hold onto the motor. Runs fine during constant speed.

    Replaced the stepper driver board with a new one with default settings, no difference.

    Note that the step settings on the board are labelled 1, 2, 8, 16. I assumed this was microsteps, if set to one the motor should go fast, if set to 16 the motor should be smoother and slower.
    My take on it is that it takes 16 microsteps to go one full step (on the 16 setting), therefore for a constant pulse input rate the motor should rotate slower. It does not, it rotates faster on the 16 setting than on the 1 setting. I assume settings chart on board is backwards.

    Picture of board 1_6_2.jpg
     
  6. Steve Fox

    Steve Fox Well-Known
    Builder

    Joined:
    Feb 22, 2015
    Messages:
    129
    Likes Received:
    21
    I attached my current GRBL settings. Look through those.
    You want the Pulse Width as small as possible, 25 is too high. Mine work as low as three or four.
    If the tape ends up in a different place, it means the motor is not tracking the steps correctly. Something is wrong.
    I have had problems with some step settings. Start with 2 or 8 first.
    Your motors are probably 200 steps per revolution. Try working in full circles by setting a combination of steps/mm and millimeters of movement so it works out to one revolution.
    Your current doesn't need to be more than 1.8amps.

    My acceleration runs between 200 and 250. Don't be afraid to start out slower until you get the other variables figured out.
    You want to isolate as much as you can by leaving things working that work.

    If your switches function like I think,
    set them to ON, ON,OFF, ON, OFF, ON, OFF, OFF, OFF
    .....or...... ON, ON, OFF, ON, OFF, ON, ON, OFF, OFF.

    Set $0= 10 Pulse Width
    Set $1= 255 : that locks the motors on
    Set $100, $101, $102= 20 :Steps
    Set $110, $111, $112= 15000 :Max Rate
    Set $120, $121, $122= 200 :Acceleration

    I don't think the board markings are backwards.

    Those settings should get you working. If your current settings are much off these, that could be your problem. If not, it's obviously something else I haven't thought of. I'm pretty sure it has to do with the buzzing. When you find out what that problem is, I think it will be fixed.

    Steve Fox
     

    Attached Files:

  7. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    547
    Hey Steve + all:

    So, after futzing with the motor a bit, no success at all. Still loses steps on accel + decel. Set my acceleration down to 2.5mm/sec^2, no difference.

    Switches on the stepper driver board are AFU. I set GCODESender to 8 (whatever they ares) per press of the jog button. Then I set the switches on the board for the four step size selections in turn and pressed the jog button. Results follow:

    Step Size (1/x) Rotation
    1 1/4 t
    2 1/8 t
    8 2 t
    16 1 t

    This is screwed up, it looks like there are a couple switches reversed, but even more fubar, it looks like the selections are essentially backwards. Should not increasing the (micro)step size reduce the amount of rotation? If the driver is set for 1 step/pulse, it should rotate more than if set for 1/16step/pulse, no? It looks like the settings should be 1=8, 2=16, 8=1, 16=2 if that makes any sense.

    Having found this error, it does not bode well for the accuracy of the other switch settings.

    Steve - I tried all your GRBL and stepper driver switch settings, nothing seems to work. Seem to still lose steps. Of course I ignored the ones that are used to calibrate the machine axes, I won't need those until I actually get a machine.

    Not sure what to try next. I am going to put my 'scope on it to see if I can see whats happening...
     
  8. Steve Fox

    Steve Fox Well-Known
    Builder

    Joined:
    Feb 22, 2015
    Messages:
    129
    Likes Received:
    21
    Something definitely is amiss.
    The scope should definitely show something.
    I don't know how anybody gets along without one.

    Have you checked to see if the controllers are maintaining current to the motors after they turn off?
    In other words, can you twist the shafts when they aren't doing anything?

    My only other suggestion would be a different type of controller.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice