Read present position after switching on power again_ Dyanmixel MX28-AT (1.0) spin in CW or CCW to get it's home position

hi everyone, I am new with Arduino and dynamixel. I have downloaded library from GitHub and it's working well.

The problem is when the dynamixel power is off and if I manually displace its position (in any direction( suppose from 0 to 6000 or from 0 to -4000) and when I power on it gets home/goal position (which is set 0) by rotating any of the direction where the home position is nearer (suppose if I manually rotate it at from 0 to -4000, the Arduino assumes -4096 as 0 position therefore the motor spins just from -4000 to -4096 but actually it should rotate in other direction from -4000 to 0 position). It seems the Arduino controller/programming is not recognizing the present position of the dynamixel when I switch on the power again. therefore, I need a program which can read the present position of MX28 so that on powering on it can recognize its current position and then it can rotate in the right direction to get the goal position (any set position).

For example, dynamixel is connected with the Arduino (multi-turn mode) and its present position is 4000. Now I do switch off the dynamixel and rotate it further at 6000 position manually. I do power on and run the Arduino code and now it should rotate from 6000 to 0 position (as goal position is set 0) but it rotates up to 4096 only, which proves Arduino is not recognizing its position as 6000 and now this 4096 position is read as 0 position.

I have also used the Wizard dynamixel software which worked well. It can read the present position of dynamixel servo even when we manually rotate the motor (on switch off) and connect it again with this software. The servo rotates from 6000 position onwards to 0 which is all right.

Thanks everyone for any suggestion

Danaish Rathore

I’ve done something similar in the past with different hardware.
“”Power on at an unknown position ‘somewhere’ between two limits…””

Start a back and forth cycle with ever increasing range, until one of the limits is hit.

If you can’t do that (e.g. it would open a critical valve etc), then move in one direction at least far enough to clear ‘away’ from the opposite limit, then run back until you hit that limit.

It takes a bit of thinking, but when you look at your criteria and options it often becomes easier.

Hi lastchancename, thanks for the help. Actually, the first solution which is a back-and-forth cycle with ever increasing range is not possible to use in my project. I am working on a project of hand exoskeleton soft device using tendon driven technology, so when the spool rotates (spool is connected with dynamixel) it causes tension to the one cable and releases opposite one for flexion-extension of finger. Here tendon length is fixed and the spool rotation limit is also set. beyond that limit the device can hurt to finger. now the problem is when the glove is worn every thing works smooth as it is operating under limits but there is a chance during taking off the glove it may some time displace the position of the dynamixel and while power on device could cross the limits which is not acceptable.

Here, I would like to know what is difference between Arduino hardware (using Arduino IDE) and U2D2 hardware (using Dyanmixel Wizard software) because using the dynamixel Wizard software power off doesn't matter and it can easily recognize the unknown position on again powering on. but this software is just computer controlled and can't run/save the code.

Again thanks to everyone.

You’ve got a bit of a challenge, unless you can ‘lock’ the actuator, you’ll never know where the actuator is positioned after a power cycle - unless you have an absolute encoder or this wake-up exerciser method.

Thank you for prompt response and suggestions. I would try to solve this problem anyway, and if I could find a way to cope up with this, will must share here.

You can only know the difference between two similar things. These two things are totally different.

The U2D2 is a microprocessor type it is used in the Leonardo and Micro Arduino models. You program it using the Arduino IDE software. Just like the Arduino Uno model you program that with the IDE but this has a AT328 microprocessor type in it.

The U2D2 processor has different capabilities the main one being is that it can directly be seen by the attached computer as a USB device, where as the AT328 needs an extra chip to convert its serial output to a serial USB device. So it always looks to your computer as a serial device, where as the other processor can be seen as a USB keyboard, mouse, serial or MIDI device, depending on how your program it.

Thanks Mike, Actually my question was; what is the main difference between them? that using U2D2 can easily recognize the dynamixel position while powering on at an unknown position where as the Arduino Uno doesn't.

And if you know how to solve this problem (to read dynamixel unknown position on power up ) it would be really helpful to me.

And that is what I thought I answered in my last reply.

It is likely that the software in your PC communicates by other means than a simple serial interference for this feature. Unless you can hack into the software and see what it is doing, the only other thing I can think of, is to ask the people who wrote it.

Thanks again.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.