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
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
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:
Sorry I did say dirty :lol:. The stuff in the LA looks correct.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); }
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
Forgot to comment:
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...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?
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.
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
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
Kåre Halvorsen aka Zenta
---------------------------------
Zenta's YouTube channel
Zenta's Blog
Zenta's Instagram
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
Kåre Halvorsen aka Zenta
---------------------------------
Zenta's YouTube channel
Zenta's Blog
Zenta's Instagram
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks