Page 18 of 31 FirstFirst ... 814151617181920212228 ... LastLast
Results 171 to 180 of 302

Thread: PhantomX using a Teensy 3.1

  1. #171

    Re: PhantomX using a Teensy 3.1

    Quote Originally Posted by KevinO View Post
    Once you go to the MX line you will never want to go back to the AX line. :P So smooth... and strong.
    And you still have all your fingers

  2. #172
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    781
    Images
    276
    Rep Power
    71

    Re: PhantomX using a Teensy 3.1

    Hi,

    I finally got my two MX-64 working. At first no one of them worked at all, they only returned value -1 on servo voltage and position. Got me really frustrated. I then found my old CM-5 and updated the RoboPlus software and the CM-5 firmware. X-ing my fingers the MX-64 would work on the CM-5. At first they didn't came up using the "Dynamixel Scan", but using the rather slow "Dynamixel Search" worked and the MX-64 came up! I was then able to test them ok and changed the ID to 20 and 21.

    I then tested them on the Teensy and they worked fine, lol!
    I'm puzzled why they worked fine after testing them on the CM-5?
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  3. #173
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    781
    Images
    276
    Rep Power
    71

    Re: PhantomX using a Teensy 3.1

    Hi Kurt and others,
    Since the MX-64 has a max com speed of 3Mbps. I simply tried "BioloidControllerEx bioloid = BioloidControllerEx(3000000);" in your test program. But that didn't work. Any idea or tip of why?
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  4. #174

    Re: PhantomX using a Teensy 3.1

    Hi Kåre,

    Not sure?

    Probably need to try simple test to see how it works. Also my guess is that it would only work if you set the CPU speed to 96mhz (assuming it actually does go to 96). As if I understand the chip well enough, it would set the Baud rate divisor something like:
    (96000000 + 1500000)/3000000 = 32. The actual divisor is number / 32 = 1, and then the fine tune value is (32 & 0x1f)=0

    Did simple test, with Teensy3 and Logic 16, with a quick and dirty:
    Code:
    void setup() {
      delay(2000);
      Serial.begin(9600);
      Serial2.begin(1000000);
      Serial.println("Test Serial");
    }
    
    void loop() {
      Serial.println("1mb Test");
      Serial2.println("1mb");
      Serial1.begin(1000000);
      Serial1.println("1MB test");
      Serial1.flush();
      Serial1.end();
      delay(100);
      Serial.println("2mb Test");
      Serial2.println("2mb");
      Serial1.begin(2000000);
      Serial1.println("2MB test");
      Serial1.flush();
      Serial1.end();
      
      delay(100);
      Serial.println("3mb Test");
      Serial2.println("3mb");
      Serial1.begin(3000000);
      Serial1.println("3MB test");
      Serial1.flush();
      Serial1.end();
      delay(500);
    }
    Sorry I did say dirty :lol:. The stuff in the LA looks correct.

    I don't see anything in my Bioloid Serial code base associated with the Teensy test that does anything with the baud rate, except pass it through to underlying serial object.

    Don't have one of those servos to try out on the buss, but if I did, I would, hook up one to the AXBus, I would also hook up the LA to one of the data pins of the AXBUS and first see if it looks like the data is going out and any responses coming back... If something going out, can then verify right baud rate. If something coming back and looks correct, may be issue in Teensy receiving data that quick? Althought I think Serial1 object actually has an underlying 8 byte hardware buffer...

    The other thing I would check is that the Baud rate is set to 3mb on the servo... But I assume you have already done this.

    Not sure what else yet
    Kurt

  5. #175

    Re: PhantomX using a Teensy 3.1

    Forgot to comment:
    I finally got my two MX-64 working. At first no one of them worked at all, they only returned value -1 on servo voltage and position. Got me really frustrated. I then found my old CM-5 and updated the RoboPlus software and the CM-5 firmware. X-ing my fingers the MX-64 would work on the CM-5. At first they didn't came up using the "Dynamixel Scan", but using the rather slow "Dynamixel Search" worked and the MX-64 came up! I was then able to test them ok and changed the ID to 20 and 21.

    I then tested them on the Teensy and they worked fine, lol!
    I'm puzzled why they worked fine after testing them on the CM-5?
    I wondered at the time if you had updated the baud rate of the servos. I think I read at some point that some of these other servos are shipped using a different baud rate than 1000000 (something slower). So I wonder if the first test you did Dynamixel Scan may have assumed 1000000 (like on Teensy), but the Dynamixel Search, may try reconfiguring the Serial port for different baud rates, until it can get a servo to respond. Maybe at that point it might update the Baud rate register to whatever you have the buss configured for at the time? Don't know never used CM-5 or their software... Once configured to 1000000 then XBee worked...

    Just a thought (probably wrong)
    Kurt

    P.S. - Having a scan may be another good Teensy test. Maybe with optional try baud rates...
    Last edited by KurtEck; 05-07-2014 at 10:02 AM.

  6. #176
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    781
    Images
    276
    Rep Power
    71

    Re: PhantomX using a Teensy 3.1

    Thanks for your reply Kurt! Oh.. To be honest I've never set the baud rate on the servo..lol. I'm then wondering what the default baudrate is on a new MX-64. I did also have a brand new AX-18A that worked at first try. Anyway I'll try the LA for fun.
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  7. #177
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,142
    Images
    27
    Rep Power
    265

    Re: PhantomX using a Teensy 3.1

    MX servos ship with baudrate set to 57600 bps just like their DX/RX/EX predecessors. Also, the calculation to set the baudrate register to >1Mbps is different from the formula for 1Mbps and slower.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  8. #178
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    781
    Images
    276
    Rep Power
    71

    Re: PhantomX using a Teensy 3.1

    Thanks for the info! That explains it. So the CM-5 probably changed the baudrate on the servo to 1000000 automatically then.
    Quote Originally Posted by tician View Post
    Also, the calculation to set the baudrate register to >1Mbps is different from the formula for 1Mbps and slower.
    Ok, would you mind elaborating this a little more?


    EDIT:Oh, sorry Kurt. I didn't mean to hijack this thread.
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  9. #179
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,142
    Images
    27
    Rep Power
    265

    Re: PhantomX using a Teensy 3.1

    MX-64 support page. The baudrate register value was initially designed using the ATmega's baudrate register calculation with a value of 1 being the maximum of 1Mbps (with double sampling rate enabled; 2Mbps without). The STM32 can reach higher baudrates, so they cut off the lowest rates from the ATmega calculation and gave them set values for the STM32.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  10. #180
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    781
    Images
    276
    Rep Power
    71

    Re: PhantomX using a Teensy 3.1

    Quote Originally Posted by tician View Post
    Thanks, found all the info I needed there.
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PhantomX Hexapod Kit
    By SuperMiguel in forum Projects For Request and/or Sale
    Replies: 12
    Last Post: 12-29-2013, 09:36 PM
  2. Question(s) PhantomX AX Quadruped Mark II PhantomX Robot Turret Equipped??
    By hwan we in forum Robotics General Discussion
    Replies: 1
    Last Post: 03-11-2013, 02:09 PM
  3. Question(s) PhantomX Drawings?
    By phil0stine in forum Humanoids, Walkers & Crawlers
    Replies: 2
    Last Post: 01-03-2013, 02:09 PM
  4. For learning: PhantomX Hexapod vs PhantomX Quadruped
    By Leugim in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-26-2012, 08:50 AM
  5. My PhantomX Hexapod
    By Gilrock in forum Humanoids, Walkers & Crawlers
    Replies: 0
    Last Post: 09-26-2012, 02:23 PM

Posting Permissions

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