I was cutting on my ShapeOKO 2 last weekend and having major issues with missing steps on the Z. During fast retracts the Z would just hum resulting in passes where the tool wouldn’t clear the work resulting in more or less catastrophic failure. Either the work piece was damaged or the bit from trying to be forced through way more material it should be before I hit the e-stop. After some research I came to the conclusion that the stepping was the culprit. The steppers are configured correctly, wired correctly and moving as freely as possible but the controller would step at a rate that was causing issues on the Z.
After a little research I found that there was an update to GRBL version 0.9G that in addition to having a better acceleration planner the maximum feed rates could be configured per-axis. This is a pretty big deal because in 0.8C all the axis are limited by your slowest axis – which is the Z. Because of this cutting speeds are severely limited on the axis that one spends most of the time cutting on.
UPGRADING the machine
The easiest way to update the machine is with a little piece of software called X-Loader. ‘avrdude’ can be used on the command line if you are familiar with it but X-Loader makes the process super simple. To get started you just need a couple things:
Before you flash the machine you should make note of your current settings. The new version of GRBL uses a different default baud rate for communication as well as different configuration settings. To gather your settings open up the Universal G-code sender. If you only use Easel then you may want to download the Arduino IDE. Any serial port communication tool will work for this step. Connect your your machine and enter the command $$ and send it to the machine. The machine should dump out all it’s settings along with a string of what the settings are for. Save these in a text file for future reference. You will only need these if you have changed something on your machine from the factory defaults like limit switches, axis inversion or if you have an ACME lead screw for the Z.
Once you have the utility and have made note of your settings it’s time to flash the new firmware. Plug in your ShapeOKO2 via USB only. Do not power the stepper board to avoid damage. Open XLoader and set the Device to “Uno(ATmega328)”. Select the correct com port and the select the HEX file listed above. When ready hit the “Upload” button and wait. After several seconds the new firmware should be uploaded to the Arduino.
After the new hex code is uploaded you should validate the settings and tune them up. The defaults in the HEX file listed above are configured for a stock ShapeOKO2. Use the serial monitor in the Ardiono IDE or Universal G-code Sender to verify and change the machines settings. Note that the baud rate needs to be set to 115200 in order to communicate with your controller now. After changing the baud rate connect to the controller and issue the $$ command again to see the new settings. Change any axis inversion settings that you may need to for your wiring. I have found that the defaults in this work great as a baseline for my ShapeOKO 2. The X and Y axis are free to move at a higher rate than the Z and I no longer have missed Z steps due to the cleaner stepping and acceleration code in GRBL 0.9G.
You may want to tune the maximum feed rates for all the axis. The best way to go about doing this is to move one axis at a time in a large increment. You’ll notice that the acceleration is much smoother in the new version of GRBL. Jog back and forth large disatances changing the maximum feed rates higher each time until you have missed steps. The $110,$111 and $112 settings control the X, Y and Z respectively. Once you find the maximum rates back off of them a little bit and set those as the defaults. To set a value for the X for example issue the command $110=2000 to set the X maximum federate to 2000 mm/sec. I’ve seen some machines go as fast as 5000 mm/sec but they may have had NEMA 23 Steppers or high torque NEMA 17 steppers.