GRBL Configuration and Setting Up Your Machine For The First Time
1) The document discusses setting up GRBL, an open-source CNC controller, for the first time.
2) It provides information on connecting to GRBL, viewing settings, changing settings like step pulse time, and ensuring the machine axes move in the correct directions.
3) Finally, it discusses tuning settings like step distance and travel limits and indicates the machine is then ready to run G-code files.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
297 views
GRBL Configuration and Setting Up Your Machine For The First Time
1) The document discusses setting up GRBL, an open-source CNC controller, for the first time.
2) It provides information on connecting to GRBL, viewing settings, changing settings like step pulse time, and ensuring the machine axes move in the correct directions.
3) Finally, it discusses tuning settings like step distance and travel limits and indicates the machine is then ready to run G-code files.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4
GRBL Configuration and Setting Up Your
Machine for the First Time
First, connect to Grbl using the serial terminal of your choice. Set the baud rate to 115200 as 8-N-1 (8-bits, no parity, and 1-stop bit.) Once connected you should get the Grbl-prompt, which looks like this: Grbl 0.9i ['$' for help] Type $ and press enter to have Grbl print a help message. You should not see any local echo of the $ and enter. Grbl should respond with: [HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x] The ‘$’-commands are Grbl system commands used to tweak the settings, view or change Grbl's states and running modes, and start a homing cycle. The last four non-'$' commands are realtime control commands that can be sent at anytime, no matter what Grbl is doing. These either immediately change Grbl's running behavior or immediately print a report of the important realtime data like current position (aka DRO). $$ - View Grbl settingsTo view the settings, type $$ and press enter after connecting to Grbl. Grbl should respond with a list of the current system settings, as shown in the example below. All of these settings are persistent and kept in EEPROM, so if you power down, these will be loaded back up the next time you power up your Arduino. $x=val - Save Grbl settingThe $x=val command saves or alters a Grbl setting, which can be done manually by sending this command when connected to Grbl through a serial terminal program, but most Grbl GUIs will do this for you as a user-friendly feature. To manually change e.g. the microseconds step pulse option to 10us you would type this, followed by an enter: $0=10 If everything went well, Grbl will respond with an 'ok' and this setting is stored in EEPROM and will be retained forever or until you change them. You can check if Grbl has received and stored your setting correctly by typing $$ to view the system settings again. Grbl's default configuration is intentionally very generic to help ensure users can see successful motion without having to tweak settings. Generally, the first thing you'll want to do is get your stepper motors running, usually without it connected to the CNC. Wire Grbl to your stepper drivers and stepper motors according to your manufacturer guidelines. Connect to Grbl through a serial terminal or one of many Grbl GUIs. Send some G1 or G0 commands to Grbl. You should see your stepper motor rotating. If you are having trouble with your stepper motors, try the following: • Ensure everything is wired and powered correctly per your stepper driver manufacturer guidelines. • If your steppers are mounted in your CNC already, ensure your axes move freely and don't obviously bind. If you can't easily tell, try removing your steppers and check if they run under no load. • Ensure your stepper motors and axes linear mechanisms are all tight and secure. Small set screws on drivetrain components becoming loose is a very common problem. Re-tighten and try applying some non- permenant thread locker (Loctite blue) if it continually loosens. • For more difficult issues, try the process of elimination to quickly isolate the problem. Start by disconnecting everything from the Arduino. Test if Grbl is operating ok by itself. Then, add one thing at a time and test. • If your steppers are powered and making a grinding noise when trying to move, try lowering the '$' acceleration and max rate settings. This sound is a sign that your steppers is losing steps and not able to keep up due too much torque load or going too fast. • Grbl's default step pulse settings cover the vast majority of stepper drivers on the market. While very uncommon, check these settings if you are still experiencing problems or have a unusual setup. Next, you will need to make sure your machine is moving in the correct directions according to a Cartesian(XYZ) coordinate frame. Mount your stepper motors into your CNC, if you haven't already done so. Send Grbl some motion commands, such as G91 G0 X1 or G91 G0 X-1, which will move the x-axis +1mm and -1mm, respectively. Check all axes. If an axis is not moving correctly, alter the $3 direction port mask setting to invert the direction. If you are unfamiliar with how coordinate frames are setup on CNC machines, see this great diagram by LinuxCNC. Just keep in mind that motions are relative to the tool. So on a typical CNC gantry router, the tool will move rather than the fixed table. If the x-axis is aligned positive to the right, a positive motion command will move the tool to the right. Whereas, a moving table with a fixed tool will move the table to the left for the same command, because the tool is moving to the right relative to the table. Finally, tune your settings to get close to your desired or max performance. Start by ensuring your $100,$101, and $102 axes step/mm settings are correct for your setup. This is dependent on your stepper increments, micro steps on your driver, and mechanical parameters. There are multiple resources online to show you how to compute this for your particular machine, if your machine manufacturer has not supplied this for you. Tweak your $11x acceleration and $12x max rate settings to improve performance. Set to no greater than 80% of absolute max to account for inertia and cutting forces. Set your $13x max travel settings if you plan on using homing or soft limits. It's recommended to enter something approximately close to actual travel now to avoid problems in the future. At this point, you're pretty much ready to get going! Grbl can now move your CNC machine and run g-code jobs. If you need to add more features, such as limit switches for homing or hard limits or spindle/laser control. There are other Wiki pages to help you that. Good luck and have fun! Here is my Setting$0 = 10 (step pulse, usec) $1 = 25 (step idle delay, msec) $2 = 0 (step port invert mask:00000000) $3 = 0 (dir port invert mask:00000000) $4 = 0 (step enable invert, bool) $5 = 0 (limit pins invert, bool) $6 = 0 (probe pin invert, bool) $10 = 3 (status report mask:00000011) $11 = 0.010 (junction deviation, mm) $12 = 0.002 (arc tolerance, mm) $13 = 0 (report inches, bool) $20 = 0 (soft limits, bool) $21 = 0 (hard limits, bool) $22 = 0 (homing cycle, bool) $23 = 0 (homing dir invert mask:00000000) $24 = 25.000 (homing feed, mm/min) $25 = 500.000 (homing seek, mm/min) $26 = 250 (homing debounce, msec) $27 = 1.000 (homing pull-off, mm) $100 = 100.000 (x, step/mm) $101 = 100.000 (y, step/mm) $102 = 100.000 (z, step/mm) $110 = 5000.000 (x max rate, mm/min) $111 = 5000.000 (y max rate, mm/min) $112 = 500.000 (z max rate, mm/min) $120 = 5000.000 (x accel, mm/sec^2) $121 = 5000.000 (y accel, mm/sec^2) $122 = 10.000 (z accel, mm/sec^2) $130 = 200.000 (x max travel, mm) $131 = 200.000 (y max travel, mm) $132 = 200.000 (z max travel, mm)