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

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

Scheduled Pinned Locked Moved Solved
Using Duet Controllers
3
4
323
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.
  • undefined
    trobison
    last edited by trobison 10 Oct 2021, 07:53 10 Oct 2021, 07:49

    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)

    undefined undefined 2 Replies Last reply 10 Oct 2021, 08:18 Reply Quote 0
    • undefined
      o_lampe @trobison
      last edited by 10 Oct 2021, 08:18

      @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
      • undefined
        droftarts administrators @trobison
        last edited by 10 Oct 2021, 09:14

        @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

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        1 Reply Last reply Reply Quote 0
        • undefined
          trobison
          last edited by trobison 10 Oct 2021, 23:37 10 Oct 2021, 23:35

          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
          3 out of 4
          • First post
            3/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA