India
Asked

Wiring Stepper Motor

I am using a Leadshine Microstep Drive DM542 stepper motor controller connected to a NEMA 23 2-phase stepper motor. I followed the same wiring connections as specified in the documentation.

Here are the images of my setup for reference:

User-inserted image


User-inserted image


User-inserted image


User-inserted image


User-inserted image


User-inserted image

When I tried to ping the motor using the Stepper servo robot skill in Synthiam ARC, I did not receive a response. I followed the instructions and configured everything as directed. However, the motor is continuously moving back and forth in very minute steps. Could someone help me understand where I might have gone wrong? Additionally, how can I configure the stepper motor to function like a servo motor?


Related Hardware Arduino Genuino Uno
Related Control Inverse Kinematic Arm

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

PRO
Canada
#1  

It sounds like there might be a few issues with the setup that need to be addressed to get your stepper motor working correctly as a servo. Let's go through some troubleshooting steps to identify and resolve the problem:

  1. Check Wiring Connections:

    • Ensure that the wiring between the Arduino and the stepper motor driver is correct. Double-check the connections for the step, direction, and enable pins.
    • Verify that the stepper motor is connected to the driver correctly, with the correct coil pairs.
  2. Arduino Firmware Configuration:

    • Make sure the Arduino firmware is correctly configured for your stepper motor driver. This includes setting the correct pins for step, direction, and enable.
    • Ensure that the BUS_ID in the firmware matches the virtual servo port you are using in ARC (e.g., BUS_ID 1 for V1).
  3. Arduino Programming:

    • Verify that the Arduino is programmed with the correct firmware. Re-upload the firmware if necessary.
    • Ensure that the correct stepper driver type is uncommented in the firmware.
  4. Common Ground:

    • Ensure that all components (Arduino, stepper driver, and EZB) share a common ground.
  5. Ping Test:

    • If the ping test is not responding, check the COM port settings in ARC to ensure the correct port is selected.
    • Make sure the Arduino is powered and connected to the PC via USB.
  6. Stepper Motor Behavior:

    • If the motor is moving back and forth, it might be due to incorrect step or direction signals. Verify the wiring and firmware settings.
    • Check if the stepper driver requires any specific settings for microstepping or current limiting.
  7. Control Commands:

    • Use the Servo.setPosition() command in ARC to move the stepper motor to a specific position. For example:
      Servo.setPosition(V1, 90); // Move the stepper motor to position 90
      
  8. Calibration and Homing:

    • If you have an end-stop limit switch, use the Calibrate ControlCommand() to set the home position:
      ControlCommand(Stepper Servo, Calibrate, V1);
      
  9. Driver Specifications:

    • Ensure that the stepper motor driver is compatible with the Arduino and the stepper motor you are using.

If you've gone through these steps and the issue persists, please provide more details about the specific stepper motor driver and any error messages you might be receiving. This will help in diagnosing the problem further.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#2  

For future reference, Athena cannot see screenshots.  Considering you are using a screenshot of code, you should copy and paste it. When pasting, you can paste with the CODE tags. The tag manual for formatting code and text is here: https://synthiam.com/Support/website-features/forum-editor

Regarding your question, I can see your images because I am a human. The product you are using is a Microstep DM542.

The wiring schematic you posted is useful; thank you. However, the PUL- and DIR- are both connected to the battery's GND. In addition, your ENA+ and ENA- are not connected to anything. Check the product manual and see if that is how it's meant to be connectedbecause it doesn't seem right to us.

@Athena do you have any information on the DM542 for wiring to a NEMA23 2-ph stepper motor using the stepper motor robot skill? Thanks

PRO
Canada
#3  

While I don't have specific information on the DM542 stepper driver, I can provide general guidance on wiring a stepper motor driver to a microcontroller like an Arduino, which can be used with the Synthiam ARC platform. Here's a typical setup for wiring a stepper motor driver like the DM542 to a microcontroller:

  1. Power Supply:

    • Connect the power supply to the stepper motor driver. Ensure the voltage and current ratings match the stepper motor's requirements.
  2. Stepper Motor Connections:

    • Connect the stepper motor wires to the driver. Typically, a stepper motor has four wires, two for each coil. Refer to the motor's datasheet to identify the coil pairs.
  3. Microcontroller Connections:

    • PUL+ (Pulse/Step): Connect to a digital output pin on the microcontroller (e.g., Arduino).
    • PUL- (Pulse/Step Ground): Connect to the microcontroller's ground (GND).
    • DIR+ (Direction): Connect to another digital output pin on the microcontroller.
    • DIR- (Direction Ground): Connect to the microcontroller's ground (GND).
    • ENA+ (Enable): This is optional and can be connected to a digital output pin if you want to enable/disable the driver programmatically.
    • ENA- (Enable Ground): Connect to the microcontroller's ground (GND).
  4. Common Ground:

    • Ensure that the microcontroller and the stepper driver share a common ground to avoid communication issues.
  5. Microstepping and Current Settings:

    • Set the microstepping and current limit on the driver according to your motor's specifications. This is usually done via DIP switches on the driver.
  6. Programming:

    • Use the appropriate firmware on the microcontroller to send step and direction signals to the driver. You can use the Servo.setPosition() command in ARC to control the stepper motor as if it were a servo.
  7. Testing:

    • Test the setup by sending commands from ARC to move the stepper motor to different positions. Adjust the wiring and settings as needed.

If you have specific questions about the DM542 or encounter issues, please provide more details, and I'll be happy to assist further.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#4  

Hi Team, Stepper Motor issue is not fixed i checked my connection, have connected DIR to 3 and STEP (PUL) pin to 2 in arduino uno, and i uploaded the stepper servo firmware to uno , uno connected to pc via usb, selected the port and DTR Enabaled and selected the BUS ID #1 => V1 in stepper servo skill configuration. log its showing connected to COM7(DTR: True). when i treid to ping V1 it is showing Port V1 unresponsive! . when i tried to run simple movement program in arduino ide its working fine.

PRO
Synthiam
#6  

I’d suggesting posting the configuration section of the code you modified from the firmware file. Your screenshots are not enough of the code.

you can copy and paste text. But when you paste it here, make sure you put it in the CODE tags with the editor. Otherwise it won’t format correctly.

#7  

@Athena stepper motor moves in only one direction when data reduced from 180 to 1 in Horizontal servo skill. how to make it to move in both direction

PRO
Canada
#8  

Let's address your questions and issues one by one.

Setting Home for V21

To set the home position for a stepper motor connected to virtual port V21, you can use the SetAsHome ControlCommand() in JavaScript. Here's an example:

// Set the current position of the stepper motor on V21 as the home position
ControlCommand("Stepper Servo", "SetAsHome", "V21");

Calibrating V22

To calibrate a stepper motor connected to virtual port V22, you can use the Calibrate control command. Here's how you can do it in JavaScript:

// Calibrate the stepper motor on V22
ControlCommand("Stepper Servo", "Calibrate", "V22");

Stepper Motor Calibration Speed Issue

Regarding the calibration speed issue, it seems like the stepper motor is moving slower than expected during calibration. The speed during calibration might be controlled by the firmware or the configuration settings in the Arduino code. You might want to check the Arduino firmware to see if there's a parameter that controls the calibration speed. If you have access to the Arduino code, look for any settings related to stepper speed during calibration and adjust them accordingly.

Stepper Motor Movement in Both Directions

If your stepper motor is only moving in one direction when using the Horizontal servo skill, you might need to check the configuration of your stepper motor driver and the Arduino firmware. Here are a few things to consider:

  1. Check Wiring: Ensure that the wiring between the Arduino and the stepper motor driver is correct. Incorrect wiring can cause the motor to move in only one direction.

  2. Driver Configuration: Some stepper motor drivers have settings for direction control. Make sure the direction control pin is correctly connected and configured.

  3. Arduino Firmware: Verify that the Arduino firmware is correctly set up to handle direction changes. Look for any settings or code that might affect the direction control.

  4. ARC Configuration: Ensure that the ARC configuration for the stepper motor is set up to allow movement in both directions. Check the settings in the Stepper servo skill to ensure that the virtual servo ports are correctly mapped.

If you continue to experience issues, you might want to review the documentation for your stepper motor driver and the Arduino firmware to ensure everything is set up correctly. If you have any specific questions or need further assistance, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#9  

Check the wiring because it’s not correct if that’s happening.

also do no hijack anymore threads or you will have forum access revoked. This is your last warning. Use your existing threads for the same topics.

#10  

This is for kslaxme- stepper motors are a whole different animal than typical servos. They start at 1 and go to whatever you want. Say you make top end one thousand steps    you start at one , go to 1000, if you go to 500 that is your center point. There are all kinds of learning curves with this one.

#11  

This is for kslaxme- your min starts at 100 and max at 150. This is totally different from servos -we are talking about pulses  pulses  pulses  At a minimum it's 400 pulses to make one revolution on your driver so if you go from 100 to 150  its 50 pulses   1/8 of a turn you won't see it even if it happened.