Lego Mindstorms

From Wikipedia, the free encyclopedia

Jump to: navigation, search
A Lego Mindstorms kit

LEGO Mindstorms is a line of Lego sets combining programmable bricks with electric motors, sensors, Lego bricks, and Lego Technic pieces (such as gears, axles, and beams).

Mindstorms originated from the programmable sensor blocks used in the line of educational toys. The first retail version of Lego Mindstorms was released in 1998 and marketed commercially as the Robotics Invention System (RIS). The current version was released in 2006 as Lego Mindstorms NXT.

The hardware and software roots of the Mindstorms Robotics Invention System kit go back to the programmable brick created at the MIT Media lab. This brick was programmed in Brick Logo. The first visual programming environment, called LEGOsheets,[1] for this brick was created by the University of Colorado in 1994 and was based on AgentSheets.

The original Mindstorms Robotics Invention System kit contained two motors, two touch sensors, and one light sensor. The NXT version has three servo motors and four sensors for touch, light, sound, and distance. Lego Mindstorms may be used to build a model of an embedded system with computer-controlled electromechanical parts. Many kinds of real-life embedded systems, from elevator controllers to industrial robots, may be modelled using Mindstorms.

Mindstorms kits are also sold and used as an educational tool, originally through a partnership between Lego and the MIT Media Laboratory.[2][3] The educational version of the products is called Lego Mindstorms for Schools, and comes with the ROBOLAB GUI-based programming software, developed at Tufts University[4] using the National Instruments LabVIEW as an engine. The only difference between the educational series, known as the "Challenge Set", and the consumer series, known as the "Inventor Set", is another included light sensor and several more gearing options.

Mindstorms is named after the book Mindstorms: Children, Computers, and Powerful Ideas by Seymour Papert.[5]

Contents

[edit] Robotics Invention System

[edit] RCX

First-generation RCX programmable brick.

The first generation of Lego Mindstorms was built around a brick known as the RCX. It contains a 8-Bit collision detector Renesas H8/300 microcontroller as its internal CPU.It also contains 32K of RAM that stores the Firmware and User Programs. The brick is programmed by downloading a program (written in one of several available programming languages) from a Windows or Mac computer to the brick's RAM via a special infrared (IR) interface. After the user starts a program, an RCX-enabled Mindstorms creation may function totally on its own, acting on internal and external stimuli according to the programmed instructions. Also, two or several more RCX bricks can communicate with each other through the IR interface, enabling inter-brick cooperation or competition. In addition to the IR port, there are three sensor input ports and three motor output ports (also usable for lamps, etc). There is also an LCD that can display the battery level, the status of the input/output ports, which program is selected or running, and other information.

Version 1.0 RCX bricks feature a power adapter jack to allow continuous operation instead of the limited operation time when using batteries. In version 2.0 (as well as later 1.0s included in the RIS 1.5), the power adapter jack was removed. Power adapter-equipped RCX bricks are popular for stationary robotics projects (such as robot arms) or for controlling Lego model trains. In the latter context, the RCX needs to be programmed with Digital Command Control (DCC) software required for automated model train operation..

The IR interface on the RCX is able to communicate with Spybots, Scout Bricks, Lego Train, and the NXT (using a third-party infrared link sensor.) The RCX 1.0 IR receiver carrier frequency is 38.5 kHz, while the RCX 2.0 IR carrier frequency is 76 kHz. Both versions can transmit on either frequency.[6] The carrier signal is generated by one of the RCX's internal timers.

All versions of the RCX have a unique number printed on it. Little is known about the reasoning behind this number, except for the use of technical support and as a ID number of the RCX for your Lego Mindstorms account on the now-defunct Lego Mindstorms RCX website. The first RCX produced is marked "000001" and was on display at the Mindstorms 10th Anniversary event.[7]

[edit] Programming languages

