Issue getting Laser to work

Basic Information:

MPCNC with DLC Aenbuslm 10 watt laser
MCU / Printerboard: Mellow Fly D5
Host / SBC: Orange Pi Zero 3W
klippy (4).log (4.6 MB)

klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

[pwm_tool LASER]
pin: !PC8
hardware_pwm: True
cycle_time: 0.001
shutdown_value: 0

[gcode_macro M3]
gcode:
    {% set S = params.S|default(0.0)|float %}
    SET_PIN PIN=LASER VALUE={S / 255.0}

[gcode_macro M5]
gcode:
    SET_PIN PIN=LASER VALUE=0

[gcode_macro LASER_ON]
gcode:
    SET_PIN PIN=LASER VALUE=1

[gcode_macro LASER_OFF]
gcode:
    SET_PIN PIN=LASER VALUE=0

This is part of my config that pertains to the laser. With the Macros I can turn on and off the laser. I can also get it to turn on and off at any % I want with the slider. However, when I send M3 S0.5 or any other M3 SXXX it does nothing. I am sure I am missing something, but a few hours of Google and searching here, I just can’t seem to find what I have done wrong.

For what its worth, I was able to get the Laser working. The PWM needs a 0-1 signal and I had {S / 255.0}, so it was dividing the 1 by 255 and that number was so small the laser did not turn on.
I now have it working with Air Assist.
Currently the biggest struggle is outside of Klipper. None of the popular Laser Softwares play nice with Klipper. So far, Laser Web has been the easiest to get to work.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.