Mr Jos

Robotic arm V2, fully automated with PS4 teaching

Recommended Posts

51175939957_e5351edee9_o.png

https://rebrickable.com/mocs/MOC-76666/Mr_Jos/6-degrees-of-freedom-6dof-fully-automatic-robotic-arm-with-inverse-kinematics-programmed/#details

EDIT: Last video made shown here;

/EDIT

 

My V1, 6 degrees of freedom robot worked, but had no power to lift anything when fully stretched.

I designed a complete new base and managed to even make it slimmer at the base, and a longer arm allowing it to move closer to itself.

Gearing changed from 1/10 to 1/42 at the base. PS4 controller used to teach the robot new waypoints, it then move in a straight line to each point (live calculating on the EV3 brick to compensate for stress in the gears).

Except the PS4 controller, everything is original LEGO, it does work without it by just running a saved waypoint program. All cables are original ones, unlike in my other project seen at the back (highbay warehouse crane that needed 50cm+ cables I made myself).

Need to modify some parts of the robot for more durability, then I will try to make instructions for it when I'm happy with it.

When I'm finished with this robot I'm planning to make many more industrial "machines" that are not made before in LEGO (or not many times), it will now be easier as I expanded my LBG beams and connectors in storage.

EDIT: Photo's added;

51164785139_cfe3111f65_b.jpg

51164785104_e9119ac274_b.jpg

51163336787_4f07d8e10f_b.jpg

51164785034_220c28e788_b.jpg

51165104215_d86e05a728_b.jpg

51165104180_effeb2ff34_b.jpg

EDIT: For geeks only;

Spoiler

Some photos (no screenshots, the program is on a different laptop I don't use internet with). This is just a part of my program, but most important is on it.

51163361757_d8ce8bcbf4_c.jpg

51163361802_d941495c4d_c.jpg

51165129740_146f4db4ed_c.jpg

51164025391_4eb7085641_c.jpg

51164810204_64c2c71767_c.jpg

51163361582_e310294afe_c.jpg

51164025291_3f58297389_c.jpg

51165129550_b7ac3dda95_c.jpg

51164025236_ea139591fc_c.jpg

 

 

Edited by Mr Jos
Photo's added

Share this post


Link to post
Share on other sites

Very cool.  I went through a lot of iterations on the bottom tilt axis of my robotic arm.  I ended up using two motors for this axis and a relatively complicated gear train. I posted about it here:

 

I also noticed in the video that some of the axes have a bit of a jerky motion when moving.  I had this same problem.  The way I ended up improving that was to do the gear reduction as late as possible in the gear train.  This kept the torque as low as possible through most of the gear train and the axles twisted less and acted less like springs.  This smoothed things out considerably.  it also improved the backlash a bit.  All the backlash in the low torque portion of the gear train is reduced by the final gear reduction.  My final bend axis on the wrist is still a little jerky.  Because of space constraints, I couldn't fit more gear reduction where I needed it.  I might try to revisit that at some point.

I'm curious about which motors and sensors you are using in the arm.  Are you using the sensors for calibration?  Any more detailed photos?

Share this post


Link to post
Share on other sites

That is some subzero programming you have there! I know a little bit about the programming required to go from a R-theta like steering to cartesian movements, that is superimpressive to run on an EV3. Oh and the robot looks & works fantastic too.

Some subtitles in the video might help though.  A simple: 'learning the waypoints', 'run the sequence automatically' would help the viewer. I almost lost attention before the last fifty seconds where the magic happens.

Share this post


Link to post
Share on other sites
1 hour ago, Glaysche said:

I also noticed in the video that some of the axes have a bit of a jerky motion when moving.  I had this same problem.  The way I ended up improving that was to do the gear reduction as late as possible in the gear train.  This kept the torque as low as possible through most of the gear train and the axles twisted less and acted less like springs.  This smoothed things out considerably.  it also improved the backlash a bit.  All the backlash in the low torque portion of the gear train is reduced by the final gear reduction.  My final bend axis on the wrist is still a little jerky.  Because of space constraints, I couldn't fit more gear reduction where I needed it.  I might try to revisit that at some point.

I'm curious about which motors and sensors you are using in the arm.  Are you using the sensors for calibration?  Any more detailed photos?

The jerky motion comes from the program. Everything before 3:04 is me adjusting with PS4 controller to save some waypoints. Then it starts to run automatic between these points, this is much smoother, so start it at 3:04 to see the "real movement" you would also get with just sending it hard-coded waypoints and eliminate the PS4 teaching.

Simply said; for example the end-effector is at position X= 200, Y=0, Z=350 with Yaw=0°, Pitch=0° and Roll=0°. This means the centerpoint is 200mm forward outside the center of the robot, on center axis (Y=0), and at 350mm high. The end-effector is pointing forward and flat. To move to lets say X=200, Y=100, Z=350 with yaw=0°, Pitch=0° and Roll=0° it has to move 100mm to the left. My program only takes these 2coordinates (waypoints can be hard-programmed or like in the video set with "X" button). The program then calculates the path to go in a straight line from "A" to "B", due to slow cycletimes with EV3 I had to set a limit to the amount of calculations to be done, first step is calculating a 6mm movement, send the motor and directly calculate next set of coordinates, then livecheck current motorpositions and send new speed for each motor. Around every 60-105ms a new speed is send to all motors, this makes it jerky.

I could hard-program a set of coordinates with preset speeds to do some 'showing', and it would not be jerky as cycletimes would be way lower, but that was not my goal to be hardcoding a long time for 1 show run, when I can now make limitless amount of 'showruns' by teaching it with the PS4 controller just a few points, and let it do the calculating and adjusting on its own.

Motors used are:

EV3 Medium motor for Axis1 (Yaw the base) 1/11.666 gearing. Homing sensor = touch sensor at lower back side.

EV3 Large motor for Axis2 (Pitch at base) with 1/42 gearing. Homing sensor = touch sensor at top of back side.

EV3 Large motor for Axis3 (Pitch at arm) with 1/29.166 gearing. Homing sensor = touch sensor at the top of 1st arm, near the 3 medium motors.

EV3 Medium motor for Axis4 (Roll whole wrist) with 1/5 gearing. Homing sensor = touch sensor at the roll turntable, this sensor allows this joint to turn around forever.

EV3 Medium motor for Axis5 (Yaw the wrist) with 1/10 gearing. No homing sensor, the wrist gets jammed at its maximum position with low torque and stalling is detected for homing.

EV3 Medium motor for Axis6 (Roll end-effector) with 1/7 gearing. Homing sensor = color sensor that looks for the red pin on the last turntable.

All controlled by 2x EV3 brick connected with bluetooth with left side master, right side slave controlling base Yaw and end-effector Roll.

 

1 hour ago, Jeroen Ottens said:

That is some subzero programming you have there! I know a little bit about the programming required to go from a R-theta like steering to cartesian movements, that is superimpressive to run on an EV3. Oh and the robot looks & works fantastic too.

Some subtitles in the video might help though.  A simple: 'learning the waypoints', 'run the sequence automatically' would help the viewer. I almost lost attention before the last fifty seconds where the magic happens.

Thanks, the programming took very long for my V1 project, once I had that I made it easy changeable by just changing motor directions for theta2 and theta3 and gearing with each 1 parameter to be changed for the whole program. The EV3 is not really made for these kind of robots, not having matrix calculations makes it so hard to make these straight lines without hard-coding, but I managed it!

I did add some "subtitles", but they are in the timeline, you only see them next to the timestamp. I directly uploaded this raw video without any editing. But I do admit, someone who does not know what is behind it will not understand how hard work this little LEGO computer is delivering. Still need to see anyone else making straigth lines with full yaw/pitch/roll control possible with an EV3 without hard coding the path to follow.

Edited by Mr Jos

Share this post


Link to post
Share on other sites

The PS4 teaching method is a masterstroke in my opinion - it basically turns the project into a tool people without programming experience can use for their own purposes. If you ever manage to make instructions or perhaps only create a studio file then community will gain something truly unique.

Share this post


Link to post
Share on other sites

New video made with better explanations. Hope it's better this way, my video-editing skills are close to '0'.

 

Share this post


Link to post
Share on other sites

Reason for the jamming of the roll joint has been found. Had 1 of the 2 plugs for charging the EV3's unplugged since yesterday when I started playing with the labelprinter.. Battery was near empty and not able to handle the 'lock' on that joint with low gearing. Now going to put my time in disassembling it and making instructions.

Share this post


Link to post
Share on other sites
On 5/7/2021 at 9:42 PM, Mr Jos said:

I could hard-program a set of coordinates with preset speeds to do some 'showing', and it would not be jerky as cycletimes would be way lower, but that was not my goal to be hardcoding a long time for 1 show run, when I can now make limitless amount of 'showruns' by teaching it with the PS4 controller just a few points, and let it do the calculating and adjusting on its own. 

Your v2 robotic arm is amazing.

As to the demo shown in the video, I see a paradox there. When you navigate your arm by PS4 and store the coordinates of the check-points in the memory, it would seem to be more rational to store the angles of all the motors. Then, no inverse kinematic equations would be needed, as you could just move from the current angle to the next point angle.

Yes, the IK is important and you made amazing programming work, but this particular show task can actually run without it. Or am I wrong?

Share this post


Link to post
Share on other sites
3 hours ago, Jonas said:

Your v2 robotic arm is amazing.

As to the demo shown in the video, I see a paradox there. When you navigate your arm by PS4 and store the coordinates of the check-points in the memory, it would seem to be more rational to store the angles of all the motors. Then, no inverse kinematic equations would be needed, as you could just move from the current angle to the next point angle.

Yes, the IK is important and you made amazing programming work, but this particular show task can actually run without it. Or am I wrong?

In the ideal world it would work without forward kinematics, but not without inversed kinematics at all, I'll try to explain with simple points;

I save waypoint 1, Stored data: (X=200, Y=-100, Z=250, Roll=0°, Pitch=0°, Yaw=0°)

I save waypoint 2, Stored data: (X=200, Y=100, Z=250, Roll=0°, Pitch=0°, Yaw=0°), this means the arm will move from left side to right side in a straight line, while maintaining altitude and fork levelled. To do this both pitch joints have to make the arm go closer to the center until it reaches Y=0, and then start stretching again. To do this there is a constant change in speed for these 2 joints, reaching 0m/s at Y=0. Problem is that speeds are calculated in ideal circumstances, arm going up or down is the same, but the weight and stress on the joint may make it move slower then wanted, if it lags behind and you reach Y=0 they would completely stall without knowing the real reached position, this gets caught now with the forward kinematics and it will speed up the joint lagging behind as it now has to move a larger distance.

Note that in this example both these motors will be at exactly the same angle in start and end position, but they do have to move forward and back to make a nice straight line between these points. Only the end theta1 and theta4 will not be the same end result once all movement is finished.

For the inverse kinematics, it is needed to make these nice straight lines, if I just save all motor angles that I reached with the remote it would be an ugly path. When moving down, forward and turning yaw 90° it takes many steps with the PS4 to reach the wanted position. But I save only the start and end position. Inverse Kinematics then "build in realtime" a path that goes down and forward and meanwhile slowly turning 90° yaw. This can be seen in the video going from waypoint #1 to #2. My moves were messy with the controller, but in auto mode it made a smooth descend.

Edited by Mr Jos

Share this post


Link to post
Share on other sites

Stud.io progress is going good so far, only making the base rollerbearing was a pain with all the round tiles not possible to connect and each giving an angle + XYZ value to position them in the gear.

51171896825_c2fe485db6_o.png

With some luck 3D file will be finished end of this week, only instructions will take some longer I think, don't know yet how I will draw in the cables yet and put explanation...

Share this post


Link to post
Share on other sites

Wow, that's a lot of progress in a very short time. Regarding the explanations, is it just the cable routing or are there some tricky bits that can't really be shown on a model?

Share this post


Link to post
Share on other sites
5 minutes ago, domleg said:

Wow, that's a lot of progress in a very short time. Regarding the explanations, is it just the cable routing or are there some tricky bits that can't really be shown on a model?

One of the things that need to be done is putting 4x pin with bush in a panel, but only 1 deep, then later when the 'marriage' happens from the base and arm, the pins need to be pushed in further. I don't know how to move anything during instructions on more then just the adding of that part page.

51172464741_2d74832a39_c.jpg

There are the 4 pins, they lock the lower arm to the turntable base, but can only be pushed in completely when it's sub-assembly is finished, and the beam above it blocks it from being added after the marriage.

And the cables are tight, as I wanted to use only standard Lego cables (max 50cm long) they have to be perfectly routed,

51173265424_272bb0862a_c.jpg

But they are curved through the frame so many times.. Studio does not allow this I think.

Share this post


Link to post
Share on other sites

Finished it faster then expected.

51173223483_aa085ec499_o.png

Only 1011 parts (If I didn't forget to draw in any).

Now instructions.. what is the best way to make them, with Studio or other application?

Edited by Mr Jos
Typo

Share this post


Link to post
Share on other sites

I have no experience with instructions making but for the target demographic of people owning two ev3 bricks and several medium motors a Studio model would probably suffice, especially if it's divided into subassemblies. For the same reason I wouldn't worry too much about cable routing or joining subassemblies - I suppose folks can figure that out, it's not rocket science. There are dozens of amazing projects on rebrickable that are no more than a 3d model and have lots of positive feedback.

Edited by domleg

Share this post


Link to post
Share on other sites
1 hour ago, domleg said:

I have no experience with instructions making but for the target demographic of people owning two ev3 bricks and several medium motors a Studio model would probably suffice, especially if it's divided into subassemblies. For the same reason I wouldn't worry too much about cable routing or joining subassemblies - I suppose folks can figure that out, it's not rocket science. There are dozens of amazing projects on rebrickable that are no more than a 3d model and have lots of positive feedback.

Yeah true, anyway before I did read your comment I already made the instructions for the whole robot excluding the cable routing, that I wanted to add with making some real pictures. Might finish it anyway haha.

This is what it's so far.

51176598821_3ea053876c_b.jpg

It's nice in subassemblies that get added to the complete arm step-by-step. 75Pages is not to bad I think.

And an example page;

51177701210_3ce0101c38_b.jpg

I never published anything, so will look for some explanation how to upload the 3D files/instructions/programs and make inventory list with bricks used etc (will have to manually add cables as they can not be drawn).

Share this post


Link to post
Share on other sites

If I'm not mistaken, it uses no more than 6 motors (and no sensors except the infrared one for the remote) so one could build it with just one RI brick instead of two EV3 bricks, am I correct?

Share this post


Link to post
Share on other sites
7 minutes ago, howitzer said:

If I'm not mistaken, it uses no more than 6 motors (and no sensors except the infrared one for the remote) so one could build it with just one RI brick instead of two EV3 bricks, am I correct?

It would be correct if the gearing would be 1:1, then you don't need homing for the motors. But now there is big gearing down meaning that the motor at 0° can be at many possible positions of the arm. So you will still need to do homing. To remove the sensors you could use stalling detection by letting it jam at its end. But 3 of my joints are infinite, so they will never jam.. A robot with finite joints will be possible with one RI I think yes, but I don't own any (yet), only 4x EV3.

The IR sensor can be left out, it's only for emergency that I added it. As it might damage the robot if you start the homing when the pitch base joint is completely forward and the top arm touches the floor, it will start to home the top arm by going down even more. With the IR you can then first move up the base arm as far as you want and start the homing by pressing the beacon button. By just deleting this waiting for the beacon you can delete the sensor.

Edited by Mr Jos

Share this post


Link to post
Share on other sites
2 hours ago, Mr Jos said:

Yeah true, anyway before I did read your comment I already made the instructions for the whole robot excluding the cable routing, that I wanted to add with making some real pictures. Might finish it anyway haha.

Your pace of work is astounding. It would have probably taken me weeks if not months to get to that stage.

Share this post


Link to post
Share on other sites

51178535826_f8845c52bb_c.jpg

Nearly there, all files submitted. 3D File, 2D instructions, cabling instructions, MicroPython programs (1x Master with PS4 teaching, 1x Master with only preprogrammed waypoints, 1x Slave only homing and moving it's 2 motors the way masterbrick tells him), Partslist.

Anyone wanting so see if they have all the parts needed for this toy;

51177875352_e0a059d3bf_b.jpg

Share this post


Link to post
Share on other sites

That didn't take long, congratulations! Now back to checking rebrickable if the project is live yet. Thank you again for your effort.

Share this post


Link to post
Share on other sites

Hi Mr. Jos,

you have done an amazing  job. I have just purchased the instructions to support your wonderful work. I do not think I will copy your design but I will use it as a reference in my building attempts.

This applies mainly to your codes where I believe to find answers to some coding challenges. From your description, I believed that the codes would be included in the downloaded data. Unfortunately not. When I try to download the codes from your Bricksafe depository, it says Forbidden. Anything wrong?

 

Share this post


Link to post
Share on other sites
20 minutes ago, Jonas said:

Hi Mr. Jos,

you have done an amazing  job. I have just purchased the instructions to support your wonderful work. I do not think I will copy your design but I will use it as a reference in my building attempts.

This applies mainly to your codes where I believe to find answers to some coding challenges. From your description, I believed that the codes would be included in the downloaded data. Unfortunately not. When I try to download the codes from your Bricksafe depository, it says Forbidden. Anything wrong?

 

I will see what is wrong, they seem to be set public, but I will upload the program to Dropbox. I'll already send you the link, and add it to rebrickable aswell.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.