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

    Duet 2 on RRF3: Servos not working

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    11
    797
    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.
    • felix9tundefined
      felix9t
      last edited by

      Hi there

      For some reason I can't get any servos (BLToucha and a cutting servo) running on the new beta firmware. It works just finde on the last RRF2. I get no error message, it is just not executed. Please tell me if you have any idea why executing M280 is not working. Here you find my config.g:

      ; above are only drive and endstop settings...
      
      ; Z-Probe (BLTouch)
      
      M558 P9 C"zprobe.in" H5 F120 T3000 ; BLTouch connected to Z probe IN pin
      M950 S0 C"exp.heater3" ; create servo/gpio 0 on heater 3 pin on expansion connector
      M280 P0 S10 ; send control signal to BLTouch through servo/gpio 0
      
      ; Heaters
      
      M308 S1 P"spi.cs1" Y"thermocouple-max31856" K"K"; define H2 temperature sensor
      M950 H1 C"e1heat" T1; define H1 heater for Tool 0
      
      ; Cutting Servo
      M950 S4 C"exp.heater4"
      
      ; Tools
      
      M563 P0 S"Printing Nozzle" D0 H1            ; Define tool 0
      M563 P1 S"Touch Probe"                            ; Define tool 1
      
      ; Define offset between Tool 0 and 1
      
      G10 P1 X0 Y0 Z5.75
      G10 P0 X14 Y-32 Z5.75 B-90 P25
      G10 P0 R0 S0
      
      ; Small last settings
      
      M302 P1           		 ; Enable Cold Extrusion
      G92 Z0				 ; Set Z to 0
      
      ; Automatic saving after power loss is not enabled
      
      
      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @felix9t
        last edited by

        Thanks for your report. We also have reports that BLTouch deployment and retraction doesn't work reliably on the 2.04RC3 release. These may be related. I will investigate.

        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

        1 Reply Last reply Reply Quote 1
        • felix9tundefined
          felix9t
          last edited by

          Hi dc42,

          unfortunately servos also don't work on the newly updated firmware. They move slightly on M950 P... (500Hz) but not on M950 S... (50Hz). Also using the Q command makes no difference.
          This is the code I use to move a servo on the new RRF 3:

          ; The next two lines are in config.g:
          M950 P4 C"nil"
          M950 S4 C"exp.heater4"
          ; The next two lines are in a macro gcode:
          ;cutting code
          M280 P4 S20;reset
          G4 P10;wait
          M280 P4 S170;cutting
          G4 P800;wait
          M280 P4 S20;reset
          G4 P300;wait
          ;cutting code end
          

          Would be great to here if you have any idea why that is? Thanks!

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

            @felix9t said in Duet 2 on RRF3: Servos not working:

            Hi dc42,

            unfortunately servos also don't work on the newly updated firmware. They move slightly on M950 P... (500Hz) but not on M950 S... (50Hz). Also using the Q command makes no difference.
            This is the code I use to move a servo on the new RRF 3:

            ; The next two lines are in config.g:
            M950 P4 C"nil"
            M950 S4 C"exp.heater4"
            ; The next two lines are in a macro gcode:
            ;cutting code
            M280 P4 S20;reset
            G4 P10;wait
            M280 P4 S170;cutting
            G4 P800;wait
            M280 P4 S20;reset
            G4 P300;wait
            ;cutting code end
            

            Would be great to here if you have any idea why that is? Thanks!

            I just tested that on a Duet WiFi. After M280 P4 I get 750us positive going pulses on exp.heater4 (measured on the expansion connector), frequency 59.9Hz according to my 'scope. After M280 P4 S170 I get 2.3us pulses, same frequency.

            The formula used by RRF in computing the pulse width is as follows (originally copied from Marlin):

            microseconds = (min<float>(S, 180.0) * ((MaxServoPulseWidth - MinServoPulseWidth) / 180.0)) + MinServoPulseWidth

            where the min and max pulse widths are 544 and 2400.

            So I conclude that it is working correctly, and I don't understand why it isn't working for you.

            PS - if I send M950 P5 Q100 then the next time I send a M280 P4 command, the pulse frequency increases to 100Hz.

            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

            felix9tundefined 1 Reply Last reply Reply Quote 0
            • felix9tundefined
              felix9t @dc42
              last edited by

              @dc42 Having seen your post I also checked the frequency on a multimeter and indeed it shows 49.9Hz when using S4 or P4 Q50 resp. 499.8Hz when using P4. However, I can't get the servo running with the new firmware. Sometimes it moves once but doesn't execute the other commands. It works perfectly fine on RRF2 though.
              I'm going to borrow an oscilloscope and I'll tell you when I find sth interesting. But I'm quite certain the issue must be software related..

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

                Which Duet are you using?

                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

                felix9tundefined 1 Reply Last reply Reply Quote 0
                • felix9tundefined
                  felix9t @dc42
                  last edited by felix9t

                  @dc42 Duet Ethernet 1.02 or later + DueX5

                  1 Reply Last reply Reply Quote 0
                  • felix9tundefined
                    felix9t
                    last edited by

                    @dc42 Do you have any news regarding the issue resp. could you replicate it?

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

                      @felix9t said in Duet 2 on RRF3: Servos not working:

                      @dc42 Do you have any news regarding the issue resp. could you replicate it?

                      I fixed this several days ago and posted about it in another thread. Have you tried the latest firmware at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0 ?

                      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

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

                        PS - in the latest RRF3, for BLTouch v3 you must enable the pullup resistor on the Z probe input pin in the M558 command. I updated the documentation in several places to cover this.

                        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

                        1 Reply Last reply Reply Quote 1
                        • felix9tundefined
                          felix9t
                          last edited by

                          @dc42 Thanks for the last update. It solved one issue with the BLTouch v3.
                          The biggest problem I had was that I needed to invert both pins from:

                          M950 S4 C"exp.heater4"
                          ...
                          M950 S0 C"exp.heater3"
                          

                          to

                          M950 S4 C"!exp.heater4"
                          ...
                          M950 S0 C"!exp.heater3"
                          

                          That solved all issues. I've just discovered that they needed to be inverted for PWM.. 🙂

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