This is a project that I’ve been working on on-and-off for over a year now. A while back, a friend got me this robotic claw kit from thinkgeek, basically to make fun of my prosthetics research. It’s simple enough…A wired controller is connected to the claw and has a few levers for eliciting movement from the arm’s various motors. As you might expect, I got bored with picking up blocks rather quickly. I instantly had the idea to pick up blocks remotely! Oh what fun that would be! To accomplish this I employed one of my favorite microcontrollers, the parallax propeller. Admittedly, the propeller is overkill for this project, but it’s what I happened to have on hand–It has 8 cores and I am only using one, but this is only v1 of the claw, and I hope to take better advantage of this chip in the future. The propeller chip communicates with a small web server (also sold by parallax) via a serial connection. I’ve even setup a network webcam, and embedded the feed in the control webpage, so I can easily control the claw from anywhere in the world!
Read on for pictures, source-code, a video, and a walk-through of the system!
Here’s how the whole thing works:
1. I send a command via my web interface (view the html source below)
2. That command modifies one of the variables stored in the web server’s RAM
3. The propeller is constantly polling the web server to search for variable changes. If it finds one, it executes the related command based on the value stored in the variable.
4. To execute a command, the propeller sets an output pin connected to a solid-state relay to “high” for a certain about of time (based on another web variable)
5. While that pin is high, the relay connects the two wires necessary to move the requested part of the claw.
6. When movement is complete, the propeller sets the RAM variable in the web server back to a default value, and starts querying for new values again.
*In addition to this, the propeller illuminates a red or green LED to indicate whether the web server is properly communicating with the network.
The RoboClaw v1 source code is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
RoboClaw Source Code (ZIP – 276KB)
Video Walk-Through and Demo