GRBL LightDrive V3n Axis Settings Calculator

http://www.lightburn.tc

ATMEGA328P-AU 20MHz MCU - GRBL LightDrive 3 Axis laser controller board

DISCLAIMER: Lasers are extremely dangerous devices. They can instantly cause fires and permanently damage your vision. Please read and understand all related documentation for your laser prior to using it. The Grbl LightDrive producers is not responsible for any damage or issues may cause.

Designed for easy assembly and perfect LightBurn Software compatibility

Test your values to avoid mistakes...

Default values are set for LightDrive V3d 3 Axis Driver

Variables Settings Values Warnings Info
MXL:2.032mm, GT2:2mm, 3M:3mm X/Y belt pitch (mm):
X/Y motor (steps/rev):
X/Y pulley teeth:
X/Y microsteps:
Z threaded rod pitch (mm):
Z motor (steps/rev):
Z microsteps:
$0 Step pulse width (µs):
$1 Step idle delay (ms):
$110 & $111 X&Y max rate (mm/min):
$112 Z max rate (mm/min):
$120, $121 X&Y Acceleration (mm/s²):
$122 Z Acceleration (mm/s²):
$130 X Max travel (mm):
$131 Y Max travel (mm):
$132 Z Max travel (mm):
Press here if the numbers below don't update automatically:
$100/$101 X/Y (micro)steps per mm: 0 0
X/Y max steps/s: 0 Greater than 30kHz!
X/Y max step period (µs): 0 Less than 2x step pulse width!
$102 Z (micro)steps per mm: 0 0
Z max steps/s: 0 Greater than 30kHz!
Z max step period (µs): 0 Less than 2x step pulse width!

Your Settings

Once you're happy with the selections above you can copy and paste the followings into console:

   calculate me!
   

If your drawing dimensions are different after measured according to these calculation results, check your mechanic problems.
If the mechanical problems cannot be corrected, you can try to correct the dimensions by playing with $100 and $101 values.

Connection Diagram

Designed for Arduino nano r3, easy assembly and perfect LightBurn compatibility.

Board sizes: 48x77mm

Screw terminal blocks: 2Pcs 6 Pin 2EDG 5.08mm

Screw holes: 3mm

Pc Drivers

Warning! Please download the current version of winrar at rarlab.com, otherwise you may not be able to open the archive

Windows driver | Linux Driver | Mac Driver

Electrical Specifications

Logic Supply Voltage Logic Signal Output Analog Signal Output Pulse Output Frequency Step Pulse Width
+5VDC, 100mA
(Takes from usb port)
7~16mA (Typical 10mA) 20~30mA 0~30KHz 3~27μS
Laser PWM (TL) Laser PWM (TH) Active Low Frequency Active High Frequency Connection PWM Pin
Active Low Active High 0~7.8KHz 0~7.8KHz Low to TL, High to TH

Laser PWM signal connection

Use TL OR TH According to your power supply specifics & GND

Compatible Stepper Motor Drivers

Stepper motor driver Recommendation
LightDrive V3d 3 Axis Driver (For Nema17 stepper motors) Use 30KHz
EM806 Use 30KHz
DM860T Use 30KHz
DM860I Use 30KHz
DM556T Use 26KHz
DM542T Use 26KHz
M542 Use 26KHz
TB6600 Use 20KHz
TB6560 Use 20KHz
Pololu A4988 Use 20KHz
And much more stepper motor drivers...

Firmware Informations

Technical Configurations (Hidden but everyone can edit on console)

(This group is now hidden, cannot be listed with the $$ command) *Why?

$0Step pulse, microseconds
$2Step port invert, mask
$3Direction port invert, mask
$4Step enable invert, boolean
$5Limit pins invert, boolean
$6Probe pin invert, boolean
$10Status report, mask
$11Junction deviation, mm
$12Arc tolerance, mm
$13Report inches, boolean
$20Soft limits, boolean
$21Hard limits, boolean
$22Homing cycle, boolean
$23Homing dir invert, mask
$24Homing feed, mm/min
$25Homing seek, mm/min
$26Homing debounce, milliseconds
$27Homing pull-off, mm
$30Max PWM
$31Min PWM

