Settings for laser diode



  • Hi - hope you can assist with setting up my 10w laser diode from endurance. Thought I had figured the post processor to run the pwm from the heater 5 volt, but attached photo shows uneven burning - must have got something wrong, but not sure where to look first. Help please!)AAFE6910-B035-4D94-89DF-4ECD4469855B.jpeg



  • Can you provide some more information?

    What board? What firmware? What hardware? What are your settings? Software?



  • @Phaedrux
    Sorry- my mistake - ancient "newbie" brain fade!
    Board: Duet2 WiFi
    Laser: Endurance 10w pro
    Workbee 1000x750 Updated firmware V1.07
    Software: Vectric V-carve pro
    Set up using modified Post processor (suspect my error somewhere here! I added comments to each line to try to get my head around the commands, but may have muddled them????)
    Thanks for your assistance.

    +================================================
    +

    • Grbl - Vectric LASER output configuration file

    +================================================
    +

    • History
    • Who When What
    • ======== ========== ===========================
    • JTechP 03/28/2016 Added laser commands to
    •                 every line.  Changed laser
      
    •                 OFF command to both M03 S0 and
      
    •                 M05.  
      
    • PaulW 01/20/2016 turn Spindle off during rapids
    • EdwardP 11/02/2015 Written from Grbl_mm.pp but
    •                 set G20
      
    • EdwardP 11/02/2015 Commented out arcs as these
    •                 slow GRBL performance appear 
      
    •                 interpolated anyway
      
    • JayJ 3/10/2017 Changed for 3D printer fan
    •         control of laser
      
    • Simon N 15/11/2019 altered laser settings
    •         hopefully to suit duet reprap
      

    +================================================

    • "laser on fan output M106-M107 duet3d (MM) (.gcode)"
      POST_NAME = "
      *** LASER post low power ****"

    FILE_EXTENSION = "gcode"

    UNITS = "MM"

    +------------------------------------------------

    • Line terminating characters
      +------------------------------------------------

    LINE_ENDING = "[13][10]"

    +------------------------------------------------

    • Block numbering
      +------------------------------------------------

    LINE_NUMBER_START = 0
    LINE_NUMBER_INCREMENT = 10
    LINE_NUMBER_MAXIMUM = 999999

    +================================================
    +

    • Formating for variables

    +================================================

    VAR LINE_NUMBER = [N|A|N|1.0]
    VAR SPINDLE_SPEED = [S|A|S|1.0]
    VAR FEED_RATE = [F|C|F|1.1]
    VAR X_POSITION = [X|C|X|1.4]
    VAR Y_POSITION = [Y|C|Y|1.4]
    +VAR Z_POSITION = [Z|C|Z|1.4]
    VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.4]
    VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.4]
    VAR X_HOME_POSITION = [XH|A|X|1.4]
    VAR Y_HOME_POSITION = [YH|A|Y|1.4]
    +VAR Z_HOME_POSITION = [ZH|A|Z|1.4]

    +================================================
    +

    • Block definitions for toolpath output

    +================================================

    +---------------------------------------------------

    • Commands output at the start of the file
      +---------------------------------------------------

    begin HEADER

    "M452 p2 r255"

    • switch to laser mode on fan heater logical pin 2 at max output of 255=10 watts

    "G17"

    • set arc plane to xy

    "G90"

    • set absolute co-ordinates relative to origin

    "G21"

    • set to metric (mm)

    "G0 F500"

    • Rapid move speed to 400

    "G0[ZH]"

    • Rapid Home z axis

    "G0 [XH] [YH]"

    • Rapid Home x&y axis

    +---------------------------------------------------

    • Command output after the header to switch LASER on
      +---------------------------------------------------

    "M106 p2 S0"

    • enable fan heater laser output 0%

    +---------------------------------------------------

    • Commands output for rapid moves
      +---------------------------------------------------

    begin RAPID_MOVE

    [Y] [Z]"

    +---------------------------------------------------

    • Commands output for the first feed rate move
      +---------------------------------------------------

    begin FIRST_FEED_MOVE
    "M106 P2 S0.1"

    •   "M106 P2 [S] [F]"
      
    • laser controlled by fan pin at set output and set frequency

    [Y] [F]"

    • controlled move to X & Y at set feed rate

    +---------------------------------------------------

    • Commands output for feed rate moves
      +---------------------------------------------------

    begin FEED_MOVE

    [Y] [F]"

    • controlled move to X & Y at set feed rate

    +---------------------------------------------------

    • Commands output for the first clockwise arc move
      +---------------------------------------------------

    begin FIRST_CW_ARC_MOVE

    [Y] [I] [J] [F]"

    +---------------------------------------------------

    • Commands output for clockwise arc move
      +---------------------------------------------------

    begin CW_ARC_MOVE

    [Y] [I] [J]"

    +---------------------------------------------------

    • Commands output for the first counterclockwise arc move
      +---------------------------------------------------

    begin FIRST_CCW_ARC_MOVE

    [Y] [I] [J] [F]"

    +---------------------------------------------------

    • Commands output for counterclockwise arc move
      +---------------------------------------------------

    begin CCW_ARC_MOVE

    [Y] [I] [J]"


    • Commands output for Retract Moves

    begin RETRACT_MOVE

    "M106 P2 S0"

    • reduce output on fan pin to 0 (LASER OFF)

    +---------------------------------------------------

    • Commands output at the end of the file
      +---------------------------------------------------

    begin FOOTER

    "M106 p2 S0"
    "M107 p2"

    • Laser off

    "G0 [ZH]"

    • Rapid home Z

    "G0 [XH] [YH]"

    • Rapid home X&Y

    "M453"

    • Switch back to CNC


  • Not sure how to help with this, as you're using the Workbee firmware by @Ryan-Lock at Oozenest, which I'm not familiar with. I'm not sure where you would ask questions in the Oozenest support site, either. Maybe drop them an email? https://ooznest.co.uk/contact/

    Ian


  • administrators

    You are not using laser mode as it is intended to be used. Using M106 is not a good way to control the laser, because it takes no account of adjustments to the speed of movement. When you are engraving fine detail, the speed necessarily reduces, because the segments are to short to accelerate to the requested speed.

    The correct way to do laser engraving is to configure your GCode generation program to generate S parameters on the G1 commands. The S parameter specifies the requested laser power. Then RRF can adjust that power if it has to use a lower speed than was requested. Better still, if you use RepRapFirmware 3 then it will also ramp up the laser power during acceleration, and ramp it down during deceleration.



  • @droftarts
    Hi Ian, thanks for reply.
    Workbee is running Duet2 wifi RepRap version 2.03 firmware.
    At this stage I'm really trying to establish whether my post processor editing is correct.
    If it is, then could the burning be down to an intermittent delay between actuating the Laser Diode and moving the head...?
    Currently still trying to get my head around the differences between M106 and M452 - IE once the board is switched into laser mode with M452, do I control output with M452 commands, or M106 fan output? What does the M452 actually do to the controller? I suspect it tightens up the timing as there is no inertia from the spindle to take account of? Anyone put me straight on this please


  • administrators

    @woodworksimon said in Settings for laser diode:

    Currently still trying to get my head around the differences between M106 and M452 - IE once the board is switched into laser mode with M452, do I control output with M452 commands, or M106 fan output?

    Neither, the best way to control it is with S parameters on your G1 commands.

    What does the M452 actually do to the controller?

    It makes the firmware recognise the S parameter on G1 commands as the parameter for laser power, and applies that to the laser control pin, after correcting it for requested vs. actual speed (and for acceleration/deceleration when using RRF3).



  • @dc42

    [Y] [F] S25 (for a laser power of 25/255ths). Thereafter would G1 [X] [Y] [F] [S] inherit the laser power?



  • @woodworksimon
    sorry, lost the question - try again...
    If I have understood it correctly, then from the code above, the G1 command controls the laser power output and the M106 controls the frequency of that output. So for my example, in the header I use M452 P2 without the r255, still use the M106 p2 S0 to direct the output to 5v fan output, but I don't then need the M106 P2 S0.1 in the first feed move, but replace it with G1 X Y F S25 for a laser power of 25/255ths. Thereafter would the s25 be inherited in the begin feed moves. Is that power modulated to suit the xy speed to avoid overburning, and is it down to the software used to modulate output ie if you are burning a halftone image?
    So many questions - apologies!


Log in to reply