How to retrieve the present load

Hi all,
my HW: Portenta with dynamixel shield + MX64AT
my SW:

/****  SETUP DXL  ****/
const int DXL_DIR_PIN = A6;
const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 2.0;
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL    Serial1
#define  Serial  _UART_USB_
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);
using namespace ControlTableItem;
void setup(){
 _UART_USB_.begin(115200); while (!_UART_USB_);
 /****  SETUP DXL  ****/
  dxl.begin(115200);
  dxl.setPortProtocolVersion(DXL_PROTOCOL_VERSION);
  // Get DYNAMIXEL information
  dxl.ping(DXL_ID);
  dxl.torqueOff(DXL_ID);
  dxl.setOperatingMode(DXL_ID, OP_CURRENT_BASED_POSITION);
   dxl.torqueOn(DXL_ID);
   dxl.setGoalCurrent(DXL_ID, 200, UNIT_MILLI_AMPERE);
}

void loop() {
  // put your main code here, to run repeatedly:


 _UART_USB_.println(dxl.readControlTableItem(PRESENT_LOAD, DXL_ID));
  
}

My problem: dxl.readControlTableItem(PRESENT_LOAD, DXL_ID) is always 0. I don’t understand this behavior. Can someone explain to me and help me to retrieve Motor Power? Indeed I am trying to compute it, solving the formula: MaxTorque* PresentLoad/1023. Maybe PresentLoad is not available with protocol 2.0? Can the current be equivalent in some way?

Thank You so much

As you suspected, the Present Load control table item is not available for 2.0 firmware DYNAMIXELs.

The Present Current control table item can be used to estimate the load similarly to the Present Load item.

Thank You to replied. I would like to understand how much, in terms of kilograms, the dynamixel can rise at a distance of 50 cm. Can you guide me to the solution if u know it. I mean, should I collect the absorbed current during the task and compute:

  • Torque: [Nm]= [V][A]/[rad/s] = [W][s]/[rad]
  • Force: [N]=[Nm]* [efficiency] /[m]
    and then only [kg]=[N]/9.8 or Torque / (9,8 m/s^2)?
    With controltable I can reach the variable, in my case current and rotation speed. Is there a way to get the efficiency avoiding the performance graph?
    Thank You again

The amount of weight that can be lifted at a specified radius from the DYNAMIXEL can be calculated according to the following formula:

Nn = Radius x Newtons

In this case, the estimated maximum Newtons liftable at that distance is 12 (given the 6Nm rating of the listed servo), and newtons can be converted into Kg as follows:

1 N = 0.1019716213 KgF

So the rough estimate of the maximum Kg load .5m away from the horn is ≈1.2Kg, although that would be the absolute maximum possible load, the the real maximum value in practice would likely be around .9Kg or so, to leave some room for safety of the actuator.

1 Like