Duet 3 Laser and PWM Frequency



  • Hi

    I've built my own Lasercutter/-engraver using the Duet 3 and a Raspi/SBC.

    Board: Duet 3 MB6HC (MB6HC)
    DSF Version: 1.3.2.0
    Firmware: RepRapFirmware for Duet 3 MB6HC 3.01-RC7 (2020-04-14b3)
    

    I use a SPT 100W power supply and their 100W TR CO2 laser tube.
    I can't find any information on which PWM frequency I should use for the M452 Laser Mode definition (This Page led me to using 10000Hz).

    Measuring the PWM output on out9 I get correct voltages - that's why I assume my configuration isn't that bad.

    My config.g looks like this:

    ; Configuration file for Duet 3 (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Tue Mar 10 2020 15:29:19 GMT+0100 (Mitteleuropäische Normalzeit)
    
    ; General preferences
    G90                              ; send absolute coordinates...
    M550 P"Duet 3"                   ; set printer name
    
    ; Drives
    M569 P0.0 S1                     ; physical drive 0.0 goes forwards
    M569 P0.1 S1                     ; physical drive 0.1 goes forwards
    M569 P0.2 S0                     ; physical drive 0.2 goes backwards
    M569 P0.4 S1                     ; physical drive 0.4 goes forwards
    M584 X0.0 Y0.1:0.4 Z0.2          ; set drive mapping
    M350 X16 Y16 Z16 I0              ; configure microstepping without interpolation
    M92 X53.33 Y53.33 Z3820.00       ; set steps per mm
    M566 X20.00 Y20.00 Z50.00      ; set maximum instantaneous speed changes (mm/min)
    M203 X50000.00 Y30000.00 Z500.00   ; set maximum speeds (mm/min)
    M201 X5000.00 Y500.00 Z20.00      ; set accelerations (mm/s^2)
    M906 X1650 Y1650 Z1650 I30       ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                          ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                 ; set axis minima
    M208 X1359 Y878 Z240 S0          ; set axis maxima
    
    ; Use Endstops
    M574 X1 S1 P"!io0.in"                       ; configure sensorless endstop for low end on X
    M574 Y1 S1 P"!io1.in"                       ; configure sensorless endstop for low end on Y
    M574 Z1 S1 P"!io2.in"                      ; configure sensorless endstop for low end on Z
    
    ; Use Motor Stall As Endstop - ENDSTOPS NOT BUILT IN YET
    ;M574 X1 S4
    ;M574 Y1 S4
    ;M574 Z1 S4
    ;M915 X,Y,Z S20 F0 H200 R0
    
    ; Laser
    M452 C"out9" R255 S1 Q10000 
    

    My macro to test the laser looks like this:

    G91
    G1 X5 S10 F1000
    G1 X5 S20
    G1 X5 S30
    G1 X5 S40
    G1 X5 S50
    G1 X5 S60
    G1 X5 S70
    G1 X5 S80
    G1 X5 S90
    G1 X5 S100
    G1 X5 S110
    G1 X5 S120
    G1 X5 S130
    G1 X5 S140
    G1 X5 S150
    G1 X5 S160
    G1 X5 S170
    G1 X5 S180
    G1 X5 S190
    G1 X5 S200
    G1 X5 S210
    G1 X5 S220
    G1 X5 S230
    G1 X5 S240
    G1 X5 S255
    G90
    G0 X0
    

    The line it burns into the wood start really light and switches to maximal at around S50 already.

    Am I missing a hardware limitation? Is my GCode incorrect?


  • administrators

    The web page for that PSU says it accepts either an analog 0-5V signal or PWM on the control pin. That suggests to me that the PWM signal is smoothed to give an analog voltage. If that is the case then the exact PWM frequency isn't critical, it just needs to be high enough for the smoothing to happen.

    CO2 lasers are nonlinear devices so it is unlikely that you will get a smooth variation in power. However I would expect maximum power to be reached somewhat higher than S50.

    Some suggestions:

    • Have you tried engraving at higher XY movement speeds, to see if the power really is reaching its maximum at S50?
    • Does the laser PSU have an output current limit adjustment? It may be that they use the same PSU for lower powered tubes too, in which case they would need to implement a current limit.
    • What sort of cooling does the laser tube have? CO2 lasers lose power if they are not sufficiently well cooled, and of course they generate more heat at higher tube currents. So the power could be limited at high currents by the amount of cooling provided.


  • Thanks @dc42 for your help - your work is highly appreciated! That PWM-Frequency really gave me a headache. Lots of information, but i couldn't find anything relevant to my situation. Your explanation makes a lot of sense, though.

    I spent last night trying to figure things out and in the end: My speeds were too slow - as you suggested. I'm now off to my next mission: Finding suitable Laser-CAMs for the Duet 3.



  • flatcam free and sort of works, but learning curve and quirks.
    lightburn is all the rage not not free, but still affordable. (probably what I'll get when laser starts working again)



  • @bearer Couldn't find an acceptable machine profile yet. Engraving and cutting probably needs the speed-adjusted update thats scheduled to come soon to duet3 firmware as @dc42 mentioned in other posts.



  • +1 for lightburn.
    I use it for my K40



  • @jay_s_uk With a duet 3? If yes: Which profile do you use?



  • @Royassas

    Not yet but I am planning to upgrade to a duet board shortly.
    I expect there to be some sort of post processing required to get it fully compatible.


  • administrators

    @Royassas said in Duet 3 Laser and PWM Frequency:

    @bearer Couldn't find an acceptable machine profile yet. Engraving and cutting probably needs the speed-adjusted update thats scheduled to come soon to duet3 firmware as @dc42 mentioned in other posts.

    It's been working in RRF3 for several months, not just on Duet 3 but on Duet WiFi/Ethernet too.

    @jay_s_uk said in Duet 3 Laser and PWM Frequency:

    Not yet but I am planning to upgrade to a duet board shortly.
    I expect there to be some sort of post processing required to get it fully compatible.

    I think the profiles used with Smoothieboard and grbl may work as-is.


Log in to reply