Let's Make Robots!


echo.png31.83 KB
echo.12b.txt - 12Blocks file, rename without the .txt extension and load into 12Blocks8.77 KB
IMG_20100803_232241.jpg -inside Bender's rusty inards1.01 MB
IMG_20100804_231435.jpg - a view of the fitPC21.12 MB
IMG_20100805_204304.jpg1.02 MB

Bender is a medium sized robot based on the Crustcrawler Nomad HD platform. It uses the Parallax Motor Kit with Position Controllers, a pair of Parallax HB-25 Motor Controllers, 6 Parallax Pings, and a Parallax Propeller Robot Control Board.

The propeller handles the low level functions, such as sensor scans, movement, collision avoidance, robot status monitor. Low level routines are written in SPIN and all the behavior software is written in 12Blocks, which talks to the lower level routines through  12Blocks custom blocks written by me.

Bender's brain is a FitPC2, a 12 volt powered Atom 1.6 processor based microPc. It has 1.6Ghz processor, 1 G RAM, 160G hard drive, 6 usb 2.0 ports, dvi video, full audio, an ethernet port and built in WiFi. All of this in a package that measures 4x4x1 inches and consumes only 6-10 watts of power.

There is a Logitech Orbit webcam on board running AbleCam (video web server)

All this is powered by a 13000 mAh NimH battery pack.

Not shown is the scanning laser rangefinder. I have it, just haven't sat down to figure out how to get the propeller to read it. Also not shown is the head, which remains to be built. It sports a 7" touch screen display (back ordered) and is where the camera will be eventually mounted.

At the moment, the PC is still running on house power. I've opted to use a small inverter running off the battery pack to avoid cutting up the power cable. At some point this will have to go but since there is still plenty of room inside, it's a fair prototype trade off. I've ordered the inverter but don't expect to get it until next week. This limits the roving range to the length of the power cable but is sufficient for testing.

Running RealVNC, I can directly control Bender via WiFi. At the present time, I can drive the robot around using manual keystrokes which are passed to the propeller via the Parallax Serial Terminal that comes with the Propeller Development Editor or directly in 12Blocks as it has a built in terminal that also allows you to watch the propellers's pins change state and track all your variable. Very handy for debugging.

Software installed:

  • RealVNC
  • AbleCam
  • 12Blocks
  • Propeller Editor

UPDATE: 5 Aug 2010

Today I installed the 200 watt inverter into Bender. It has two 120 jacks, One goes to the FitPC, the other goes to the new 7 port USB hub, allowing me to hide all of the USB lines inside the robot.

Now, instead of a tangled mess of wires outside, there's a tangled mess of wires inside. I'll have to wrap the excess cable so it will be a bit neater.

Bender is now tether free! it can now be driven around the house under direct control of any computer in the house. Tomorrow I will deal with the rat nest of USB and power cables inside. I suppose I could put the inverter and hub outside, we'll just have to see how things work out tomorrow.  The inverter is a stop gap measure until I can round up a suitable power plug to run directly off the battery.

Beware, Murphy lurks in the darnedest places. 6 Aug 2010

Well tonight I found a couple of power plugs that will allow me to power the PC and the propeller off the battery. As I was checking the polarity of the power plug for the propeller, one of the cables blocked the screen of my voltmeter just enough to not see the '-'. When I plugged it into the propeller, There was the tell tell smell of acrid burning electronics. Too late! The propeller is now fried and gone to silicon heaven  and I've ordered a replacement. unfortunately, it means I can't do any of the weekend testing and development that would have allowed me to take it to work Monday to show it off.

This goes to show you that anybody can make simple mistakes. This one cost me the price of a new board and three or four days lost, all because I was not paying as much attention to everything I should have. In my case, I plead 'cataracts in both eyes, one eye that sees nothing and the other runs at about 20/70' A few years ago, this is a mistake I would not have made, but then I recall making many others,,,

It's a hundred dollar lesson that will last for awhile. They always do. Moral of the story? Don't be afraid of making mistakes, that's where we learn our toughest lessons, Don't be careless either.


Update 11 Aug 2010

The new propeller board arrived today. Like the old one, it's a MSR1, the Propeller Robot Control Board. So far, it's been fired up and programmed to handle the simple R/C program I have running for initial tests. Tonight, I'm planning on running it through a few tests to see how well it handles the WiFi things, drive it around to get the feel of it etc. I'll post some video if all goes well.

Update: 12 Aug 2010

Today, Bender fulfilled its primary design function: That of delivering a bunch of Chocolate Chip cookies to the office of our director. While it was all done under the use of telepresense, ie; remote control, Bender successfully navigated the approximatly fifty feet between my office and his, notwithstanding the positioning of a number of trash cans as obstacles. There are still issues with the anti collision software, and controlling the robot solely from the webcam was a challenge. My next step is to switch Bender to using the encoders so it will travel in something that more closely resembles a straight line.

Update 20 Aug 2010

Bender is now Skype enabled. Now I'm working on a pair of programs to talk to Skype. The first is on Bender and listens in on the chat channel for commands, then transfers the appropriate command sequence tot Bender via the serial port. Trivial program.

The second program runs on the remote client, reads mouse commands, and sends them over Skype to bender for execution.

Both programs are in VB.net. They will provide the ability to control Bender usinfg only a skype connection and my VB client.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

That's why I don't ping adjacent PINGS. just sticking a delay between pings works, but slows everything down. Ping opposite PINGS solves the problem and lets the PINGS run at full speed. slow moving robots are less critical here but faster moving robots c an easily overrun the speed of sound/reaction time window and still crash into things. I once built a pair of glasses with three SRF04s in them. One in the middle and one on each side, aimed about 45 degrees.The idea was to see how effective sonar glasses could be for vision impaired people. Naturally, I was the test subject. One of the things I discovered was that it was impossible to walk at normal walking speed because my reaction time plus the time it took to stop often exceeded the range of the sonar units. if I slowed down a bit I could avoid pretty much everything in my path. I also walked into a lot of parked cars cuz you have to do a lot more physical panning and tilting of your head and that's not a natural thing to do. We humans have a wide field of vision that allows us to take in quite a bit without turning our heads much.

Anyway, I try not to introduce extra timing in sonar sweeps to avoid the possibility of overrunning them.

Quote:  Apology Accepted Captain Neider (lol) It's a Star Wars Joke

...And then we get talking about the "tone of voice" within a text-only comment. Also, we are electronics people. What I meant to say was, "You're talkin' to my man all wrong, it's the wrong tone --You do it again and I'll stab you in the face with a soldering iron."



I finally got to use it. lol

Bender  is now skype enabled. instead of having to run RealVNC, a separate web server for the camera, and a control program, I can just call the robot with skype and my VB connector and have joystick control of Bender from anywhere on the internet.

That is absolutely awsome!

I wish I had your knowlege to that with my robots. I wouldn't where to start on such a link.

Nere is a little code that looks for a command and reacts to it. It is written in VB.net 2010. To test it, you'll need Skype on two computers connected on the interent. In my case, my desktop and Bender

Running VB from the robot (or remote computer) create a new VB project and cut and paste the code below into it's main form

Don't forget to reference the Skyp4Com object in 'add reference'

Run it

from your desktop, connect to the remote

In the chatbox type one of the commands (Hint: look through the code for the process command method) For example !who should give you my name, !help will say no help etc.

$xx are sequences intended to be sent to the robot

$f would cause an 'f' to be sent to Bender

VB expresess 2010 is a free download from Microsoft.

If you run this, you wil realize just how easy it is to integrate Skype control into your robot.


Public Class Form1
    Public WithEvents oSkype As New SKYPE4COMLib.Skype

    Private Const robotName = "Bender"
    Private Const trigger = "!" ' Say !help
    Private Const robotTrigger = "$" ' Say $f

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        oSkype.Attach(7, False)

    End Sub
    Private Sub skype_MessageStatus(ByVal msg As SKYPE4COMLib.ChatMessage,
                         ByVal status As SKYPE4COMLib.TChatMessageStatus) Handles oSkype.MessageStatus
        Dim command As String
        Dim robot As String

        ' Proceed only if the incoming message is a trigger
        If msg.Body.IndexOf(trigger) = 0 Then

            ' Remove trigger string and make lower case
            command = msg.Body.Remove(0, trigger.Length).ToLower()

            ' Send processed message back to skype chat window
            oSkype.SendMessage(msg.Sender.Handle, robotName + " Says: " + ProcessCommand(command))

        End If

        ' Proceed only if the incoming message is a command to the robot
        If msg.Body.IndexOf(robotTrigger) = 0 Then

            ' Remove trigger string and make lower case
            robot = msg.Body.Remove(0, robotTrigger.Length).ToLower()

            ' Send processed message back to skype chat window
            oSkype.SendMessage(msg.Sender.Handle, robotName + " Responds to: " + ProcessCommandToRobot(robot))

        End If
    End Sub
    Private Function ProcessCommandToRobot(ByVal str As String)
        Dim result As String
        Dim robotCommand As String
           Select str

            Case "f"
                robotCommand = "f"
                result = "Forward"

            Case "b"
                robotCommand = "b"
                result = "Reverse"

            Case "r"
                robotCommand = "r"
                result = "Right"

            Case "l"
                robotCommand = "l"
                result = "Left"

            Case "vr"
                robotCommand = "vr"
                result = "Veer Right"

            Case "vl"
                robotCommand = "vl"
                result = "Veer Left"
            Case "s"
                robotCommand = " "
                result = "Stop"

        End Select
'SendCommandToRobot(robotCommand) ' not written yet
        Return result
    End Function

    Private Function ProcessCommand(ByVal str As String)
        Dim result As String

        Select Case str

            Case "hello"
                result = "Hello!"

            Case Is = "help"
                result = "Sorry no help available"

            Case "date"
                result = "Current Date is: " +

            Case "time"
                result = "Current Time is: " + DateTime.Now.ToLongTimeString()

            Case "who"
                result = "It is David, aka dlevartt " +
                         "who wrote this program"

            Case Else
                result = "Sorry, I do not recognize your command"

        End Select

        Return result
    End Function

End Class

You is the man! I didn't get into VB much yet so I only used it only for the videostream. I'm definatly going to try this! Thanks for posting the code!

Got the robot (server) module working. Basically a merging of wTerm (serial terminal application) and the code above. It requires Skype to be running and when it sees a command meant for the robot, IE ($f for forward), it sends a sequence to the robot to execute the appropriate action. Still needs some refinement. Uses a config file for comm parameters. Going to add functionality to use the config file to define the sequence sent to the robot. Haven't started on the client front end yet, that'll wait until I get the server part the way I want it.

Hey ,  

I love this thing and I would like to contact you to get more information about it.

I am attending Rutgers University and will be working on a similar project.

Please let me know

selekumur @ gmail . com

Thank You

if everyone did that, there would be no letsmakerobots.com

Please do keep it public, so we all can learn, make spin offs etc.