Board suddenly unable to detect Servos

I am using AX12-A servos for a robotic arm project, and the code I use to run them was working, but then suddenly is not. I am using a DynamixelShield on an Arduino Mega, connected to an Nvidia Jetson Nano that is controlling the servos via rosserial. When debugging the issue, I did not use ROS in an effort to eliminate as many variables as possible. I tried a few example sketches, such as scan_dynamixel and position_mode. WHen I used scan_dynamixel, the serial monitor kept returning the message “0 dynamixels found!” I know that the servos are getting power since their LEDs blink when being plugged in and they have holding torque, and I also tested the pins with a multimeter. The power pins are receiving 11.3 V and the Data pin is receiving 4.6 V (not sure if that’s correct or not for the data pin, but that’s where it is). The position_mode sketch did not work either, even when I tried on a brand new servo (default ID of 1, baud rate of 1000000 and protocol 1.0 all preset). I added the following if statement to the setup function in the sketch:
if(dxl.ping(DXL_ID)){
DEBUG_SERIAL.println(“pinged!”);
}else{
DEBUG_SERIAL.println(“NOT PINGED!”);
}

the result of that change in the serial monitor was “NOT PINGED!”, so I’ve concluded that for whatever reason the board is unable to connect to the servos now, and I am not sure why. The same sketch was working a few days ago and I’m unsure what other variables to test. Any ideas/advice?

Hi @swazi, thanks for your question. Allow me to request some additional information to assist in troubleshooting:

  1. When using the Arduino Mega + DYNAMIXEL Shield, how are you currently reading the serial monitor? Is LN-101 or another connection back to the computer / Jetson Nano in use?

  2. Are you able to observe any damage to the chips or traces on the DYNAMIXEL Shield? Depending on the environment, if an unintended short were to occur this could compromise the communication circuit on the Shield.

Based on your responses, I may be able to recommend further troubleshooting or evaluation. Let me also tag a few users who may have further recommendations.

@Yogurt_Man, this issue might be up your alley. Do you have any other suggestions?

Hi @swazi

Can you paste your whole setup code?

Looking at your code briefly, it dost not seem to me that Ping is not the provided example code by DYNAMIXEL Shield library.

I tested a code below with the AX-12A under default setting as yours.

#include <DynamixelShield.h>

#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_MEGA2560)
  #include <SoftwareSerial.h>
  SoftwareSerial soft_serial(7, 8); // DYNAMIXELShield UART RX/TX
  #define DEBUG_SERIAL soft_serial
#endif

const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 1.0;

DynamixelShield dxl;

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

void setup() {
  // put your setup code here, to run once:
  
  // For Uno, Nano, Mini, and Mega, use UART port of DYNAMIXEL Shield to debug.
  DEBUG_SERIAL.begin(115200);
  
  // Set Port baudrate to 57600bps. This has to match with DYNAMIXEL baudrate.
  dxl.begin(1000000);
  // Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
  dxl.setPortProtocolVersion(DXL_PROTOCOL_VERSION);
}

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

  DEBUG_SERIAL.print("PROTOCOL ");
  DEBUG_SERIAL.print(DXL_PROTOCOL_VERSION, 1);
  DEBUG_SERIAL.print(", ID ");
  DEBUG_SERIAL.print(DXL_ID);
  DEBUG_SERIAL.print(": ");
  if(dxl.ping(DXL_ID) == true){
    DEBUG_SERIAL.print("ping succeeded!");
    DEBUG_SERIAL.print(", Model Number: ");
    DEBUG_SERIAL.println(dxl.getModelNumber(DXL_ID));
  }else{
    DEBUG_SERIAL.println("ping failed!");
  }
  delay(500);
}

Also notice that you need to switch the slide from Upload to DYNAMIXEL after uploading.

You may need to see both Baudrate for Serial and Baudrate for between DYNAMIXEL and Arduino.

Plus, try the Firmware Recovery of your AX series