+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 3
    Points: 106, Level: 1

    Join Date
    Jun 2012
    Posts
    4
    Helped
    0 / 0
    Points
    106
    Level
    1

    CONTROL stepper motor using PIC microcontroller

    hi guys, this is the first time ever i put my hands on stepper motor.
    i am using unipolar stepper motor (1.8 degrees step angle)...
    is it possible to control the desired angle of rotation using pic microcontroller.
    for example i want my motor to rotate 7.2 degrees after every 1 second..
    please somebody guide me about the step sequences to control the rotation.
    Thanks

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 5
    Points: 2,560, Level: 11
    Achievements:
    Created Blog entry 7 years registered

    Join Date
    Sep 2010
    Location
    Islamabad Pakistan
    Posts
    284
    Helped
    28 / 28
    Points
    2,560
    Level
    11
    Blog Entries
    1

    Re: CONTROL stepper motor using PIC microcontroller

    write code in this way
    portb=0x03;
    delay_ms(5);
    portb=0x06;
    delay_ms(5);
    portb=0x0c;
    delay_ms(5);
    portb=0x09;
    delay_ms(5);
    portb=0;
    delay_ms(980);

    and for high torque apllication
    write code in this way
    portb=0x03;
    delay_ms(250);
    portb=0x06;
    delay_ms(250);
    portb=0x0c;
    delay_ms(250);
    portb=0x09;
    delay_ms(250);

    - - - Updated - - -

    write code in this way
    portb=0x03;
    delay_ms(5);
    portb=0x06;
    delay_ms(5);
    portb=0x0c;
    delay_ms(5);
    portb=0x09;
    delay_ms(5);
    portb=0;
    delay_ms(980);

    and for high torque apllication
    write code in this way
    portb=0x03;
    delay_ms(250);
    portb=0x06;
    delay_ms(250);
    portb=0x0c;
    delay_ms(250);
    portb=0x09;
    delay_ms(250);



    •   AltAdvertisement

        
       

  3. #3
    Newbie level 3
    Points: 106, Level: 1

    Join Date
    Jun 2012
    Posts
    4
    Helped
    0 / 0
    Points
    106
    Level
    1

    Re: CONTROL stepper motor using PIC microcontroller

    Quote Originally Posted by zia View Post
    write code in this way

    write code in this way
    portb=0x03;
    delay_ms(5);
    portb=0x06;
    delay_ms(5);
    portb=0x0c;
    delay_ms(5);
    portb=0x09;
    delay_ms(5);
    portb=0;
    delay_ms(980);

    and for high torque apllication
    write code in this way
    portb=0x03;
    delay_ms(250);
    portb=0x06;
    delay_ms(250);
    portb=0x0c;
    delay_ms(250);
    portb=0x09;
    delay_ms(250);
    how to understand the logic behind this step sequence..... i mean why, 03,06,0c,09 ??



    •   AltAdvertisement

        
       

  4. #4
    Full Member level 5
    Points: 2,560, Level: 11
    Achievements:
    Created Blog entry 7 years registered

    Join Date
    Sep 2010
    Location
    Islamabad Pakistan
    Posts
    284
    Helped
    28 / 28
    Points
    2,560
    Level
    11
    Blog Entries
    1

    Re: CONTROL stepper motor using PIC microcontroller

    it has 2 coils with common joint which may be gnd or vcc or get help from google. if not understanding tell

    - - - Updated - - -

    it has 2 coils with common joint which may be gnd or vcc or get help from google. if not understanding tell



--[[ ]]--