Simulation & Control AL5D from Matlab

Hello,

I am trying to simulate and control the Lynxmotion AL5D 4DOF (without gripper rotation) from MatlabR2015 (connected to a Arduino UNO pwm and with USB to Matlab) , first drawing simulation of the arm and then send the parameters to arm.
I have done the direct and inverse kinematics in Matlab, using the Denavit Heartenberg and trigonometric approach for inverse; but as always the simulation doesn’t correspond to reality.

The main issue is that the simulation is done using positive and negative angles (-90 - 90) and the arduino addon from Matlab sends only angles between 0 and 180 and i haven’t got a way to transform the angles for the arm to look like simulation.

For example, for the specified angle zero the simulation draws a L, but the same position for the AL5D corresponds to 90 degree for all servos.
Adding 90 degree for zero angle works, but for other angles is not corresponding.

Another issue is the common problem, elbow up and elbow down, if someone understands how to choose between two cases in this situation would be helpful, in theory it would be a minus or plus sign, but when comes to control of the arm is not the same as simulation, as a conversion for the angles is needed.

Hi,

This sounds like a very interesting endeavor. We would be curious to see at least some screenshots of your progress (if not some code!). You can post about your project here or on our project-oriented website, Let’s Make Robots.

The conversion from the -90, 90] range to a [0, 180] range should be a direct translation of +90 degrees (assuming in the -90, 90] range 0 is the center). If you obtain different results, then you may have an issue with the way your simulation is done or the way your robotic arm is assembled (i.e.: possibly a reversed servomotor?).

The issue could also be from the way the sketch on your Arduino is doing the RC PWM signals sent to the servomotors. It may be wise to check that code, too.

As for the multiple solutions issue (elbow up/down, left/right, etc.), you will have to add more code to your simulation to determiner the appropriate solution for your equipment/situation. You can find many papers about this with a quick online search.

Sincerely,