509,979 active members
3,498 visitors online
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Registered
    Join Date
    Jul 2014
    Posts
    2

    Red face Help wiring motors steppers

    Hi there !
    I'm a newbie in this domain but I've built a CNC mahine that should be able to work. But I've got wiring problems.

    I've got an arduino UNO v3
    2 steppers motors with enough couple.
    2 "easydrivers" v4
    And here is the issue :




    The first motor :
    x-axis
    M49SP-2K 24V DC that I'm powering with an old computer power.
    Attachment 243284 ( http://img4.hostingpics.net/pics/854248IMG0216.jpg )
    Attachment 243286 ( http://img4.hostingpics.net/pics/422580IMG0299.jpg )
    4 wires as you can see.
    Green wire 8ohms with yellow one. infinite with two other
    Same with violet and brown.
    But I don't get how to make it turning.

    I'm using this shematic :
    Attachment 243288

    And this arduino sample :

    Code:
    #define DIR1_PIN (12)
    #define STEP1_PIN (13)
    #define DELAY (1600/10)
    #define BAUD (9600)
    
    void setup() {
    Serial.begin(BAUD);
    pinMode(DIR1_PIN,OUTPUT);
    pinMode(STEP1_PIN,OUTPUT);
    }
    
    
    void loop() {
    int i,j=DELAY;
    
    digitalWrite(DIR1_PIN, LOW); // Set the direction.
    delayMicroseconds(DELAY);
    Serial.println(">>");
    
    for (i = 0; i<4000; i++) // Iterate for 4000 microsteps.
    {
    digitalWrite(STEP1_PIN, LOW); // This LOW to HIGH change is what creates the
    digitalWrite(STEP1_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(j); // This delay time is close to top speed for this
    j+=1;
    } // particular motor. Any faster the motor stalls.
    
    digitalWrite(DIR1_PIN, HIGH); // Change direction.
    delayMicroseconds(DELAY);
    Serial.println("<<");
    
    for (i = 0; i<4000; i++) // Iterate for 4000 microsteps
    {
    digitalWrite(STEP1_PIN, LOW); // This LOW to HIGH change is what creates the
    digitalWrite(STEP1_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(j); // This delay time is close to top speed for this
    j-=1;
    } // particular motor. Any faster the motor stalls.
    }
    And it only vibrates. Maybe too fast for torque required.
    ( I tried most of all combinason of wiring orders )


    Here is the second one :
    Y-axis
    C5870-60004
    24V DC

    http://img4.hostingpics.net/pics/942358IMG0218.jpg

    http://img4.hostingpics.net/pics/928740IMG0290.jpg

    And there is 5 wires !!! :-O

    After some researches, I though that it was an 5wire unipolar stepper and organised that way :
    Attachment 243290

    So I connected from left to right on the 928740IMG0290.jpg picture:

    Coil A Coil A Coil B Coil B
    + - + -
    1 2 4 5
    1 4 2 5
    not worked

    Please help, I don't know what to do :c





    Thank you for futur answers and sorry for bad english

  2. #2
    Gold Member
    Join Date
    Jan 2010
    Posts
    2141

    Re: Help wiring motors steppers

    For the second (Y-axis) motor, if it is a 5-wire motor designed for unipolar hookup, you will not be able to use it with the EasyDriver. The center taps of both windings are shorted together, so you can not convert that into a 4-wire configuration.

    However I can not be certain from your photo, but it is possible that the motor is actually a 6-wire motor, but that both center taps have been soldered together on that PC board to save one wire.

    If that is the case, and you can unsolder the PC board and instead have access to all six wires, then you should be able to hook up the motor. To use a 6-wire motor with a 4-wire bipolar driver, you will either have to use a "full-coil" hookup or a "half-coil" hookup. There is a discussion of how to do that here: UniPolar vs BiPolar wiring schemes for 2-phase Stepper Motors

    I have not yet reviewed your Arduino code and hookup for the other motor. Maybe I will be able to look at it later this evening.

  3. #3
    Gold Member
    Join Date
    Jan 2010
    Posts
    2141

    Re: Help wiring motors steppers

    A few comments:

    - I am not able to load two of your attachments (Attachment 243288 and Attachment 243290)

    - You are sending the step pulse by using back-to-back digitalWrite() calls. The spec sheet for the driver chip has a minimum step pulse width of 1 microsecond and a minimum LOW time of 1 microsecond. I suspect that your minimum LOW time is shorter than that, and so if I'm correct then you should put some short delay between the HIGH-to-LOW transition and the LOW-to-HIGH transition. You might also want to initialize the STEP pin LOW within the setup() routine. (but see the next paragraph, because I don't believe that your stepping is being done correctly either)

    - If I'm reading things correctly, your normal state of the STEP pin is high, going low then high to give a positive-going step pulse edge. That means that your step pulse width looks like it starts out at 160 us wide, and each time through 4000 loops it gets incremented by 1 us, so by the time you're done you have a step pulse that is 4160 us wide. Why are you doing that? Don't you want the STEP pin to normally be low, then go high to start the step pulse, keep it high for at least 1 us, then back down to LOW? See the timing diagram on page 7 of the datasheet at http://www.allegromicro.com/~/media/...Datasheet.ashx

  4. #4
    Registered
    Join Date
    Jul 2014
    Posts
    2

    Re: Help wiring motors steppers

    Yeah, the two center taps are soldered together (0ohms), then I deduce that it is an Unipolar 6 wires with common linked.
    I'll try to do something with this ! =)

    Here is the attachement 243288
    http://www.ordinoscope.net/images/e/..._-_Arduino.png

    And for the arduino code, he isn't made by me, but now that you're asking, that's true that STEP pin should stay longer on the low state, I may have to put a delay between ! And I'll also try to replace high by low and low by high.

    Thank you for your anwsers ! :cheers:

Similar Threads

  1. Wiring Steppers w/o driver board?
    By LowIQGenius in forum Stepper Motors / Drives
    Replies: 7
    Last Post: 04-29-2009, 02:57 PM
  2. wiring steppers/ gecko 201
    By littlebear in forum General CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 10-08-2006, 04:26 PM
  3. How about trailer wiring for steppers?
    By johnt in forum General CNC Machine Related Electronics
    Replies: 2
    Last Post: 03-07-2005, 03:09 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •