Cheap, Easy Robotics for the Non-Programmer

 by doctek
babuino_logo_2_4.jpg
Hey Robotics-Programmer-Wanna-Bees! Tired of trying various 'environments' only to find that there's a steep learning curve between you and those cool robot tricks your geeky friends do? Are the commercial kits too expensive? Then this Instructable is for you! I'll show you an inexpensive (nearly free) environment that'll have you teaching your robot tricks without realizing you're actually programming. OK, maybe it's not quite that simple, but by presenting you with building blocks instead of a text editor, it makes programming much simpler and more intuitive.

"Hang on," you say, "How is this different from Arduino or Legos? They claim to make Robotics easy also."

What's wrong with Legos?

Perhaps you've seen Lego Mindstorms, but aren't ready to shell out $200 to $400 for the system. This Instructable is for you since the robot can be much cheaper and simpler, yet still do fun and interesting tricks.

One of the real strengths of the original Mindstorms was the programming environment. Since it was designed with kids in mind, it provided an intuitive, graphical method of programming. (But friends tell me that it has become bloated and is somewhat intimidating in the NXT version.) I'll show you a similar, simpler graphical environment you can have for free.

What's wrong with Arduino?

If you're like a lot of geek wanna-bes, you've purchased an Arduino or some flavor of Freeduino. Attracted by the low price and simplicity of the hardware, you ordered one. You downloaded and installed the software, got a led or two to blink, looked at all the great stuff in the many libraries - and then put it aside. It was all just too overwhelming! And trying to modify somebody else's library code was simply too complex.

The Solution

Suppose there was a way to combine the inexpensive Arduino hardware with an intuitive programming environment like Mindstorms? Guess what? There is! And the software is public domain, open source (as in "free") no less. For teachers and educators, there's even free courseware. Doesn't get much better.

I'll provide a little background so you'll understand the pieces, then I'll explain how to create your own robot development and programming environment. The Graphical Programming Environment is known as "Blocos" and the robot hardware is known as "Babuino". I'll tell you all about them, how to get them, and how to have fun with them. So hang on, here we go! Babuino / Blocos is in use in Spain , Argentina, and the US .

When you complete this Instructable, you'll know how to turn an Arduino into a programmable robot controller and how to set up a graphical programming environment for it. I'll provide some pointers which will help you interface robotic hardware to your controller. In a planned follow-up, I'll give detailed instructions on hardware interfacing.

Important Note: When I use the name "Arduino" I mean not just the (not quite copyrighted) Arduino itself, but also the many public domain versions collectively known as "Freeduino". In some cases I use the term "Ard/Free-duino", but the terms should be considered interchangeable for the purposes of this Instructable.

 
Remove these adsRemove these ads by Signing Up

Step 1: A Little Background

Here's an abbreviated and imperfect history of fun-to-program robotics. Back in the late 60s, Seymour Papert at MIT decided that robots should be fun. His excuse was that he wanted to help children learn, but I really think he just wanted to play himself. :)} One of his concepts was known as Turtle Graphics in which an imaginary turtle could be programmed to draw lines on the display. Shortly afterward, the idea of making a motorized turtle that could drag a pen on a piece of paper evolved. MIT got Legos involved and the first Programmable Brick (robot controller) was created. Mindstorms (name taken from a Papert book) followed quickly. A spin off, based on the work of Fred Martin, was a programmable brick known as Cricket . Most recently, an inexpensive brick, known as Babuino and based on Arduino, has been developed. The Babuino is the reason I'm writing this Instructable.

To go along with his easy to use hardware, Papert invented a language called Logo to make programming equally easy. Logo was supposed to be easy for anyone (adults included) to learn. It was easy compared to languages of the day, but still involved a text editor and memorizing syntax. Papert's collaborators created a graphical environment called Logo Blocks in which blocks representing Logo statements could be metaphorically snapped together to build the logical constructs of the robotics programs. Fortunately, Logo Blocks is much easier to understand than that last sentence describing it! Logo is now available as Cricket Logo and is the basis for Logo Blocks. Cricket Logo and Logo Blocks are both only for Windows and Mac environments. Blocos is a modern replacement running on Linux, Mac and Windows that I'll tell you all about in the sections to follow.

One additional concept is integral to the Programmable Brick and the Logo Blocks environment. To keep the Programmable Brick simple and cheap, the software that runs on it must be very simple. So the brick software knows nothing about the elegant programming environment provided by Logo Blocks. Instead it accepts single byte codes, also known as "opcodes". Each opcode translates to exactly one simple action that the brick software will perform. For example, opcode 46 might refer to Motor A while opcode 49 might turn on a motor. So the opcode sequence 46 49 would cause Motor A to turn on. The result is that Logo Blocks (and Cricket Logo also) knows nothing about the Programmable Brick; it simply generates opcodes. The brick knows nothing about Logo Blocks; it simply responds to the opcodes sent to it.

A direct consequence of this clever scheme is that new languages and environments (such as Blocos) may be developed as long as they produce opcodes as their output. An equally important consequence is that new programmable bricks (such as Babuino) may be created as long as they provide appropriate actions in response to a stream of opcodes.

rfrancis says: Sep 4, 2011. 9:15 PM
tell me how to make a bot the coding will come later yarrrrrrrr
doncrush says: Apr 16, 2011. 5:16 PM
When I hit the download button I get an error...my Arduino Uno is on COM5, but the Blucos program is showing in the terminal window it is trying to talk to Com2 and Com 4?

Help?
doctek (author) in reply to doncrushApr 19, 2011. 8:19 PM
For questions about the Blocos protocol, please post to the Blocos forum.
http://groups.google.com/group/br-gogo

You'll receive prompt help from the creators and users of Blocos.
T_T_ says: Dec 13, 2010. 7:33 PM
another question, I'm looking at the babuinobot instructions and there are 6 pins labeled "program header". you said "To do the upload, you'll need a USB to serial adapter". well I already have a serial port, is it possible to make a cable that goes from those 6 pins to the existing serial port on my computer? If so, what pins on the babuino would go to the different pins on the serial port.
Thanks
doctek (author) in reply to T_T_Dec 14, 2010. 11:17 AM
So the 6-pin connector on the schematic you are looking at is really just a connector to 3 pins on the Arduino processor: RX and TX (serial receive and transmit respectively) and Ground. While these are intended to work with your serial port, they need translation to RS-232 (as used by a standard serial port) levels. If you use a USB serial port adapter, then this level translation is not required.
This is the programming interface you will use for Babuino.

Since you want to use a real serial port, then you need the level translation. Fortunately, it's easy to do. Use this part: http://www.sparkfun.com/products/316
and hook it up like the data sheet shows (the data sheet is available on the page). Then connect pin 10 of the part to pin 3 (TX) of the Arduino; and connect pin 9 of the part to pin 2 of the Arduino. You don't need the 10K resistor shown in the schematic you reference.

To connect your serial port, you'll probably want a 9 pin connector like this one: http://www.sparkfun.com/products/429 - just be sure you get the correct sex for your cable. Pin 7 from the interface part you just hooked up should go to pin 2 of the connector and pin 8 goes to pin 3 of the connector. Be sure to connect pin 5 of the connector to ground of the Arduino board.

If things don't work, you may have a non-standard connection. In which case try swapping the wires on pins 7 and 8 of the interface part.
T_T_ in reply to doctekDec 15, 2010. 4:49 PM
actually I'll use either the serial port or usb, I just want the cheapest route.
thanks
T_T_ says: Dec 10, 2010. 7:50 AM
Am I going to need this for programing, or can Just use the existing serial port on my computer
doctek (author) in reply to T_T_Dec 10, 2010. 10:47 AM
As usual, it depends. If you are using the Teensy2 - based version, then you already get the USB interface and you don't need anything else. That is, it's programmed using your computer's USB interface.

If you're using an Arduino or clone, then it will have either a USB interface built on it (which you'll use for programming), or it will have a serial port (use your computer's serial port).

I'm assuming your computer has both serial and USB ports available.The device you link to is in case you have only a USB port available and need a serial port. If you have serial and USB both on your computer, you won't need that device in any case.
T_T_ in reply to doctekDec 12, 2010. 9:55 PM
thats nice to hear thanks, yes it does have serial and usb.
on the building instructions there was 6 pins for programing, I'm not sure if all are used, but I am wondering if those 6 pins are for usb or serial.
doctek (author) in reply to T_T_Dec 13, 2010. 10:37 AM
I'm not sure exactly what instructions you are looking at. I'm guessing you're looking at the instructions that use an ATMega168 or ATMega328 chip and show how to program the bootloader. In that case, there is a six pin programming header used to program the chip. If you want to go this route, let me know and I can point you to some programming options.

If your goal is just to create an Arduino clone so you can run Babuino, then you are better off just buying the chip with the Arduino bootloader already loaded. Then you don't need the 6 pin header and will just use the serial interface for programming. The links I provided will lead you to sources for the programmed chips.
T_T_ in reply to doctekDec 13, 2010. 3:16 PM
that makes sense thank you.
jeff-o says: Sep 2, 2010. 6:25 AM
Wow, thanks for bringing this fantastic looking system to everyone's attention! I had not heard of this before your instructable. Now I'm inspired to make a little robot out of an Arduino Mini I've got lying around...
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!