.NET Serial Communication and Microbotlabs' Robotic Claw
I always enjoy playing with electronics and seeing what I can do with them, so I’m a big fan of Arduino and the maker movement. One area I had been wanting to explore with electronics was real world physical interactions, like moving robots or robotic claws. So I added a robotic kit to my wish list on Amazon and just so happened to get one for the holidays!
This is the Microbotlabs “MeArm DIY Robot Arm Kit With MeCon Pro Motion Control Software and Arduino Source Code” that you can get on Amazon MeArm DIY Robot Arm Kit With MeCon Pro Motion Control Software and Arduino Source Code. The kit quality is a little low (especially the servos) and the instructions and support seem lacking; but I was able to put it together and it was still a lot of fun and pretty cool. Once I built the claw, I connected it to my Arduino and tried running the application Microbotlabs include to control the claw from your computer (MeCon).
With everything working, I toyed around with the application for a bit. The idea of “recording” servo positions and playing them back so that the robot could record and playback motions seemed like a fun way to interact with the arm. Below is a screenshot of the application, where you can see the controls. There’s the ability to move the base and each of the 3 servos controlling various parts of the arm, and the on the right there is a list of “coordinates”. These are servo positions, and you can use the application to record a list of these “coordinates” and play them back so that the robotic claw can perform a specified movement (and presumably so you can generate code from it that you can maybe add in your project).
This was fun at first, but it very quickly became obvious it was going to be difficult to record and playback smooth motions without a lot of work. I would record some movements and then I would play the recording back, but the Robotic Claw would jerk and jump to the new servo positions. I was either going to need to record a lot of motion data or just accept jerky movements. Adding insult to injury, it was also difficult to edit a motion once recorded. Here’s a short video of playback of the motion recording with the standard software:
To be fair, I’m sure if I would have spent enough time adjusting and tweaking I could have gotten that to work somewhat, but I still had limitations. I decided it would be fun to build my own interface to address these problems using .NET and very generically called it “Crawl Controller”:
Basically, the major feature difference is that you can move the claw to the desired position and record “key frames” much like 3D animation for 3D models in video games. On playback, you can have the application interpolate in between each key frame and come up with the “frames” in between so that the motion is nice and smooth. I went ahead and put all my code (which wasn’t the prettiest, but hopefully clear enough) on GitHub so anyone can download and play with it. The application also makes it easier to delete and add new key frames wherever desired which really comes in handy when “designing” a new movement. The application also allows the user to send more precise servo positions rather than just a degree (180 degrees), but the application is still backwards compatible with the code that Microlabs provides out of the box. (See GitHub for Arduino code that allows “Crawl Controller” to use more precise servo positions)
Anyway, here is a video of the finished product with interpolation. It is much easier to put together complex motions and the smooth movement allows much more gentle motions making it easier to pick up and set down objects consistently and repeatedly. Here, I recorded movement for the claw that loops and you can see the claw can repeatedly put down and pick up the VGA/DVI adapter again after finishing the animation without knocking over the adapter- the animation also was easy to record.
Code on GitHub: https://github.com/JhottMaster/ClawController
Enjoy Reading This Article?
Here are some more articles you might like to read next: