Welcome to Our Community

Some features disabled for guests. Register Today.

Laser Head, Speed Varies during power change in Grayscale

Discussion in 'OpenBuilds Bug Report' started by Frank Rieder, Aug 20, 2023.

  1. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    So I have dove into doing some 3d Grayscale laser engravings. When using the Ortur Lasermaser 2 the thing happily runs back and forth like a cute puppy after its favorite toy. However when on my 2'x4' machine running off an openbuilds 4x controller during the power changes (all the time except for whitespace) the speed varies so much so that I do not like it (and does not do the same thing on the ortur). Is there a setting I am missing or doing something incorrect? Engraving and Cutting on this machine works flawlessly.

    I use lightburn mostly but have even tried to save gcode and use the openbuilds control and it is even worse when I do that.

    Thoughts or comments on what to do would be great.


    Thank You

    EDIT: after seeing some others with an issue similar this is what I am told would maybe fix the problem? This is above my pay grade...lol

    "LASER_POWER_INLINE mode, which allows you to set power in G1 moves, fixing this problem."
     
    #1 Frank Rieder, Aug 20, 2023
    Last edited: Aug 20, 2023
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    the BB4x must be in laser mode ($32=1)
    the Gcode must use M4 power mode (a setting in lightburn I guess).
     
    Peter Van Der Walt likes this.
  3. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1

    $32=1 - yes
    M4 Power Mode - yes (default for Lightburn GRBL machine)

    Gcode Snippet:
    {
    G00 G17 G40 G21 G54
    G91
    M4
    ; Image @ 3000 mm/min, 100% power
    M9
    G0 X-144.65Y-143.45
    ; Layer C00
    G1 X1.25F3000S0
    G1 X131S50
    G1 X0.2S57.5
    G1 X0.1S53.7
    }

    So it looks like it is all sending correctly, I mean it does what it should do I guess. I am moving a lot more iron on the cnc vs the laser engraver. As a side note the CO2 doesnt slow down even a little bit during power changes, but I figure that is because of its controller.
     
    #3 Frank Rieder, Aug 22, 2023
    Last edited: Aug 22, 2023
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    can the machine even do 3000mm/minute?
    my belt drive machine can, but few screw driven/stepper machines can.

    maybe the wiki has some clues, and a quick glance shows that speed changes with power changes are not normal for laser mode, so do check the $32=1 setting, to be absolutely sure
    grbl/doc/markdown/laser_mode.md at master · gnea/grbl
     
  5. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    Code:
    [04:01:02] [ ] Grbl 1.1g ['$' for help]
    
    [04:01:02] [ ] [MSG:'$H'|'$X' to unlock]
    
    [04:01:04] [ $$ ] $0=10 ;Step pulse time, microseconds
    
    [04:01:04] [ $$ ] $1=25 ;Step idle delay, milliseconds
    
    [04:01:04] [ $$ ] $2=0 ;Step pulse invert, mask
    
    [04:01:04] [ $$ ] $3=7 ;Step direction invert, mask
    
    [04:01:04] [ $$ ] $4=1 ;Invert step enable pin, boolean
    
    [04:01:04] [ $$ ] $5=0 ;Invert limit pins, boolean/mask
    
    [04:01:04] [ $$ ] $6=0 ;Invert probe pin, boolean
    
    [04:01:04] [ $$ ] $10=1 ;Status report options, mask
    
    [04:01:04] [ $$ ] $11=0.010 ;Junction deviation, millimeters
    
    [04:01:04] [ $$ ] $12=0.002 ;Arc tolerance, millimeters
    
    [04:01:04] [ $$ ] $13=0 ;Report in inches, boolean
    
    [04:01:04] [ $$ ] $20=0 ;Soft limits enable, boolean
    
    [04:01:04] [ $$ ] $21=1 ;Hard limits enable, boolean
    
    [04:01:04] [ $$ ] $22=1 ;Homing cycle enable, boolean (Grbl) / mask (GrblHAL)
    
    [04:01:04] [ $$ ] $23=3 ;Homing direction invert, mask
    
    [04:01:04] [ $$ ] $24=50.000 ;Homing locate feed rate, mm/min
    
    [04:01:04] [ $$ ] $25=1000.000 ;Homing search seek rate, mm/min
    
    [04:01:04] [ $$ ] $26=250 ;Homing switch debounce delay, milliseconds
    
    [04:01:04] [ $$ ] $27=2.000 ;Homing switch pull-off distance, millimeters
    
    [04:01:04] [ $$ ] $30=1000 ;Maximum spindle speed, RPM
    
    [04:01:04] [ $$ ] $31=0 ;Minimum spindle speed, RPM
    
    [04:01:04] [ $$ ] $32=1 ;Laser-mode enable, boolean
    
    [04:01:04] [ $$ ] $100=320.690 ;X-axis steps per millimeter
    
    [04:01:04] [ $$ ] $101=320.200 ;Y-axis steps per millimeter
    
    [04:01:04] [ $$ ] $102=320.150 ;Z-axis steps per millimeter
    
    [04:01:04] [ $$ ] $110=3000.000 ;X-axis maximum rate, mm/min
    
    [04:01:04] [ $$ ] $111=3000.000 ;Y-axis maximum rate, mm/min
    
    [04:01:04] [ $$ ] $112=2000.000 ;Z-axis maximum rate, mm/min
    
    [04:01:04] [ $$ ] $120=150.000 ;X-axis acceleration, mm/sec^2
    
    [04:01:04] [ $$ ] $121=150.000 ;Y-axis acceleration, mm/sec^2
    
    [04:01:04] [ $$ ] $122=100.000 ;Z-axis acceleration, mm/sec^2
    
    [04:01:04] [ $$ ] $130=600.000 ;X-axis maximum travel, millimeters
    
    [04:01:04] [ $$ ] $131=900.000 ;Y-axis maximum travel, millimeters
    
    [04:01:04] [ $$ ] $132=150.000 ;Z-axis maximum travel, millimeters
    
    [04:01:04] [ $$ ] ok
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    with that low acceelration rate it is not going to be able to get to 3000mm/min except on quite long moves.
    have you done any tuning of speed and acceleration?
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,868
    Likes Received:
    4,283
    Also looks like a low pitch leadscrew - is it by any change a heavy ballscrew (enertia limiting acceleration?)
     
  8. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    I have not really done any tuning other than $100-$102 to get proper shapes.

    This machine was MACH3 controlled, but I changed it over to the Blackbox x4

    The lead screws are something like 15MM thick.

    I will lookup tuning guide and start there.

    Thank You guys for the help, I know some of this may be dumb moves on my part, but using this bigger machine for the larger projects is very useful.
     
  9. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,868
    Likes Received:
    4,283
    The heavy weights may affect laser ability. For lasers a light machine like an OpenBuilds ACRO System is more suited to the demands
     
  10. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    I found a listing for the machine I have (Amazon.com) Mind you I use this primarily for 3d wood engraving and large laser cuts. So workspace is everything,
    I have a small 400x400mm laser from ortur, the above cnc and a small CO2. I have certain jobs for each of these machines, but within the past year I have added a 4 diode laser module to the CNC and use it for large cuts to make layered stuff that people ask for.. (cut settings are usually 300mm/m at 80% power 1 pass for 6mm material)

    Now on to the testing results, I can easily get my accel up to 300 and speed up to 3000mm/m or 50mm/s, I do use 2 GRBL config files, one for wood projects (with $32=0 and the acceleration at 150) and one for laser projects ($32=1 and accel I kept at 150 because it didnt have any issues).

    Testing I have taking the machine to 4000mm/m before noticing any issues, so 3000mm/m should be conservative speed, I bumped up to 400mm/squared and still; no issues. At 300mm/s2 I am up to 3000mm/m well within 10mm and I mitigate that with overscanning in lightburn ( going well past where you want to burn to make sure you are up to speed before the laser fires ).


    The ACRO system would be great, but I already have this in my shop. Time to start explaining to the better half why I need yet another machine in the garage...lol
     
  11. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    350
    Likes Received:
    273
    I don't understand that comment - 150mm/s^2 acceleration will get to 3000mm/min (50mm/s) from a standing start in just over 8mm / 0.33 seconds - is that a long move? :confused:

    In any case, I can't see why the acceleration / weight of the machine should cause the original problem:

    (Not that I can come up with an answer! It just shouldn't happen if $32 is set correctly...:confused: )
     
  12. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    So overnight I ran a little test, I saved all my settings, wired up my ortur with the blackbox 4x to simulate the ACRO system, did not connect a laser, made sure $32=1 and ran the job on that machine. This was to test the motion. Same slow downs in the places it would vary the power. I figure I have found a limit to what this box can do. Maybe this does not happen with the x32.
    I am ok with this being a limiting factor for this controller. I did not know if someone else could replicate the problem with the same controller or not, or if I had a setting incorrect, or if I found a bug.

    Granted I am using a height map image, same as used for 3d cnc, maybe that is my issue. I am going to jump into that this afternoon.
     
  13. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,868
    Likes Received:
    4,283
    Post the file so we can see what they do. Perhaps theres a Z move at that time (Do you have a Z axis)?
     
  14. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    Yes I do have a Z axis, but unused other then focusing. Here is the Gcode file attached, I do not see any Z movements.
     

    Attached Files:

  15. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    350
    Likes Received:
    273
    FWIW, I can’t see anything wrong with the gcode…
     
  16. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    59
    Likes Received:
    60
    Is it the ESP32 version? I so it likely uses grblHAL or GRBL_ESP32 and that may explain why it runs smoothly.

    8-bit Grbl has a smallish planner buffer that might restrict the achievable feed rate of many small moves and could be one of the reasons behind the uneven speed. Setting the laser power might be another - since it is done from the stepper interrupt handler.

    FYI grblHAL (and FluidNC) allows run time setting of the planner buffer size and is one of the parameters to tune for higher/smoother engraving speeds.
     
    Misterg likes this.
  17. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    lots and lots of 0.1mm moves, would be hard for many controllers to manage the planner buffer.
    do you really need 0.1mm resolution?
     
  18. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    350
    Likes Received:
    273
    That's a very good call!

    The original grbl on 8 bit Arduino definitely bogs down when presented with complex commands at high speed. I ran the same program on both the ESP32 (running GRBL_ESP32) and the Arduio UNO – it was a complicated 3D scroll carving with a lot of curves and simultaneous axis moves. At exactly the same feeds, the 32 bit version was consistently 10-20% faster - down purely to processing time.
     
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,868
    Likes Received:
    4,283
  20. Frank Rieder

    Builder

    Joined:
    Apr 22, 2022
    Messages:
    12
    Likes Received:
    1
    yes the ortur runs the 32 bit.
    the .1 happens to be the size of the laser (actually .06 but it looks better at .1)
    I feel as though I would have to upgrade to the x32. Too bad I bought 4x a few months before the x32 came out...lol
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice