Maker.io main logo

Building Custom XRP Robot Attachments: Adding a Rotating Gripper

2024-11-19 | By Zach Hipps

License: General Public License Robot Kits

 

Robots are taking over the world! Okay, maybe not, but they are taking over the Byte Sized workshop. Today, we will level up our robotics game. XRP stands for eXperiential Robotics Platform. If you're a student or a hobbyist interested in getting into robotics, this is the platform you want to get. Until now, if you wanted to build a robotics platform, you had to piece everything together. However, several industry leaders have come together to make it easy and give us all more access to robotics at home. Today, we will go beyond the basics of assembling the XRP, and design/build some fantastic attachments. Let's get started!

zach_1xrp_2

Let's see what comes in the kit. The first thing I see here is the 3D-printed chassis. Then, we also have the control board with the microcontroller on it. That's going to snap directly into the chassis. One of the cool things about XRP is that instead of having to assemble everything using screws, screwdrivers, and hex keys, everything just snaps into place. This chassis has mounting rails along the edges, and I will take advantage of that later. There’s also a battery pack that snaps into place in the center of the chassis.

kit_3

kit_4

I will put the wheels on the motors, feed the wire through, and attach the motors which also just click into place. If you think about it, this kit is almost like assembling Lego®. It's easy. There are step-by-step instructions, and it doesn't take an engineering degree to put this thing together. Pretty much anybody who has the interest and the tenacity to do something like this should easily be able to pick this up. I love how the casters snap into place! They're plastic balls that roll around, isn’t that cool? The last thing I will do is attach this servo motor and I have some cool plans for this. I'm excited to start designing and building attachments for the XRP, but I’ll take this thing for a spin before doing so.

wheels_5

wheels_6

I’ll connect the XRP to my laptop and pull up the coding environment. Then, I’ll open the example folder, open the installation verification program, and load it onto the microcontroller. I expect the robot to move forward, make some turns, and then come back. I’ll push the button to see if the servo works. Excellent, it moved! I have a lot of ideas on how I'm going to use that. If I push the button again, I expect the robot to start moving. Nice, check that out! It's working perfectly. That means I didn't mess up the wiring, and everything's properly connected.

robot_7

Earlier this year, at Open Sauce 2024, I got a chance to use the XRP robot. We got to drive it around a little arena, with some 3D-printed soccer balls. I even got to play with Odd Jay, who also makes content for DigiKey. This got me thinking about all the cool things I want to do with the platform. So, let's dive in and build the first attachment.

arena_8

After playing with this for a few days, I'm excited about how easy it is to build attachments for the XRP. There are rails on the side of the chassis, and all you have to do is 3D print a little clip, which you can attach anywhere on the robot's perimeter. The control board is another thing that makes it easy to build attachments. So far, all I've connected to it is a servo motor, a distance sensor, a line following sensor, and two motors. However, if you look closely at the control board, you'll see extra ports to add two more motors and an additional servo. The first thing I thought was I wanted to be able to grab things. So, I will design and build a claw for this robot.

design_9

design_10

When I tackle a problem, I try to break things down into smaller parts. The first thing I’ll do is design a clip that can attach to the side of the rail. After several different iterations, I landed on a piece that snaps from the top of the rail and clips on the underside of the rail. Now, I can add and design things around this clip. The first iteration consists of three pieces: a left claw, a right claw, and a mounting piece for the servo motor. As I tested the fit on this, I noticed it was too small.

fit_11

fit_12

So, that brought me to iteration number two. I changed the dimensions, and I printed it out again. I’ll test fit this once more. Oh yeah, that is so much better, but it seems to be a little bit too loose. So, this is a Goldilocks situation: my first iteration was too small, I overcompensated, and my second iteration was too big. That requires a third iteration where it's just right. So, as I go back into the computer, I need to make sure that I change those dimensions back into the middle so that they are not so loose. I like how this claw attaches. I have a little post that this will snap onto, and now that acts as an axis. I didn't have to use any tools to assemble this.

assemble_13

I need to make a few adjustments and combine the clip and the servo mount. I’ll dive into my 3D modeling software, finish the design, and send it to the 3D printer. Unfortunately, I didn't get it on the third try. It took me 5 or 6 iterations of 3D printing, but I think I've landed on something that will work. Now I can put this thing together. These 3D-printed clips are spring-loaded. As I snap it into place, it should hold the servo tight. It holds it in there perfectly. I nailed those tolerances. I mean, it did take me six tries… Let's get this thing on the robot and write some code for it!

adjust_14

adjust_15

I've loaded the XRP code, and I went ahead and wrote a simple program in the visual block editor. When I run this program, I should be able to open and close the claws by pressing the user button. This is a wonderful first iteration of building a claw. I can add and control two claws independently because I have two servo connectors on the control board. But something is missing with this claw design. You'll notice they close at an angle as I open and close these claws. These would work better if I could open and close the jaws and make them parallel. To do that, I need to implement a four-bar linkage. That mechanical linkage uses four links, surprisingly enough, to achieve a parallelogram. That will allow these claws to open and close in a parallel way. Let me design that on the computer and print out the prototype.

proto_16

proto_17

I just pulled the new claw pieces off the 3D printer and am excited to see if they work. So, to get started, let's put together the base part. In the earlier versions, I had the clip and the attachment part as one piece, and they clipped onto the robot chassis. Moving forward, I decided it would be wiser to separate these into two pieces, and I added a little dovetail clip that slides the pieces together. So, if I ever make any changes, I don't have to reprint the whole piece. I can just print the part that I need. It also allows me to develop further attachments in the future that will just slide on using the dovetail system. I changed how I did the clip on this one because it might be better but getting it in seems a little more difficult. The next piece I will put on is the servo gear, which has a place for the servo arm to go into and a screw to hold it in place. Next, I need to put in the other gear, and this one just snaps into place. Hopefully, I don't break this by attempting to snap it together. One thing to note about using carbon fiber filaments is that they are brittle. You could print it in another filament like PETG or PLA. This gear will not snap on. Rather than risk breaking something, I will remove the first gear to give myself more room to work. Then, I can snap this on without worrying about breaking it. Once it's on, it works fine. Now, I can put that first gear back on and make sure the angle is correct.

track_18

track_19

track_20

track_21

The next pieces I need to install are the claws, which are mirror images of each other. All I need to do is snap them into place, except the post just snapped off! Why is this so difficult? I’m curious how I should design or improve the model so that I don't have these little pieces snap off. I tried adding as much extra material around it as possible, but they're so small, and the assembly just puts too much pressure on them, and they keep breaking off. Rather than going into the 3D model, trying to fix it, and reprinting another piece, my goal is to see if this works. I need to keep moving forward. I'm going to drill a hole into this piece and use a machine screw. Yes, I know that I said that I was aiming for a tool-free assembly, but I need to figure out if this works first. I'm going to grab an M4 machine screw, and I'm not even going to use a tap. I'm just going to use the threads on the screw to tap into this plastic. I've done this many times, and it seems to work great. I'll leave it loose enough that this can still rotate. Maybe I don’t need to worry about making this a tool-free assembly because using that screw is going to give me a much better joint. I'll keep assembling this, and if anything else breaks, I'm just going to drill more holes and use more screws. That seems to be working, but I put the claws on backward. I need to take that off and flip them around.

flip_22

flip_23

There's just one final piece left, the last link that makes this a four-bar linkage. Since the posts are still breaking, I'm just going to drill some holes and put in some M4 screws to make sure this works. As I attach the claw to the chassis, I realize it's running into the line following and the range-finding sensors. I'm thinking to fix that problem, I'm going to move the whole thing forward and lean into that look of making it look like a crab.

crab_24

Now I've got the same program running that I had before, and all I need to do is press the user button. It works, and in addition to moving the claw forward, I have another way to improve it. I want to add a second degree of freedom with a second servo so that the claw can rotate in addition to opening and closing, just like your hand and wrist work. I’ll jump back on the computer, do some more design work, and print out the final version of the gripping claw.

claw_25

I designed a way to mount these claws more forward on the chassis. I also designed a way to rotate the claw like a wrist joint. The first piece I designed slides over the caster wheel. Looking at the front, you will see it has a dovetail joint. The goal is that I want all of these pieces to be interchangeable. I want to mount the claws anywhere on the chassis, including upfront. So, everything I designed has that mating dovetail joint.

joint_26

Now that I can mount the gripping claws up front, here's what I came up with for the rotating wrist. I designed a piece that accepts another servo and the servo clips into place. I wanted to make sure that the second servo was out of the way, so when I designed this mount, I ensured it was above and behind where the claw goes. Before attaching the claw, I need to assemble the rotating dovetail piece. This piece just attaches to the servo, and once I screw it on, it will rotate around with the servo. To attach this rotating dovetail piece, I will use the servo horn that came with the servo.

servo_27

servo_28

Now, I can add the claw. If you remember, I had so much trouble with all those little posts breaking off. I decided to use all M4 screws, and it works so much better. It's so much smoother, and nothing's breaking. Looking at the other side, you'll notice that I added that sliding dovetail so I can attach it to that rotating arm.

arm_29

I’ll head to the computer and write some code to see if it works. I've got a basic demo I wrote in block language; I just need something to test with. My son was in over the weekend, and he was playing with a little red car. I’ll see if this can grab the red car. I’ll hit run, and yes, it grabs the car.

car_30

I want to incorporate everything I've done so far, so here's the plan. I've created a simulation where the robot will dispose of some hazardous material. The robot will roll up to the station, grab the hazardous material, turn around, and bring it to the disposal site. However, the problem with the disposal site is its narrow gap. Fortunately, we have a wrist on our robot so that it can twist and drop the hazmat right into the disposal station.

station_31

station_32

I've been working on writing a simple program, and here's how it should work. The robot should turn to the right and then start moving forward. It'll stop when it gets to about 7.5cm away from the hazardous material. Then, it'll close the gripping claw. From there, the robot should back up and turn to the left. As it moves forward, it's reading that distance sensor again. It'll stop when the distance sensor reads about 12cm from the disposal site. Then, it will rotate the claw, and as it pulls forward, it should drop that hazardous material into the storage facility.

program_33

Let's give this a shot. I press the button, and it's off! It turned 90 degrees, but it missed the hazardous material. Let's see if the rest of the program works. It turns to the other way, and it’s heading in the wrong direction... So, we need to make a couple of adjustments.

shot_44

shot_45

I’ll try again. It’s making the turn, moves forward, and knocks over hazardous material! It needs to move slightly forward as it reaches the hazardous materials.

materials_46

All right let's go again. It went too far, but at least it grabbed it this time. I should have that back up a little bit further.

back_47

Is this going to work? Nope, it ran into the disposal station. The distance sensor is still not reading. If I put my hand in the way, it will fake it into working. It seems like it's turning a little bit. I wonder if I can adjust the speed of the wheels to make it go a little bit straighter.

work_48

Okay, it's turning 90 degrees. Picks up the hazardous material. Awesome, now turn around and go that way. That's where the storage container is. Okay, a little too far. Great. Straighten out, straighten out. Good good good good good. Stop! Oh, we're so close. It dropped it next to the storage facility.

I'm not sure why this didn't work perfectly. There are a lot of factors here. If I feel the surface of my workbench, it's not very flat. I'm also relying on the internal measurement unit, the IMU, to tell me when it's reached 90 degrees. And I realize that if I want precision here, I need to use the line following sensor on the XRP. I will give it one last shot to see if I can store the hazardous material safely. If that doesn't work, I will start putting tape down and using the line following sensor.

Here goes nothing! It's making the turn. All right, now stop at 90 degrees. All right, go ahead, go forward. Now stop! Yeah! We did it! Awesome. That was so cool. Everything I worked on came together, and I disposed of the hazardous material.

turn_49

turn_50

turn_51

turn_52

Everything I built in this video will be available for free download here. I've got the basic gripping claw. I also have the parallel gripping claw that uses the four-bar linkage. Finally, I have the rotating gripping claw. You can go and download and print these out yourself. What kind of attachments would you build?

制造商零件编号 KIT-22296
XRP ROBOTICS PLATFORM KIT BETA (
SparkFun Electronics
¥968.54
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum