Power loss controlling laser via ttl on Duet 3



  • I'd love to get some advice from you guys.

    I'm using the new Duet 3 Motherboard 6HC + RPi (DSF Version: 3.1.1, RepRapFirmware for Duet 3 MB6HC 3.1.1 (2020-05-19b2)) and built my own laser using an SPT 100W red dot tube and an Cloudray 100W power supply. It moves, it lazes, but not consistently. I spent many nights troubleshooting and would love to get your input on the following problem:

    When i start a lazing job, initially the power is very high, but looses lots of power over the next 4-5cm - it finishes the job with this very low power (probably only about 20% of the acutal set power) - it sometimes doesn't even activate the laser anymore (which means less than about 5-6mA). During all this i get normal amperage readings (17mA for S0.5 = 50% PWM), which confuses me.

    Today i disconnected the power supply from the Duet 3 and controlled power via a potentiometer - no power loss here (I'm very happy about this - thought i killed the tube!). Below you'll find two test jobs i just lazed.

    20200721_141513.jpg
    Image: Left - 15mA via Potentiometer, Right - 17mA via TTL

    All this tells me I must be doing something wrong controlling the lasers power input via TTL:

    • I connected the 5V rail of the power supply to the "IN" port - which should give full power if activated via TTL.
    • I attach the ground-cable from the duets "out9" (the somewhat dedicated laser output port) to TTL_High "H" on the power supply and ground from the out9-port to ground on the power supply.
    • I'm overriding the waterpump-alarm on the power supply with a simple switch.

    This is my config.g:

    ; 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 I1              ; configure microstepping without interpolation
    M92 X53.33 Y53.33 Z3820.00       ; set steps per mm
    M566 X100.00 Y100.00 Z50.00      ; set maximum instantaneous speed changes (mm/min)
    M203 X20000.00 Y20000.00 Z500.00   ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.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 X1358 Y878 Z240 S0          ; set axis maxima
    
    ; Use Endstops
    M574 X2 S1 P"!io0.in"                    
    M574 Y1 S1 P"!io1.in+!io4.in"                
    M574 Z2 S1 P"!io2.in"              
    
    ; Laser
    M452 C"out9" R1 S1 Q20000 
    

    I think this should be all the information needed. I'm happy to provide more if I missed something.
    Thanks for your help


  • Moderator

    @Royassas I’m not a laser expert, so not sure I can help much. But I think to help, can you supply the Gcode file too? Is there a reason for using R1 rather than R255 in M452? Is the PSU expecting a 20000hz input for the TTL?

    Ian



  • @droftarts Thanks for your reply.
    I'm using R1 because i use LightBurn with the Smoothieboard-settings - i can't change the min/max S parameters in that profile.
    This is the GCode-File i used:

    ; LightBurn 0.9.14
    ; Smoothieware device profile, current position
    ; Bounds: X-0 Y0 to X100 Y100
    G00 G17 G40 G21
    G91
    M3
    ; Cut @ 500 mm/min, 50% power
    M106
    G4S5
    G0X45.43Y53.44
    G1Y-0.81S0.5F500
    G1X-0.01Y-0.66
    G1X-0.01Y-1.04
    G1X-0.02Y-1.43
    G1X-0.03Y-0.99
    G1X-0.02Y-0.79
    G1X-0.02Y-0.67
    G1X-0.01Y-0.59
    G1Y-0.55
    G1X0.03Y-0.52
    G1X0.05Y-0.5
    G1X0.08Y-0.47
    G1X0.12Y-0.46
    G1X0.15Y-0.43
    G1X0.2Y-0.42
    G1X0.24Y-0.38
    G1X0.28Y-0.35
    G1X0.34Y-0.32
    G1X0.38Y-0.27
    G1X0.43Y-0.22
    G1X0.47Y-0.16
    G1X0.51Y-0.1
    G1X0.55Y-0.03
    G1X0.57Y0.04
    G1X0.59Y0.12
    G1X0.61Y0.21
    G1X0.61Y0.28
    G1X0.6Y0.38
    G1X0.58Y0.46
    G1X0.56Y0.54
    G1X0.51Y0.63
    G1X0.46Y0.7
    G1X0.4Y0.78
    G1X0.32Y0.84
    G1X0.23Y0.89
    G1X0.15Y0.95
    G1X0.03Y0.97
    G1X-0.07Y0.99
    G1X-0.19Y1.01
    G1X-0.3Y0.99
    G1X-0.43Y0.97
    G1X-0.55Y0.94
    G1X-0.67Y0.88
    G1X-0.79Y0.81
    G1X-0.89Y0.73
    G1X-1Y0.62
    G1X-1.08Y0.52
    G1X-1.17Y0.39
    G1X-1.22Y0.25
    G1X-1.28Y0.11
    G1X-1.31Y-0.04
    G1X-1.31Y-0.2
    G1X-1.31Y-0.36
    G1X-1.29Y-0.52
    G1X-1.23Y-0.68
    G1X-1.17Y-0.83
    G1X-1.08Y-0.98
    G1X-0.96Y-1.12
    G1X-0.84Y-1.25
    G1X-0.7Y-1.35
    G1X-0.53Y-1.45
    G1X-0.21Y-0.76
    G1X-0.15Y-0.77
    G1X-0.12Y-0.78
    G1X-0.06Y-0.8
    G1X-0.01Y-0.8
    G1X0.03Y-0.81
    G1X0.09Y-0.81
    G1X0.13Y-0.82
    G1X0.19Y-0.8
    G1X0.23Y-0.81
    G1X0.29Y-0.79
    G1X0.34Y-0.78
    G1X0.39Y-0.76
    G1X0.44Y-0.75
    G1X1.03Y-1.42
    G1X1.2Y-1.31
    G1X1.39Y-1.17
    G1X0.75Y-0.53
    G1X0.78Y-0.49
    G1X0.83Y-0.45
    G1X0.85Y-0.4
    G1X0.88Y-0.35
    G1X0.91Y-0.3
    G1X0.94Y-0.25
    G1X0.95Y-0.19
    G1X0.97Y-0.14
    G1X0.99Y-0.09
    G1X0.99Y-0.03
    G1X1Y0.04
    G1X1Y0.09
    G1X1.01Y0.14
    G1X0.99Y0.21
    G1X0.99Y0.27
    G1X0.98Y0.33
    G1X0.96Y0.38
    G1X0.94Y0.44
    G1X0.92Y0.5
    G1X0.89Y0.56
    G1X0.86Y0.61
    G1X0.83Y0.66
    G1X0.78Y0.72
    G1X0.75Y0.76
    G1X0.7Y0.81
    G1X0.65Y0.85
    G1X0.6Y0.89
    G1X0.55Y0.94
    G1X0.49Y0.97
    G1X0.44Y1
    G1X0.37Y1.03
    G1X0.3Y1.05
    G1X0.25Y1.08
    G1X0.17Y1.1
    G1X0.11Y1.11
    G1X0.04Y1.12
    G1X-0.04Y1.12
    G1X-0.1Y1.13
    G1X-0.18Y1.13
    G1X-0.25Y1.12
    G1X-0.32Y1.11
    G1X-0.39Y1.09
    G1X-0.46Y1.08
    G1X-0.53Y1.05
    G1X-0.6Y1.03
    G1X-0.67Y0.99
    G1X-0.73Y0.96
    G1X-0.79Y0.92
    G1X-0.86Y0.87
    G1X-0.92Y0.83
    G1X-0.97Y0.78
    G1X-1.02Y0.72
    G1X-1.07Y0.67
    G1X-1.12Y0.61
    G1X-1.16Y0.54
    G1X-1.19Y0.48
    G1X-1.24Y0.41
    G1X-1.26Y0.34
    G1X-1.29Y0.26
    G1X-1.3Y0.2
    G1X-1.33Y0.11
    G1X-1.34Y0.04
    G1X-1.34Y-0.03
    G1X-1.34Y-0.12
    G1X-1.34Y-0.19
    G1X-1.34Y-0.28
    G1X-1.32Y-0.35
    G1X-1.3Y-0.42
    G1X-1.28Y-0.51
    G1X-1.25Y-0.58
    G1X-1.21Y-0.66
    G1X-1.18Y-0.72
    G1X-1.14Y-0.8
    G1X-1.09Y-0.87
    G1X-1.03Y-0.93
    G1X-0.98Y-0.99
    G1X-0.92Y-1.06
    G1X-0.85Y-1.11
    G1X-0.79Y-1.16
    G1X-0.72Y-1.21
    G1X-0.63Y-1.26
    G1X-0.57Y-1.3
    G1X-0.48Y-1.33
    G1X-0.39Y-1.36
    G1X-0.31Y-1.39
    G1X-0.23Y-1.41
    G1X-0.13Y-1.43
    G1X-0.04Y-1.44
    G1X0.04Y-1.45
    G1X0.14Y-1.44
    G1X0.24Y-1.44
    G1X0.32Y-1.43
    G1X0.42Y-1.42
    G1X0.51Y-1.39
    G1X0.6Y-1.37
    G1X0.68Y-1.34
    G1X0.78Y-1.3
    G1X0.85Y-1.26
    G1X0.95Y-1.21
    G1X1.02Y-1.16
    G1X1.09Y-1.1
    G1X1.17Y-1.04
    G1X1.24Y-0.98
    G1X1.3Y-0.91
    G1X1.37Y-0.83
    G1X1.42Y-0.75
    G1X1.47Y-0.68
    G1X1.52Y-0.59
    G1X0.77Y-0.26
    G1X0.78Y-0.24
    G1X0.8Y-0.22
    G1X0.8Y-0.2
    G1X0.81Y-0.17
    G1X0.81Y-0.15
    G1X0.82Y-0.13
    G1X0.83Y-0.1
    G1X0.83Y-0.08
    G1X0.84Y-0.06
    G1X0.83Y-0.03
    G1X0.84Y-0.01
    G1X0.85Y0.02
    G1X0.84Y0.04
    G1X0.84Y0.07
    G1X0.84Y0.09
    G1X0.84Y0.11
    G1X0.84Y0.14
    G1X0.83Y0.17
    G1X0.83Y0.19
    G1X0.83Y0.21
    G1X0.82Y0.23
    G1X0.81Y0.26
    G1X0.81Y0.29
    G1X0.8Y0.31
    G1X0.79Y0.33
    G1X0.78Y0.35
    G1X0.77Y0.38
    G1X1.51Y0.83
    G1X1.45Y0.91
    G1X1.4Y1
    G1X1.34Y1.08
    G1X1.28Y1.17
    G1X1.2Y1.23
    G1X1.12Y1.31
    G1X1.05Y1.38
    G1X0.95Y1.44
    G1X0.45Y0.75
    G1X0.42Y0.75
    G1X0.4Y0.77
    G1X0.37Y0.78
    G1X0.35Y0.8
    G1X0.33Y0.8
    G1X0.3Y0.82
    G1X0.27Y0.82
    G1X0.25Y0.84
    G1X0.22Y0.84
    G1X0.2Y0.85
    G1X0.17Y0.86
    G1X0.14Y0.86
    G1X0.11Y0.87
    G1X0.09Y0.87
    G1X0.06Y0.87
    G1X0.03Y0.88
    G1Y0.88
    G1X-0.02Y0.89
    G1X-0.06Y0.88
    G1X-0.08Y0.88
    G1X-0.11Y0.88
    G1X-0.14Y0.88
    G1X-0.17Y0.88
    G1X-0.19Y0.87
    G1X-0.22Y0.87
    G1X-0.25Y0.86
    G1X-0.28Y0.85
    G1X-0.31Y0.85
    G1X-0.33Y0.85
    G1X-0.36Y0.83
    G1X-0.39Y0.82
    G1X-0.42Y0.81
    G1X-0.44Y0.81
    G1X-0.47Y0.79
    G1X-0.49Y0.77
    G1X-0.52Y0.77
    G1X-0.54Y0.75
    G1X-0.57Y0.74
    G1X-0.6Y0.72
    G1X-1.25Y1.39
    G1X-1.35Y1.32
    G1X-1.44Y1.24
    G1X-1.51Y1.16
    G1X-0.79Y0.55
    G1X-0.8Y0.53
    G1X-0.83Y0.51
    G1X-0.84Y0.48
    G1X-0.86Y0.46
    G1X-0.87Y0.43
    G1X-0.89Y0.41
    G1X-0.9Y0.38
    G1X-0.91Y0.36
    G1X-0.93Y0.33
    G1X-0.94Y0.31
    G1X-0.95Y0.28
    G1X-0.96Y0.25
    G1X-0.97Y0.22
    G1X-0.98Y0.2
    G1X-0.98Y0.17
    G1X-1Y0.14
    G1X-0.99Y0.11
    G1X-1.01Y0.08
    G1X-1Y0.06
    G1X-1.01Y0.02
    G1X-1.01
    G1X-1.01Y-0.03
    G1X-1.02Y-0.07
    G1X-1.01Y-0.09
    G1X-1.01Y-0.12
    G1X-1Y-0.15
    G1X-1.01Y-0.18
    G1X-1Y-0.21
    G1X-0.99Y-0.23
    G1X-0.99Y-0.27
    G1X-0.98Y-0.3
    G1X-0.97Y-0.32
    G1X-0.96Y-0.35
    G1X-0.95Y-0.38
    G1X-0.94Y-0.41
    G1X-0.93Y-0.44
    G1X-0.91Y-0.46
    G1X-0.9Y-0.49
    G1X-0.89Y-0.52
    G1X-0.87Y-0.54
    G1X-0.86Y-0.57
    G1X-0.84Y-0.6
    G1X-0.82Y-0.62
    G1X-0.8Y-0.64
    G1X-0.78Y-0.67
    G1X-1.5Y-1.4
    G1X-0.71Y-0.74
    G1X-0.7Y-0.75
    G1X-0.67Y-0.78
    G1X-0.65Y-0.8
    G1X-0.62Y-0.82
    G1X-0.6Y-0.84
    G1X-0.57Y-0.85
    G1X-0.54Y-0.87
    G1X-0.52Y-0.89
    G1X-0.48Y-0.9
    G1X-0.46Y-0.92
    G1X-0.44Y-0.94
    G1X-0.4Y-0.95
    G1X-0.37Y-0.96
    G1X-0.34Y-0.97
    G1X-0.31Y-0.98
    G1X-0.28Y-0.99
    G1X-0.25Y-1
    G1X-0.22Y-1.01
    G1X-0.18Y-1.02
    G1X-0.15Y-1.02
    G1X-0.12Y-1.03
    G1X-0.09Y-1.04
    G1X-0.05Y-1.03
    G1X-0.02Y-1.04
    G1X0.01Y-1.04
    G1X0.05Y-1.05
    G1X0.08Y-1.04
    G1X0.11Y-1.04
    G1X0.15Y-1.04
    G1X0.18Y-1.03
    G1X0.21Y-1.03
    G1X0.25Y-1.03
    G1X0.28Y-1.02
    G1X0.31Y-1.01
    G1X0.34Y-1
    G1X0.38Y-1
    G1X0.41Y-0.99
    G1X0.44Y-0.97
    G1X0.48Y-0.96
    G1X0.5Y-0.95
    G1X0.54Y-0.94
    G1X0.56Y-0.92
    G1X0.6Y-0.91
    G1X0.63Y-0.89
    G1X0.65Y-0.87
    G1X0.68Y-0.86
    G1X0.72Y-0.84
    G1X0.74Y-0.81
    G1X0.76Y-0.8
    G1X0.8Y-0.77
    G1X0.81Y-0.75
    G1X0.85Y-0.73
    G1X0.86Y-0.71
    G1X0.89Y-0.68
    G1X0.92Y-0.66
    G1X0.93Y-0.63
    G1X0.96Y-0.6
    G1X0.98Y-0.58
    G1X0.99Y-0.55
    G1X1.02Y-0.52
    G1X1.03Y-0.5
    G1X1.05Y-0.46
    G1X1.06Y-0.43
    G1X1.08Y-0.41
    G1X1.1Y-0.37
    G1X1.1Y-0.34
    G1X1.12Y-0.31
    G1X1.13Y-0.28
    G1X1.14Y-0.24
    G1X1.15Y-0.21
    G1X1.16Y-0.18
    G1X1.16Y-0.15
    G1X1.17Y-0.11
    G1X1.17Y-0.08
    G1X1.18Y-0.05
    G1X1.18Y-0.01
    G1X1.18Y0.02
    G1X1.18Y0.06
    G1X1.18Y0.09
    G1X1.18Y0.13
    G1X1.18Y0.15
    G1X1.17Y0.2
    G1X1.17Y0.23
    G1X1.16Y0.26
    G1X1.15Y0.29
    G1X1.15Y0.33
    G1X1.14Y0.36
    G1X1.12Y0.4
    G1X1.11Y0.42
    G1X1.11Y0.46
    G1X1.08Y0.5
    G1X1.08Y0.52
    G1X1.05Y0.56
    G1X1.04Y0.58
    G1X1.02Y0.62
    G1X1.01Y0.65
    G1X0.98Y0.67
    G1X0.96Y0.71
    G1X0.94Y0.73
    G1X0.92Y0.77
    G1X0.89Y0.78
    G1X0.87Y0.82
    G1X0.85Y0.84
    G1X0.82Y0.87
    G1X0.79Y0.89
    G1X0.76Y0.91
    G1X0.74Y0.94
    G1X0.7Y0.96
    G1X0.68Y0.98
    G1X0.64Y1
    G1X0.61Y1.02
    G1X0.58Y1.04
    G1X0.55Y1.05
    G1X0.52Y1.08
    G1X0.48Y1.09
    G1X0.44Y1.1
    G1X0.41Y1.12
    G1X0.38Y1.13
    G1X0.34Y1.14
    G1X0.3Y1.15
    G1X0.27Y1.16
    G1X0.23Y1.18
    G1X0.19Y1.17
    G1X0.15Y1.19
    G1X0.12Y1.19
    G1X0.08Y1.19
    G1X0.04Y1.2
    G1Y1.2
    G1X-0.04Y1.21
    G1X-0.07Y1.2
    G1X-0.11Y1.2
    G1X-0.16Y1.19
    G1X-0.19Y1.2
    G1X-0.23Y1.19
    G1X-0.26Y1.18
    G1X-0.31Y1.18
    G1X-0.34Y1.17
    G1X-0.39Y1.16
    G1X-0.41Y1.15
    G1X-0.46Y1.14
    G1X-0.49Y1.13
    G1X-0.53Y1.11
    G1X-0.57Y1.1
    G1X-0.6Y1.09
    G1X-0.64Y1.06
    G1X-0.67Y1.05
    G1X-0.71Y1.03
    G1X-0.74Y1.02
    G1X-0.77Y0.99
    G1X-0.8Y0.97
    G1X-0.84Y0.95
    G1X-0.87Y0.92
    G1X-0.9Y0.9
    G1X-0.92Y0.87
    G1X-0.96Y0.85
    G1X-0.98Y0.82
    G1X-1.02Y0.8
    G1X-1.03Y0.76
    G1X-1.07Y0.74
    G1X-1.09Y0.7
    G1X-1.11Y0.68
    G1X-1.13Y0.64
    G1X-1.16Y0.61
    G1X-1.17Y0.58
    G1X-1.2Y0.55
    G1X-1.21Y0.51
    G1X-1.23Y0.47
    G1X-1.25Y0.45
    G1X-1.26Y0.4
    G1X-1.28Y0.37
    G1X-1.28Y0.33
    G1X-1.31Y0.3
    G1X-1.31Y0.26
    G1X-1.32Y0.22
    G1X-1.33Y0.18
    G1X-1.33Y0.15
    G1X-1.34Y0.1
    G1X-1.35Y0.07
    G1X-1.35Y0.03
    G1X-1.35Y-0.01
    G1X-1.35Y-0.05
    G1X-1.35Y-0.09
    G1X-1.35Y-0.12
    G1X-1.34Y-0.17
    G1X-1.35Y-0.2
    G1X-1.33Y-0.25
    G1X-1.33Y-0.28
    G1X-1.32Y-0.32
    G1X-1.31Y-0.36
    G1X-1.31Y-0.4
    G1X-1.28Y-0.43
    G1X-1.28Y-0.47
    G1X-1.26Y-0.51
    G1X-1.25Y-0.55
    G1X-1.23Y-0.58
    G1X-1.21Y-0.62
    G1X-1.2Y-0.66
    G1X-1.17Y-0.69
    G1X-1.15Y-0.72
    G1X-1.13Y-0.76
    G1X-1.11Y-0.79
    G1X-1.08Y-0.82
    G1X-1.06Y-0.85
    G1X-1.02Y-0.89
    G1X-1.01Y-0.92
    G1X-0.97Y-0.94
    G1X-0.94Y-0.98
    G1X-0.92Y-1
    G1X-0.88Y-1.03
    G1X-0.85Y-1.05
    G1X-0.81Y-1.08
    G1X-0.78Y-1.11
    G1X-0.75Y-1.13
    G1X-0.71Y-1.15
    G1X-0.67Y-1.17
    G1X-0.64Y-1.19
    G1X-0.6Y-1.21
    G1X-0.56Y-1.23
    G1X-0.52Y-1.25
    G1X-0.49Y-1.26
    G1X-0.44Y-1.28
    G1X-0.4Y-1.29
    G1X-0.36Y-1.3
    G1X-0.32Y-1.31
    G1X-0.28Y-1.33
    G1X-0.23Y-1.33
    G1X-0.19Y-1.34
    G1X-0.15Y-1.35
    G1X-0.11Y-1.35
    G1X-0.06Y-1.36
    G1X-0.02Y-1.36
    G1X0.02Y-1.36
    G1X0.07Y-1.36
    G1X0.11Y-1.36
    G1X0.16Y-1.36
    G1X0.2Y-1.35
    G1X0.24Y-1.35
    G1X0.29Y-1.35
    G1X0.33Y-1.33
    G1X0.37Y-1.33
    G1X0.42Y-1.32
    G1X0.46Y-1.3
    G1X0.5Y-1.3
    G1X0.54Y-1.28
    G1X0.58Y-1.26
    G1X0.63Y-1.25
    G1X0.66Y-1.23
    G1X0.71Y-1.22
    G1X0.74Y-1.19
    G1X0.79Y-1.18
    G1X0.82Y-1.15
    G1X0.86Y-1.13
    G1X0.9Y-1.1
    G1X0.93Y-1.08
    G1X0.97Y-1.06
    G1X1Y-1.02
    G1X1.03Y-1
    G1X1.07Y-0.97
    G1X1.1Y-0.94
    G1X1.13Y-0.9
    G1X1.16Y-0.88
    G1X1.19Y-0.84
    G1X1.22Y-0.81
    G1X1.24Y-0.78
    G1X1.27Y-0.73
    G1X1.3Y-0.71
    G1X1.32Y-0.66
    G1X1.34Y-0.63
    G1X1.36Y-0.59
    G1X1.38Y-0.55
    G1X1.4Y-0.51
    G1X1.41Y-0.48
    G1X1.44Y-0.43
    G1X1.44Y-0.39
    G1X1.46Y-0.35
    G1X1.48Y-0.3
    G1X1.48Y-0.27
    G1X1.49Y-0.22
    G1X1.51Y-0.18
    G1X1.5Y-0.13
    G1X1.52Y-0.1
    G1X1.51Y-0.04
    G1X1.52Y-0.01
    G1X1.52Y0.04
    G1X1.53Y0.08
    G1X1.51Y0.13
    G1X1.52Y0.17
    G1X1.51Y0.21
    G1X1.51Y0.26
    G1X1.49Y0.3
    G1X1.49Y0.35
    G1X1.48Y0.38
    G1X1.47Y0.44
    G1X1.45Y0.47
    G1X1.44Y0.51
    G1X1.43Y0.56
    G1X1.4Y0.6
    G1X1.39Y0.64
    G1X1.37Y0.68
    G1X1.35Y0.72
    G1X1.33Y0.76
    G1X1.3Y0.8
    G1X1.28Y0.83
    G1X1.25Y0.88
    G1X1.22Y0.91
    G1X1.2Y0.94
    G1X1.16Y0.98
    G1X1.14Y1.02
    G1X1.1Y1.05
    G1X1.07Y1.08
    G1X1.04Y1.11
    G1X1Y1.14
    G1X0.96Y1.17
    G1X0.93Y1.2
    G1X0.89Y1.23
    G1X0.85Y1.26
    G1X0.81Y1.27
    G1X0.77Y1.31
    G1X0.73Y1.33
    G1X0.69Y1.34
    G1X0.64Y1.37
    G1X0.6Y1.39
    G1X0.56Y1.41
    G1X0.51Y1.42
    G1X0.46Y1.44
    G1X0.22Y0.72
    G1X0.2Y0.73
    G1X0.2Y0.73
    G1X0.18Y0.74
    G1X0.17Y0.74
    G1X0.15Y0.74
    G1X0.15Y0.74
    G1X0.13Y0.74
    G1X0.12Y0.75
    G1X0.11Y0.75
    G1X0.1Y0.75
    G1X0.09Y0.75
    G1X0.07Y0.76
    G1X0.06Y0.75
    G1X0.05Y0.76
    G1X0.04Y0.76
    G1X0.03Y0.76
    G1X0.01Y0.76
    G1Y0.76
    G1X-0.01Y0.76
    G1X-0.02Y0.76
    G1X-0.04Y0.76
    G1X-0.05Y0.76
    G1X-0.06Y0.76
    G1X-0.07Y0.76
    G1X-0.09Y0.76
    G1X-0.09Y0.75
    G1X-0.11Y0.76
    G1X-0.12Y0.76
    G1X-0.14Y0.75
    G1X-0.14Y0.75
    G1X-0.16Y0.75
    G1X-0.17Y0.75
    G1X-0.18Y0.75
    G1X-0.19Y0.74
    G1X-0.21Y0.74
    G1X-0.22Y0.74
    G1X-0.23Y0.74
    G1X-0.24Y0.73
    G1X-0.25Y0.73
    G1X-0.55Y1.45
    G1X-0.59Y1.43
    G1X-0.63Y1.42
    G1X-0.68Y1.4
    G1X-0.73Y1.38
    G1X-0.77Y1.36
    G1X-0.82Y1.34
    G1X-0.86Y1.32
    G1X-0.9Y1.29
    G1X-0.94Y1.27
    G1X-0.99Y1.24
    G1X-1.03Y1.21
    G1X-1.06Y1.19
    G1X-1.1Y1.15
    G1X-1.15Y1.13
    G1X-1.17Y1.09
    G1X-1.22Y1.05
    G1X-1.25Y1.03
    G1X-1.28Y0.98
    G1X-1.31Y0.96
    G1X-1.35Y0.91
    G1X-1.38Y0.87
    G1X-1.4Y0.84
    G1X-1.43Y0.8
    G1X-1.46Y0.75
    G1X-1.48Y0.72
    G1X-1.51Y0.67
    G1X-1.53Y0.62
    G1X-0.77Y0.3
    G1X-0.78Y0.29
    G1X-0.79Y0.27
    G1X-0.78Y0.27
    G1X-0.79Y0.25
    G1X-0.8Y0.24
    G1X-0.8Y0.23
    G1X-0.81Y0.22
    G1X-0.8Y0.21
    G1X-0.82Y0.2
    G1X-0.81Y0.18
    G1X-0.82Y0.17
    G1X-0.82Y0.16
    G1X-0.83Y0.15
    G1X-0.82Y0.14
    G1X-0.83Y0.13
    G1X-0.84Y0.11
    G1X-0.83Y0.1
    G1X-0.84Y0.09
    G1X-0.84Y0.08
    G1X-0.84Y0.06
    G1X-0.84Y0.06
    G1X-0.84Y0.04
    G1X-0.84Y0.03
    G1X-0.85Y0.02
    G1X-0.84
    G1X-0.84Y-0.01
    G1X-0.85Y-0.02
    M107
    G1S0
    M5
    ; return to starting pos
    G0 X-43.68Y-99.97
    M2
    

    No reason for the 20'000 Hz, i think i read that the duet 3 can output 65khz max. - i can't find any recommandations on the cloudray power supply specs for this. I'm using this one: 100W CO2 Laser Power Supply MYJG-100W LCD. My nooby self expects a smoother average voltage with higher PWM-frequency.



  • I'm hoping to get a grip on an oscilloscope in the next couple of days to check the PWM output



  • Ok - problem solved! A new member of our makerspace brought his scope. Turns out, there's a little glitch in the documentation of possible Gcodes für the M452 command:

    @dc42 I suggested the following correction of the at GCode Wiki:

    M452 C"exp.heater3" F100 ; laser uses heater3 pin, PWM frequency 100Hz
    

    instead of:

    M452 C"exp.heater3" Q100 ; laser uses heater3 pin, PWM frequency 100Hz
    

    That letter must have cost me 5 nights 😉

    With this change I got to play with the PWM-frequency:

    • If i set it too low, for example to 500Hz - the default if no F parameter is set, I got the problem described above.
    • If i set it too high, for example the maximum of about 65kHz, i oversaturated my power supply and the laser kept burning at maximum power.

    In the end i settled for 12500Hz - and lazing is fun again!!
    20200722_230343.jpg


  • Moderator

    @Royassas well spotted, and sorry for the wasted time! I’ve accepted your edits to the Gcode page.

    It probably would have helped if sending M452 with no parameters reported the current settings, then you would have seen the frequency was not changing, but M451/452/453 were originally defined (not by us) to have no parameters. So they switch modes without any. M450 reports the mode (CNC/laser/3D printer) but not the parameters. I’ve asked @dc42 if he can add parameter reporting to M450.

    Ian


Log in to reply