Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Solved How do I connect a servo on Duet 2 with Duex 5 Expansion board?

    Using Duet Controllers
    3
    4
    153
    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.
    • trobison
      trobison last edited by trobison

      How do I connect a servo to E3D Tool changer / Duet 2 with Duex 5 Expansion board?

      I am trying to configure a “Pebble Wiper” on my E3D Tool Changer. When I add the following lines, the hot end fan on tool 3 will stop. I have tried e1stop and get the same result. My goal is to connect a servo and control it. The lines below work, but I fan stops on Tool 3. I have been using a 9g micro-servo for testing.

      M950 F7 C"^duex.e2stop" Q600 ; Set up Wipe Servo
      M106 P7 C"Wipe" ; Set up Wipe Servo

      config.g

      Board: Duet 2 Ethernet (2Ethernet)
      Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.3 (2021-06-15)

      o_lampe droftarts 2 Replies Last reply Reply Quote 0
      • o_lampe
        o_lampe @trobison last edited by

        @trobison "F7" is already defined as a fan in config.g. You can use M950 "S1" for servos and they don't need a Q(600) parameter.
        Also check here about further details, like using M280 instead of M106

        1 Reply Last reply Reply Quote 0
        • droftarts
          droftarts administrators @trobison last edited by

          @trobison you can’t connect the servo to an endstop pin. Use the PWM pins on the Duex. See https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins

          Ian

          Cartesian bed-slinger with Duet 3 Mini 5+ WiFi : RRP Fisher Delta v1 with Duet 2 Maestro : TronXY X5S with Duet 2 Wifi (in progress)

          1 Reply Last reply Reply Quote 0
          • trobison
            trobison last edited by trobison

            Thank you for your help. I think I have it working. Yes, the F7 was already defined as a fan and that stopped the fan. The servo did work on the endstop pin, but the fan stopped. What I did in the end was:

            M950 S0 C"duex.pwm5" ; assign GPIO port 0 to pwm5 on expansion board, servo mode

            and use:
            M280 P0 S80 ; set 80deg servo position on GPIO port 0
            to move the servo. This is all very new to me, thank you for your help.

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