Page 4 of 4 FirstFirst 1234
Results 31 to 39 of 39

Thread: DynaManager Not Finding Servos

  1. Re: DynaManager Not Finding Servos

    Displays "working." I was having so much fun programming my turret until it stopped functioning Thanks for all of your help! I appreciate it a lot. I've been waiting over a week for a reply from Trossen. I'll keep phoning/emailing.

    This is what I had functioning before the issue. It isn't smooth because I was sending commands every ~60-100ms and there was a small bug in my positioning code.
    Last edited by keveng; 1 Week Ago at 03:14 PM. Reason: Inserted link

  2. #32

    Re: DynaManager Not Finding Servos

    So the two IO pins associated with Serial1 are tied to each other and appear to work...

    So Again if it were me, I again would try simple things. I know that you probably have done this.

    That is, make sure there is nothing plugged into the Arbotix board except the Power and USB cables and Connect up only one Servo, with one three pin Servo cable and maybe try my simple AX12 test
    Code:
    void FindServos(void) {
    
      bioloid.readPose();
      int w;
      Serial.println("Begin: ");
      for (int i = 0; i < 254; i++) {
        w = ax12GetRegister(i, AX_PRESENT_POSITION_L, 2 );
        if (w != (int) - 1) {
          Serial.print(i, DEC);
          Serial.print(" - ");
          Serial.println(w, DEC);
        }
        delay (100);
      }
      Serial.println("Done");
    }
    In the FindServos function try removing the readPose call. Build it and try running it... This is the: 5 <CR>
    test.
    Does it locate that servo? If not try a different servo, and also try a different servo cable.

    If one of them works, try connecting another servo to it and see if it still works... What may happen is one or more servos may be reset to #1 and then they confuse things.

    Also check over your wiring of the servos. I have had Servo wires get messed up before. Example is one gets caught in a joint and either creates a short or wire stretch and makes an intermittent break...

    Beyond that...

  3. Re: DynaManager Not Finding Servos

    Still unresponsive. The output now is just "Begin: ." All of my testing has been done with only one servo attached at a time. I've attempted most debugging with both servos (swapping them in/out), but as I'm losing hope I've opt'd to test with one to save time and the connectors. Both servo cables I have are good and every wire strand is unbroken.

    It's very odd.
    Last edited by keveng; 1 Week Ago at 10:24 PM.

  4. #34

    Re: DynaManager Not Finding Servos

    Sorry, not sure what else to suggest. Again if you have different hardware to test the servos with or servos that were not part of earlier tests I would try that.

    What I would do is to try out a different controller board, but I have that luxury...

    If a servo did not respond, I would then use something like the USB2AX and the Dynamixel manager and try to do a servo recovery (don't remember if this is what it was called or not)...

    If it were me and I did not have any additional hardware, I might try a few long shots, like maybe a broadcast package got sent out that set the baud rate of all of the servos to something else... I once set a servo to baud rate 0 which is 2mhz...

    So I thought I hacked up a test program trying to see if I could talk to servos, but I don't see it any more...

    It went something like:
    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    //====================================================================================================
    // Setup 
    //====================================================================================================
    void setup() {
      Serial.begin(38400);  // start off the serial port.  
    
      delay(250);
      bioloid.begin(1000000, &AX_BUS_UART, SERVO_DIRECTION_PIN);
      
    }
    
    uint8_t ax_baud_divisor = 0;
    //====================================================================================================
    // Loop
    //====================================================================================================
    void loop() {
      unsigned long baud_rate = 2000000L/(ax_baud_divisor + 1);
      Serial.print("Try Baud: ");
      Serial.println(baud_rate);
      Serial1.end();
      Serial1.begin(baud_rate);
      if (FindServos()) {
        Serial.println("Found a servo!");
        // wait until the user enters something to continue
        while (Serial.read() == -1) ;
        while (Serial.read() != -1) ;
      }
      ax_baud_divisor++; 
    }
    
    //=======================================================================================
    bool FindServos(void) {
    
      bool found_servo = false;
      int w;
      Serial.println("Begin: ");
      for (int i = 0; i < 254; i++) {
        w = ax12GetRegister(i, AX_PRESENT_POSITION_L, 2 );
        if (w != (int)-1) {
          Serial.print(i, DEC);
          Serial.print(" - ");
          Serial.println(w, DEC);
          found_servo = true; 
        }    
        delay (10);
      }
      Serial.println("Done");
      return found_servo; 
    }
    Warning typed on the fly, but the idea is try to find a servo on all of the different possible baud rates...
    If it hangs at some baud where it does a start, but never prints a Done then something is wrong...

    Again long shot!

  5. Re: DynaManager Not Finding Servos

    Doesn't compile on Arduino 1.8.5 "multiple definition of `__vector_28'." Dynamixel Wizard does something similar when it attempts to recover a servo. It goes through all of the valid baud registers and looks for an ID. Nothing found. The Dynamixel tech support said that the current servos cannot be set to an invalid register, but that this was an issue with the previous generation. So I believe this can be safely ruled out.

  6. #36

    Re: DynaManager Not Finding Servos

    I made a version of the program that runs:
    Code:
    #include <ax12.h>
    #include <ax12.h>
    
    //====================================================================================================
    // Setup 
    //====================================================================================================
    void setup() {
      Serial.begin(38400);  // start off the serial port.  
    
      delay(250);
     
    }
    
    uint8_t ax_baud_divisor = 0;
    //====================================================================================================
    // Loop
    //====================================================================================================
    void loop() {
      unsigned long baud_rate = 2000000L/(ax_baud_divisor + 1);
      Serial.print("Try Baud: ");
      Serial.println(baud_rate);
      dxlInit(baud_rate);
      if (FindServos()) {
        Serial.println("Found a servo!");
        // wait until the user enters something to continue
        while (Serial.read() == -1) ;
        while (Serial.read() != -1) ;
      }
      ax_baud_divisor++; 
    }
    
    //=======================================================================================
    bool FindServos(void) {
    
      bool found_servo = false;
      int w;
      Serial.println("Begin: ");
      for (int i = 0; i < 254; i++) {
        w = ax12GetRegister(i, AX_PRESENT_POSITION_L, 2 );
        if (w != (int)-1) {
          Serial.print(i, DEC);
          Serial.print(" - ");
          Serial.println(w, DEC);
          found_servo = true; 
        }    
        delay (10);
      }
      Serial.println("Done");
      return found_servo; 
    }
    It found my Servos.

  7. #37

    Re: DynaManager Not Finding Servos

    And for what it is worth, here is a version of the program that made that I used an Arduino Leonardo to the scanning...
    Code:
    #include <ax12Serial.h>
    
    //====================================================================================================
    // Setup 
    //====================================================================================================
    void setup() {
      while (!SerialUSB) ;
      SerialUSB.begin(38400);  // start off the serial port.  
      delay(250);
    
     
    }
    
    uint8_t ax_baud_divisor = 0;
    //====================================================================================================
    // Loop
    //====================================================================================================
    void loop() {
      unsigned long baud_rate = 2000000L/(ax_baud_divisor + 1);
      SerialUSB.print("Try Baud: ");
      SerialUSB.println(baud_rate);
      ax12Init(baud_rate, &Serial1);
      if (FindServos()) {
        SerialUSB.println("Found a servo!");
        // wait until the user enters something to continue
        while (SerialUSB.read() == -1) ;
        while (SerialUSB.read() != -1) ;
      }
      ax_baud_divisor++; 
    }
    
    //=======================================================================================
    bool FindServos(void) {
    
      bool found_servo = false;
      int w;
      SerialUSB.println("Begin: ");
      for (int i = 0; i < 254; i++) {
        w = ax12GetRegister(i, AX_PRESENT_POSITION_L, 2 );
        if (w != (int)-1) {
          SerialUSB.print(i, DEC);
          SerialUSB.print(" - ");
          SerialUSB.println(w, DEC);
          found_servo = true; 
        }    
        delay (10);
      }
      SerialUSB.println("Done");
      return found_servo; 
    }
    Note: this uses my bioloidserial library,

    Here is a picture showing a hookup to the Arduino:
    Click image for larger version. 

Name:	IMG_0157.jpg 
Views:	14 
Size:	116.7 KB 
ID:	7105

    Again I used part of a bioloid cable and part of an RC servo cable. I connected up both RED and YELLOW wires to the Signal wire and Black to the GND pin... You can see I connected the RED/YELLOW to pins 0 and 1... So shorts TX/RX pins. And connected up Black to Ground pin.

    I then plugged the AX connector plug into a powered USB hub, which has all of the SERVOS plugged in... And it found them.

  8. Re: DynaManager Not Finding Servos

    The updated Arbotix Arduino code worked ... and it found my servos! Both servo IDs had been set to 1 and their baud rate @ 666666. Both servos have been recovered and work as expected. Thanks so much for all of the support & code @KurtEck. I need to be a bit more careful around these serial connections. A malformed message can cause a huge headache. At least that is what I assume caused the issue during a code refactor.

  9. #39

    Re: DynaManager Not Finding Servos

    You are welcome!

    Glad you have it working. Yes bad messages which sometimes can be caused by bad power, can be a headache!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help finding right Arduino for RC quadruped
    By Duhjoker in forum Arbotix, Microcontrollers, Arduino
    Replies: 9
    Last Post: 05-24-2015, 05:08 PM
  2. Is there another app to assign motor ids besides dynamanager?
    By wthierry in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 08-15-2014, 12:38 PM
  3. Arbotix m and Dynamanager on mac
    By wthierry in forum Arbotix, Microcontrollers, Arduino
    Replies: 3
    Last Post: 08-12-2014, 08:15 PM
  4. Question(s) Help finding servo potentiometers
    By alonso in forum Sensors
    Replies: 7
    Last Post: 06-22-2013, 07:20 PM
  5. Student Project II (finding the parts)
    By csdude in forum Rovers
    Replies: 22
    Last Post: 06-03-2008, 09:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •