585,930 active members*
3,869 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2011
    Posts
    0

    Arduino and commercial Breakout Board

    Hi,

    I have been working on an Arduino-based interface for a commercial Breakout Board complete with drivers.
    (Commonly used with a real parallel-port and Mach3 SW)

    During my work I have struggled to find the appropriate information, and I am now stuck ... =(
    So I am hoping that my post is not out of topic for this forum, and that there could be a kind soul to help me out.

    What I am trying to do:
    Control the stepper drivers (CW230) through the DB25-port (parallel port - breakout board) using an Arduino UNO.

    OBS.
    I don't wish to run any G-code or nothing like that. I would only like to do a step forward and back.

    What have I successfully done:
    Connected the Arduino PIN's to the breakout board's parallel port.
    Written a small test program, to step some steps of the engine.
    .
    ..
    // Move X - left [a]
    if (incomingByte == 97) {
    digitalWrite(dirPinX, LOW);
    for (int i=1; i <= 500; i++){
    digitalWrite(movePinX, LOW);
    delayMicroseconds(spd);
    digitalWrite(movePinX, HIGH);
    delayMicroseconds(spd);
    }
    Serial.println("OK");
    }
    ..
    .

    What is the problem?
    Well, the engine moves .... but very slowly and not according to the iterations in the for loop.
    i.e. one pulse (HIGH>LOW>HIGH) does not correspond to one step?!
    [Triggers on LOW]

    I actually get one turn, on 15000 pulses or so????
    (almost like it's set on 1/64 microstepping?)

    It seems like the drivers does not trigger on every pulse, but rather only a fraction of them? (I am running full-step)

    Suspected issues:
    1) The trigger levels are not set right
    2) The stepper driver can_NOT be controlled in this simple manner? Since the standard setup with parallel port - Mach3
    also sends control signals that I simply do not understand, and can't re-create?
    3) The stepper engine is not wired correctly

    If I look in the CW230 driver specification, there is one section that deals with the pulses:
    CP +、CP -:Stepping pulse input+5V (Rising edge effective , rising edge duration >10μS)

    Could it be that the Arduino is to fast when switching logical level?
    ----------------------------------------------------------------------------------------------------------------------------------

    Here is the Hardware I am using (may or may not be useful info)

    http://www.brundin.biz/images/datash...0Elschema1.pdf

    The breakout board is a BK-1 (or BK-3?) (Chinese product with very little information)
    BK-1 CNC breakout board with build-in DB25 connector - Detailed info for BK-1 CNC breakout board with build-in DB25 connector,CNC breakout board ,BK-1 CNC breakout board with build-in DB25 connector,BK-1 on Alibaba.com

    Connected to 3 drivers (CW230)
    http://www.brundin.biz/images/extra/...river40v3a.pdf


    ----------------------------------------------------------------------------------------------------------------------------------


    Best Regards
    //Martin

  2. #2
    Join Date
    Apr 2011
    Posts
    0
    Thanks for the answers .... =)

    But I figured it out.
    Timing issues, and also taking acceleration under consideration.
    Trial and Error does the work.

    Cheers

  3. #3
    Join Date
    Jan 2010
    Posts
    2141
    Although it looks like you have answered your own questions, here are a couple notes and questions for your consideration...

    Have you enabled the internal pull-up resistors on the arduino output pins that you are using, or are you using external pull-up resistors?

    It looks like your program is set up for roughly a 50% duty cycle, but you may want to experiment with smaller duty cycles (shorter pulse, longer duration between pulses, making sure that the pulse duration meets the minimum requirements of the driver, and the repetition rate is within the capabilities of both your drivers and your motors). As you have likely found out, it is possible to generate shorter pulses with the arduino than your drivers require, and you might also be sending them to the motors faster than they can respond.

    In your code, the very first output of the direction signal is followed almost immediately by a step pulse. Some drivers require a specific "setup time" between setting the direction and starting to send step pulses, so you might want to put in a delay between setting direction and then starting the step pulses.

  4. #4
    Join Date
    Apr 2011
    Posts
    0
    Hi again,

    Thanks doorknob!
    I am using the Arduino's internal pull-up resistors. And yes, it seems like the Arduinio can generate pulses faster than what the driver can handle.
    Good point about the "direction signal was followed almost immediately by a step pulse", I did not consider that. I will try to change that, once I get back from work.


    I did this experiment

    - Testing different combinations of delays before/during active [LOW]
    (found out that they optimally could/should be the same?)

    - Incrementally lowering the delays for both (before/during) pulse, for each pulse that’s sent, i.e. constant (or linear) acceleration.
    (This actually helped allot, since it was now possible to speed up more, before I met the limit)

    So what happens when I hit the speed-limit?
    Well, the engine "slips". There is a sound coming from the coils that correspond to frequency of expected speed. But there is no movement.
    But still, quite a reasonable speed now.

    I really appreciate your thoughts here, so sorry about my previous sarcastic remark.

    BR

Similar Threads

  1. How to get the most out of C10 breakout board?
    By woodchuck5 in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 11-16-2013, 02:52 AM
  2. Which Breakout Board?
    By gotfdirtball in forum Bridgeport / Hardinge Mills
    Replies: 7
    Last Post: 05-03-2011, 08:44 AM
  3. breakout board
    By linkintiger in forum Maintenance DIY Discussion
    Replies: 0
    Last Post: 01-27-2011, 06:43 AM
  4. breakout board
    By nitroboy in forum CNC Machine Related Electronics
    Replies: 11
    Last Post: 01-24-2011, 03:09 PM
  5. Breakout board, Relays on board?
    By Cooper in forum Open Source Controller Boards
    Replies: 11
    Last Post: 06-10-2007, 01:55 AM

Posting Permissions

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