robotic arm...


Closed Thread
Results 1 to 6 of 6

Thread: robotic arm...

  1. #1
    Join Date
    May 2008
    Posts
    15

    Default robotic arm...

    do anyone know how to control the servo motor of the robotic arm...i'm using three servo..so planning to use picbasic...

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi,

    May be you should begin by one of such sites ... ( "robotics" KEYWORD for Google ...)

    http://www.mcmanis.com/chuck/robotics/

    But it's just my own opinion ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shirleyz View Post
    do anyone know how to control the servo motor of the robotic arm...i'm using three servo..so planning to use picbasic...
    Assuming you mean a "standard" RC servo? You need to generate a 1 to 2ms pulse every 20ms for each servo. Most RC servos use 1.5ms as the centre position, 1ms for minimum position, and 2ms for max. Depending on the physical limits of the servo, you might be able to get enough angular movement of each arm to do something useful (aka like the Lynx5)

  4. #4
    Join Date
    May 2008
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    hi,

    yes, i mean a standard RC servo. if i'm using 20Mhz oscillator, izzit still the same..i mean izzit 1ms for min, 2ms for max and 1,5ms for centre??
    can i have some sample code using picbasic..i know must use pulseout, rite??

    thx

  5. #5
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Pulsout... hmmm

    This depends what you want to do. Do you want your pic to be more or less dead for 30% of the time or do you plan to do more things?

    The thing is that you should update your 3 servos for the arm every 20 ms to keep them in the right position. If you don't do that they can start to drift or loose torque so they will become weak. If all your 3 servos are in the max position you will be spending 3*2ms waiting and then you have 14 ms for other stuff... in fact your PIC will seem to be locked up for 15-30% of the time depending where your arm is.

    What you need to have here is an interupt routine that executes every 20 ms and inside this routine you should use a second timer to generate a new interupt for each servo. With DT's interupts you can easily set this up. In your case at 20 MHz you would have a variable for each servo with a value from 5000 to 10000 (representing min and max) depending on your servo position.

    All this of course comes down to if you have any timers availible. If you dont have that you better try to make a fast main loop where you use high and low (or =1 , =0) to set the pins manually.

    I would go for the interupt solution, sure it might be a bit harder in the beginning but after you have made this you can write more or less anything you want in your main loop and that will not affect your arm in any kind of way. Your main loop just need to set the variable value for each servo and the interupt routine will keep the servos there for you.

    I know is sucks that I didnt give you any code but I dont think it is time for coding yet until you have figured out what you want your PIC to do.

    Maybe you also want your PIC to do other things such as following a line and then you can not wait for stuff to finish before you try to correct the heading again....

    /me
    Last edited by Jumper; - 30th May 2008 at 11:42.

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shirleyz View Post
    hi,

    can i have some sample code using picbasic..i know must use pulseout, rite??

    thx
    Thats the fun part of these projects, writing your own code, experimenting with different bits of hardware, and learning how/why these things work, and to develop your electronics skills.

    You'll also receive more help when people see that you have tried to develop something for yourself rather than asking others to do all the work for you

Similar Threads

  1. PIC BASIC Compiler for ARM machines?
    By stone20008 in forum General
    Replies: 2
    Last Post: - 22nd August 2008, 07:14
  2. dsPIC ?!
    By xenon_xplo in forum Schematics
    Replies: 13
    Last Post: - 11th June 2007, 19:49
  3. PBPro for 16-bit PICs (24F/24H/DSPICs)?
    By Sergeant in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 20th April 2007, 20:18
  4. pin 12f683
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 22nd March 2007, 22:29
  5. HPWM and 16F628A
    By Michael in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th February 2006, 14:27

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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