
Sudo
PLEASE NOTE: THIS GUIDE IS OUTDATED. BADLY. (remind me later to fix this and spiff it up a bit, please)
So, you finally have your EZ-B v4. You love it already, and you're ready to hook this baby up to some sort of Dynamixel powered creation. You go to plug everything in, and - wait. You have no idea how to set those Dynamixels up.
Well, I do, and I'll show you how.
SECTION 1: GETTING TO KNOW DYNAMIXELS
Dynamixels are intelligent servos that can track not only position, but temperature, speed, and load. The servo can automagically shut itself of incase of a failure. These servos are also incredibly strong. But there's one feature in particular that is useful, but at the same time a little hard to wrap your head around. In this section, we will cover daisy chaining and other features of the AX-12A Dynamixel; however, most of the servos in the Dynamixel family work exactly alike, so this guide can help you with most models.
On the back of all of your Dynamixels, you will notice a couple things. A place for a bolt, a light, two wire ports, and the ID. Lets go over all of them so you know what they do:
Light - Blinks once when turning on. If the light is flashing, there is a failure of some sort.
Screw hole - Allows you to attach the Dynamixel to a bracket.
Wire ports - Allows you to connect to other Dynamixels, in a long strand of servos, both to and from other Dynamixels. This means both ports work the same way, which means it doesn't matter which side is plugged in. (see image below)
ID - What the EZ-B and ARC address the Dynamixel as.
PART 2: CONNECTING YOUR DYNAMIXELS TO THE EZ-B
All Dynamixels must plug into port D5 in order to properly work. This means that all of your Dynamixels must plug into one port. If you have more than one strand of connectable Dynamixels, you will have to use a Dynamixel splitter hub, like this one here:
You can either run a cable to the EZ-B via a power base or via the powered splitter. I advise that you use only one, as using both at once can brown out the EZ-B.
Q: So, now that that's done, what power supply do I use? Mains or a battery pack?
A: Both will work just fine. Just make sure you have an adequate power supply at around 10v.
"But wait!" you scream. "Dynamixels can run at 9v-12v! Why 10v?"
Because voltage is gradually lost over time depending on how many servos you're running at once, as well as when the EZ-B is powered on. The more servos you have, the higher you should up your voltage to get a steady 10v overall.
So, if you have power running to the EZ-B, Dynamixels set up to port D5 (as well as the optional splitter) you should have something resembling this:
Now that you're powered on, lets move into ARC and get your Dynamixels running.
PART 3: OPERATING THE DYNAMIXELS WITH ARC
Connect to your EZ-B as usual (We won't be covering connections in this guide). Bring up a servo control panel and go to the servo configuration screen as shown below.
Click the Dynamixel box and scroll down until you see the ID of the Dynamixel you want to move (the ID on the back of the servo). In this demonstration, we'll be selecting Dynamixel AX18.
Select it and save the configuration. Congrats, you just set up your first Dynamixel in ARC! It should operate just like a normal servo. This applies to all servo control functions.
PART 4 (EXTRA): ASSIGNING A NEW ID TO BLANK SERVOS
When you buy a Dynamixel that doesn't come in the kit, the ID sticker will sometimes be blank, which means it hasn't be assigned a "real" ID. However, a tool in ARC can give Dynamixels a new ID.
First, open up the Dynamixel Config. control in ARC. You should see something similar to this:
All blank servos are assigned ID 1. If you have a dynamixel with the ID 1 already, remove it before you proceed. Simply choose the new ID you want (in this case, AX18) and press execute. ARC will assign it a new ID. That's it, you're done! You can also write the ID on the blank tag if so desired.
GUIDE LAST UPDATED: 12/9/2014
@ RobertL184
The intermittent control issues are related to the wrong setting being used by ARC. For example if you set your goal position for 70 and the servo is at 10 it will make its way to the new position at full speed.
Now if you try adjusting the speed through ARC it does it slower but not by reducing the speed but the torque. So if there is any load on the servo it will jerk around and be unstable or not respond at all.
Sending and receiving commands is quite simple once you figure out the format. They use data packets. The following tells servo #12 to go to position 400 at the speed of 20.
If you are using the UART these numbers would be sent as bytes.
255, 255 ,12 ,7 , 3, 30, 144, 1, 20, 0, 32
255 and 255 is the heads up for the dynamixels basically saying wake up there is a command coming.
12 is the ID of the servo #12 that your sending the command to.
7 is the length of the instruction
3 Indicates that you are sending a command to the servo to do something
30 Tells the servo the command is for setting the position of the servo
144 and 1 are LSB and MSB and in micro processer language represents 400
20 and 0 is the above and represents 20
32 is the checksum. it adds up all the items in the packet to make sure it hasn't been corrupted when sent to the servo.
@Jeremie,
Here is an EZ Script to control a Dynamixel servo. I've also included the reset script if you were using ARC to control your Dynamixels.
Again if the instruction packet contains 92, 34 or 40 it will crash.
For Richard and others a properly working UART is a must. Again its very basic feature that all your competition have.
What they don't have is the EZ Buider software and EZ Scipt. You guys have a great product I hope you can resolve this issue in a timely matter.
AXServoControl.EZB
Hi guys,
I did some testing over the weekend here is what I've found:
UART0, UART1, & UART2 are 100% functioning properly. They can both transmit and receive data with precision. They can work with the Roomba, they can work with Arduinos, you name it it's completely capable to communicate with it serially.
Here's some pictures of my tests:
The tests show me transmitting the integer values 34, 40, & 92 from the ez-bv4 to a Freeduino.
The discrepancy is in the uartRead() function inside ARC. When a integer is transmitted serially, it is interpreted by the uartRead() function as an ASCII value, this is just like many other systems on the market.
The integer values of 34, 40, and 92 are actually special characters in ascii:
34 is quotation marks 40 is an opening bracket 92 is back slash
Even if a separate board (such as an Arduino) sends these values to ARC errors occur. It seems that these are reserved characters in ez-script. This is likely on DJ's list of items to look at already so I will just wait until he gets to it.
Good news is that it is very rare that you will need to receive special characters such as these. It should be noted that if you'd like to receive the integer value of 34 you simply have to use the following example: uartWrite(0, 0, 51, 52)
51 represents ascii value: 3 52 represents ascii value: 4
As a side note, I'm still looking into the Dynamixel situation.
@Jeremie,
Thanks for looking into the issue, I thought I tried sending plain integers and it didn't work for me before. I rewrote my code and I can now send all commands to the Dynamixel servos. Yea ! , thanks !
Unfortunately the UART(read) issue is a problem because when reading positions from the dynamixel servo two bytes are received.
Least Significant Byte and Most Significant Byte:
So two bytes are received that represent the position of the servo. $A=GetByteAt($RX_DATA,13) $B=GetByteAt($RX_DATA,14) $position=$A+(256*$B)
So if there is a 92, 40 or 32 in any of those two bytes the script crashes.
I have attached my updated code to control the servos as well as a script to read its position. You need to attach a data line to D6 and you will be able to receive the current position of the servo but it will crash if its in those three positions. All you have to do is move the servo a bit and click the start button again.
Thanks again for looking into this Jeremie.
AXServoControl.EZB
refrech this topic made some little changes.
@mtiberia sorry I haven't been on this issue as fast as I had hoped. But tonight I was finally able to get the CM-530 to work in Windows 8. More on that below.
I used your "ResetAX-12A.ezb" code and was able to verify that it indeed did reset the all the Dynamixels attached to the ez-bv4 back to being readable by the CM-530. Thank you for that example (I'm still trying to decipher how it works but DJ would know at a glance). I'll make a request for a button to be included in the ARC "Dynamixel configuration tool" that would execute this code in order for users to go back to using their Dynamixels with their Robotis controller. Long-term we'd likely want to take advantage of the readings coming back from the Dynamixels instead of disabling them, but we haven't decided anything around that yet.
Since I could only communicate with the CM-530 on a winXP system and the ez-bv4 on my Win8 laptop, it got old really quick carrying 2 laptops around to get this issue dealt with. So, I finally got around to solving the my FTDI driver woes in Win8 tonight.
For those just tuning in, the CM-530 has what is considered to be a 'fake' FTDI USB-to-Serial converter chip installed. Once you plug it the controller into a Win8 computer with up-to-date FTDI drivers the chip gets bricked.
A Trossen Robotics blog post helped me out quite a bit.
Here's what I had to do:
Plug the CM-530 into my WinXP laptop and run a program called FT_Prog from FTDI in order to reprogram the FTDI chip's PID from the bricked ID of '0000' back to '6001'.
Once that was successful, I then had to plug the CM-530 into my Win8 laptop, wait for it to install and then do the following:
I was then able to communicate with the CM-530 via the RoboPlus software from Robotis, and breathe a 'sigh' of relief I might add
I will try to verify the two-way communication example soon.
I've been away for a bit guys. OldBotBuilder and Nomad , looking really cool, keep posting your progress.
Jeremie I've attached a PDF file that shows the control table for the dynamixels servos. If you reference the example code that I posted, the $table variable corresponds to the address on the left side of the table. You can use the integer value not the Hex.
So if you want to set the goal value for the servo set the $table value to 30. You'll also notice that there is another goal value at address 31. Ignore that because the servo can be placed at positions ranging from 0 to 1023. So you need to send two bytes LSB and MSB. The LSB is for table 30 and MSB is table 31.
When you send two bytes it automatically goes down to the next value in the table. So if you send 4 bytes at $table 30, you'll set the goal position with bytes 1 and 2 and with bytes 3 and 4 you will set the speed. That works because table 32 and 33 are for setting the speed of the servo.
Sounds confusing at first, it took me a while to figure this out.
DynamixelControlTable.pdf
So this was never resolved? I have 42 AX-12 servos and was wanting to use my V4 to control them. I have been controlling 2 AX-12 servos in a few tests. They seem to work fine so far. Glad I didn't brick anything.