Output Configurations (Axis settings)

(Visible and everyone can edit on console)

$1Step idle delay, milliseconds
$100X steps/mm
$101Y steps/mm
$102Z steps/mm
$110X Max rate, mm/min
$111Y Max rate, mm/min
$112Z Max rate, mm/min
$120X Acceleration, mm/sec^2
$121Y Acceleration, mm/sec^2
$122Z Acceleration, mm/sec^2
$130X Max travel, mm
$131Y Max travel, mm
$132Z Max travel, mm

*Why?: To avoid end-user problems and free up more microcontroller space

Response Messages

ok : All is good! Everything in the last line was understood by Grbl LightDrive and was successfully processed and executed.

If an empty line with only a return is sent to Grbl LightDrive, it considers it a valid line and will return an ok too, except it didn't do anything.

error:X : Something went wrong! Grbl LightDrive did not recognize the command and did not execute anything inside that message. The X is given as a numeric error code to tell you exactly what happened. The table below decribes every one of them.

Error Codes & Descriptions

ID - Error Code Description

1G-code words consist of a letter and a value. Letter was not found.
2Numeric value format is not valid or missing an expected value.
3'$' system command was not recognized or supported.
4Negative value received for an expected positive value.
5Homing cycle is not enabled via settings.
6Minimum step pulse time must be greater than 3usec
7EEPROM read failed. Reset and restored to default values.
8'$' command cannot be used unless Grbl LightDrive is IDLE. Ensures smooth operation during a job.
9G-code locked out during alarm or jog state
10Soft limits cannot be enabled without homing also enabled.
11Max characters per line exceeded. Line was not processed and executed.
13Safety door detected as opened and door state initiated.
15Jog target exceeds machine travel. Command ignored.
16Jog command with no '=' or contains prohibited g-code.
20Unsupported or invalid g-code command found in block.
21More than one g-code command from same modal group found in block.
22Feed rate has not yet been set or is undefined.
23G-code command in block requires an integer value.
24Two G-code commands that both require the use of the XYZ axis words were detected in the block.
25A G-code word was repeated in the block.
26A G-code command implicitly or explicitly requires XYZ axis words in the block, but none were detected.
27N line number value is not within the valid range of 1 - 9,999,999.
28A G-code command was sent, but is missing some required P or L value words in the line.
29Supports six work coordinate systems G54-G59. G59.1, G59.2, and G59.3 are not supported.
30The G53 G-code command requires either a G0 seek or G1 feed motion mode to be active. A different motion was active.
31There are unused axis words in the block and G80 motion mode cancel is active.
32A G2 or G3 arc was commanded but there are no XYZ axis words in the selected plane to trace the arc.
33The motion command has an invalid target. G2, G3, and G38.2 generates this error, if the arc is impossible to generate or if the probe target is the current position.
34A G2 or G3 arc, traced with the radius definition, had a mathematical error when computing the arc geometry. Try either breaking up the arc into semi-circles or quadrants, or redefine them with the arc offset definition.
35A G2 or G3 arc, traced with the offset definition, is missing the IJK offset word in the selected plane to trace the arc.
36There are unused, leftover G-code words that aren't used by any command in the block.
38Number greater than max supported value.

Alarm Codes & Descriptions

ID - Alarm Code Description

1Hard limit triggered. Machine position is likely lost due to sudden and immediate halt. Re-homing is highly recommended.
2G-code motion target exceeds machine travel. Machine position safely retained. Alarm may be unlocked.
3Reset while in motion. Machine cannot guarantee position. Lost steps are likely. Re-homing is highly recommended.
4Probe fail. The probe is not in the expected initial state before starting probe cycle, where G38.2 and G38.3 is not triggered and G38.4 and G38.5 is triggered.
5Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4.
6Homing fail. Reset during active homing cycle.
7Homing fail. Safety door was opened during active homing cycle.
8Homing fail. Cycle failed to clear limit switch when pulling off. Try increasing pull-off setting or check wiring.
9Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases.

Detailed Explanations

$0 – Step pulse, microseconds

Stepper drivers are rated for a certain minimum step pulse length. Check the data sheet or just try some numbers. You want the shortest pulses the stepper drivers can reliably recognize. If the pulses are too long, you might run into trouble when running the system at very high feed and pulse rates, because the step pulses can begin to overlap each other. We recommend something around 10 microseconds, which is the default value.

$1 - Step idle delay, milliseconds

Every time your steppers complete a motion and come to a stop, Machine will delay disabling the steppers by this value. OR, you can always keep your axes enabled (powered so as to hold position) by setting this value to the maximum 255 milliseconds. Again, just to repeat, you can keep all axes always enabled by setting $1=255.

The stepper idle lock time is the time length Machine will keep the steppers locked before disabling. Depending on the system, you can set this to zero and disable it. On others, you may need 25-50 milliseconds to make sure your axes come to a complete stop before disabling. This is to help account for machine motors that do not like to be left on for long periods of time without doing something. Also, keep in mind that some stepper drivers don't remember which micro step they stopped on, so when you re-enable, you may witness some 'lost' steps due to this. In this case, just keep your steppers enabled via $1=255

$110, $111 and $112 – [X,Y,Z] Max rate, mm/min

This sets the maximum rate each axis can move. Whenever Machine plans a move, it checks whether or not the move causes any one of these individual axes to exceed their max rate. If so, it'll slow down the motion to ensure none of the axes exceed their max rate limits. This means that each axis has its own independent speed, which is extremely useful for limiting the typically slower Z-axis.

The simplest way to determine these values is to test each axis one at a time by slowly increasing max rate settings and moving it. For example, to test the X-axis, send Machine something like G0 X50 with enough travel distance so that the axis accelerates to its max speed. You'll know you've hit the max rate threshold when your steppers stall. It'll make a bit of noise, but shouldn't hurt your motors. Enter a setting a 10-20% below this value, so you can account for wear, friction, and the mass of your workpiece/tool. Then, repeat for your other axes.

NOTE: This max rate setting also sets the G0 seek rates.

$120, $121, $122 – [X,Y,Z] Acceleration, mm/sec^2

This sets the axes acceleration parameters in mm/second/second. Simplistically, a lower value makes Machine ease slower into motion, while a higher value yields tighter moves and reaches the desired feed rates much quicker. Much like the max rate setting, each axis has its own acceleration value and are independent of each other. This means that a multi-axis motion will only accelerate as quickly as the lowest contributing axis can.

Again, like the max rate setting, the simplest way to determine the values for this setting is to individually test each axis with slowly increasing values until the motor stalls. Then finalize your acceleration setting with a value 10-20% below this absolute max value. This should account for wear, friction, and mass inertia. We highly recommend that you dry test some G-code programs with your new settings before committing to them. Sometimes the loading on your machine is different when moving in all axes together.

$130, $131, $132 – [X,Y,Z] Max travel, mm

This sets the maximum travel from end to end for each axis in mm. This is only useful if you have soft limits (and homing) enabled, as this is only used by Machine's soft limit feature to check if you have exceeded your machine limits with a motion command.


GRBL XYZ is a microcontroller software based on GRBL source codes and developed for laser CNC systems.

GRBL LightDrive V3n is a controller main board designed for easy assembly and perfect LightBurn Software compatibility.

GRBL LightDrive V3d is a 3 Axis driver board for V3n controller main board.

https://lightburn.tc

http://www.lightdrivecontroller.com (Coming soon)

If you have any suggestion please send email to: tanju.ergan@gmail.com

copyright 2020 © grbl.xyz