Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: servo motor control

  1. #1
    Senior Member Cyborg sudarshan's Avatar
    Join Date
    Jun 2008
    Location
    Virudhunagar - 626001, Tamilnadu, India
    Posts
    180

    Question servo motor control

    hi
    i want control two servo motors for my robots hand one servo for each hand?
    and i have attached a plate in it so it carry some dishes like food and water
    i want to lift the plate and lower the plate with the two servos
    when it raises i want it to hold its position and move for some distance and stop and then lower the plate

    the problem i am facing is
    i can hold the plate in position but i can't make it to move at the same time
    i am using atmega 32 and avr 40pin v2 board from robokits.co.in

    please help me

  2. #2

    Default

    Quote Originally Posted by sudarshan View Post
    i can hold the plate in position but i can't make it to move at the same time
    In which direction(axis) do you want to move the hand?
    Probots
    Online Robot Store : www.probots.co.in - Robot Kits , Development Boards and Components
    Blog : www.probots.co.in/blog - Probots' Official Blog
    Twt : www.twitter.com/probots - Probots' Official Tweets

  3. #3
    Senior Member T-1000
    Join Date
    Jun 2007
    Location
    Jamshedpur/Bhubaneswar
    Posts
    421

    Default

    Explain your setup with diagrams.
    Avinash Gupta
    ************
    www.eXtremeElectronics.co.in

  4. #4
    Administrator T-1000 vikas's Avatar
    Join Date
    Feb 2004
    Location
    Delhi
    Posts
    1,922
    Blog Entries
    14

    Default

    post pic / better explanation
    Vikas Patial

  5. #5
    Senior Member Cyborg sudarshan's Avatar
    Join Date
    Jun 2008
    Location
    Virudhunagar - 626001, Tamilnadu, India
    Posts
    180

    Default

    please refer the followng url
    http://www.superrobot.co.cc/Home/robotics/mega_prime

    currently no plate is attached to the robot.but you can see the hand of the robot at the end of the hand the plate will be attached
    All the works properly the servo and the movement
    the servos are controlled with delays .i want to hold the servos postion up and move to a person and lower the plate after sometime
    Last edited by sudarshan; 05-30-2010 at 08:18 PM. Reason: spelling

  6. #6
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    Is it that you need to know how to control a servo, or is it that you have a problem driving the servo??

    Atleast can you specify which servo you are using??
    .... I didnt do it ! ....

  7. #7
    Senior Member T-1000
    Join Date
    Jun 2007
    Location
    Jamshedpur/Bhubaneswar
    Posts
    421

    Default

    Look A servo needs 50 hertz signals OK.

    The width of the pulse control the angle.

    So set up AVR Micros TIMER1 for PWM MODE 14 (Fast PWM with Resolution Governed By ICR1 Register.

    Set ICR1 = 1249 (this sets the PWM period = 20ms in 16MHz clock rate and PRESCALER=256)

    Now you can generate variable duty cycle by writing to OCR1A and OCR1B registers.

    OCR1A=78 will give 0 degree and for each increase in OCR1A will increment servo by 5.76 degrees.

    Thats it!
    Avinash Gupta
    ************
    www.eXtremeElectronics.co.in

  8. #8
    Senior Member Cyborg sudarshan's Avatar
    Join Date
    Jun 2008
    Location
    Virudhunagar - 626001, Tamilnadu, India
    Posts
    180

    Default

    i am using it on portA of the atmega32 because robokits have give servo connetors only on portA will i get the timer output on portA
    i am using standard dual ball bearing servo from robokits

  9. #9
    Senior Member T-1000
    Join Date
    Jun 2007
    Location
    Jamshedpur/Bhubaneswar
    Posts
    421

    Default

    If you use the method I told above to KEEP the servo in a locked angle you don't need any CPU power. The TIMER will keep the servo locked!

    The CPU is free to do other tasks.

    But if you use software to lock servos then 100% of the CPU power goes to lock CPU (unless you use some complex programming).

    Thats a foolish thing to do!

    PORTA don't have PWM outputs.


    Hey, I feel some kinda fool to help Robokits(Our Competitor!) Customer.
    Avinash Gupta
    ************
    www.eXtremeElectronics.co.in

  10. #10
    Senior Member Cyborg sudarshan's Avatar
    Join Date
    Jun 2008
    Location
    Virudhunagar - 626001, Tamilnadu, India
    Posts
    180

    Default

    Quote Originally Posted by avinash_g View Post
    Hey, I feel some kinda fool to help Robokits(Our Competitor!) Customer.
    Hey for me only cost matters so i buy from then.if you think you can provide cheaper board ,servos,high torque motorsfor cheaper rates than robokits let me know i will you customer.

    if you have any competition with robokits is yours not mine so if you feel i am "Robokits(Our Competitor!) Customer" then dont respond to my posts.....
    Last edited by sudarshan; 05-31-2010 at 01:02 PM.

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
  •