Skip to content

Smoothie firmware

arkypita edited this page Feb 5, 2020 · 2 revisions

Smoothieware

Since version 3.25, LaserGRBL can control a main board flashed with smoothieware.

You can find more information about using laser with smoothieware here .

Smoothieware can be used in two ways to control a laser :

  • Using G1/G2/G3 command
  • Using M3/M5 command

With G command, the power must be set by using the Shift parameter. Values goes from 0 ( 0% ) to 1 ( 100% ). Example : G1 X20 S0.3 : Go to X=20 and set the power to 30%.

With M command, the power must be also set by using the Shift parameter. Values goes from 0 ( 0% ) to 1 ( 100% ). Example : M3 S0.6 : Switch on laser and set power to 60%.

Smoothieware configuration

In the smoothieware config file, it is necessary to define two sections:

  • a section for the laser
  • and a "switch" section

Laser section

The laser section look like this ( SKR 1.3 board exemple, LaserPWM on servo pin) :

laser_module_enable                          true            # false
laser_module_pin                             2.0             # this pin will be PWMed to control the laser. Only P2.0 - P2.5
                                                             # can be used since laser requires hardware PWM
laser_module_max_power                       1               # this is the maximum duty cycle that will be applied to the laser
laser_module_tickle_power                    0               # this duty cycle will be used for travel moves to keep the laser
                                                             # active without actually burning
laser_module_pwm_period                      20              # this sets the pwm frequency as the period in microseconds

Switch Section

The "Switch" section look like this ( SKR 1.3 board exemple, LaserPWM on servo pin) :

switch.laser.enable                            true             # False or true
switch.laser.input_on_command                  M3               # M-code
switch.laser.input_off_command                 M5               # M-code
switch.laser.output_pin                        2.0              # Pin
switch.laser.output_type                       hwpwm            # PWM output settable with S parameter in the input_on_comand
switch.laser.max_pwm                           255              # Set max pwm for the pin default is 255
switch.laser.pwm_period_ms                     1                # Set max pwm for the pin default is 255
switch.laser.startup_state                     false

Exemple of config.txt

You can find an example here : config.txt

Clone this wiki locally