How to connect a stepper motor to the duet wifi ?



  • Hi,
    I am new to electronics and 3d printing so please forgive me if this is a stupid question.
    i want to connect a stepper motor NEMA17 (kl17h248-15-4a) to the duet wifi and iam bit confused to which color go where.
    The colors on the diagram (https://duet3d.com/wiki/Duet_WiFi_wiring_diagrams) don't match with the wire colors on the stepper motor.
    Does anyone know in which order it should be wired ?



  • Okay so forget about colours of wires when wiring stepper motors. Every different brand of motor has different colour wiring there is no standard.

    This is about understanding how they work. Once you do it will seem simple. They have two sets of coils inside (that's why they're called bipolar). Two of the wires go to one coil, the other two wires go to the other coil.

    On most printer controllers, and duet wifi is the same the motor plug has 4 pins. The two pins on one side pins 1,2 go to one coil, the other two pins 3,4 go to the other coil. What you need to do is determine which of your 4 wires from your motor are a coil pair. So get multimeter on ohms/resistance and measure between the motor wires. Two wires will have some resistance between them, they are one pair, the other two wires are the other pair. Now you know how to wire it one pair to pins 1,2 and the other to pins 3,4.

    Write down the colours which form the pairs as you might have more of the same brand motors and they can all be wired the same way.

    Motor might turn in the wrong direction when you ask motor to move, but its an easy fix if the motor goes the wrong way, TURN THE POWER OFF, then turn the motor plug the other way around, this swaps the pairs over and now the motor turns the other way. You can change the motor direction in firmware, but never unplug or work on motor plugs or wiring with power on, it can destroy the motor driver chips, which is an especially irritating and expensive mistake to make on duetwifi as you can't just plug new ones in.



  • Thanks a lot for the complete answer Dj.
    Unfortunately i dont have a multimeter :S Any chance i could do this another way ?


  • administrators

    With the motor not connected to anything, spin the spindle with your fingers. Then short 2 of the wires together and spin it again. If it's much harder to spin fast, then those two wires are a pair. If not, try shorting a different 2 wires together.



  • Thanks a lot for the tip! i will try this.



  • I love it when people simply know stuff. Learned something new.
    Just amazes me every time to see the support and knowledge on this forum.



  • Thanks a lot for your help, this solution seems to work.
    I have another very beginner question. Iam trying to connect to the wifi on the board, the wiki say :

    The board does not start up the WiFi access point until you send it M552 S1 over USB from a printer host program

    I guess "M552 S1" is a Gcode command ? i tried to use repetier and pronterface but they dont seem to support the Usb 3d printers.
    Do you know what windows software i could use to send this command to the printer ?



  • Those two do support 3d printers over usb. You need to install the correct drivers for the board, which is available on the firmware's github. In pronterface, select the comport it's connected to before hitting the connect button.



  • Thanks for your answer Stephen.
    When you say " You need to install the correct drivers for the board ", you mean copying the bin file (https://github.com/dc42/RepRapFirmware/tree/dev/Release/Duet-WiFi/Stable) onto the sd card ? I can't find documentation related to this procedure. I found a page saying you can update the the firmware via wifi …

    In prontface how do i know which comport or channel number i should use ?
    I thought the comport where related to serial ports ?



  • @Zesty_Lykle:

    I love it when people simply know stuff. Learned something new.
    Just amazes me every time to see the support and knowledge on this forum.

    Sadly I wish I had as much patience as I do knowledge as I could share so much. Perhaps in my next life.



  • Iam trying to follow the step by step guide here:
    https://duet3d.com/wiki/Getting_connected

    i have installed the RepRap drivers on my machine as recommended (https://github.com/dc42/RepRapFirmware/tree/dev/Driver).
    Unfortunately when i plug the board to my computer it doesn't get recognize by the system …
    Would it be because i need to move the 5V jumper in usb power ?


  • administrators

    USB power should be sufficient unless you have a PanelDue connected. Do you get 2 or 3 red LEDs and one green led lit on the edge of the board with the USB connector? If your PC runs Windows, does Device Manager show an unknown USB device?

    See also https://duet3d.com/wiki/What_to_do_if_your_Duet_or_Duet_WiFi_won%27t_respond.



  • Hi DC42,
    Thanks a lot for your help. I do not have a PanelDue. When i connect the board i have 2 red led. I join a picture here:

    I have windows 10, and the device manager do not pickup any new device. I also tried on my windows laptop and with an alternate usb wire without any luck.
    I also tried the 3 procedures as listed here:
    https://duet3d.com/wiki/Updating_main_firmware

    But the board still doesn't get detected …


  • administrators

    No green 3.3V LED. Most likely you have the endstop switches connected incorrectly and they are shorting out the 3.3V supply.



  • Haa yes! that was it! thank you so much, i can now continue the step by step wifi tutorial!



  • It seem to be working well now, i have also plugged my power supply and i can now access the web interface in wifi without the usb wire.
    Is there a specific procedure to turn off the Duet Wifi ? At the moment i am just powering on and off the power supply, but iam not sure it's the best for the board. Is there a Gcode to execute to just tell the board "shut down" ?


  • administrators

    You can just power it down, People typically put M0 in their slicer end gcode to turn off all the heaters and stepper motors.



  • Thanks!


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.