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

Thread: Project of robotic Arm with dynamixel motors

  1. Question Project of robotic Arm with dynamixel motors

    Hello everyone!!

    Frst of all, sorry about my english, i´m it improving slowly.

    I'm doing the final project of my university degree, in which I have to be able to control a robot arm. The communication between the computer and the engines of the robot is established through arduino program (library ax12.h) and with an arbotix card.

    So far, I have managed to move the robot with my hands, and then the program makes the robot repeat the same sequence, but now what I want is to be able to control the torque, so that when it repeats the sequence, if I hold it or I push it, i want to stop the sequence few seconds, as a security.

    My doubt is that I do not know how to get the feedback or the data of the moments, and make the subsequent control, so that when I want to stop it stops.

    The robot arm has 4 motors, two MX-64 and another two MX-106, each one are conected to an alimentation of 12V.

    Thank you very much!!

  2. Re: Project of robotic Arm with dynamixel motors

    You can use
    to get the load. This is the amount of power required to drive the motor to the requested position.
    Detecting a collision using this could be tricky because this includes the acceleration that would naturally be required to move the object, or resist gravity.
    If it bumps up against a person, the feedback would increase the power to get the motor moving again, and this is what you might detect.
    However, it might be easier to detect an sudden unexpected stop in position changes.
    This is similar to how I ended up controlling my gripper. I set the torque limit, gripped the object and waited for the gripper to stop moving. This worked out more reliable than watching the load until it hit a certain level.

  3. Re: Project of robotic Arm with dynamixel motors

    Thank you very much for answering!

    First, I can not read in the program the code that you sent me

    Dxl.getLoad (inId);

    and I've tried other ways like:

    dxlGetLoad (inId);
    dxlGetPresentLoad (inId);
    Dxl.getPresentLoad (inId);
    Dxl.Get.PresentLoad (inId);
    and nothing, so I don´t know if there is any other way to obtain the Load.

    I have tried with dxlGetTorque (inId); and I have obtained some values, but I don´t know in what units are the numbers that appear (they oscillate between 0 and 1800 more or less). Did you know it?

    In any case, I also think that the second option that you mention could be better, in fact, what I want is a collaborative robot arm.
    I already tried to do what you tell me about "set torque limit", but I did not get results. I don´t know what limit I should fix, and I don´t know if I have to fix the maxtorque or the mintorque.
    If I hold and I block the arm, the engines try to follow the previous programmed sequence that they have, and they make more force and become hotter. I mean, they doesn´t stop (I know that i haven´t done the control yet), but the thing is that I don´t know how to start with the control.

    Thanks again!!

  4. Re: Project of robotic Arm with dynamixel motors

    The details of the api may be different depending on what code you are using. I was using the OpemCM code, which starts like:

    Dynamixel Dxl(1 /*DXL_BUS_SERIAL1 = cm094 */);

    I was using a register based api, to work around some issues I was having reading and writing with multiple serial ports and timing, like:

    #define MAX_TORQUE 34
    #define TORQUE_ENABLE 24
    void setMaxTorque(int id, int torque)
       for(int attempt=0;attempt<10;attempt++)
          Dxl.writeWord( id, MAX_TORQUE, torque);
          if ( Dxl.getResult( ) == COMM_RXSUCCESS )
    And would do something like:


    Now, these number are for the Ax12 (my gripper) - for the more powerful dynamixels, the range is 0-4095 so the torque/position values need to be 4x as big.

    Reading the load is a bit tricky because there is a sign bit in there. I also found it changed in quite big steps, so not great for fine motor control.

    This is the code I used for the load (again, Ax12 - the hex constants will need an extra 'f' on the end for MX)
    int getLoad(int inId)
       for(int i=0;i<10;i++)
          int result = Dxl.getLoad(inId);
          if(result<0 || result>=4096)
          if (result & 0x400)
             result = 1024 - (result&0x3ff);
             result = 1024 + (result&0x3ff);
          return result*2;
       return -1;
    Here I am converting from a signed value to an unsigned value centred on 1024 - you will need to check the details for MX motors. And this makes more sense to my application.

    To manually position the arms, I just completely disabled the torque and then they were easy to move (I used a keyboard command to close the gripper).

    To control the sequence, I used a program that set a target position, and then waited for the arm to get close and to stop moving, rather than wait a specific amount to time, before issuing the next command. This allows the sequence to be interrupted or slowed depending on the environment. For the gripper, I set the torque depending on what I was grapping, and then waited for it to stop moving.

    Especially for the Ax12 gripper, you do need to set a lower max-torque or you will overheat pretty quickly. A fan or aluminium casing of the newer motors may help a lot here too.

    Here is my experiment controlling dynamixels on a robot arm:
    <a href="" target="_blank">

    And a final sequence:
    <a href="" target="_blank">

  5. Re: Project of robotic Arm with dynamixel motors

    Hi everyone!!!

    Thank you very much Hugh!! As I say you, I´m proving your advices! but at the moment without succes.

    I have recorded a video, where you can see that the robot movements are slow and jerky, I do not know if it is because the strucuturee is very heavy, or if I have to change some feature in the engines ...

    I have already tried without success to change the present speed, torque max and torque min ... but the robot keeps going at the same ritm/speed.

    On the other hand, I'm still immersed in torque control, with the intention of making a collaborative robot, but without results. If someone could help me with ideas or with the program to make that control (that is, to stop the sequence of the robot when I touch it), I would really appreciate it!

  6. #6
    Join Date
    May 2016
    White Plains, NY
    Rep Power

    Re: Project of robotic Arm with dynamixel motors

    I've watched the video. When the top are is upright it doesn't seem to move any faster. Based up this observation I don't think the servos are slow because of loading issues.

    I also see you have the servos geared down quite a bit. I think this is why the arms move so slowly.

    You might consider a couple of RoboClaw controllers and motors with quadrature encoders. The Roboclaw will let you set the desired target and speed...

  7. Re: Project of robotic Arm with dynamixel motors

    This is looking pretty good I think.
    I have experienced this sort of jerkiness when trying to get a pair of dynamixes to trace a path.
    The truth is that these are not stepper motors, and can't really be used as such.
    So you can NOT easily get two motors to move in a line very nicely by doing (pseudo-code)
      for(i=0; i<1000;i++)
         setPosition(0, i);
         setPosition(1, i/2);
    because there is an acceleration-phase followed by a linear phase, followed by a deceleration phase.
    If you ask it to go a small distance it will accelerate and then decelerate quicky, never hitting the linear phase, and you get this jerkiness.

    But there is a trick to it - setting the speed small enough.
    The idea is that you set the speed depending on the new target position and the current position, and small enough that the target position "leads" the current position by enough that the motor stays is its constant velocity phase (at a low speed).
    If you want to move faster and smoothly, you need to issue fewer "setPosition" calls. One "setPosition" at full speed should move pretty quickly.

  8. Re: Project of robotic Arm with dynamixel motors

    Thanks for answering!!!

    1-First, Brooks, the thing/problem is that the design of the components and the structure for my project is already fixed, that is, I have to do the project with:

    2 dynamixel MX-64 engines
    2 dynamixel MX-106 engines
    Arbotix electronic card
    Program in arduino
    The structure of the video

    and I can´t change anything, so, i can´t use any other controller/any other form of structure.

    2-Huhg, okey between today and tomorrow I will try to prove what you tell me of set a smaller speed! Let's see if I can get something, I'll let you know!

    Anyway, this problem now has less importance, because yesterday I achieve the robot to be much faster (I changed the Delay commands by Delaymicroseconds), and now the robot repeats the movements really fast!
    That's why now, when going faster, those blockages of the robot when moving are less noticeable and the problem become less important.

    In conclusion, from next week I think I'm going to focus more on the other problem, on the code to get the load or torque of the robot, and try to make it stop when I touch it with my hands. Huhg, I'm still trying to try the advices you gave me! I'll tell you if I get something! Meanwhile I am open to new tracks/advices!!


  9. Re: Project of robotic Arm with dynamixel motors


    Unfortunately I have not been able to advance the project this week because I have broken the arbotix. I can´t upload the program to the card (I've done all kinds of tests) and it does not even turn on the LED. That is why it will take longer to have results with torque control.
    I will also ask in other forums but, do you know what the problem could be?

    The answer that the program gives me is the following:

    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 10 of 10: not in sync: resp = 0xff
    Problem uploading to arbotix.

    I have already requested a new arbotix, to see how long it takes me to arrive, meanwhile I will try to find solutions to see if this can be fixed.

    Thank you very much!

  10. Re: Project of robotic Arm with dynamixel motors

    Hello again!

    Throughout the morning I managed to solve the problem with the arbotix, so tomorrow I will continue with the control of the torque.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 07-11-2017, 07:27 AM
  2. Replies: 8
    Last Post: 06-01-2015, 06:22 PM
  3. Replies: 0
    Last Post: 05-06-2012, 10:23 PM
  4. Question(s) replacing wheelchair motors for Mutant Shopping Cart Project
    By LUCKY13 in forum Mechanics / Construction
    Replies: 4
    Last Post: 06-21-2010, 09:30 PM
  5. Project C# Dynamixel Project
    By MikeG in forum Software and Programming
    Replies: 6
    Last Post: 01-12-2010, 09:21 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