Lego Mindstorms

In case you have somehow missed it, let me shortly describe you what is Lego Mindstorms. Basically, it is a Lego construction kit with servo motors, sensors and a controller included. This way it is possible to build a "real" robot with Lego.

As you can understand, neither soldering nor previous electronics knowledge are required. While it is quite easy to program your robots using the provided software, the kit still provides serious educational value. Later it is possible to program this kit with more advanced methods as well.

I suppose this is enough for a short description and you'd like to find out more about this robot construction kit. Read on to find out what's in the kit, what can you do with it, how you can program it and more.

the kit


Alpha Rex, photo courtesy of Lego for press use.

There are 619 Lego pieces in the kit that enables you to build 4 different pre-defined robots - a humanoid, an alligator, a shooter-bot and a robot that can sort by colors. By saying "pre-defined" I mean that there are detailed instructions included with the kit on how to build these four robots. Of course, you can build many more robots, that’s the point of Lego anyway.

You say, you can build "a robot" with other Lego kits as well? That's true, nevertheless as I mentioned above, there are also some sensors and motors included in this kit to bring your robot to life. And of course there is the controller that does the thinking.

As you can understand, the controller is one of the most important parts of this kit. There'd be no point in sensors and motors if there's no way how to make them work together. So, the controller has 3 input and 4 output ports. It is powered by 6 AA batteries and it can connect to a PC wirelessly via Bluetooth.

As the controller has 3 input and 4 output ports there are three servo motors and 4 sensors - 2 touch, 1 ultrasonic and 1 color sensor included in the kit. The motors have built-in sensors that allow you to control not only their speed but position as well. The motors are powered from the controller.

The included touch sensors can detect ermm... touch, obviously. The ultrasonic sensor acts as a bat or as a dolphin - it emits ultrasonic sound and waits for response, this way it can detect movement and measure distance, oh, and it looks like eyes. The color sensor can distinguish between colors and detect light intensity.

Also there are seven connector cables, a user guide, a test pad and a CD with the NXT-G software included. If you're wondering whether there are other sensors for this kit or is it possible to connect more than four sensors, read on, I'll cover this later.

Legacy


Lego Mindstorms RCX, by Mairi, released under Creative Commons license.

The current version of Lego mindstorms is NXT 2.0. As you can guess there was NXT 1.0 before it. But even before it there was the Robotics Invention System with the RCX intelligent brick. If the difference between NXT 2.0 and NXT 1.0 is not really significant, the RCX was quite different.

The Robotics Invention System came out in 1998. After that there was a few additional kits released and the RIS version two came out in 2001. After that it seemed that people at Lego have abandoned the idea of robot construction kits.

Things changed in 2006 when Lego Mindstorms NXT kit was released. The NXT 2.0 came out in august 2009. As I said, the difference between the NXT and the NXT 2.0 is not really significant. The sets have slightly different pieces in them, the firmware is updated, and the color sensors, as well as some other features, are added.

Augmentation possibilities

I'm sure you have a lot of questions by now. Are there any more sensors for this kit? Is it possible to connect more than four sensors to the controller brick, more than three motors? What about old RCX sensors? On one side, there are additions made by Lego for Lego mindstorms kit. These include RCX-NXT convertor cables that enable you to connect old RCX sensors to the kit, a rechargeable battery pack and additional sensors as well.

There are sound sensors that were included in NXT 1.0 kit by default. These can measure noise level, as well as recognize different sound patterns and identify different tones. Also, there is a compass sensor and an accelometer sensor.

Using the compass sensor the robot can distinguish at what direction is the North Pole. The accelometer sensor lets you measure acceleration, as well as tell the robot which way is up and whether it's tilted left or right.

In addition to these official Lego mindstorms sensors there are different sensors manufactured by different third party manufacturers as well. These include pneumatic pressure sensors, different infrared range sensors and more.

The most interesting of these third party manufacturers in my opinion is Mindsensors. Amongst above mentioned additional sensors they have also developed advanced sensors such as a camera that can track color blobs, a dual range, triple zone infrared sensor, as well as an eight sensor array for line following applications.

While all these sensors are great there's not much use of them if you can connect only four to your Lego mindstorms intelligent NXT brick. So, people at Mindsensors have come up with a solution to this kind of problems.

There is a port splitter that allows you to connect more digital sensors to your NXT brick. As it is possible to connect them to each other, it is possible to connect up to 124 digital sensors. While it is possible to use this port splitter for motor ports, it is not very useful as three is the optimal count of motors the controller can provide power to.

So what to do if you need more motors for your project? Fortunately, Mindsensors have come up with a solution for this problem too. They've designed an 8 channel servo controller for NXT. Basically you can control the speed and position of eight "regular" servo motors using this device.

As you can connect the servo controller to the port splitter and eight servo motors to each servo controller it should be enough. As you can understand, the power has to be supplied separately. With these augmentations you can create quite complex devices, see the video:

Programming options

OK, I talk about sensors, motors, augmentation possibilities, et cetera. I'm sure you would like to know more about the programming aspect of this robot construction kit. Will it be easy enough for your kid and not too restricting for yourself?

The good news is that there are plenty of methods that can be used to program Lego mindstorms. Let me tell about these more. The graphical programming environment that comes bundled with the kit is called NXT-G.

In NXT-G you have to drag and drop blocks that represent certain actions, much like a flowchart. This way it is easy enough to program Lego mindstorms robots without previous programming knowledge, also this is a good way to learn basic programming.

While NXT-G is now the most widely used graphical programming environment for this kit, there are people that use the ROBOLAB. This software just as the NXT-G is based on LabVIEW by National Instruments. It was used to program the RCX controller but you can use it with NXT as well.

If you have previous programming knowledge, these graphical environments can be a bit of a burden to you. While they're great as an introduction in programming and it is easy to create simple programs with them, it can be hard to use them if you plan to create more complicated applications.

There is a variety of solutions for you if you prefer textual programming over graphical alternatives. NBC and NXC (Next Byte Codes and Not eXactly C) is one of these solutions. NBC is essentially an assembly language and NXC is a C-like language built on top of the NBC assembly compiler.

Both, NBC and NXC are open-source, so you can get and use them for free. As NBC compiler outputs the machine code for NXT, as I understand, it is possible to use NBC/NXC without changing the firmware, which is quite handy if you want to use them and NXT-G simultaneously.

Regarding the NXC language itself, I can say that it is not exactly C as the name suggests. While the language syntax is similar to that of C there are some differences and limitations. For example - there are no floating point variables in NXC.

RobotC is another solution if you prefer to program your Lego mindstorms creations in C. RobotC ir arguably the most powerful way to program this kit; it features a powerful real time debugger and has no limitations of the NXC.

However, the downside is that RobotC costs 30 USD for a single user license. On the other hand, it is suitable for novices in programming as well, as there are basic and advanced modes. Nevertheless, you have to install different firmware to use it, so it's not possible to use it simultaneously with NXT-G.


Lego Mindstorms tribot simulation in Microsoft Robotics Developer Studio.

As far as I'm aware, these are the most popular programming environments for Lego mindstorms. However, it should be noted, that it is possible to program the kit in JAVA, using leJOS NXJ as well as in Lua using the pbLua environment.

The Lego mindstorms robot construction kit is also supported in Microsoft Robotics Developer Studio and there is Lego mindstorms NXT software for Matlab and Simulink. As you can see, the programming options are quite vast in case NXT-G is not sufficient for you.

the Conclusion

Lego mindstorms is a kit that has gathered considerable recognition between hobbyists and educators alike. As you now know, the kit is suitable for a wide age range and various levels of experience. The instructions and software provided with the kit is simple enough for a kid to follow.

Yet quite serious projects and researches can be carried out if hardware augmentation possibilities together with advanced programming environments are used. In either case, people can have great fun doing it.

If you are interested in other Lego products as well, and would like to find insights about them from a user's perspective, I recommend you to check out this Lego fan-site. Who knows, maybe it turns out to be your favorite Lego community! If you found this article interesting, you may find my article on other robot construction kits interesting as well.

In case you wonder where to get the kit, Trossen robotics (aff link - read ad policy) is a good place where to look for it. There you can find the above mentioned Mindsensors' sensors for NXT and other NXT supplies as well.

Search

Go to trossenrobotics.com

Newsletter

Email

Name

Then

I keep addresses private.