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

    Servo PWM behavior

    Scheduled Pinned Locked Moved
    General Discussion
    3
    3
    199
    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.
    • Ethelredundefined
      Ethelred
      last edited by

      When switching Duet from power OFF to ON pin3 sends a brief pulse s to displace the servo by a significant increment. This happens to give my particular strategy fits. Is there any way to subvert this?

      Secondly problem is when I want to displace the servo to a new position I send , for example :
      M280 P3 S1400 I1 ;PULSE WIDTH MICROSECONDS
      G4 S1 ;DWELL BEFORE DISABLE
      M280 P3 S-1 ;TURN OFF P3 (SERVO)
      which works fine and turns off the servo to avoid overheating. There is no external force attempting to move the servo when off. Unfortunately, I think, but am not absolutely certain, that occasionally (?) an uncommanded servo signal occurs in the gcode execution stream. I can't think how to determine when/if this occurs.

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

        I assume you are driving the servo directly from the expansion connector of the Duet. Here are some suggestions to fix the power on problem:

        1. Connect a pulldown resistor of between 1K and 10K between the servo output and ground. This should hold the pin low during power up.

        2. If you are activating the servo within config,g, try adding a G4 delay command before you enable the pin for servo use. This will make the pin stay high for much longer, and with luck the servo will ignore it.

        3. Try a different pin on the expansion connector. Some of the PWM-capable pins use a timer-counter, and others use a PWM channel. They may behave differently at start-up.

        Modern servos do not normally overheat unless you drive them beyond their physical endstops. So avoid sending commands which move the servo beyond its natural range. Some servos have slightly smaller ranges than published.

        HTH David

        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 0
        • Danalundefined
          Danal
          last edited by Danal

          @balrags said in Servo PWM behavior:

          ...that occasionally (?) an uncommanded servo signal occurs in the gcode execution stream. I can't think how to determine when/if this occurs.

          In decreasing order of what they'd tell you:

          • Oscilloscope on the output pin.

          • "Servo tester" that reads pulse width (much cheaper than o-scope!) in parallel.

          • Cheap analog servo in parallel.

          Delta / Kossel printer fanatic

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