
mtiberia
Today is the first time I really had a chance to play with the EZB-4. I've connected a Dynamixel servos and had mixed results. The resolution is 0 to 170 but the servos are unresponsive from 81 to 89 for some reason.
I tried communicating with the servos with EZ script using UART 2 with no luck.
I'm using the communication protocol for the servos. This works with Python through a serial connection.
UARTInit(0,1,1000000)
$AX_Write_Data=3 #Dynamixel Instruction Code
$AX_ID=14 #Servo ID
$length=7
$table=30 #this is the entry code for setting the goal position of the servo
$position=100 #set goal position for servo
$speed=20 #set the speed of the servo
$MSB=Round($position/256,0) $LSB=$position%256 $MSB2=Round($Speed/256,0) $LSB2=$Speed%256
$checksum= 255-(($AX_ID+$length+$AX_Write_Data+$table+$MSB+$LSB+$MSB2+$LSB2)%256)
$handshake=GetAsByte(255) $AX_ID=GetAsByte(14) $length=GetAsByte(5) $AX_Write_Data=GetAsByte($AX_Write_Data) $table=GetAsByte($table) $LSB=GetAsByte($LSB) $MSB=GetAsByte($MSB) $LSB2=GetAsByte($LSB2) $MSB2=GetAsByte($MSB2) $checksum=GetAsByte($checksum)
UARTWrite(0,1,$handshake) UARTWrite(0,1,$handshake) UARTWrite(0,1,$AX_ID) UARTWrite(0,1,$AX_Write_Data) UARTWrite(0,1,$table) UARTWrite(0,1,$LSB) UARTWrite(0,1,$MSB) UARTWrite(0,1,$LSB2) UARTWrite(0,1,$MSB2) UARTWrite(0,1,$checksum)
Thanks
That's neat that you have attempted to create your own
there is already support built into the EZ-B v4. Check this link out: Dynamixel Servo
I still can't get the servos to move from 81 to 89 and I would like to have control over the speed.
I should be able to communicate with the servos through the EZ script, what I'm I doing wrong?
ServoSpeed() will set the speed of all servos including dynamixel.
I'm unsure of what you mean by not being able to move to positions outside of 81-89? Can you clarify and I'll help you. It works with our servos, but they are standard and have the factory settings still. Perhaps you need to reset yours?
I can move them from position 0 to 170 but for some reason when I get to position 80 it stops responding until position 90 is indicated. The servo then becomes responsive again all the way to 170.
Interesting - I will take a look tomorrow for you.
As for your code, it appears you are using UART 0 and not UART 2.
Sorry I'm using digital port 5 to connect to the dynamical servo. My python code works but I can't get the EZ script to work. It really would cool if it would.
I have been playing with Dynamixel servos connected to D5. I haven't seen a dead spot issue but I have been having some communication issues. I am trying to use the D18 and D19 UART to talk to an emic2 serial text to speech device. I found I had to send ARC commands to the Dynamixel servos first or I couldn't talk to them. Also the servos would occasional seem not to recieve commands after I had sent text to the D18/D19 UART2. I didn't try using any commands to set up the D5 Dynamixel port using UART commands. ARC servo speed works with the Dynamixel servos when I can reliably communicate with them. My problem didn't show up until I started using a second UART. Was trying to debug what is really happening when I saw this forum discussion.
Use the latest ARC - I am not receiving any dead spots or communication issues. Perhaps check your wires for communication issues - or add a capacitor to filter the motor noise?
As for the dynamixel, I did notice there was an occasional checksum calculation error in the old ARC. It is fixed in the new one. Download the new one from here: ARC release