Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Laser always on

    Scheduled Pinned Locked Moved Solved
    Laser Cutters
    4
    19
    819
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shigaundefined
      shiga
      last edited by

      Hello everyone, please help me with my problem. There is a homemade delta on DUET that works perfectly, I connected the laser "http://nejetool.com/module_20w.html" to my DUET according to the diagram from "https://duet3d.dozuki.com/Wiki/Laser_PWM_control#Section_Controlling_a_PWM_Laser_with_a_Duet_2_Board" when the DUET is turned on, the laser is constantly on and is not controlled by any G-code, does not turn off does not change the power.!

      Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
      Firmware Electronics: Duet WiFi 1.02 or later
      Firmware Version: 2.02(RTOS) (2018-12-24b1)
      WiFi Server Version: 1.22
      Web Interface Version: 1.22.6

      My config.g
      ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool on Thu Jul 12 2018 20:54:00 GMT-0500 (Central Daylight Time)

      ; General preferences
      ;G90 ; Send absolute coordinates...
      ;M83 ; ...but relative extruder moves

      ;*** The homed height is deliberately set too high in the following - you will adjust it during calibration.

      ; After G32 auto-calibrate, copied from config-override.g
      ; Note: G31 Z (below) affects M665 H, and this is NOT yet calibrated.
      M665 L264 R124 H240 B120.0 X-0 Y-0 Z0
      M666 X-0 Y0 Z0 A0 B0

      ; Network
      M550 PAKL Plus ; Set machine name
      M552 S1 ; Enable network
      ;*** Access point is configured manually via M587
      M586 P0 S1 ; Enable HTTP
      M586 P1 S0 ; Disable FTP
      M586 P2 S0 ; Disable Telnet

      ; Drives
      M569 P0 S0 ; Drive 0 goes forwards
      M569 P1 S0 ; Drive 1 goes forwards
      M569 P2 S0 ; Drive 2 goes forwards
      M569 P3 S0 ; Drive 3 goes forwards
      M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
      M92 X80 Y80 Z80 E400 ; Set steps per mm
      M566 X300 Y300 Z300 E300 ; Set maximum instantaneous speed changes (mm/min)
      M203 X12000 Y12000 Z12000 E12000 ; Set maximum speeds (mm/min)
      M201 X1000 Y1000 Z1000 E1500 ; Set accelerations (mm/s^2)
      M906 X1000 Y1000 Z1000 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
      M84 S30 ; Set idle timeout

      ; Axis Limits
      M208 Z0 S1 ; Set minimum Z

      ; Endstops
      M574 X2 Y2 Z2 S1 ; Set active high endstops

      ; Z-Probe
      M558 P4 H6 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
      G31 P1000 X0 Y0 Z13.48 ; Set Z probe trigger value, offset and trigger height
      M557 R105 S20 ; Define mesh grid

      ; Heaters
      M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
      M143 H0 S150 ; Set temperature limit for heater 0 to 120C
      M305 P1 X501 R4700 ; Set thermistor + ADC parameters for heater 1
      M143 H1 S350 ; Set temperature limit for heater 1 to 280C

      ; Fans
      M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
      M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
      M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on

      ; Tools
      M563 P0 D0 H1 ; Define tool 0
      G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
      G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

      ; Automatic power saving
      M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

      ; Custom settings are not configured

      ; Miscellaneous
      M501 ; Load saved parameters from non-volatile memory
      T0 ; Select first tool

      M307 H3 A-1 C-1 D-1 ; Disable Heater output on H3
      M452 P3 S1 R1.00 F2000 ; Enable Laser mode, on output 3 (heater 3), with max intensity being 1.00, and a PWM frequency of 2000
      M571 P3 F200 S0IMG_20200807_203959.jpg

      My mail: d7a7r7@mail.ru

      Phaedruxundefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        Have you connected pin 7 of the 74HCT02 chip to ground? When you click on the schematic to expand it, there is a short section of wire missing from the enlarged schematic.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        shigaundefined 1 Reply Last reply Reply Quote 0
        • shigaundefined
          shiga
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • shigaundefined
            shiga @dc42
            last edited by

            @dc42 да 7 булавок на земле, я делаю это в соответствии с инструкциями ВикиIMG_20200809_100128.jpg IMG_20200807_203959.jpg

            shigaundefined 1 Reply Last reply Reply Quote 0
            • shigaundefined
              shiga @shiga
              last edited by

              @shiga said in Laser always on:

              @dc42 да 7 булавок на земле, я делаю это в соответствии с инструкциями ВикиIMG_20200809_100128.jpg IMG_20200807_203959.jpg

              pin heater 3 is present at 3.3 volts, switching on without sd card is also present at 3.3 volts.

              1 Reply Last reply Reply Quote 0
              • arhiundefined
                arhi
                last edited by

                Check your driver without duet. I made the similar adapter (same schematic) for @omni 's lazor and when I turned the duet on lazor was 100% on. I turned lazor on from the duet and it turned off :D. So I removed the whole adapter that's inverting the PWM signal (and rising it to 5V) and connected heater.3 directly to PWM pin of the laser driver and now it works ok. When I expect laser to be off it's off, when I expect it to be on, it's on. Power nicely go from 0 to 100%. The only issue is when I turn the duet on for the first time (poweron) the laser turn on and back off. The on period is very short but it is visible. It will not be a problem as the main power to the laser is manually controled via switch and normally laser will receive it's 12V after the duet is powered on :).

                So check what polarity your PWM port want to turn on/off the laser, maybe you do not need to be inverting it.

                shigaundefined 1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator @shiga
                  last edited by

                  @shiga said in Laser always on:

                  Firmware Version: 2.02(RTOS) (2018-12-24b1)
                  WiFi Server Version: 1.22
                  Web Interface Version: 1.22.6

                  Update your firmware to at least 2.05.1

                  Z-Bot CoreXY Build | Thingiverse Profile

                  shigaundefined 1 Reply Last reply Reply Quote 0
                  • shigaundefined
                    shiga @Phaedrux
                    last edited by

                    @Phaedrux updated. this solution didn't help!

                    1 Reply Last reply Reply Quote 0
                    • shigaundefined
                      shiga @arhi
                      last edited by

                      @arhi please tell me how you did it? how did you raise it to 5 volts? And what was the piece of config.g and the circuit at least by hand, how did you connect it?

                      arhiundefined 1 Reply Last reply Reply Quote 0
                      • arhiundefined
                        arhi @shiga
                        last edited by arhi

                        @shiga said in Laser always on:

                        @arhi please tell me how you did it? how did you raise it to 5 volts? And what was the piece of config.g and the circuit at least by hand, how did you connect it?

                        originally I used same circuit as you have here

                        08c8efea-01ad-4783-b4e9-a0ecc37ba452-image.png

                        so 3v to 1AB and 1Y to 2A and heater3 to 2B, this inverts the output of the heater3 and outputs it on 2Y at 5V level, and that 2Y I connected to PWM input on the laser driver (it is some aliexpress 15W laser with external driver that has a fan on itself)

                        and this made laser ON during idle, when I do G1X10S255 the laser goes off, if I do G1X10S125 laser goes to 50% power, G1X10S10 laser go to 90% power ..

                        so this driver obviously need non-inverted signal so what I did is just REMOVE the whole 74hct02 and connected HEATER3 DIRECTLY TO PWM on the laser driver, obviously this laser driver do not have a problem with 3V on the pwm so no need to get the signal up to 5V

                        when I power on duet laser blinks for a moment (milliseconds or less) and is off, when I do G1X10S10 it is at 10% during the move, G1X10S255 it is at 100% during the move, and it is off after the move

                        The only config line required:

                        M452 C"exp.heater3" F100 R255 S0 ; laser uses heater3 pin,  PWM frequency 100Hz, 0-255 is 0-100%, not sticky use S with G1
                        
                        shigaundefined 1 Reply Last reply Reply Quote 0
                        • shigaundefined
                          shiga @arhi
                          last edited by

                          @arhi I did as you said, I connected the pwm directly, the laser was controlled, but not at full power, it was very dim, and did not shoot at S255. The macro to turn on the laser mode is as follows:
                          M563 P0 D-1 H-1; clear tool
                          M563 P0 D0; create a tool - no heaters
                          M307 H3 A-1 C-1 D-1; Clear heater
                          M452 P3 R255 F20000 I0
                          what should I do next?

                          arhiundefined 1 Reply Last reply Reply Quote 0
                          • arhiundefined
                            arhi @shiga
                            last edited by

                            @shiga so if you do

                            G1X10S0
                            

                            your laser will move and will be OFF

                            and if you do then

                            G1X20S255
                            

                            it will move and be ON but not 100% ?

                            shigaundefined 1 Reply Last reply Reply Quote 0
                            • shigaundefined
                              shiga @arhi
                              last edited by

                              @arhi said in Laser always on:

                              so if you do
                              G1X10S0

                              your laser will move and will be OFF
                              and if you do then
                              G1X20S255

                              it will move and be ON but not 100% ?

                              yes, quite right. g1x10s10 is dim, g1x10s100 is brighter, g1x10s255 is off. and if g1x10s250 also shines like on s100.grp.jpg

                              1 Reply Last reply Reply Quote 0
                              • arhiundefined
                                arhi
                                last edited by

                                dunno, that makes no sense to me, maybe your driver requires 5V pwm and will not work with 3.3V pwm, so you need to use that hct02 to up the signal to 5V but you need to get that signal trough one more part to invert it .. so instead of using 2Y as output, feed 2Y to 3A and 3B and use 3Y as output (should be inverse of what 2Y was)

                                shigaundefined 1 Reply Last reply Reply Quote 0
                                • shigaundefined
                                  shiga @arhi
                                  last edited by

                                  @arhi Many thanks for the help! the problem was resolved, it was a bad 74HCT02, from a batch of 5 pieces all were inoperative, replaced from another shop and it all worked!
                                  small question: which program is the best to use for engraving with DUET?

                                  arhiundefined 1 Reply Last reply Reply Quote 0
                                  • arhiundefined
                                    arhi @shiga
                                    last edited by

                                    @shiga said in Laser always on:

                                    bad 74HCT02

                                    auch 😞

                                    small question: which program is the best to use for engraving with DUET?

                                    no idea. I know that visicut is often mentioned on some forums for DIY machines (grbl, smoothie...) but I have never owned an engraver and the small experience I do have with it I generated the code myself using c so I doubt anyone would fund that useful 😄 ... probbly someone with engraver can give you some hints but probbly setup a specific topic for that on forum as that will give it more visibility

                                    1 Reply Last reply Reply Quote 0
                                    • arhiundefined
                                      arhi
                                      last edited by

                                      btw how do you know your laser is outputting X% at any time (not knowing what the PWM pin is doing) ? you have something to measure the ray impact or ?

                                      shigaundefined 1 Reply Last reply Reply Quote 0
                                      • shigaundefined
                                        shiga @arhi
                                        last edited by

                                        @arhi I'm looking at the current consumption.

                                        shigaundefined 1 Reply Last reply Reply Quote 0
                                        • shigaundefined
                                          shiga @shiga
                                          last edited by

                                          @shiga said in Laser always on:

                                          @arhi I'm looking at the current consumption.

                                          I look at the current consumption, and compare it with the PWM of the signals from the servo tester.
                                          1396_1.jpg

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA