BLOG > Web-Controlled RoboClaw v1

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.

Source-Code (v1)
Creative Commons License
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)

Pictures!

Video Walk-Through and Demo

16 comments

  1. Hii!!!!

    That is awesome.
    You just cant say different.

    It would be really cool if you put this on a public website and let other people control it and move some boxes around or something.

    And what are “obvious reasons” you are talking about?

    These guys manages just fine:

    Theese are pretty much the same, it is just the coding that makes the difference. (Correct me if i am wrong :p)

    Reply too my email:
    [email protected]

  2. The primary reason I don’t want others controlling this is that there are no limit switches, so people could easily over-stress the motors if they desired. Also, It’s about 5 feet away from my bed and I would prefer not to hear it moving around in the middle of the night. I’d love to make it world-accessible once I have a better place to put it.

  3. Very cool! Which do you prefer, the Arduino or propeller? in terms of the different language and hardware capabilities… And why did you pick the propeller chip for this project?

    1. I basically just used the propeller because it was what I happened to have at the time. It’s overkill for this project – you should check out my deepnote guitar hero bot. That one could not have been done with an Arduino – the Propeller has 8 “cogs” or cores that can be very useful for solving certain problems.

  4. Very cool..! Can we use a raspberry pi instead of parallax propeller? Will it be faster than this?
    Also in this you have buttons for each movement. So is it possible to make it real time using raspberry pi with no delay in between?

  5. Hi Jeremy, I am working with Web-based Home Automation and I used the tutorial on startingelectronics.com as a guide. I used Gizduino X (clone of Arduino mega 1280) as a webserver. The problem is; it works fine/fast (ajax request every 200ms) when the server is connect with one client device but when two or more client is connected, the response became slower and slower. I found out when I opened the ‘inspect element’ on chrome that the ‘blocking time’ increases about few seconds when there were two or more client connected.

    Your response will be greatly appreciated. Thanks in advance Jeremy :)

  6. Pingback: Remote controlled claw of doom | Diy all the Way

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Advertisement