My experience with the Lego 8527 Mindstorms

I probably should have titled this article: "Why I have the coolest job in the world".

The other day, I showed up at the office and my boss said, "Take home this new Lego robot stuff and play with it. Tell us what you think." When I was a kid, Legos were far-and-away the best toy I had. My absolute favorite. Erector sets and the like were up there too, but I was all about the Legos. No surprise I became an engineer all those years later. So when I got to play with build-it-yourself Lego robots as part of my job, I was all over it.

I brought home a half-assembled Lego Mindstorms 8527, which they call "NXT" for short. I immediately took every single piece apart, tossed the instructions aside, and starting putting things together -- just as I had when I was a child. Eventually, I backed down from my rogue tendencies, and started building the robots prescribed by the out-of-the-box instructions. I thought that might be a better way to systematically report back to you, my fellow technology lovers, what I learned and thought.

First impression. LEGO ROBOTS! 'Nuff said!

Okay, real first impression -- not really for kids. The user guide is 50 pages of how the sensors and brain work, before you even get to instructions. Second impression was that these aren't your father's Legos. One of the things I loved about the Legos of my youth is that you had a bunch of blocks to work with. Everything else came from your imagination.

The Mindstorms kits aren't as bad though as other Lego sets I've seen in the recent past -- where all the hard stuff is already "put together" as cool molded plastic pieces. However, this thing is a far cry from just a bunch of blocks. The good news is that it's now all gears and axles, etc. So, I guess it's actually an upgrade. It's even more fun to put stuff together out of gears and joints and axles than out of blocks. The bad news is that there aren't enough of these sets yet, so my childhood tendency to throw all the pieces in a big tub, ditch the directions and just build isn't as realistic as it was with my older stuff. More good news, though, is that the older stuff is in fact compatible with the new stuff. If I want to integrate robot parts into my Death Star Lego set, I can feel free to do so.

How does it work?

With that introduction out of the way, let's get down to the nitty gritty...

The set comes with a programmable "Intelligent Block". It has 4 inputs and 3 outputs, takes a zillion (okay 6) AA batteries, weights almost a pound, and can connect to your computer either via Bluetooth or USB. It has a number of little demo programs built in, and comes with software you can install on your desktop computer to teach it all kinds of new tricks. There's a graphically-based programming language -- anyone remember the days of "Logo" and the "turtle" we used to play with in the days of the Apple II? -- which lets you build complex movement / action instructions out of basic "move forward", "turn right", "use sensor" kinds of commands. The 4 inputs map to 4 distinct sensor types: touch, sound, light and ultrasonic. The 3 outputs allow you to connect up to three "servos" (also called "actuators", but they're basically just electric motors) to the brain.

So, let’s talk sensors.

The four sensors provided in the kit.

Touch

The touch sensor gives your robot a sense of touch (go figure!). You can detect when the sensor is pressed, released or "bumped" (pressed then released). The set even comes with a shiny red ball and claw pieces, so that you teach your robot to pick up the ball. Probably not a major league baseball pitcher in the making just yet, but still cool.

Sound

The sound sensor detects sounds in the form of adjusted decibels (dBA). This is sound pressure in the range of human hearing. The sensor can measure sound pressure levels up to 90 dB (about as loud as a lawnmower). Therefore, you can program the robot to react to sounds by % of this range, where 3-4% is a quiet room and 90-100% is me cutting the grass. The sound sensor demo makes the robot move faster the louder the noise it "hears" is.

Light

Half of the equation for giving the robot a sense of vision. The sensor can distinguish between light and dark, measure the light intensity in a room, and detect the difference between various colored surfaces. The kit comes with a cool fold-out "game board" (for lack of better terminology) with colored squares on it. Built right, a robot could run around and make decisions when it sees those squares. Also I'm sure you too can think of many uses for the bright red ball in this context.

Continue to page 2 >> [[page]] 

Ultrasonic

The other half of the vision equation. This sensor allows the robot to avoid obstacles, sense and measure distances (up to 100in, or 255cm, away), and detect movement. It essentially uses the same scientific principle as bats, measuring distance and observing changes in what's in front of the sensor by calculating the time it takes for high-frequency sound waves to hit an object and return.

What about the servos?

Pretty basic. Each of the three servos can turn an axle either clockwise or counter-clockwise a specified number of degrees, where 360 is a full rotation. The speed of the motor is also a variable. Because the servos each function independently of the other two, attaching axles and wheels to them allows your robot to move forward, turn gently or sharply, move backwards, turn in place, etc. The most sophisticated design included with the kit uses the servos to make the robot walk, which is actually pretty cool.

Tell me more about the NXT intelligent brick.

First of all, I love the name. Very appropriate too. An intelligent brick. Volumes could probably be written about this thing I guess, but that's a bit beyond this article. It's a mini-computer. Simple as that. It contains a 32-bit primary microcontroller, 256KB ROM, 64KB RAM, several sub-processors, etc. And we already talked about the visual programming language and the I/O of the device. Basically a way to wire a brain into your Lego creation.

Instruction Sets

