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
- Power Check: Confirmed 24V supply to the shield and to RS485 ports.
- Jumper Position: Jumper is removed to power board with 24V.
- 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.
- Servo and Shield Connections: Verified connections between the shield’s RS485 ports and the servo.
- 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
- 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?
- 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!