Using a Laser with the Duet 2 WiFi

  • I have my printer working pretty well now. I am now getting my laser set up on it and have a few questions for those that use it for both printing and Laser.

    Do you use two different config.g files to switch between the functions?
    Does it matter if I use Fan2 or a heater pin on the expansion pins?
    Can I add the Laser as a new tool even though no heater or thermistor is attached to it?
    Any pointer you want to send my way?


  • Moderator

    Have you seen these?

    The heater pins have more current than the fan pins I believe.

    You can define the laser tool without a heater

    And I think you should be able to use M505 to specify an alternate sys directory to have separate config files for printer and laser mode.

  • Thanks,
    I had read the first two.
    The third one I didn't read down far enough and I had not seen the fourth.

  • Well for some reason I cannot get this laser to work properly. The laser in question is from J Tech and the driver is here:

    It was working properly with my previous printer when I was using a Ramps board.

    I have tried using Fan2 with this in the config.g
    ; Laser w Fan
    M106 P2 H-1 ; Set Fan2 for laser PWM control, disable thermostat control
    M452 P22 R255 F200 ; switch to laser mode using the FAN-2 output pins to control the laser

    The laser will come on but it will not shut off or change intensity. I am using
    M106 Sxxx and

    So I then tried it with using the pin for Heater 4 and for power the 5v pin for the Panel Duet.

    ; Laser Heater
    ; M307 H4 A-1 C-1 D-1 ; Disable heater4 on PWM channel for Laser
    ; M452 P4 R255 F200 ; switch to laser mode using the heater 4 output pins (pin 13) to control the laser

    Same thing. Laser turns on but cant control after that. Wont shut off or change intensity with M3 Sxxx or M5

    Can anyone see what I am missing?

  • administrators

    To use a fan pin for M452, you first need to disable the fan. In RRF2 this is done by sending M106 P# I-1 where # is the fan number.

    To use a heater output on the expansion bus, you would need to invert the output using I1 in the M452 command.

    I don't recommend either solution, because in both cases the laser will default to On at power up until config.g has executed the commands. The recommended way is to use a 74HCT02 chip to invert a heater output on the expansion bus, gate it with +3.3V and shift the level to 5V. There is another forum thread about doing this.

  • @dc42 On the driver I can set the control to be either high or low. Would that be the same as using the 74HCT02 chip?

Log in to reply