Lego-supplied languages:

  • RCX Code (included in the Mindstorms consumer version sold at toystores)
  • ROBOLAB (based on LabVIEW and developed at Tufts University)

Popular third-party languages:

[edit] Lego camera

The Lego camera on its own is technically not a robotic toy; rather, it is a normal webcam (a Logitech Quickcam Web) packaged into a Lego shell. Being a normal webcam, the Lego Camera is, unlike most Mindstorms products, not programmable and is only usable connected to a PC or some other device that supports USB webcams.

The Lego camera is meant to be used with the included Vision Command software which can also interface with an RCX and thus enables creating robots with "vision". The software is capable of detecting different lightings, motion, and colors. It can also be used with any other software that uses a webcam. The webcam is capable of recording up to 30 frames per second. It also contains a microphone to record sound for videos.

[edit] Cybermaster

Lego Cybermaster

Cybermaster was mainly sold in Europe and Australia/New Zealand, but was available for a short time in America via the Lego Club magazines. It was aimed at a younger audience as an early attempt of merging computer gaming with robotics and Lego. The Pbrick shares many, especially software, features with the RCX but differs in appearance and technical specifications: 1 output (plus 2 built-in) and 3 sensors.

  • It uses RF (27 MHz R/C band) instead of IR for communication.
  • It has two built-in motors with integrated tachometers and speedometers.
  • It is limited to passive sensors (a simple A/D with internal pull-up resistors).
  • The sensors shipped with it are color coded and have internal resistors in their open state (allowing the Pbrick to sense which sensor is attached to which port).
  • It has a fixed firmware (so it cannot be upgraded or replaced).
  • It has limited RAM for programs and only one program slot.

Despite its obvious limitation it has a number of advantages over its 'big brother', the RCX.

  • The RF link has greater range and is omnidirectional.
  • The built-in tachometer and speedometer sensors on the internal motors provides the same function as the external rotation sensor to the RCX, but without using up sensor ports.

This makes it very useful for various mobile platforms and performing basic motion/positioning tasks.

It talks the same protocol as the RCX but cannot communicate directly to it (due to IR vs RF) but with a repeater (a computer with 2 serial ports and a simple program) they can be integrated.

[edit] Codepilot

Sold as part of the Barcode Truck kit. This unit was the first programmable brick (or Pbrick). It features a single motor, a single touch sensor and a light sensor. It is programmed by setting it to 'learn' and using the light sensor to feed barcoded commands. The command set is very limited. Since barcode is just a series of variances in light, this form of command entry was dubbed VLL (Visual Light Link) and has been used in several later Lego models.

[edit] Scout

Lego also released a blue computer called the Scout, which has 2 sensor ports, 2 motor ports, and a built in light sensor, but no PC interface. It comes with the Robotics Discovery Set. The Scout can be programmed from a collection of built-in program combinations. In order to program the Scout, a user must enable "power mode" on it. The Scout can store one program.

There was a plan for Lego to create a booster set that allows you to program the Scout from a computer with a software such as RCX code. However, due to the complexity of this project, it was abandoned.

The RCX can control the Scout brick using the "Send IR Message" program block. The RCX does all of the controlling, and therefore can be programmed with the PC, while the Scout accepts commands. The Scout brick must have all of its options set to "off".

The Scout is also capable of using VLL to control a Micro Scout.

[edit] Micro Scout

The Micro Scout was added as an entry level to Lego robotics. It is a very limited Pbrick with a single built-in light sensor and a single built-in motor. It has seven built-in programs and can be controlled by a Scout, Spybotics or RCX unit using VLL.

The unit was sold as part of the Droid Developer Kit (featuring R2D2) and later the Darkside Developer Kit (featuring an AT-AT Imperial Walker).

[edit] Spybotics

Spybotics was more of an attempt to expand on the Cybermaster line. The kits were sold together with a computer game where part was played on the computer and part was played by controlling the Spybot to solve a number of fixed missions. The Pbrick itself shares many features with the Cybermaster, but it has no tachometers or speedometers and a single integrated touch sensor.