There were two very simple designs in the box when I opened it. After a little bit of searching on-line for more instruction sets, I discovered that the software I installed on my laptop contains a whole raft of plans for a wide variety of robotic toys. The good news is that it would keep me busy for quite a while. The bad news is that I have to have the laptops open and the software running (it's kind of like a page-by-page wizard) to play with my Legos. I can find anywhere that would allow me to get all these nifty schematics printed out in old-fashioned, non-robotic paper form. Back on the positive side, though, I love the zoom in feature on the instructions module. I built robot guy from a gigantic set of plans this afternoon. :-)

Demo Programs

As I mentioned, there were a couple of demo programs included with the designs. They all worked as advertised, but they weren't all that impressive. Even the simple programs I attempted as my first trials were more sophisticated than the demos provided out of the box. A very useful demo feature was that each sensor had a specific program stored in the brick's ROM to show it off. Very helpful in the early what-the-heck-does-this-do? phase.

Connecting to Your Computer

Both USB and Bluetooth were easy. The only catch with Bluetooth is that you have to make sure you configure the brick correctly. In order to do so, go to the Bluetooth menu, turn on the Bluetooth functionality in general, and then turn "visibility" to "on" in a separate menu. Then, once I installed the software on my laptop, it was very easy to use the "search" feature to detect my NXT robot. Of course, the unit has to be powered on for the connection to be established, and you have to enter a password into the brick to make sure it doesn't get hacked by dark side.

My only headache was that every time the NXT unit powered off to conserve power, the connection to my laptop would die. Not a big deal, though, 'cause I could just turn it back on and keep going, right? Unfortunately not. After such a power loss, I could not get the laptop to reconnect. In order to re-establish it, I had to power-cycle the NXT unit (again). Pretty annoying.

It was also a bit annoying to have to enter the password every time. The user guide points out that you can get a bluetooth device (like my laptop) to be "trusted" by the NXT, but that didn't seem to get me anywhere on the don't-want-to-enter-my-password-every-time front.

My First Program

I found the programming language pretty intuitive as a set of building blocks go (pardon the pun), but not so easy to get it right. It only took me a few minutes to put together my first few commands, but they didn't work as planned. I built one of the out-of-the-box robots (a crab-like 'bot pictured here), and wrote a simple program to have it pick up a ball and hand it to me. But I couldn't get the servo used to control the claw to react the way I wanted it to.

Next attempt was for a robot that would roll toward me until I put my hand out for it to stop, then back away a fixed distance. But that didn't work so well either. Could be that I need more robot savy, but it's also possible that this tech is still in its infancy and needs a bit more time in the oven. Either way, the experience certainly reinforced my hunch that this is more an adult toy than for 10 year olds (as the box suggests).

<< Return to page 1 | Continue to page 3 >> [[page]] 

The Big Build

The most sophisticated thing I attempted to build was the robot you see in the picture above. Took me hours (while the latest greatest from the Sci Fi channel played in the background for inspiration -- Stargate SG-1 and -Atlantis, if you're interested). But I digress... It took a long time to find the right pieces (since they're all small and intricate, 3-4 different shades of grey, and (most importantly) a totally different dynamic than the Legos of old. Here's a shot of the project part-way in...

Jeff working on the robot

I touched earlier on the idea that old Legos were blocks, and these are much more sophisticated. The longer I worked on Mr. Robot, the more that hit home. Some of my favorite pieces are shown here...

Some of my favorite parts.

A) Super-funky connector that allows me to link pieces together ten ways to Sunday.

B) I originally thought this piece was some kind of goofy make-it-look-a-little-cooler piece. But this is actually used as a large-toothed interlocking gear. It can also be used to drive pistons. I show a different implementation of this below.

C) A spiral gear. Interlock this with some of the more classic gears, and you can do all kinds of fun things.

D) A single "ball" similar to the "four ball" large-toothed gear shown by B. I had NO idea what this did, until I hooked up the pistons that drive the robot's arms. Picture of this below (piston circled -- part D is used to lock the piston on).

And after about 4 hours later, I wrapped things up and threw this article together. Here's a shot of the finished robot...

Summary

  • Fun for the engineer in us all? Lots and lots and lots of moving parts that give me infinite possibilities for wasting time building things? I give it a 10.
  • Able to make all my dreams a reality? I give it a 5. I was routinely able to come up with things I wanted it to do but couldn't get it to do.
  • Is the technology mature? I give it a 5 as well. Really awesome start; long way to go.
  • Is it innovative? Back to 10 again. This is definitely the way to go. More servos! More sensors! Let's take this idea out for a spin.
  • Flexibility? Ability to build stuff that isn't in the instructions book? Also a 10. I was pleasantly surprised to discover that there had to have been over 100 pieces leftover after I finished the big robot, including claws, tires, gears, long struts, etc. Rock on!

I guess that's about it for my first tour through Lego Mindstorms. There'll be more I'm sure. Especially if I build anything cool / sharable out of this stuff, I'll post pictures.

In the meantime, I'd be very interested in hearing about your experiences. Join in the discussion around this article, or check out the forum thread I created here.

Couple cool links...

 

Connect With Techlore