Hello. I need a little help in setting up my robot environment.
We are planning to buy eight Dynamixel Mx-64T and to program the algorithm using python and we are a little confused about the hardware setup we should be using.
One solution we have came up is to use OpenCR1.0 that connects all the eight motors using its three TTL ports. I have seen some hardware connections where a single motor is powered up by OpenCR with a single power supply (SMPS 12V 5A power supply, powering up OpenCR). But as we have eight motors with each motor maximum capacity is 12V 5A, a single supply is not enough. We are wondering how can we fulfill the power requirements for all the eight motors in the setup? Should we power up the OpenCR with a bigger power supply?
Any other solutions for the hardware setup will be more than welcome. The only requirement is we need to control all the eight motors simultaneously assuming full capacity and the program should be in python.
@Tahir
In general, all DXLs are connected in parallel, power and communications wise.
So you can use these PCB hubs to create separate power groups as needed:
As long as the GROUND lines and the DATA lines are all in common (but separately - of course) all the way back to the OpenCR, it will be able to control them all using DXL SDK and Python.
These modules also may be handy for your situation
Please note that the stall torque of the DYNAMIXEL is measured with different method which is usually applied in the industrial applications.
It is a good practice to keep enough power margin for the system, but it is very unlikely that you will be continuously using the stall torque range of DYNAMIXEL.
The self protecting function(Shutdown) of DYNAMIXEL will prevent you from any excessive use of the product.
FYI, recommended torque range is about 20% of the stall torque.
The OpenCR software development environment is based on Arduino IDE which does not support Python language.
If you have a separate controller such as PC or SBC, you may want to use DYNAMIXEL SDK as @roboteer mentioned in the above reply.
@willson . Thanks for pointing out that Python is not supported with OpenCR board. @Tahir . To stay with Python throughout, you may want to look into using ROBOTIS CM-550 which can run MicroPython on its own MCU, and/or use SBCs such as RPi 4 or 2W, or Jetson Nano and use U2D2 and Dynamixel SDK in Python.
@willson@roboteer. Thank you very much guys for the information and the tips. And apologies for a delay reply. We were in a phase to decide which motors will suit best for our application. We are finally going for MX-28AT motors Stall Torque : 2.5N.m (at 12V, 1.4A).
so we have two SMPS2Dynamixels, each connected to four motors (in parallel). I had a bit bad experience with 4 MX-motors connected in series. We had a comparatively high dynamic application (high speed and high torque requirements) and we faced the issue of enough power reaching for the last motor in series because the maximum power was consumed by the motors connected closer to the power supply. That’s why i am trying to break to serial chain into several directions. Will the above scheme is okay? Normally each motor should be working at 0.8-1A. so continuously taking 4A for the charger might also not be good?
so should we go for a higher power supply by keeping the same architecture?
Thank you again for all the recommendations and help.
@Tahir@willson
It looks like that you are going for separate Power and Communications Paths for your robot using the common ground from the wall plugs for laptop and DXLs: so I don’t see any problem with this approach.
As you plan to use TWO COM ports, and I have so far used only 1 COM Port (i.e. 1 U2D2 for 12 DXLs) with DXL-SDK so I don’t know for sure if DXL-SDK will accomodate two DEVICENAME
In theory, It looks like that ones should be able to create TWO portHandler with two different DEVICENAME, but here Will Son will know a lot better than I.
Personally, I think that you only need to use 1 U2D2 (and keep the separate power circuits) - Sync/Bulk read/write functions of the DXL-SDK are pretty robust. Are you threading your Python code for each COM port?
@roboteer Thank you for the details.
I have tested multiple servos with multiple connections using USB2AX. Exactly as you said, TWO portHandler with two different DEVICENAME. But i have not used DXL-SDK to program my application. Instead, i have always used stand alone python based libraries developed by Healthcare Robotics Lab at Georgia Tech.
I am not sure if DXL-SDK based program will create a different or its better in terms of making an application?
@Tahir
Thanks for sharing the link robotis: File List
I only had a quick look at it (and I had never used it), although this library is dated 2009, but you are using an older servo model anyway which is supported by this library (and with ROS too - which I do not use) and you are already familiar with it already. You are better off asking the users at GA Tech to see how they like it.
Both the GA Tech Library and the Python DXL-SDK use the PySerial module at the core level, so I don’t expect much performance differences.
There are different releases of the DXL-SDK, see this link to see if they suit your needs:
Are you looking at ROS 2?
From my own experiences, it is the USB Latency Timer that is the biggest issue to get good throughput for all the DXL packets to get back and forth between your laptop and the DXLs.
See multiport example. This would give you insight to use the two ports for each daisy-chained DYNAMIXEL.
I highly recommend using the DYNAMIXEL SDK as this is more common and familiar to users in the community, so that people would give you hands with no hesitance.
Alternatively, if you are concerned about voltage drop (and current drawing) in series, why you don’t jump the power to DYNAMIXEL? and just use the one common data line in series.
@Yogurt_Man@roboteer
Thank you very much for your tips. I have received all my parts and will start working on the application. @Yogurt_Man i will definitely use DYNAMIXEL SDK. The power scheme you shared is also very interesting. I didn’t knew we can just input another supply like this in the chain. I will definitely try it. I will update here soon. Thank you once again guys.
@roboteer@willson@Yogurt_Man
Hey guys. So the scheme you guys suggested all worked out. Big thanks for it. sorry for the delay. I was busy in other projects.
Now we are in a phase of building the controller. We are using Eight MX-28AT motors simultaneously and we are using the python files in the DynamixelSDK. In my robot model, we have the desired motor positions and velocities. I am using the velocity mode while the feedback corrections based on the difference in the desired and actual motor positions.
For now we are using a single port and all 8 motors are connected in series. The problem we are facing now that the communication is very slow. In a single iteration of the program, i have to send the desired velocity to each motor and read its actual current position. To write the velocity on the motor, DynamixelSDK takes 20milisecond while reading the motor position takes 30milisecond. So in total, a single iteration of the program, all eight motors read and write takes upto 250 milisecond. Thats very slow. My application needs faster communications.
Is there anyway we can make the communication faster? The reason we are using velocity mode is because we need continuous motor rotations. If we use position control, there is an issue that motor automatically switch direction while crossing -pi to pi. Is there any solution to this issue?
Using multi ports can make a difference?
Kindly let us know what you think about it. or any solution/technique we can adopt to make the communication faster.
What kind of CM controller are you using at present? Still OpenCR-1?
If Python is not fast enough you may have to use C/C++.
Also Robotis has new FastSync for DXL-SDK but you need to use the “develop” branch out on Robotis GITHUB @Yogurt_Man can help more for this option.
MX Series may not support Fast Sync Read, if you are using just simple Read/Write for multiple DYNAMIXEL, Sync Read / Sync Write would give enhanced comm. Here is what benefit of Sync instruction(Sync Read).