It also features a light sensor which doubles as computer interface. This interface can also be used to connect to the Scout, Micro Scout and possibly the Codepilot using VLL. It has an expanded IR functionality allowing it to communicate with other Spybots or RCX units. The IR unit also has limited direction and range function, allowing it to track and locate other Spybots, IR Remote Controls/beacons or RCX units.

[edit] Lego Mindstorms NXT

Lego Mindstorms NXT is a programmable robotics kit released by Lego in July 2006, replacing the first-generation LEGO Mindstorms kit.[8] The kit consists of 519 Technic pieces, 3 servo motors, 4 sensors (ultrasonic, sound, touch, and light), 7 wires, a USB cable, a USB Bluetooth dongle, and the NXT brick. It also includes NXT-G, a graphical programming environment that enables the creation and downloading of programs to the NXT. There is in development of a new robotics kit, called WeDo. It is designed for students from 7 to 11 year old and works with the OLPC, Intel Classmate, Mac OS and Microsoft Windows.

The NXT is the "brain" of a Mindstorms robot. This computer-controlled Lego brick lets the robot autonomously perform different operations.

[edit] Programming languages

Name Language type(s) Notes URL
Actor-Lab Custom flowchart-like language [5]
Ada Interface to MindStorms Ada [6]
brickOS C/C++ [7]
FLL NXT Navigation Uses NXT-G and .txt files http://fllnxtnavigation.codeplex.com/ FLL NXT Navigation
GCC C/C++, Objective C, Fortran, Java, Ada among others [8]
GNU Toolchain for h8300 C/C++, ASM [9]
jaraco.nxt Python Python modules providing low-level interfaces for controlling a Lego NXT brick via Bluetooth. Also includes code for controlling motors with an Xbox 360 controller using pyglet. [10][9]
LabVIEW National Instruments LabVIEW Visual programming language (G code) Core language used to develop Mindstorms NXT software. Can use available add-on kit to create and download programs to NXT, create original NXT blocks or control robot directly via USB or Bluetooth using NXT fantom.dll [11]
Lego.NET Anything that can compile to .NET, works best with C# Does not come with a compiler, converts bytecode to machine code [12]
Lego::NXT Perl Set of Perl modules providing real-time low-level control of a Lego NXT brick over Bluetooth. [13] [14]
LegoNXTRemote Objective C Cocoa framework for low and high level manipulation of a Lego NXT brick using Bluetooth. This also includes a sample remote control application using the framework. [15]
leJOS Java A java based system for advanced programmers can handle most sensors and things like GPS, speech recognition and mapping technology. Can be interfaced with the Eclipse IDE or run from the command line [16]
nxtOSEK C [17]
librcx C/C++ A library for GCC [18]
Logitech SDK Visual Basic, Visual C++ Can be combined with an RCX control library such as spirit.ocx from the MindStorms SDK to make use of the Lego Cam [19][dead link]
MicroWorlds EX Robotics Edition This is a program in the MicroWorlds series that allows students to control the NXT. [20]
NQC NQC, a C-like language This is the most widely used unofficial language [21]
NXT++ C++ Allows you to control the NXT directly from any C++ program, in Visual Studio, Windows. [22]
NXT_Python Python NXT_Python is a package for controlling a LEGO NXT robot using the Python programming language. It can communicate using either USB or Bluetooth. [23]
NXT-Python Python NXT-Python is a newer version of NXT_Python, and has some extra capabilities. The svn repository is at Google code. Anyone can contribute, just ask. [24]
Lestat C++ Allows you to control the NXT directly from any C++ program in Linux. [25]
Official Mindstorms SDK Visual Basic, Visual C++, MindScript, LASM You do not need VB to use the VB features as MS Office comes with a cut down version of VB for making macros [26][dead link]
OnScreen A custom language which can be programmed directly on the RCX [27]
pbForth Forth [28]
PBrickDev PBrickDev, a flowchart based language. Has more functionality than the RIS language, such as datalogs and subroutines/multithreading. [29]
PRO-BOT A kind of Visual Basic/spirit.ocx-based language Designed for robots which are in contact with the workstation at all times [30]
QuiteC C A library for use with GCC and comes with GCC for Windows. [31]
RCX Code RCX Code, a custom flowchart-based language Included in the Mindstorms consumer version sold at toystore [32][dead link]
ROBOLAB A flowchart language based on LabVIEW This is the programming environment offered to schools who use MindStorms, supports the Lego Cam [33]
RoboRealm A multi-platform language that works with IRobot Roomba, NXT, RCX, VEX, and many other popular robotic sets. This language is also capable for video processing using a webcam, this gives your robot excellent vision since it can filter out certain colors, lock-on to a certain area of color, display variables from the robot or computer, and much more. The software works with keyboard, joystick, and mouse. This software is freeware. [34]
ROBOTC A multi-platform C programming language designed for the programmer in need of powerful debugging tools for the NXT, RCX, VEX, and soon-to-be FIRST Controller (for FRC). ROBOTC gives the ability to use a text-based language based on the C programming language. It includes built-in debugger tools, as well as (but not limited to) code templates, Math/Trig operations (sin, cos,tan, asin,acos... etc), user-friendly auto-complete function built into the interface, built-in sample programs [35]
ruby-nxt Ruby Provides low-level access to the NXT via Bluetooth as well as some preliminary high-level functionality. [36]
RWTH - Mindstorms NXT Toolbox MATLAB Interface to control the NXT from MATLAB via Bluetooth or USB (open-source). [37]
SqLego Squeak [38]
TclRCX Tcl [39]
Terrapin Logo LOGO [40][dead link]
TinySoar Soar An implementation of the Soar artificial intelligence architecture that runs on the RCX brick. Soar incorporates acting, planning, and learning in a rule-based framework. [41]
TinyVM Java A predecessor to the lejos language. An open source Java based replacement firmware for the Lego Mindstorms RCX microcontroller. [42]
The Transterpreter occam [43]
Gostai URBI for Lego Mindstorms NXT URBI, C++, Java, Matlab Easy to use parallel and event-driven script language with a component architecture and opensource interfaces to many programming languages. It also offers voice/speech recognition/synthesis, face recognition/detection, Simultaneous localization and mapping, etc. [44]
Vision Command RCX Code The official programming language for use with the Lego Cam, that allows you to control your robot with color, motion, and flashes of light. [45][dead link]
XS Lisp [46]
LegoLog Prolog Uses an NQC program to interpret commands send from the PC running the Prolog code [47]
Microsoft Visual Programming Language (VPL) Graphical flowchart, based on .NET With the Microsoft Robotics Studio, it uses a native NXT program msrs to send and receive messages to and from a controlling program on a computer via Bluetooth [48]
DialogOS Graphical Flowchart for voice controlled robots DialogOS combines speech recognition and speech synthesis with robotics, enabling you to build talking robots that react to your voice commands. [49][dead link]
Processing Java (Simplified / programmed C-style) Processing (programming language) is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. To control the NXT with Processing you can use the NXTComm Processing library developed by Jorge Cardoso. [50],[10]
Interactive C C-style language. Language developed for the Botball robotics competition [51]

[edit] Community

There is a strong community of professionals and hobbyists of all ages involved in the sharing of designs, programming techniques, and other ideas associated with Lego Mindstorms. The Lego Mindstorms system/website is organized much like a wiki, harnessing the creative potential and collaborative efforts of participants. Lego also encourages sharing and peering by making software code available for downloading and by holding various contests and events.

[edit] See also

[edit] Notes

[edit] References

[edit] External links

Personal tools