Bender

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.

  • Actuators / output devices: Parallax Motor Kit
  • Control method: autonomous via propeller/FitPC, WiFi telepresence via Skype
  • CPU: Propeller
  • Operating system: Windows 7
  • Power source: 12v 13000mAh NiMh pack
  • Programming language: Java, Visual Basic, Spin, 12blocks
  • Sensors / input devices: Pings, Scanning Laser Rangefinder, Web Camera

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/bender

This is way cool!

And you are so right about the build time! I had the same or similar issues. That is a really nice robot that you have. Post some video soon please.

kind of big

kinda big to be a mediom sised robot it looks huge

Cool!

I love it, keep posting, there is only few propellor guys here :wink: I’m working on something like it (in the far distance :))

If you think Bender is big,

If you think Bender is big, wait till you see what I can do with weelchair motors ah ha ha ha ha ha ha ha

It’s only 14 inches wide, 18 inches long, 4 inches tall. It’s the tiny compuyer that trows the scale off. Or maybe MY definition od medium is different than everynody elses, but I’ve built a number of smaller robots and they all proved to be too small to do anything practical…

Phew

Just went trough the specs again, you spent some serious money on that baby!

In defense of Bender

Yes, you are right, but…

One of the problems facing robot enthusiests these days is that, while it is relatively inexpensive to build a robot, it is quite another matter to build something that can be used for something practical. Other than the battlebot I built years agom all of my other robots were small, like most peoples robots. The problem always comes back to the question of 'What can it do?" Most of the robots around really only serve one of two purposes; entertainment, education.

Having a robot that can do the macarana is cute but serves no practical purpose and is usually relagated to genre of toy. Educational robots allow us to learn principles of robotics but only at the beginner’s level. This is mainly due to the fact that while the microprocessors  that are available are awesome, their limited architecture means that you can only take them so far.

Now something like Bender, or TOBI, because they have a major attribute that nonl of the smaller bots have, allow you to enter into a whole new universe. That attribute is;

BIGGER MOTORS

Most bots made by enthusiests are designed primarily around components that are inexpensive, easy to work with, and are readily available/ This make entry a little easier on somone who is only getting started in robotics. The problem is that because they use tiny motors, payload capacity is almost non exisitant, making it very difficult to to anything practical with it.

I have run up against this time and time again. Bigger motors allow for bigger battery packs, which allow for longer operating periods and larger payloads, such as secondary computer systems, sensors. I worked on a battlefield rescue robot for the army, and when your robot needs to be robust enough to run for eight hours in a hostile, unknown environment, you’d be suprised just how much ‘extra’ sensors, computing power, actuator power you wind up using just getting your robot where you want it to be.

If all you need is a couple of infrared and ultrasonic rangefinders and you want to avoid colisions and maybe put out a fire in a contest, you really don’t need much in the way of resources. But if you want your robot to be able to make enough sense of its surroundings so that it can figure out where it’s at and navigate from one end of a factory to the other, carrying a payload, or capable of putting out a real fire, you’re going to need something a little more substancial.

One of Bender’s purposes is to allow me to explore sone of these ‘other’ possibilties. I expect a 6-8 hour duty cycle, One of the reasons I went with NiMh battery pack was to be able to push that boundry.

I suppose I could have bought a commercail robot for what I put into Bender, but I would have been stuck with proprietary hardware and software and I’m not willing to abdicate that power just yet.

I know a number of robot manufacturers that would have charged me two or three times Bender’s cost and their robot would not have been any better that Bender is turning out to be. It might be prettier but I would always be stuck development wise with whatever the company was willing to give me.

This way, I control every aspect of the robot and its capabilites, including the ability to upgrade as technology evolves without having to buy a whole new robot every couple of years and to change directions in its design as I see fit.

Now the real truth is that I don’t have a fast car to pour money into, nor a boat, nor an airplane. I don’t drink expensive wines, fly first class, buy priceless works of art, take extravagant vacations, or any of the thousand other things that people throw money away on. What I do have is a passion for evolving technology abd pushing the state of the art as much as I can so I choose to spend my ‘disposable’ income on that evolving technology because I get a great deal of pleasure of building something from scratch and making it dance. That’s what computer programming is all about. A robot is just a dancing computer.

And finally, it keeps me out of the bars (mostly)

To address you original comment directly; Yes I’ve put about $4500 into it so far,

  • 1300 for the platform
  • 100 for the two HB-25 motor controllers
  • 100 for the Propeller board
  • 1200 laser rangefinder
  • 700 for the PC (counting the video converter and CD drive I had to buy after the fact)
  • 350 for the battery pack
  • 100 for the webcam
  • 200 for Pings
  • 79 for the USB hub
  • 30 for the inverter
  • and assorted harwarel nuts, bolts, switches, wire

What I get is a robot that can go almost anywhere inside, some places outside (low clearance still), carry anything I’m likely to want to carry;luggagem, bird seed, dog food, and literally be limited only by MY imagination, which seems to be less restricted than some others.

Sorry that was so long winded. I know that many people can’t afford to build something even at this level, but I’ve been lucky. I can do it for the time being. Next year, you never know.

 

 

Dave, can you talk about the

Dave, can you talk about the way the low level functions work? I am trying to find a better/easier way to deal with motor control, encoder use, sensor data processing, everything that can be done at microcontroller level.

Thank you!

WOW!!

You got to work with the BEAR??? How cool is that!

Your investment is about on par since the major developement robots start at $3K and seem to top out now around $12K with an average of 5-7K for most. Who wants to spend that and be locked into someone elses proprietary platform. I can see the need of those developement platforms for fast implementations like a security system bot. If a client company is willing to pay for it and you just have to add couple of cameras that tie into a DVR over WiFi and don’t have the time to make your own brand of robot or you don’t have the time. So those robots that can do object avoidance right out of the box and follow an interior programmed map with your added security gear could justify the cost of such. But as you say, you are locked into platform in an emerging field of tech.

I think that it is better to build it yourself. Besides, Robotics [I should say “Personal Robotics”] is where computers were in the 80’s and 90’s. There were the TI99’s, Commodore 64’s, Atari’s, Apple II’s, Apple Machintosh’s, Amiga’s and many many more… How many do you see now? 

I think what you are building is really cool. I can’t wait for some video. What are you using to interface the Propeller with the PC?

I worked on a protoype that

I worked on a protoype that was the impetous for the BEAR. You might say there was a project that got canceled and the BEAR emerged out of it. Not exactly the direction I was going but…

I remember those heady days you mentioned. I myself owned an IMSAI 8080 with cp/m. I agree that the personal robotics world is pretty much where the personal computer was in 1979. It’s kind of nice being on the ground floor of two industries in one lifetime.

The propeller talks to the PC through the USB port on both. I currently run it at 19200 baud, which is plenty fast enough… Right now I control the propeller via keys pressed. It’s a simple remote control app that triggers behaviors on the Propeller. after I get the main hardware situated, it’ll be time to write a robot executive prgram. Haven’t decided which language it will be in, VB or java is almost certain athough I may do it in scratch (MIT) Going to resurect Strabo Pathfinder for the navigation part so the executive will be nistky to interface to Strabo and send navigation commands tot he propeller for execution.

I’m thinking of expanding Strabo to be the executive instead of simply a navigation server. This is mainly because, While Strabo does a good job of getting from one sopt in a building to another, there are a bunch of ancillary functions that belong inside Strabo and not necessarily. It willl require a tighter interface to the propeller but I’m not sure that I’m going to market it again. We’ll see. 

 

I really like the looks of the FitPC2

Since you have this kind of power in your robot you may want to look into the ViewPort debugger software for the Propeller by hannoware.com since it can do image processing and other things. Have you looked at the Propellant Library download on the Parallax site?

I now want to pick up a FitPC2 and increase my options too. This seems a better alternative to using a Laptop and more cost effective. You have provided me with new inspiration! It also has a line input so that I can run the audio output of the Propeller to the FitPC and use either the voice object in the Prop or in Windows to create speach. Cool!

Looking good man

I too feel the need for bigger robots, with stronger motors, hence my latest project, but since I work on a budget(a low one) I have to work with what I have, and to be honest I prefer it this way because I get to have it 100% custom :smiley:

 

Parallax HB-25 12v motor kit - 280$

modified 18v drill motors - less than 40$, including batteries and chargers.

Wind shield wiper motors - 20$ ish each, or free if you know your ways.

The last ones both require you to get wheels though, but wheels are cheap and are everywhere.

 

Sure, the parallax motors are nicer, and easier to mount, but even being able to afford them it’s simply not worth it, I am a miser however, I hate spending money…

Hey man, it’s way cool and I

Hey man, it’s way cool and I would love to have one. If you edit the topic there’s a “cost” tab where you  can enter that.

I have been thinking about a functional robot to. That’s pretty hard as you need to identify a task for it to perform first I think. Like Tobi, to carry tools but also like the Whirliwig, a small boat that maps the depths of lakes. Both robots, both cool as the northpole in december and both functional. Still very very different. But both designed to do something specific.

For me I won’t be on the nasa payrol anywhere soon. As you mention it’s just a fun way of teaching myself some basic electronics and some programming.

Imagination will always be limited by technology :slight_smile: No escape there I’m affraid.

12Blocks includes viewport

Or at least some of it. 12Blocks is also written by Hannoware. Viewport is an excellent propeller diagnostic tool. Not only does it handle image processing, it allows you to visually see the states (hi/lo) of each pin and watch the contents of your propeller variables change as they change in real time. You can almost through away those logic probes and oscilloscopes.

Haven’t looked at propellant, seen it at Parallax, I’m a frequent flier there. I’ve been a Stamp fan since the BS2 came out.  I bought a propeller when they first came out but never jumped on it so this is my first ‘real’ propeller project.

The FitPC gave me some grief at first. Tech support is awful, they will run you around in circles and you will wind up finding the solutions to their most common problems with google, not with them so much. If you use a VGA monitor, you have to buy an extra ‘CONVERTER’, not adapter, two different things and they won’t tell you that up front. It’s an $80 part expect to add that to te cost.

That being said, so far the FitPC seems to be working fine. It’s no speed demon but it does the job. Frankly All I really cared about at the time was power consumption and 12 volt source, and as small as I could get. Mine runs Windows 7. Linux would be better in some ways, but I’ve been programming on Windows platforms since 3.1 and while I’m not happy with the way some things are done, I know my way around the OS enough to pretty much do whatever i want. It just turns out that there are better development tools in windows so I’m sticking with it.

I thought I’d use the PC for speech processing and the propeller to generate little status chirps, al ;la R2D2. i Figured it might be interesting to beep and chirp as it moves around, partially to let people know it’s around so they don’t step on it and hurt themselves and it will be cute.

 

low level (propeller) functions

The low level functions are all written mainly in 12Blocks. If you’ve ever programmed in logo or with the Lego Mindstorms, you’ve like seen a graphical interface similar to what 12Block uses. (the Mindstorm uses a computer developed at MIT, who also created the Scratch language, of which 12blocks is a program that produces SPIN code using graphics very similar to scratch, optimized for the propeller. The thing that is nice about it is that you get the best of both worlds; a graphical development environment free of syntax, grammer, and most other things that make learning a new language tedious. with 12Blocks, you visually design your program and press one button to see the spin code created by it. This allows you to  do rapid development visually and tweaking in SPIN as necessary.

Because it is all SPIN based, there are SPIN objects in 12Blocks to support everything it does. If there is a block that you need that doesn’t exist, you can write a SPIN function, put it in your own SPIN object and link a block to it. Pretty easy to do. Parallax maintains an object exchange that contains literally hundred of objects that can asve you a lot of time. In addition, the propeller editor comes with a b bunch of objects.

The easiest way to understand it is to download `1blocks and look at the echo.12b file at the bottom of the robot section above just before the comments. Mainly I use two main cogs; the first is a command processor that continuously looks for keys from the PC and triggers event handlers when a key with a command is pressed. The other just manages the sensors by scanning them and storing their contents ubti global variables. This allows all the other cogs to get the results of the latest results fo a sensor without having to wait for them, Depending on how far an ultrasonic sonar signal has to travel, it can take a second or two to process 8 sensors. This streamlines the process a little by always having data that can not possible be more than a second or so old. If you don’t move to fast, it’s difficult to overrun this.

There are event handlers for forward, reverse, turn left, turn right, stop, and change speed.

For instance, If you look at the jpg in the attached file below the picture of Bender, you will see that there is a forward event handler.

This gets triggered when you press the letter ‘f’ in the terminal program The robot enters an endless loop, scanning the sensors for anything in its path while moving forward. If the sensors detect an object within 5 inches, it triggers the avoid routine, which sets a flag killing the forward handler, turns to the left until there is nothing within 5 inches of any of the fron sensors. It then triggers the forward event and it will move forward again, repeating until you command it to do something else.

It is all primitive, designed mostly to help me get a feel for everything . Once all this works you can just add other behaviors as you figure out how to do them.

There are blocks like ‘move forward’, ‘move backward’, ‘turn’, ‘stop’. I added ‘turn x degrees’, ‘forward x inches’ and a couple of others

If you use a propeller, You won’t go wrong with 12Blocks.

disclaimer: I have no involvement with 12Blocks other than as a happy customer and get no remuneration for talking about it. I just happen to know that it frees me up from thing about the syntax, grammar, punctuation, functions, and keywords. in other words it allows me to concentrate on the logic. After spending a lifetime learning new languages, I have learned to appreciate anything that makes my life easier.

Technology is usually advanced by imagination

.Sometimes by accident.  Imagination is inherently limitless, ergo technology is inherently limitless.

Our imaginations allow us to push technology to it’s limits, then we push a little harder and we have ‘new technology’ It has been so since man (or woman) discovered fire.

Everyone has imagination;Some choose to explore it, some don’t.

When I get the inverter, USB

When I get the inverter, USB hub and the other 4 Pings and have made sure that the behavior code works right, I’ll do just that. Should have everything in and setup by next weekend.

By the way, It also has an AX-12 arm, but I haven’t built it yet. I’m thinking it will wait til the head gets built cuz I want it at shoulder level and that hasn’t been worked out yet. I’m thinking it will come in handy for drinks and elevator buttons.

4 Hours! Really?

Well It took a couple of hours to assemble the platform kit. maybe a half hour to wire the motors to the controllers and build the power bus. A lot of time was spen just staring at it, thinking about where to mount things and what to put inside.

I ordered the platform three weeks ago, along with the propeller. Unfortunately, I only ordered one motor controller and only discovered that I needed two when I got my hands on the first one. Parallax says you can control two motors with one motor controller but neglected to mention that both motors would always receive the same signal. Hint to readers: One HB-25 per motor, unless you plan on driving a 4 or 6 wheel bot with more than one motor on a side.

It was about that time that I ordered the FitPC2. When it arrived, I discovered that it wouldn’t talk to my VGA monitor so I went out and bought an adapter. Turns out an adapter doesn’t work. You need a ‘converter’ That costs another $80 bucks and more importantly a week stalled. When the converter did arrive, windows didn’t boot, as it had gotten lost doing the setup without the monitor(When I first tried it) so I had to go out and buy a USB CD ROM and reinstall windows. The I discovered that the cable4s I had bought for the pings were too short and had to order longer ones.

Fortunately, I was able to keep busy learning SPIN and learning my way around the 12Blocks development system. In a way, it was fortuitous that the PC problem slowed me down, the battery took almost 2 weeks to arrive, FitPC’s support is among the worst I’ve ever seen, but it’s a great little box.

All in all, counting all the down time, debugging things that I shouldn’t of had to debug, redoing things because I followed documentation that was wrong, I’d say I spent about twenty hours building and programming it.

When the other 4 pings arrive, it will take me about an hour to install and test them. The software has already been adjusted for them. I’m thinking about adding a USB hub so there will only be one USB thing coming off the PC. Wiring that will likely take half an hour and there is still the head to build. I’m thinking about something like what the anybot (anybot.com) has. It’s kind of cute.

The real time is only just beginning. behavior programming is not really hard, it is just so much more subtle than regular computer programming because the robot can do real damage if it runs amok. Consequently, I expect that I will spend a lot of time tinkering with behaviors and trying not to run down Sparky, the family dog.

The program I have right now, as listed above only took a couple of hours to write, maybe ten if you count the learning curve.

So there you have it, 4 hours to build, 2 hours to program, 80 + hours of hurry up and wait, 20 hours of wild goose chases. Ah the joys of programming.

So, if everything had gone right the first time and all the parts were on hand, and I already knew how to program in SPIN and 12Blocks adn I already knew how to make the proper behaviors work, this would be a project that could easily be done in one weekend. Because there was a whole number of things that went wrong, It took a couple of weeks to pull together to the point it is now. This is why Research and Development can’t work on a deadline. Murphy’s law always get’s in the way.

 

Thanks! Looks like Propeller

Thanks! Looks like Propeller is a fun thing to program. I’ve started robotics with Lego RIS kit, then basic microcontrollers (Nemesis & co), read all about the Boe-Bot and been aware of the Propeller since it’s apparition. But I found Arduino, and now I’m hooked to that. There is also the WebbotLib and Designers that make things as easy as with Arduino for a few AVR based robotic boards like Roboduino, Axon I & II, Orangutan and a few others. The Designers will generate the hardware code for all the components you add to your project and all you need to do is program your logic using bare C. Anyway, I don’t think I’ll get a Propeller any time soon, I’ll stay with Arduino and link several on a I2C network to accomplish what you do with a single board. Easier your way, but I’ll rather spend the little I can on a high amp motor controller.

So far I see you have only the basic low level routines, as I also have. I am looking forward to see more advanced stuff, but I guess that would be done on the computer anyway. I am at a point where I need to code some sort of a Pathfinder and figure how to use the robot’s ability to scan and map the scanned objects to correct accumulated position errors. This is something where my current programming skills don’t help too much… so I’m looking for some insight.

I love the feeling Bender gives me, like this thing looks rock solid, almost indestructible and factory made. I hope I’ll get to that point too. I see that other builders go that route, TOBI, Roundabout Bob and Walter look solid and professional made. All our small robot experimenting shape our skills to create those bigger robots that are built to actually do something useful. That is my long term goal too. But I need to shape my programming skills or I’ll end up with a nicely built bot that does nothing.

Ok, You got me interested

I did download and install 12Blocks in January and looked at it for a while but I decided to jump head first into Spin. Now with a good knowlege of Spin under my belt, I think that I will take another look at 12Blocks. So my question is this: If a block doesn’t exist in 12Blocks and you find an Object on the OBEX, how simple is it to add it to 12Blocks to start using?

I noticed that there is no TPA81 sensor block but I found the code on the OBEX [or was it norrislabs.com I forget now]. Anyway how hard would be to add blocks? And/or update blocks since your code refers to the Servo32v6 object and I am using the Servo32v7 object?