PM42-010-S260-R with Arduino UNO and Dynamixel Shield

Hello everyone,
I’m working on a project involving a Dynamixel PM42-010-S260-R servo and using an Arduino Uno R3 with a Dynamixel Shield. I’m having trouble getting any response from the servo and receiving no feedback from the Serial Monitor, except a jumbled mess. I’ve included photos of my setup for reference (attached below).
Here’s a summary of my setup, code, and the issues I’m experiencing:


Setup Details
• Servo Model: Dynamixel PM42-010-S260-R
• Microcontroller: Arduino Uno R3
• Communication: RS485 via Dynamixel Shield
• Power Supply: 24V provided to the Dynamixel Shield (I’ve confirmed 24V on the RS485 ports)
• Servo ID: Set to 11
• Baud Rate: 57600


Code I’m Using
Below is the code I’m currently working with. I’ve tried various adjustments based on forum suggestions and the Dynamixel documentation, including toggling torque and adjusting serial connections.
cpp
Copy code
#include <Dynamixel2Arduino.h>

#define DXL_SERIAL Serial
#define DEBUG_SERIAL Serial
const int DXL_DIR_PIN = 2;
const uint8_t DXL_ID = 11;
const float DXL_PROTOCOL_VERSION = 2.0;

Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);

void setup() {
DEBUG_SERIAL.begin(115200);
delay(500);

dxl.begin(57600); // Set baud rate
dxl.setPortProtocolVersion(DXL_PROTOCOL_VERSION);

// Disable torque to allow EEPROM writing
dxl.torqueOff(DXL_ID);
DEBUG_SERIAL.println(“Torque disabled to allow EEPROM writing…”);

// Example setting: change the baud rate in EEPROM (if needed)
dxl.setBaudrate(DXL_ID, 57600);

// Re-enable torque
dxl.torqueOn(DXL_ID);
DEBUG_SERIAL.println(“Torque re-enabled for servo operation.”);
}

void loop() {
// Empty loop for now
}


Troubleshooting Steps Taken

  1. Power Check: Confirmed 24V supply to the shield and to RS485 ports.
  2. Jumper Position: Jumper is removed to power board with 24V.
  3. Software Serial: Suspecting issues due to software serial limitations on the Arduino Uno. I have a UART to USB converter, but am unsure it will work properly.
  4. Servo and Shield Connections: Verified connections between the shield’s RS485 ports and the servo.
  5. Baud Rate and ID: Confirmed correct baud rate (57600) and ID (11) as per the servo’s specifications.

Issues I’m Facing
• No Response from Servo: Despite following the documentation, the servo doesn’t respond to commands.
• No Feedback on Serial Monitor: The Serial Monitor doesn’t display any messages, making it challenging to debug.
• Upload/Run Switch on Shield: I understand that the Dynamixel Shield has an Upload/Run switch. I’m not certain if this switch affects communication, but I’ve tested both positions without success.


Questions

  1. Use of UART to USB Adapter: Would using a Dynamixel U2D2 or similar UART to USB adapter bypass any potential issues with software serial on the Arduino Uno?
  2. Connection to Serial Monitor: Are there any additional steps I need to take to ensure reliable communication between the servo and the Arduino?

Additional Context and Photos
• Servo Control Goals: Ultimately, I want to control the servo’s position in specific increments with delays between each movement.
• Photos: Attached are photos of my setup, including wiring connections, jumper settings, and shield configuration.
Any advice or insights from those who have experience with Dynamixel servos and Arduino setups would be greatly appreciated. I’m open to suggestions on alternative methods, potential hardware changes, or software tweaks.
Thank you in advance for your help!
20241028_123613

With the UNO R3, I had to forego DEBUG_SERIAL. I don’t think that you can point both DXL_SERIAL and DEBUG_SERIAL to the same device Serial()

#include <Dynamixel2Arduino.h>
#define DXL_SERIAL   Serial
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 2.0;

Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);

//This namespace is required to use Control table item names
using namespace ControlTableItem;

void setup() {
  // put your setup code here, to run once:
  
  // Set Port baudrate to 1000000bps matching my 2XL-430's with DYNAMIXEL baudrate.
  dxl.begin(1000000);
  // Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
  dxl.setPortProtocolVersion(DXL_PROTOCOL_VERSION);
  // Get DYNAMIXEL information
  dxl.ping(DXL_ID);

  // Turn off torque when configuring items in EEPROM area
  dxl.torqueOff(DXL_ID);
  dxl.setOperatingMode(DXL_ID, OP_POSITION);
  dxl.torqueOn(DXL_ID);

  // Limit the maximum velocity in Position Control Mode. Use 0 for Max speed
  dxl.writeControlTableItem(PROFILE_VELOCITY, DXL_ID, 30);
}

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

Maybe it is time to move on to OpenRB-150

and DXL Communication Bridge