Hello!
I have a laser driver board that uses a TTL signal in to pulse a laser diode to achieve a desired power level. When the TTL pin is high, it turns the laser on.
When I used a marlin electronics set up, it was connected to the fan output and I just "pretended" that the output was PWM'ing the fan, when in fact it was PWM'ing the laser. This setup worked with my MATLAB code to engrave with the laser by setting the fan (laser) to a higher pwm on areas desired to be darker and lower PWM on areas desired to be lighter.
On smoothieboard I'd like to accomplish the same thing so I have it set up as follows:
#switch.laser.enable true # LASER
#switch.laser.input_on_command M106 #
#switch.laser.input_off_command M107 #
#switch.laser.output_pin 2.4 #
#switch.laser.output_type pwm # pwm
switch.laser.max_pwm 255 # set max pwm for the pin default is 255
switch.laser.startup_value 10 # starts laser at 10
The LCD menu entry I have for controlling ht laser is:
custom_menu.laser_on.enable true #
custom_menu.laser_on.command M106 S5 #
custom_menu.laser_on1.enable true #
custom_menu.laser_on1.command M106 S100 #
custom_menu.laser_off.enable true #
custom_menu.laser_off.command M107 #
The Iaser controller is attached to pin 2.4, and I can turn the laser on with either of the two pwm levels, or by setting a start-up value, however, the laser just comes on to full power immediately (PWM @ 255, instead of 5 or 100), and neither above command has any effect. I can limit the power by changing the max_pwm parameter, in which case the laser comes on to the maximum allowed PWM immediately and the commands have no effect.
I'm not sure why the LCD commands have no effect, but at the moment I have no "host computer" so I cannot test whether the fan output is controllable via serial.
I'm not sure how to troubleshoot this issue, as it seems like it just isn't behaving as intended, or that I am missing a fundamental step of the module's code.