From ShapeOko
Jump to navigation Jump to search

Once you have your ShapeOko built, it's time to tune it for optimal performance, see Belt Tension and Motor Current below.

If there are issues w/ your "Hello World" efforts, there has been quite a bit of discussion in the forums.

Machine Movement is Erratic and Jerky

By default, some Communication / Control programs will send one command to Grbl and then wait for an acknowledgement, this slows the machine down and precludes the machine optimizing acceleration. Some programs have an option which will download multiple instructions, keeping the buffer full. This can be enabled by:

Y-Axis Gantry Racking (ShapeOko 1 with single- motor Y-axis)

The gantry racking along the Y-axis is a primary cause of mis-alignment along the Y-axis. From the thread Help with Hello World alignment, cvoinescu suggested the following:

First, check that your pen is firmly attached to the Z rail. It should not move at all. Tape (even duct tape) is usually not enough. Also, in some pens, especially ball point pens, the lead can move inside the case of the pen, dragging behind. Often, you're able to attach the pen so that it is rock solid in the Y direction, but can wiggle a little in the X direction.

Check that the belt pulley is firmly tightened on the shaft of the motor (one of the lead causes of this problem!), and that the plastic part of the pulley isn't moving against the aluminum hub (they can detach sometimes, or the plastic part can crack). Check that the belt anchors are sturdy and don't flop around. Check your Y V-wheels, if they're very loose they could cause something like this. Check that your eccentric spacers are seated with the rounded end entirely inside the hole, otherwise they are ineffective.

With your motors energized but not moving, you should not be able to move the pen. Try pulling back and forth on the pen in the X direction, and carefully observing the parts of the machine, to see what else moves with it. The movement seems large enough to be visible, or at least felt with the other hand. Alternatively, program the machine with a series of very short back-and-forth moves on X (say, 0.5mm, or even 0.2mm), and observe carefully to see which parts don't move that should.

Belt Tension

Belt tension is a balance. The belts should be as loose as possible while still eliminating backlash (see the Glossary) effectively. If the belts are too tight they put unneeded stress on the machine (Note, that by inverting the belts on a machine w/ driveshaft or dual-motors, and using the NEMA 23 holes for the idlers it is possible to align the belt anchors w/ the center of the Makerslide, thus using the belt tension to hold the machine together.)

To tighten the belts, pull them just taut and tighten the clamps. Rotate the pulley one step, and see if the carriage moves. If it does, rotate it one step in the other direction. If the carriage moves again, then the belts are tight enough. If not, then tighten them a bit more and try again. (Note, some users have experienced slipping / missed steps unless there is much more tension.)


See also Belts and Pulleys.


It is important to ensure that the carriages are able to travel smoothly for their entire distance --- if the eccentric spacers on the V-wheels are tightened at a place where the MakerSlide is narrower than elsewhere along its length, the machine will hang up or hesitate slightly at places where it is not so narrow. Forum discussion in Help with Hello World alignment

Grbl settings

$4 and $5 control speed and may be adjusted.[1]


You have to balance the torque available from the motors (which, as @chamnit says, depends on speed) with the load. When moving at a constant speed, the load consists of friction and cutting forces. The cutting force you can get from feed-and-speed calculators. Friction has a constant part, and a part that varies with movement speed; basically, you need to be able to overcome friction at the maximum speed. When accelerating, add the inertia of the part of the machine you're moving, plus the moment of inertia of the rotating parts (motor rotor and shaft, coupler or pulley, and, in the case of a screw drive, the screw itself). The datasheet of your motor should include a torque vs speed diagram, or you can determine it approximately.

You can measure, calculate, or estimate all these, and come up with a maximum acceleration you can achieve with the available torque in the worst case. Or, you can do what @chamnit says, and push the machine until it begins to lose steps, then dial acceleration back a little.[2]

Motor Current

Motor current is another careful adjustment.

Articles on setting the current:

Excellent forum post analyzing the specifications of the parts, w/ diagram:

Forum user cvoinescu has the following caveat, “The instructions should, instead, direct one to measure the reference voltage, calculate the current, and never exceed the rated current of the motor. Within that limit, you can then do what the wiki says.”[3]

In a nutshell, set the current as low as possible so that the motors can still move the machine without stalling. If the current is set too high, the motor drivers and/or the motors can heat up. The motors getting warm is normal (per the above, “Most motors are rated for 50°C temperature rise (above ambient)”). When the drivers overheat, they temporarily shut down until they cool down again. If the motors on your ShapeOko shut down randomly, the drivers may be overheating, and so the current should be turned down.

How to Change the Current

On the shield stacked on top of your Arduino you'll see three little white boxes with adjustable knobs inside of them (well, a thing that looks like a plastic screw with a "+" on it). Use a small eyeglass screwdriver to turn that plus sign. They should turn super easy-- so if you hit any resistance, stop turning them, remember that they only turn ~270 degrees and not a full 360. They are plastic and you can break them without a whole lot of effort if you want to.[4] Turn them clockwise to increase current and counter clock to decrease.[5]

If you're not familiar with trimmer pots, it may seem there's no indication of position, but there is. One edge of the rotating part is flat, and that's always on the opposite side of the wiper contact. The trimmer pot has three terminals, two on one side (call that bottom) and one on the opposite side (top). Held that way, the pot rotates from about seven or eight o'clock to about four or five o'clock (about 270 degrees). Minimum is counter-clockwise (wiper contact nearest the bottom-left terminal), maximum is clockwise (wiper nearest bottom-right terminal, 4 o’clock[6]), and mid-point is up (nearest the top terminal, 8 o’clock[7]).[8]

More details on this in Re: will1384's Shapeoko 2, including an image showing the potentiometers and the point from which one measures current. A similar post is here.

See Z-axis Current, Acceleration, Seek Speed Set-point, and Temperature of the GRBLShield below for a unified approach.

Detailed discussion of this adjustment on a gShield.

ShapeOko 2 - Gshield tuning

A straight-forward technique to do this is:

If you don't have a multimeter, set up a quick circle cut or similar that you can cut multiple times in a piece of waste material. Use a generous step down because we're trying to see when the machine misses steps. After each run, turn your current adjustments down bit by bit (CCW) - maybe 5 minutes on a clock dial each time. You should start seeing missed steps do to insufficient current. Next, start working the other way turning the current up slightly (CW). At some point you should start seeing missed steps due to thermal shutdown. Back off slightly from this point, and you have a decent setting.[9]

Z-axis Current, Acceleration, Seek Speed Set-point, and Temperature of the GRBLShield

There is a complex interplay between all of these, and adjusting the machine for best operation can take some patience and experimentation. One thing which further complicates this was noted by cvoinescu, "Stepper motors behave weirdly at some accelerations and speeds, and sometimes resonate in "interesting" ways (that often cause them to miss steps and lose position). A system that worked fine with 500 mm of travel may stop working when converted to 1000 mm of travel, because the longer belt damps the oscillations differently."[10].

Forum user tjshape made the following specific changes:[11]

New Setting: $4=250.000 (default feed, mm/min) Old Setting: $4=500.000 (default feed, mm/min)

New Setting: $5=250.000 (default seek, mm/min) Old Setting: $5=250.000 (default seek, mm/min)

New Setting: $8=15.000 (acceleration, mm/sec^2) Old Setting: $8=25.000 (acceleration, mm/sec^2)

Forum user danimal wrote up a very nice bit discussing how to best tune these settings for a given machine:

There is a balance here where four main things are contributing to the missed steps. They are Z-axis Current, Acceleration, Seek Speed Set-point, and Temperature of the GRBLShield. Changing the seek speed only changes the setpoint value, but the machine would not actually go any faster after a certain point because it is limited by the acceleration setting. The acceleration setting is then maxed out by the electrical torque that the motor can produce, and once that torque is exceeded then you start slipping poles. To increase the actual torque values of the motor, you need to increase the axis current. As you do this the motor becomes more powerful and can take greater acceleration and speed. Then finally as you increase the motor current the motor controller will produce more heat with the possibility of overheating the controller causing it to fail.

My Z axis maxes out at about 2700 before slipping. I always limit my seek speeds to 1500 as a good safe margin, and the way that I make up time in a job is by optimizing g-code to minimize seek transitions during the job.

To achieve the best performance of your machine, you need to work the problem backwards. First design an enclosure to maximize cooling for your controller. This will allow you to raise current values without overheating, and in turn you can increase your acceleration and seek speeds. Obviously you don't want to run your machine on the bleeding edge of its capabilities, but getting it running smoothly and accurately at a reasonable speed is achievable. Another thing to watch from a machine longevity standpoint is stepper motor temperature. If you are having a lot of hold commands throughout your job, having higher currents through the motor heats them up a lot. It is not a huge deal, but if you notice a motor is very hot to the touch after running a job, or is significantly hotter than the other motors, you might want to reduce the motor current slightly until it seems to be at a safe operating temp. I compare my Z motor to my X because with dual Y motors, they are cold to the touch no matter what I do.

Really the biggest thing that you can do to save time running jobs is to make your g-code as efficient as possible to minimize seek transitions and get comfortable with the operation of your machine so that you can determine minimum safe clearance travel values for various milling operations. Post by danimal » Sat Dec 28, 2013 9:20 pm in Forum discussion: re: Bent collet? - Replacement rotary tool?

Discussion of how fast the machines can be driven in ShapeOko Racing League.

Re: What is the fastest Inch/Sec feed-rate for GRBL?


Please note that stepper motors generate more heat when they are holding a position, than when they are moving.[12]

A further consideration is that the X- and Y-axis motors are bolted to metal plates which essentially serve as heat sinks and the Y-axis motors will have their load further reduced by it being split if running dual motors on that axis. The Z-axis motor doesn't have these advantages and will run hotter than the others, and as noted above, holding a position makes a stepper motor the hottest.[13] The stepper driver will warm up some as the machine is used.[14]

Squaring the Machine

Please see: Calibration and Squaring the Machine.