, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here
I decided to drive my Robotis Bioloid Robot with an EZ-B4. I removed the Robotis CM350 and replaced it with the EZ-B4. Wiring was no problem. The AX-12s are connected to a 12V supply, the EZ-B4 is powered by a DC converter set to 7.4V.
A 6 port expansion hub connected the EZ-B4 Uart (D5) to the signal chain of the 18 servos.
My scripts are in: AX-12Test2.EZB
The Dynamixel plugin is included. The Initialize Lester script initializes UART 1 to 1000000bd, sets up the EZ-B head and hands servos (not connected), clears all the AX-12 servo speeds (V1 - V18) positions the servos to put Lester in the sit position with arms down, then sets all servos to $speed (set @ 5).
The Auto Position Action 'Arm Swing' is set to repeat. Frame arm 0 has the arms down, frame arm 1 has the arms out, and frame arm2 has the arms up.
I have a serious timing problem. When I Execute Arm Swing, the arm up/down motion is very erratic.
Here is a video:
The scope traces show the EZ-B commands at 3.5V peak and the AX-12 responses at 5V peak.
BTW - Reference my thread:
Interface Ez-b To A Trossen Robotics Hr-os1 Biped Robot
I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.
Also, consider reviewing the Learn section for informative lessons and activities.
Check it out!
@OldBotBuilder do you have any pauses between your frames? Have you left enough time for the frame to execute and the servos to arrive in their position?
The voltages are correct, the ez-b has 5V tolerant inputs and they output 3.3-3.5VDC at most. The dynamixels will respond to a TTL high signal as long as it's 2.7V or above. (That's how the Atmel microcontroller inside of it operates)
How do I create pauses between frames? I'm sure that is what is needed.
Is there to be a tutorial on Auto Position that explains the different time,g parameters with examples?
@OldBotBuilder.... You use pauses or sleep commands when you use "actions" which as you know are just a bunch of frames strung together... When you add a frame to an action you can add a pause after it before adding the next frame....
Thanks Jeremie and Richard. I found that the timing issues were more severe than I thought. I hope to have more information and examples that I can post soon.
Timing is instant for the UART data to be transmitted from the EZ-B. However, there is always lag time on the WiFi, but that lag is usually in single digit milliseconds on a local network - specifically on in AP mode.
What could be happening is UART signal interference. The UART Baud Rate of the servos is 1,000,000 bps, which will introduce radio interference AND be affected by radio interference.
This interference would prevent the Dynamixel Servos from decoding the UART data, because it will appear as jibberish and will be ignored. This can be caused by a few things...
1) Lengthy wires
2) Straight wires not twisted with a ground line
3) Poor connections/adapters (i.e. pushing pins in plugs, and not soldering)
4) electrical noise on GND line. Is there servo connected to the battery directly? Those dynamixels draw a lot of current. It would be best to connect their VCC and GND to the battery directly and not through the ez-b v4
Thanks for your interest and input.
I am using the same wiring distribution as the Robotis Bioloid.
The Robotis wiring uses straight wire cables. Maybe like I2C?
I have not found any poor connections.
I have looked at 'GND' at various locations on the 'bot and EZ-B and found no noise.
The 12V to the AX-12 distribution is direct from the power source.
I'll have specific data soon.
Can you set each servo to use a lower baud rate? I have a feeling it's timing related and the servos are skipping packets.
It is not I2C, it's UART which is a TTL Serial communication.
I'll take a look at the dynamixel plugin and see if i made it to configure the baud rate. if not, i'll update it for you.
Get the latest dynamixel plugin: http://www.ez-robot.com/EZ-Builder/Plugins/view/39
You can select the baud rate that the ez-b will communicate with the dynamixel
Also, ensure your dynmiaxel servos are configured for the baud rate that you specify
I suggest a baud rate of 230,400 or 115,200
The new plugin lets me change the transmission baud rate but does not change the baud rate the servo expects.
I am testing with 2 new AX-12s - V1 and V2. They both work at 1000000bd but not at any other bd rate.
Is there a way to change the servo's baud rate?
Thanks for your efforts. I think an EZ-B only controlling the AX-12s in my robot can be made to work very well.
Here are the AX-12 Test scripts: AX-12Test.EZB