Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Interest in a powerful, small size USB to Dynamixel ?

  1. Question Interest in a powerful, small size USB to Dynamixel ?

    Hi,

    Just a poll: would you be interested in a programmable, very small USB to Dynamixel adapter/controller?

    I made the USB2AX with a friend for my Xachikoma project, and I was thinking maybe other people could be interested in it. As far as I know, there is no product in this niche...



    Form factor: a dongle with a Type-A male USB plug and a little longer than an inch (around 3.5cm), with one 3 pin Dynamixel socket.

    Different possible firmwares:
    - (1) USB2Dynamixel drop-in replacement for AX/MX series (half-duplex TTL serial)
    - (2) Simple controller, with possibility of automation of small tasks, like reading values from multiple servos in an efficient way... This one could also expose an HID interface to have low latency communication with the OS.
    - (3) custom user firmwares. Imagine for example you made a Dynamixel-based joystick with force feedback: you could easily make a firmware to have it appear as a true plug&play joystick on your computer...
    - (4) maybe even a full controller, with gait generator/player...

    Two possible version:
    - low-end version, max 1Mbaud, limited to simple firmwares [(1), (2) and simple (3)]
    - high-end version, with 3Mbaud communication with the new MX series, large processing power and lots of flash/ram for complex programs and lots of eeprom for settings and motion sequences [any type of firmware]

    Pricing: Low-end version a lot cheaper than an USB2dynamixel, high-end version priced between USB2Dynamixel and Arbotix.

    100% open source/open hardware.

    The target would be to use it with a PC, not as a standalone.
    It would not take care of providing power to the servos, and would only have one 3pin Dynamixel socket, nothing superfluous.


    Any thoughts? Do you think such a product would be of any interest to you or anybody? Ideas on how to make it worthwhile?
    Thanks in advance!

    EDIT Moved the thread, it was not in the right sub-forum :/
    Last edited by Xevel; 08-24-2011 at 11:28 AM.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  2. #2

    Re: Interest in a powerful, small size USB to Dynamixel ?

    Certainly an interesting option. Even the A plug is often better replaced with something smaller since the socket doubles the size.

    To do a full drop in replacement for the USB2Dynamixel would require that you emulate the FTDI chip. Robotis software that talks to Dynamixels direct seems to demand an FTDI device. Emulating the FTDI gets you into license problems when you use FTDI drivers on the PC. So I would drop the USB2Dynamixel part. Which software did you test it on so far?

    HID won't lower your latency, but the fact you can intelligently forward USB packets without a latency timeout puts you ahead of FTDI based device on bulk transfers.

  3. #3
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    3,198
    Images
    952
    Rep Power
    137

    Re: Interest in a powerful, small size USB to Dynamixel ?

    Please email me with pricing details if you are looking for a distributor.

  4. Re: Interest in a powerful, small size USB to Dynamixel ?

    Quote Originally Posted by iBot View Post
    Even the A plug is often better replaced with something smaller since the socket doubles the size.
    My first idea was that plugging the adapter directly into an USB port was the way to go to make the smallest possible USB to Dynamixel board.
    With a smaller plug on the board, you would have to use a USB cable between the computer and the board, and the plugs in such a cable would as big as the controller itself...
    My first try was without a real plug:
    Click image for larger version. 

Name:	mP1000754_1365x1024.jpg 
Views:	371 
Size:	66.7 KB 
ID:	3418
    This proved to be problematic: some USB ports are too loose to hold this kind of 'plug', it's less resistant to vibration than a real plug and it's not very durable. Hence my thoughts of using a big Type-A USB plug, even if it accounts for 50% of the size of the product.

    If you have alternatives in mind, I'm all ears!

    Quote Originally Posted by iBot View Post
    To do a full drop in replacement for the USB2Dynamixel would require that you emulate the FTDI chip. Robotis software that talks to Dynamixels direct seems to demand an FTDI device. Emulating the FTDI gets you into license problems when you use FTDI drivers on the PC. So I would drop the USB2Dynamixel part. Which software did you test it on so far?
    I used the CDC/ACM USB Class, with the same library used in the Arduino Uno (LUFA, by Dean Camera), adapted to account for the "half-duplex" question. This allows for the device to appear as a serial port without the need for external drivers (a .inf descriptor is needed on Windows however, but nothing at all on Linux/MacOS).
    I used it with the Dynamixel Wizard of RoboPlus without any problem, as well as on my custom software both on my Win7 64bits PC and various Linux boxes (I use 4 of these on the BeagleBoard of the Xachikoma, 2 as USB to Dynamixel, 2 as standard serial ports).
    And alos, I only aim at communicating directly with the AX/MX series, not with the RX/EX series nor with the CM controllers.

    Do you know if Robotis software makes use any of FTDI-only functionalities?


    Quote Originally Posted by iBot View Post
    HID won't lower your latency, but the fact you can intelligently forward USB packets without a latency timeout puts you ahead of FTDI based device on bulk transfers.
    I'm still a little fuzzy on the HID part, I still have to read the corresponding chapters of the USB specs :/


    @Andrew: Will do soon, thanks!
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  5. #5

    Re: Interest in a powerful, small size USB to Dynamixel ?

    I usually remove the USB connector and wire direct to USB port or hub, so I guess easy enough to leave off the connector on your board and solder wires direct.

    The FTDI dependancy seems to depend on whether the software uses Virtual Com Port(VCP) or the more comprehensive FTDI DLL (FT2XX.DLL) under Windows, or the ftdi_sio driver in linux. The old Dynamixel manager seemed to use the FT2XX.DLL, but Dynamixel wizard does not appear to( did not test at 1Mbps though). Some third party software does use these FTDI specific drivers too. I see in your code you set the baud to default of 1Mbps anyway.

    It appears your Serial to USB flush timer is already 1ms ((256*64)/16MHz), so HID would not be faster. It would also require a special driver to be written for both Windows and Linux.

    I like the optional spilt of the Rx and Tx on the serial. You may consider adding 5V ESD bus protectors to the serial pins. They are very low cost and do often save the controller in case of shorted wires on the serial bus.

  6. Re: Interest in a powerful, small size USB to Dynamixel ?

    Quote Originally Posted by iBot View Post
    I usually remove the USB connector and wire direct to USB port or hub, so I guess easy enough to leave off the connector on your board and solder wires direct.
    Hardcore
    Yet I guess it makes sense in some cases.

    Quote Originally Posted by iBot View Post
    The FTDI dependancy seems to depend on whether the software uses Virtual Com Port(VCP) or the more comprehensive FTDI DLL (FT2XX.DLL) under Windows, or the ftdi_sio driver in linux. The old Dynamixel manager seemed to use the FT2XX.DLL, but Dynamixel wizard does not appear to( did not test at 1Mbps though). Some third party software does use these FTDI specific drivers too. I see in your code you set the baud to default of 1Mbps anyway.
    Ok, I did not know that (my involvement with Dynamixel servos is quite recent, less than a year). I should indeed abandon the "drop-in USB2Dynamixel replacement" claim, as it would not work with software depending on the FTDI library.

    Quote Originally Posted by iBot View Post
    It appears your Serial to USB flush timer is already 1ms ((256*64)/16MHz), so HID would not be faster. It would also require a special driver to be written for both Windows and Linux.
    Serial to USB Flush frequency is not the only thing that matters in my experience. On Windows 7 I had very small latency when doing a READ on a servo (typically 0.7ms to send the command and get the result back), and on my Beagleboard with Ubuntu it jumped to 7ms. It seems that the kernel simply won't service the serial interruption more frequently than that... I might be wrong on that, but I sure would like to have other options to get rid of this insane latency without needing a RealTime kernel. In this case, I thought a HID solution would provide more reliable low latency on all OS.
    And sure it would require custom drivers, yet installing a driver looks less daunting a task than trying to find a Realtime patch for the 2.6.37 linux ARM kernel.
    (And it might be of very little importance, but it's 0.5ms ( 0x7F*64 / 16M), the timer is in Clear Timer on Compare Match and the Output Compare Register is 0x7F and the prescaler is /64).


    Quote Originally Posted by iBot View Post
    I like the optional spilt of the Rx and Tx on the serial. You may consider adding 5V ESD bus protectors to the serial pins. They are very low cost and do often save the controller in case of shorted wires on the serial bus.
    Good idea, we will look into it.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  7. #7
    Join Date
    Jun 2011
    Location
    USA
    Posts
    518
    Images
    107
    Rep Power
    37

    Re: Interest in a powerful, small size USB to Dynamixel ?

    I had meant to ask you about this when I found it via the link you posted in the Xachi thread... but forgot; needless to say, I'm definitely interested in this as a nice tool for debugging/testing.

  8. #8

    Re: Interest in a powerful, small size USB to Dynamixel ?

    I just downloaded your code , rebuilt with latest LUFA and put onto a minimus board and it works good.

    Putting a USB analyser on the connection, I see surprising fast polling of endpoint 3 in both Windows and Linux.

    With a Windows 7 i7 machine, endpoint 3 is polled about every 10 microseconds by the PC ( USB and PC not very busy). Endpoint 2 is polled every 30 millisec

    On a Linux laptop endpoint 3 is polled about every 15 microsec, and not seeing any poling on endpoint 2.

    Can you let me have your test programs and I will make measurements on those to see where the delays occur under Linux.

    Also interested in your USB2MX project. I did something similar on LPC1343 for Robobuilder and Darwin, so might be able to share code. I used LIS331 and L3G4200D on the SPI bus for tiny and cheap IMU. Also brought out the I2C pins and connected to BlinkM RGB LEDs for eyes. Basically an finger sized CM730. Not really interested in commercialising mine, but could help you. The 32bit cortex can do the bulk reads and intellgently manage the USB protocol to optimally return packets of the correct size.

  9. Re: Interest in a powerful, small size USB to Dynamixel ?

    I quite frankly envy you for having an USB analyser

    Not necessarily relevant to the matter, but more to my understanding of the USB communication protocol:
    Are you sure it polls every 10µs ? This would make a polling at 100kHz. I read somewhere USB time frames were 1ms for low/high speed, and 125µs for full speed (source), and polling could be made every X frames, X being between 1 and 255. Or am I completely misinterpreting what you said?
    Or maybe you have USB 3.0 ports (aka super speed) and, as we can suppose, polling can be way faster... USB3 is looks 10 times faster compared to USB2.0, it would make sense to have ~12 µs polling...

    Anyway,
    I chose to measure the time spent in a Dynamixel READ_DATA as a whole, so it consists of the time spent by the OS + time spent for communication + time spent in the USB2AX + time it takes the servo to respond, and the same whn it comes back.
    Servo configuration : Return Delay Time is set to 0, baudrate is 1Mbaud

    You can replicate the experiment by sending a command to read one byte of data, and see how low it take to wait for the data to be available to your program.
    Or you can wait until I rewrite the test, since I can't seem to find the one I used at the time :/


    As for the USB2MX, I haven't started software development (and my friend has not started the PCB either), but I thought I should try to make something easily portable. Sharing code with you might be the incentive I need to put myself to work on this ^^. I might take you up on this, but I can't give you any time frame since this project is not my priority (it will be a little expensive).
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  10. #10

    Re: Interest in a powerful, small size USB to Dynamixel ?

    I was sort of surprised by this too. In fact 90 polls from host to device within one 1ms frame ! But this done automatically by host and device controllers

    The host is a high speed USB 2.0 port through translating hub. No other traffic, USB analyser is on different High Speed USB port.
    This implies HID would only be better in high load conditions to reserve at least 1 poll per frame if there are other high load bulk devices on same bus.

    I will test some more. We know the AX12 return delay range to be typically around 30 microsec with occasional additional delay of 50 microsec, so be interesting to find if your additional longer delays are driver or OS related.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Contest Entry Small tracked robot with super strong arm (for its size)
    By phwillys in forum Project Showcase
    Replies: 4
    Last Post: 01-01-2011, 04:28 PM
  2. New camera find, and interest must be building...
    By Robot Dude in forum Mech Warfare
    Replies: 17
    Last Post: 02-24-2010, 06:44 PM
  3. Calculate Motor and Wheel Size
    By metaform3d in forum Mechanics / Construction
    Replies: 14
    Last Post: 04-17-2009, 05:24 PM
  4. Full size robotic leg???
    By Jman26 in forum Humanoids, Walkers & Crawlers
    Replies: 36
    Last Post: 12-08-2008, 08:58 AM
  5. Interesting life size Scopedog
    By crabfu in forum Off Topic
    Replies: 2
    Last Post: 08-03-2008, 08:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •