Order Tracking My Account Product Center
  • usercenter
  • 10
  • cart

    TZT New cnc shield v3 engraving machine / 3D Printer / A4988 driver expansion board for Arduino

    Score:
    Brand:TZT
    Weight:0.01g
    Stock:99366
    Price:$0.75
    Style:
    Quantity:
    - +
    Add to Wish List
    II. UNOAnd moduleIOCorrespondence between the introduction port


    The basic needs of the stepper motor control other pins are in the engraving machine, or3DWhen the printer was used, here we do not make Detailed,IOIt corresponds to the above figure.

    Expansion board UNO ----------------------

    8 ------------------------ EN (stepper motor drive enable, active low)

    7----------------------- Z.DIR (Z-axis direction control)

    6----------------------- Y.DIR (Y-axis direction control)

    5----------------------- X.DIR (X-axis direction control)

    4 ---------------------- Z.STEP (Z-axis stepper control)

    3 ---------------------- Y.STEP (Y-axis stepper control)

    2 ---------------------- X.STEP (X-axis stepper control)

    // Here is a simple stepper motor control procedures,

    #define EN 8 // stepper motor enable, active low

    #define X_DIR 5 // X axis stepper motor direction control

    #define Y_DIR 6 // y-axis stepper motor direction control

    #define Z_DIR 7 // z-axis stepper motor direction control

    #define X_STP 2 // x-axis stepper control

    #define Y_STP 3 // y-axis stepper control

    #define Z_STP 4 // z-axis stepper control

    / *

    // Function: step function: to control the stepper motor direction, the number of steps.

    // Parameters: dir direction control, dirPin DIR pin corresponding to the stepper motor, stepperPin step pin corresponding to the stepper motor, stepping a few steps steps

    // No return value

    * /

    void step (boolean dir, byte dirPin, byte stepperPin, int steps)

    {

    digitalWrite (dirPin, dir);

    delay (50);

    for (int i = 0; i

    digitalWrite (stepperPin, HIGH);

    delayMicroseconds (800);

    digitalWrite (stepperPin, LOW);

    delayMicroseconds (800);

    }

    }

    void setup () {// the stepping motor used in the IO pin is set to output

    pinMode (X_DIR, OUTPUT); pinMode (X_STP, OUTPUT);

    pinMode (Y_DIR, OUTPUT); pinMode (Y_STP, OUTPUT);

    pinMode (Z_DIR, OUTPUT); pinMode (Z_STP, OUTPUT);

    pinMode (EN, OUTPUT);

    digitalWrite (EN, LOW);

    }

    void loop () {

    step (false, X_DIR, X_STP, 200); // X axis motor reversal lap, 200 steps for the circle

    step (false, Y_DIR, Y_STP, 200); // y-axis motor reversal lap, 200 steps for the circle

    step (false, Z_DIR, Z_STP, 200); // z-axis motor reversal lap, 200 steps for the circle

    delay (1000);

    step (true, X_DIR, X_STP, 200); // X-axis motor is transferred lap, 200 steps to circle

    step (true, Y_DIR, Y_STP, 200); // y-axis motor is transferred lap, 200 steps to circle

    step (true, Z_DIR, Z_STP, 200); // z-axis motor is transferred lap, 200 steps to circle

    delay (1000);

    }










    contact_us

     China (Mainland)

    contact_usTUOZHANTENG electronic components Co., LTD

    contact_us0755-82527072

    contact_us384834800@qq.com / 1244995775@qq.com

    contact_us3013 Hongli Road, Shanghang Building 5F/511, Huaqiangbei , Futian , Shenzhen , Guangdong , China.



    Hong Kong, China

    contact_usTUOZHANTENG HK CO., LTD

    contact_usemily384834800@gmail.com

    contact_usRoom 1103, Hang Seng Mongkok Building, 677 Nathan Road, Mongkok, Kowloon, Hong Kong

        

      WhatsApp +86 15920041318/ +86 17620404465



       WeChat   +86 15920041318/ +86 17620404465        

        

     

       Skype    +86 15920041318 



    Telegram/ KakaoTalk :+86 15920041318      

                                                                                                                                          contact_us







    Recommended productsRecommended products

    Copyright © 2023 Tuozhanteng Electronic Technology Co., Ltd
    HOME

    HOME

    PRODUCT

    PRODUCT

    CART

    CART

    USER

    USER