Expanded MindStorms FAQ  


Subject: 0.1 What are the FAQ question numbers?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Here is a key to the MindStorms FAQ question numbers. If you are reading this FAQ in pieces instead of a whole file, you can search for the answer you want using keywords from the questions (like "touch sensor" to get answer 2.3). ..

Section 1 - About MindStorms 1.1 What is LEGO&reg; MindStorms? 1.2 What is the difference between MindStorms and CyberMaster? 1.3 What comes with the MindStorms Kit? 1.4 Where did the MindStorms idea come from? 1.5 What expansion kits and add-ons are available? 1.6 Can I use other LEGO&reg; parts with MindStorms? 1.7 What are some common terms I will see in the Mindstorms mailing list? 1.8 What about the Robotics Discovery Set and the Droid Development Kit?   Section 2 - Building with MindStorms 2.7 How do I build a steering system? 2.8 What other kits are recommened to use with MindStorms? 2.9 Okay, I tried to build a <such-and-such> but I couldn't. What do I do? I really think I need to buy a lot more parts. 2.10 Okay, I built a <such-and-such> but it doesn't move the way I thought it would. Now what do I do? 2.11 My robots are ugly, and not just because I used 7 different colors. How come all the robots on people's web pages look so great? 2.12 My robot works great but it pulls itself apart as it runs. 2.13 Can I burn out my RCX, motors, or sensors by connecting them improperly? 2.14 How about inadvertant physical damage? 2.15 My robot runs great, looks great, and stays in one piece even when my kid throws it out the car window. But it's dumber than mud. What can I do?   Section 3 - Programming the Brick 3.1 How do I program the brick? 3.2 Where do I learn about the RIS software? 3.3 Can I use other programming tools? 3.4 What other tools are available? 3.5 What is Spirit.ocx? 3.6 Can I use Visual Basic? 3.7 Can I use C++? 3.8 Can I use other languages? 3.9 How big of a program can I write? 3.10 How sophisticated of a program can I write? 3.11 Can I make two or more bricks talk to each other? 3.12 Can I make the brick send data back to the PC in real time? 3.13 Can I use the IR port on my laptop? 3.14 Can I use the IR port on my Palm Pilot? 3.15 Can I use learnable remote controllers?   Section 4 - Advanced 4.1 What is inside the brick? 4.2 How do I use more than three sensors (inputs)? 4.3 How do I make a temperature sensor? 4.4 How do I make a rotation counter? 4.5 How do I make a sound sensor? 4.6 How do I get more than three motors (outputs)? 4.7 How do I make a bend sensor? 4.8 What other types of sensors can be built?   Section 5 - Other Resources 5.1 Where do I look for other information sources on MindStorms?


Based on the outline originally submitted to LUGNET by Kerry Garrison (kerryg@deltanet.com)

Section 0 - About the FAQ, administrative and legal stuff

0.1 What are the FAQ question numbers?

http://www.lugnet.com/faq/?n=573

0.2 What about all those trademarks you're using?

http://www.lugnet.com/faq/?n=572

Section 1 - About MindStorms

1.1 What is LEGO® MindStorms?

http://www.lugnet.com/faq/?n=571

1.2 What is the difference between MindStorms and CyberMaster?

http://www.lugnet.com/faq/?n=570

1.3 What comes with the MindStorms Kit?

http://www.lugnet.com/faq/?n=569

1.4 Where did the MindStorms idea come from?

http://www.lugnet.com/faq/?n=568

1.5 What expansion kits and add-ons are available?

http://www.lugnet.com/faq/?n=567

1.6 Can I use other LEGO® parts with MindStorms?

http://www.lugnet.com/faq/?n=566

1.7 What are some common terms I will see in the Mindstorms mailing list?

http://www.lugnet.com/faq/?n=565

1.8 What about the Robotics Discovery Set and the Droid Development Kit?

Section 2 - Building with MindStorms

2.1 What can you make with the MindStorms kit?

http://www.lugnet.com/faq/?n=564

2.2 What have other people built with the MindStorms kit?

http://www.lugnet.com/faq/?n=507

2.3 How do I use the touch sensor?

http://www.lugnet.com/faq/?n=563

2.4 How do I use the light sensor?

http://www.lugnet.com/faq/?n=562

2.5 Are there other sensors available?

http://www.lugnet.com/faq/?n=561

2.6 Can I make my own sensors?

http://www.lugnet.com/faq/?n=560

2.7 How do I build a steering system?

http://www.lugnet.com/faq/?n=559

2.8 What other kits are recommened to use with MindStorms?

http://www.lugnet.com/faq/?n=558

2.9 Okay, I tried to build a but I couldn't. What do I do? I really think I need to buy a lot more parts.

http://www.lugnet.com/faq/?n=557

2.10 Okay, I built a but it doesn't move the way I thought it would. Now what do I do?

http://www.lugnet.com/faq/?n=556

2.11 My robots are ugly, and not just because I used 7 different colors. How come all the robots on people's web pages look so great?

http://www.lugnet.com/faq/?n=555

2.12 My robot works great but it pulls itself apart as it runs.

http://www.lugnet.com/faq/?n=554

2.13 Can I burn out my RCX, motors, or sensors by connecting them improperly?

http://www.lugnet.com/faq/?n=553

2.14 How about inadvertant physical damage?

http://www.lugnet.com/faq/?n=552

2.15 My robot runs great, looks great, and stays in one piece even when my kid throws it out the car window. But it's dumber than mud. What can I do?

http://www.lugnet.com/faq/?n=551

Section 3 - Programming the Brick

3.1 How do I program the brick?

http://www.lugnet.com/faq/?n=550

3.2 Where do I learn about the RIS software?

http://www.lugnet.com/faq/?n=549

3.4 What other tools are available?

http://www.lugnet.com/faq/?n=548

3.5 What is Spirit.ocx?

http://www.lugnet.com/faq/?n=547

3.6 Can I use Visual Basic?

http://www.lugnet.com/faq/?n=546

3.8 Can I use other languages?

http://www.lugnet.com/faq/?n=545

3.11 Can I make two or more bricks talk to each other?

http://www.lugnet.com/faq/?n=544

3.16 Can I control the RCX's LCD display?

http://www.lugnet.com/faq/?n=543

Section 4 - Advanced

4.1 What is inside the brick?

http://www.lugnet.com/faq/?n=542

4.2 How do I use more than three sensors (inputs)?

http://www.lugnet.com/faq/?n=541

4.3 How do I make a temperature sensor?

http://www.lugnet.com/faq/?n=540

4.4 How do I make a rotation counter?

http://www.lugnet.com/faq/?n=537

4.5 How do I make a sound sensor?

http://www.lugnet.com/faq/?n=536

4.6 How do I get more than three motors (outputs)?

http://www.lugnet.com/faq/?n=535

4.7 How do I make a bend sensor?

http://www.lugnet.com/faq/?n=533

4.8 What other types of sensors can be built?

http://www.lugnet.com/faq/?n=534

Section 5 - Other Resources

5.1 What are some other Web resources for LEGO® Mindstorms and

robotics? http://www.lugnet.com/faq/?n=532

So far I have answered all the questions except the programming section, section 3.

Feedback is welcome.


LEGO MindStorms FAQ

version 19990712, by Robert Munafo

Based on outline originally submitted to LUGNET by Kerry Garrison (kerryg@deltanet.com)


Subject: 0.2 What about all those trademarks you're using?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this FAQ file or the site it is posted on.

PRIMO, DUPLO, LEGO System, LEGO System Freestyle, LEGO Technic, DACTA, LEGO World Shop, RCX, RCX Code, and MindStorms are trademarks and/or registered trademarks of the LEGO group of companies.

Nintendo and Power Glove are registered trademarks of the Nintendo group of companies.

Windows and Visual Basic are registered trademarks of Microsoft.

Mac OS is a registered trademark of Apple Computer.

M&M is a registered trademark of Mars Incorporated.

Other names are trademarks and/or registered trademarks of their respective holders.


This item is a merge of the answers by Jim Baker, Kerry Garrison, and Robert Munafo.

Subject: 1.1 What is LEGO® MindStorms?
Content-Language: en
Topic-Level: 0
Originator: Jim Baker, 1998-12-28
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/
Comment: Topic-level is inaccurate pending a reference for topic levels

Answer by Jim Baker and Kerry Garrison:

It's a new line of LEGO products which enables people to build and program autonomous robots with the help of the Programmable Brick, a.k.a. the RCX. You connect sensors and motors to the RCX and by using the packaged software, RCX Code, or alternate programs (such as BotCode and NQC) you program your robot. The core set, The Robotics Invention System, gives you everything you need to start making your inventions come to life.

Answer by Robert Munafo:

LEGO® MindStorms is a division of the LEGO Group of companies, which develops and markets the LEGO® MindStorms family of products.

The LEGO® MindStorms family of products consists of a kit (9719 Mindstorms Robotics Invention System) currently available in the United States for $200, and a series of add-on kits and accessories, which together can be used to build a wide variety of simple autonomous robots.

The LEGO group has an official web page: www.lego.com

The LEGO® MindStorms division and product has its own official web page: www.legomindstorms.com


This answer merges the answers given by Kerry Garrison and Robert Munafo.

Subject: 1.2 What is the difference between MindStorms and CyberMaster?
Content-Language: en
Topic-Level: 0
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Reference: http://users.deltanet.com/~garrison/mindstormsfaq.html
Location: /robotics/
Comment: originally part of Kerry Garrison's Mindstorms and Lego-robotics FAQ, referenced (now a deas link)
Comment: Topic-level is inaccurate pending a reference for topic levels

Mindstorms is more aimed at adults while Cybermaster is more for the younger kids. Although Cybermaster's programmable brick isn't as flexible (the two motors are attached to it!) as the RCX, it does provide younger kids a "video game" style of fun with interaction with the software.

From a technical point of view, the main difference is that the CyberMaster system is designed to allow the computer to control the robot in real time. However, CyberMaster is not limited to this. Like MindStorms, the CyberMaster allows you to download your program into the robot and operate the robot after the computer has been switched off.

The CyberMaster is based on a programmable module that contains two integrated motors and a connection for a third, whereas the MindStorms module (called the RCX) has three outputs for external motors. CyberMaster includes tachometers which aid moving in a straight line or figuring out how far you've turned. Both have inputs for three sensors. MindStorms includes two touch sensors and a light sensor while Cybermaster includes three touch sensors. The CyberMaster communicates with the computer via radio, the MindStorms RCX uses infrared. The user interface for the software you run on your computer is different.


This answer is essentially a complete rewrite and expansion of the original answer provided by Kerry Garrison.

Subject: 1.3 What comes with the MindStorms Kit?
Content-Language: en
Topic-Level: 0
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The heart of the kit is the RCX module, a programmable module containing 6 AA batteries, a microcomputer, simple LCD display, and connections for three sensor inputs and three motor outputs. The RCX comes with 5 simple programs built-in, and after installing the software on your computer you can download your own programs into the 5 program slots.

A CD-ROM containing software for Windows 95, a serial cable and IR transmitter/receiver allow your computer to control the RCX and download your instructions (program) to it. The software is oriented towards kids but works well for adults too. The CD-ROM contains video tutorials for setting up the hardware, writing and downloading programs, and learning all the different program blocks (like conditionals, loops, sensor read, motor control, etc.)

You also get two 9 volt motors type II (which have builtin gear reduction), one light sensor (which also emits its own light and thus can sometimes be used to detect proximity or distinguish colors), and two touch-switch sensors.

A set of about 710 standard LEGO® bricks and Technic parts allow you to build many fairly basic robot designs. The printed instructions show how to build 7 designs, and the CD-ROM contains several more. A large printed "test pad" is provided, useful mainly for testing "line follower" robots.

A complete inventory of the 9719 MindStorms kit is here: www.lugnet.com/db/inv/?n=123


This answer merges the answers given by Kerry Garrison and Robert Munafo.

Subject: 1.4 Where did the MindStorms idea come from?
Content-Language: en
Topic-Level: 0
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Answer from Kerry Garrison:

Some MIT people developed a similar programmable brick. Pitsco LEGO Dacta were the first to distribute this educational package to schools, etc.

Answer from Robert Munafo:

Although the actual design and development of MindStorms was conducted by the LEGO group, the ideas and inspiration come from the Programmable Brick project within the Media Lab at MIT (Massachusetts Institute of Technology) in Cambridge Massachusetts, USA. For more information see: fredm.www.media.mit.edu/people/fredm/mindstorms/index.html


This item is a complete rewrite by Robert Munafo.

Subject: 1.5 What expansion kits or add-ons are available?
Content-Language: en
Topic-Level: 0
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The following are currently available:

9730 RoboSports Expansion Set: $50 in USA. Includes an additional 9V motor and 89 other parts, including some foam balls and disks.

9732 Mindstorms Extreme Creatures Expansion Set: $50 in USA. Includes a "fiber optic" module and 148 more parts fairly evenly distributed (bricks, beams, plates, axles, gears, connectors, etc.). The fiber optic module lights up one of eight fiber strands; which one is lit depends on the rotation of an axle inserted in the module.

The following are anticipated in the fall of 1999:

9736 Exploration Mars Expansion Set: As of 1999 July, not yet available and no announced price. (Shop At Home in USA says wait until September)

9748 Droid Development Kit: As of 1999 July, not yet available and no announced price. (Shop At Home in USA says wait until September)


This item combines the answers given by Kerry Garrison and Robert Munafo.

Subject: 1.6 Can I use other LEGO® parts with MindStorms?
Content-Language: en
Topic-Level: 0
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Yes. All LEGO® kits are designed to go together and are manufactured to extremely precise specifications. This applies across the entire LEGO group product line from the pre-school PRIMO bricks through DUPLO, LEGO System Freestyle, LEGO System, LEGO Technic, LEGO DACTA classroom products and MindStorms. Thanks to a consistent dimension tolerance of .005 mm (5 micrometers), LEGO® bricks manufactured in the 1950's fit LEGO® bricks sold today.

However, some LEGO kits are more useful than others. It depends on what you want to do. MindStorms users building robots generally limit themselves to the Technic line, which is oriented towards older children and includes gears and axles for building mechanical models, like cars with working steering wheels and the like. All Technic sets provice lots of parts that are great for building robots, and you choose your sets based on what parts you need for your design.


This item includes a few more definitions which I have added, and the headers are boldfaced. The rest is left unchanged.

Subject: 1.7 What are some common terms I will see in the Mindstorms mailing list?
Topic-Level: 1
Content-Language: en
Originator: Aa-Tchoo, 1999-05-07
Revision: Eric Lind, 1999-05-09
Revision: Blake Winton, 1999-05-10
Revision: Jeremy Sproat, 1999-05-11
Revision: Robert Munafo, 1999-07-13
Reference: http://www.lugnet.com/news/display.cgi?lugnet.robotics:4961
Reference: http://www.lugnet.com/news/display.cgi?lugnet.robotics:4972
Reference: http://www.enteract.com/~dbaum/lego/nqc/
Comment: let's fill this out!
Location: /robotics/

00_FILLER
00_FILLER

class library
A collection of related classes, function, and modules that can be reused in other programs; a method of keeping one's code collected.

dynamic memory allocation
Deciding at run-time how much memory is needed for a given data. Normal variables are allocated statically. For example, an int might always take up 32 bits of memory. More complicated objects can be dynamic, as the size required is not always known.

dynamic string allocation
Not many languages support this. Usually, strings get a certain amount of space; i.e., C++ has you create a character array of a given size, and that's how big the string can be. Java simulates dynamic string allocation by creating entirely new String objects each time the string is changed.

global variables
The opposite of local variables. These variables are visible to the entire program and can be accessed anywhere. The original Mindstorms language has only global variables.

local variables
A variable that has limited scope. In other words, the variable only exists and can be accessed by a small segment of the program, usually a function or method. Useful for storing temporary information that the rest of the program doesn't need to see, but that you need for a given chunk of code to work. Compare with global variables.

NQC
An alternate, fan-written programming language to replace the original Mindstorms language. NQC stands for Not Quite C, and has many features which appeal to experienced programmers. It has its own Web page at http://www.enteract.com/~dbaum/lego/nqc/, and its own FAQ at http://www.enteract.com/~dbaum/lego/nqc/faq.html.

object-oriented programming
A programming paradigm, as opposed to iterative programming, functional programming, or logic-based programming. Objects have variables and operations on those variables. One can move objects around, chain them together, have them talk to one another. Java is mostly an OO language. C++ is a hybrid of OO and iterative, and is based on C, which is iterative. LISP is a functional language, as is Scheme, a LIST derivative. Prolog is a logic language.

recursion
The process of one function calling itself to solve a problem. This is done by breaking the problem down to its smallest size, then combining the smaller solutions. Factorials are usually used as a simple example of recursion. 6! = 6 x 5 x 4 x 3 x 2 x 1. One can repeatedly break the factorial down until you reach 1, then recombine the problem to find the final solution. For example: 6! = 6 x 5!; 5! = 5 x 4!; 4! = 4 x 3!; etc.

RCX
The "programmable brick" that is the brain (and power supply) of a MindStorms robot. It contains the software that controls the motors and reacts to changes in the sensor inputs.

LegOS
A complete replacement for the standard firmware in the RCX, which enables sophisticated programmers to write more powerful programs for the RCX. LegOS allows full use of the RCX's built in RAM memory, direct control of the LCD display, etc.

Cybermaster
A programmable robot development system similar to MindStorms but oriented towards a younger audience. Its control module has two motors built-in, making construction of vehicles easier, and its software has a more videogame-like feel.

mailing list
00_FILLER

semaphore
A special type of variable used for communication between two tasks in a multitasking environment. Semaphores are often used to mediate arbitration between multiple tasks competing for use of a shared resource.

Mindstorms
00_FILLER

LEGO® Mindstorms Internals web page
00_FILLER


Subject: 1.8 What about the Robotics Discovery Set and the Droid Development Kit?
Content-Language: en
Topic-Level: 0
Originator: Robert Munafo, 1999-09-08
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The Robotics Discovery Set and the Droid Developer Kit are slightly smaller, less expensive robotics sets designed to be useful to somewhat younger children. Each comes with a smaller, simpler "brick" that is less capable than the RCX brick. At the current time, it appears that neither of these smaller bricks can be programmed in any way like the RCX.

(The following information is incomplete)

The Robotics Discovery Set comes the "Scout", a brick with two motor outputs and two sensor inputs that (probably) only work with touch sensors. It also has a built-in light sensor. Using buttons on the Scout, the user selects one of eight types of motion (none, straight, zigzag, circle clockwise, circle counterclockwise, alternate back/forward on A, alternate back/forward on B, alternate back/forward on both A and B), one of six reactions to light (none, reverse, seek light, seek dark, waitfor, brake), and one of five actions for touch (none, reverse, avoid, waitfor, brake). They can also select one of four "special effects" which add random motions and/or sounds, and there are a few choices of speed and delay times. All the combinations of these different choices add up to the "over 3000 behaviors" that are advertized on the box.

The Droid Development Kit comes with the Micro Scout, a brick with only one built-in motor and a built-in light sensor, and no connection ports of any kind. It has 6 very simple built-in programs (like move then stop, move until light then stop) and a "code game" program which involves using a flashlight to repeat a sequence that the robot has given with beeps. There is an eighth program "P" that LEGO has claimed will allow future enhancement, perhaps in combination with the Scout and/or a personal computer — LEGO's statements have been vague.


This item merges the answers given by Kerry Garrison and Robert Munafo.

Subject: 2.1 What can you make with the MindStorms kit?
Content-Language: en
Topic-Level: 0
Originator: Kerry Garrison, 1999-01-02
Revision: Kerry Garrison, 1999-01-02
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

You can make a wide variety of robotic inventions with the Basic Kit. With the standard Mindstorms package, you get two motors, so your choices are fairly limited to a robot that can manuver and use sensors, or a robot that sits still and can move pieces around a fixed base. With the RoboSports expansion kit, you get a third motor which gives you a lot more potential.

The kit comes with enough parts to build a variety of vehicles roughly resembling tanks, cars, and other simple wheeled designs. You can also make things that walk on legs in a simple way, like the old four-legged wind-up toys. Articulated or non-circular leg motion probably requires additional parts that aren't in the basic kit.


This is Kerry Garrison's answer unmodified. http://www.lugnet.com/faq/?n=507

Subject: 2.2 What have other people built with the MindStorms kit?
Content-Language: en
Originator: Kerry Garrison, 1999-01-02
Revision: Kerry Garrison, 1999-01-02
Reference: http://users.deltanet.com/~garrison/mindstormsfaq.html
Comment: originally part of Kerry Garrison's Mindstorms and Lego-robotics FAQ, referenced
Location: /robotics/rcx/

This could be a huge list unto itself and any listings here are purely based on the author's admittingly biased opinion of what is very cool, very useful, or highly original.

Start at the Lego Mindstorms site and look at the gallery.

Another good source is the LEGO Mindstorms Web Ring.

Some of my personal favorites include:

- Michael Gasperi

- [Bob's Place|http://www.geocities.com/Heartland/Bluffs/7900/}


This item is a completely new answer by Robert Munafo.

Subject: 2.3 How do I use the touch sensor?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The touch sensor is a 2 x 3 brick with a button on the smallest face (the "end" of the brick) and contacts on the top of the brick. You use a 9V connecting cable to connect the tough sensor to the RCX, and then (using your chosen programming method, see section 3 answers below) tell the RCX to do something when the switch is pressed or released. Usually you will want to construct some sort of mechanism to press the switch when the desired type of event happens — like a bumper that pushes the switch when any part of the front of the robot hits an obstruction.

The printed instructions ("constructopedia"), CD-ROM idea area ("programmopedia") and various users online web sites give many examples of specific applications of the touch sensor.


This item is a completely new answer by Robert Munafo.

Subject: 2.4 How do I use the light sensor?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-14
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The light sensor is a 2 x 4 x 1 1/3 brick with an LED (light emitter) and photodiode (light detector) on the smallest face (the "end" of the brick) and a non-detachable 9V connecting cable. You connect the other end of the cable to the RCX, and then (using your chosen programming method, see section 3 answers below) tell the RCX to do something based on a light level or range of light levels. You might want to mount the sensor on an arm that rotates under motor control, so you can "scan" the area ahead of you, or you may want to use a fixed light sensor to detect the presence of an object, such as a ping-pong ball on a conveyor belt.

The built-in LED makes it possible for the sensor to detect proximity or to see in the dark, if the thing it's "seeing" is close to the sensor. The LED also makes the sensor more reliable for line-tracking, because it helps make the line tracker less sensitive to ambient light. However, if you only want to detect ambient light, you'll need to block the LED. To do this, place a black Technic beam directly in front of the light sensor. The hole in the beam lines up just right to allow light in to the photodiode while blocking the LED.

To make your robot work well in different ambient light levels, you'll probably have to make it measure the light level in some way when it starts up. This could be as simple as taking one reading right away when you start, or it could involve scanning in a circle and keeping track of the lowest and highest readings it gets during the scan. After you know what the average ambient level is, store it in a variable to compare to in the future. You can also design it to adjust to ambient light levels by repeating the scan from time to time.

The printed instructions ("constructopedia"), CD-ROM idea area ("programmopedia") and various users online web sites give many examples of specific applications of the light sensor.


This item is a completely new answer by Robert Munafo.

Subject: 2.5 Are there other sensors available?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-14
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

There is a temperature sensor that detects temperatures from -20 to +70 degrees Centigrade (-4 to +158 Farenheit). (At about +80 degrees Centigrade, the plastic would start to get soft.) It is a 2 x 3 brick with a rod extending about 3 units out from the brick's end; the end of the rod is metal.

There is a rotation sensor shaped like a 2 x 4 x 1 2/3 brick that detects the rotation of an axle inserted through a hole. If you are using the standard RCX firmware or NQC (see programming answers in section 3 below), the RCX will automatically keep track of rotations for you, giving you an integer from 0 to 32767 with each 16 representing one full rotation.

Both types of sensors have non detachable 9V connecting leads.

Both of these sensors are available from the LEGO® World Shop and the DACTA online store. The DACTA store is geared for educators but they will sell to anyone.

To get either of these sensors from the LEGO® World Shop, go to www.legoworldshop.com then select your region and country, then choose LEGO® MindStorms.

For the DACTA online store, go to www.pitsco-legodacta-store.com/ then select "Spare Parts", then select "Sensors".

The fiber optic unit (included in the Extreme Creatures expansion set mentioned above, and included in other LEGO® Technic sets) can also be used as a rotation sensor. If connected to an input instead an output, it acts like a touch sensor which is periodically touched and released, a total of 8 touches and releases per rotation. If you happen to know what direction you are rotating in and if you are programming in RCX or a more hardcore programming method (see section 3 below) you can use this to keep track of rotation and accomplish most of the results you would get from a real rotation sensor.


This item is a completely new answer by Robert Munafo.

Subject: 2.6 Can I make my own sensors?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Yes. Sensors must be resistive elements, capable of taking 9 volts in either polarity (in case they're connected "backwards") and may present a resistance of anywhere from 0 ohms to infinity. The effective useful range is from 0 to about a million ohms. It's linear from 0 to 10,000 ohms, then starts to go exponential. A resistance of 10,000 ohms gives a reading halfway between 0 and 1000 (which is the reading for infinite resistance). A detailed table is at www.plazaearth.com/usr/gasperi/lego.htm#basics.

More details and examples with photos, etc. can be found on the following pages, many of which also have links to other related information:

home.concepts.nl/~bvandam/index.html
www.plazaearth.com/usr/gasperi/lego.htm


This item is a completely new answer by Robert Munafo.

Subject: 2.7 How do I build a steering system?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-21
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The most simple approach is to drive at least one wheel, tread, or leg with one motor and at least one wheel, tread or leg with another motor. Then you steer by controlling the speed of the two motors relative to each other.

The second most simple approach is to drive two wheels with one motor (perhaps through a differential to allow the wheels to turn at different speed for turns) and have two other wheels that pivot via a rack-and-pinion steering system. Many Technic car kits have used this method. (Don't try use the same wheels for steering and propulsion unless you want a real challenge!)

Each of these two methods makes it hard to go in a straight line, if and when that is desired. Since motors are never perfectly matched in speed or torque, the first method usually ends up having the wheels travel at different speed even when you tell the two motors to go at the same speed, and this makes the robot turn. The rack-and-pinion approach is even worse, because it's difficult to find the point where the wheels are pointing straight ahead. Even if you use a sensor, there's enough slop in the gears that it doesn't do straight.

The easiest way to solve the straight line problem is to use a sum-difference transmission to connect two motors to two axles in such a way that the first motor produces the sum of the wheels' rotary motion and the other motor produces their difference. The sum-difference transmission is also pretty useful for other applications, like the classic "how do I raise the bucket on a crane without having it open at the same time?" and "how do I get a 7-to-1 gear ratio?" Some particularly good pictures of sum-difference steering designs are shown here:

Alex Wetmore's dad's design
Martyn Boogaarts' camcart design


This item is a completely new answer by Robert Munafo.

Subject: 2.8 What other kits are recommended to use with MindStorms?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Your choice of kit will depend on what you want to build — it depends highly on what type of design you're interested in doing and what types of parts that design requires. Some designs would require lots of gears, for example, and others might require lots of wheels. Many designs use no wheels at all.

As you look at all the designs other have built, resist the temptation to buy all the parts you might ever need to build all these different designs. Focus on one idea you'd like to build and get the parts you need for that.

You can use set inventories to determine what sets have the parts you need. Many currently-available LEGO® sets have been inventoried. Start at www.lugnet.com/inv or search the newsgroup www.lugnet.com/db/inv/

Many specific parts are also available from the DACTA store. Check out their catalog at [www.pitsco-legodacta-store.comhttp://www.pitsco-legodacta-store.com/,specifically under "Spare Parts".


This item is a completely new answer by Robert Munafo.

Subject: 2.9 Okay, I tried to build a but I couldn't. What do I do? I really think I need to buy a lot more parts.
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

If you couldn't build the design you had in mind because the parts just didn't line up, or something was the wrong size or shape, or the parts you need just don't even seem to exist, you have encountered something that nearly every other adult fan of LEGO® (AFOL) has encountered. This can be best referred to as the Fundamental Building Challenge.

Deliberately chosing to constrain yourself to a limited set of parts that fit together in limited ways limits your options — but the endless ways the parts can be combined makes you think your design, indeed every design, should be possible. The fundamental challenge results from the fact that, although there are endless ways to create a given type of design, only a few of them are possible with the parts that are available, and the method you chose to try first just doesn't happen to be one of them.

Building with LEGO® can be a sort of Zen-like experience, or it can be very frustrating depending on how you approach it. To get in the right mindset and develop a sense of the type of creative thinking you'll need for the experience to be enjoyable, try a micromodel challenge.

A micromodel challenge works like this:

1. Choose a small number of pieces as a "limit" (between 5 and 8 is a good limit).

2. Select a familiar, irregularly shaped object that can't obviously be made from that many pieces (like, say, a cat in sitting position).

3. Using a set of at least 1000 LEGO® pieces of widely assorted shapes, spend two hours creating at least 5 different designs that closely resemble the shape of your chosen object. Ignore color.

4. If you run out of ideas just start putting pieces together into random shapes and taking them apart again, until you get some ideas again.

By the end of the 2 hours you should have realized that there are many different ways to build your object and chances are none of them are what you first thought of when you started. It is this and other insights from your Zen challenge that you now take back to your robot project at hand.


This item is a completely new answer by Robert Munafo.

Subject: 2.10 Okay, I built a but it doesn't move the way I thought it would. Now what do I do?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

This is really just the Fundamental Building Challenge in another form. Now that you've built your design, take it apart and build the same design a different way. Make a bigger or smaller one, or move some of the parts around.


This item is a completely new answer by Robert Munafo.

Subject: 2.11 My robots are ugly, and not just because I used 7 different colors. How come all the robots on people's web pages look so great?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Making models look good ("elegance") is another aspect of the Fundamental Building Challenge. The solution, again, is to just keep building the same thing in different ways.


This item is a completely new answer by Robert Munafo.

Subject: 2.12 My robot works great but it pulls itself apart as it runs.
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Building strong LEGO® models is yet another aspect of the Fundamental Building Challenge, and strength issues show up in all types of LEGO® building. Building strong models with motors presents some unique challenges that traditional strong building techniques alone cannot solve. The most fundamental rule is:

Don't count on the bricks to hold themselves together by friction alone.

If you have gears in your model and it falls apart in such a way that two meshed gears are coming unmeshed, then the gears are probably pushing the model apart by pushing against each other. The simplest solution to this is to put all the gears and their axles in the same plane, so the axles all go through a single pair of beams (one beam on each end of the axles).

The next-simplest way to keep things from pulling apart vertically is to build your horizontal layers with beams and use connector pins (or friction connector pins) to connect to other beams running perpendicular (that is, vertically) to the main beams. When doing this keep in mind that:

- 2 horizontal units is exactly equal to 1 2/3 vertical units

- 4 horizontal units is exactly equal to 3 1/3 vertical units

- 6 horizontal units is exactly equal to 5 vertical units

It is also useful to note that:

- A perfect right angle is formed with a triangle with 3 horizontal units as the base at right angle to 3 1/3 vertical units (or 4 horizontal units) with 5 horizontal units on a diagonal as the hypoteneuse.

- An almost perfect right angle is formed with a triangle with 3 horizontal units as the base at right angle to 4 1/3 vertical units with 6 horizontal units on a diagonal as the hypoteneuse.

If a design is pulling apart hoizontally, it can be reinforced by adding additional horizontal layers, one above and one below, at right angles to the pieces that are pulling apart. Then the design will stay together horizontally as long as it doesn't pull apart vertically — and to prevent that, use the technique just described.


This item is a completely new answer by Robert Munafo.

Subject: 2.13 Can I burn out my RCX, motors, or sensors by connecting them improperly?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

No. LEGO® MindStorms is marketed and sold to American classrooms for students age 12 and up, and it was designed to withstand that environment. You cannot damage your RCX, motors or sensors simply by shorting two outputs to each other and driving them in opposite directions, connecting an output directly to an input, connecting a sensor to an output or any combination of such techniques.

In fact, the RCX by design detects these types of situations and handles them appropriately. For example, if you hook up one motor to output A and run built-in program #3, the motor will turn on and the RCX display will show two arrows indicating that outputs A and C are both going to the right. Now, take another connector lead and connect output A to output C. If you connect them one way, the motor will keep running because you have matched polarities. But if you reverse one end of the connector cable so the polarities are reversed, the motor stops and both arrows on the display turn off. The RCX detected the short-circuit and shut down both outputs. Undo the short circuit and the motor starts right back up again.

The one way you can damage your components by miswiring is by connecting two or more RCXs and/or battery packs in series. This can create voltages in excess of 9 volts and that definitely will cause permanent damage. Fortunately, wiring in series is fairly difficult and you probably won't do it by accident, even if your design does happen to involve more than one RCX and/or battery pack.


This item is a completely new answer by Robert Munafo.

Subject: 2.14 How about inadvertant physical damage?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Aside from obvious things like dropping or spilling liquids on your RCX, you can also cause physical damage by setting up a gear train with enough torque to permanently damage one or more of its components if it becomes jammed. The weakest link in such cases is usually the axle with the lowest rotational velocity, but it's also possible to ruin gear teeth, shear connector pins, bend plates, etc. Often the damage results from something getting jammed after you turn the robot on, either because the design is bad or because something gets caught in the works. There's no simple answer to this, but often it's useful to include deliberate failsafe elements in your design — like beams that pull apart only if gears become jammed.


This item is a completely new answer by Robert Munafo.

Subject: 2.15 My robot runs great, looks great, and stays in one piece even when my kid throws it out the car window. But it's dumber than mud. What can I do?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

First of all, try not to get frustrated. You have encountered the same issue robotics researchers have encountered for nearly fifty years. Solutions to problems that seem simple to humans, even when you've thought out the details of how it will work, totally fail to work when put into practice.

It is actually just another case of the Fundamental Building Challenge. There are many different ways to approach the same problem but only a few will actually work. In this case though, it's not just a physical or aesthetic challenge but something abstract, probably totally unlike anything you've ever thought about before. You have limited choices and you don't even know what the choices are.

Many approaches have been suggested to deal with solving the abstract challenges of robotics. The MindStorms literature suggests you "play computer" or imagine yourself physically in the position of the robot as it does its simple actions, and see how it should react. But that won't be enough to come up with a totally different approach to the problem.

One important principle to remember right away is:

"Output" is much easier than "Input"

In other words, it's much easier to make to robot create a complex sequence of actions than to make it recognize something complex.

This generalizes to the basic principle of striving to simplify the design, and simplify the problem you're trying to solve.

Some tasks might seem impossible. Suppose you want your robot to follow you around like a puppy-dog. How are you going to accomplish that? How can the robot distinguish you from everything else around that isn't you? You probably can't — even if you are the only moving object in the robot's environment.

But, if you're willing to wear an infrared LED that continually blinks a repeating pattern, the challenge suddenly becomes much easier. Using NQC or Visual Basic, monitor the light sensor to detect the pattern and check the relative level to gauge whether your direction of movement is getting "warmer" or "colder". (By the way, a repeating IR beacon is easy to make — just take a TV remote control and tape down one of the buttons.)

The best tool for simplifying designs and finding new solutions is to go out and see how other people have approached their problems. Spend a while going around the MindStorms web ring and visiting other robotics sites. One person's line follower solution might give you just the idea you need to perfect your M&M candy sorter.


This item is a completely new answer by Robert Munafo.

Subject: 3.1 How do I program the brick?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

There are many programming methods available. You need a computer with a serial port. Most of the programming options run on Windows, but Mac OS and Linux solutions are also available. See answers 3.3, 3.6, 3.7, 3.8 for more details.


This item is a completely new answer by Robert Munafo.

Subject: 3.2 Where do I learn about the RIS software?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

If you want to learn about it in order to use it, you might as well install the RIS software on your computer. To do this, you will need to have a computer running Windows 95 or 98. The CD-ROM included in the 9719 kit includes an extensive tutorial that will lead you through the entire process of setting up your hardware, building a robot, and learning how to use the RIS software and programming environment.

If you just want to learn about the RIS software without installing it, take a look at the LEGO® MindStorms web site, www.legomindstorms.com. Select "Tips and Tricks" near the top, then select "Programmopedia" on the left, then click on the various items that show up underneath "Programmopedia". These pages will give you a feel of what the RIS environment is like.


This item is a completely new answer by Robert Munafo.

Subject: 3.3 Can I use other programming tools?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Yes. Read on!


This item is a completely new answer by Robert Munafo.

Subject: 3.4 What other tools are available?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The next-most-official tool is the DACTA RoboLab software, sold by the LEGO® DACTA division for use in the classroom. You don't have to be a teacher to get it. It's sold seperately from the DACTA RCX kits, and the software runs under both Windows and Mac OS. To learn more, start at www.pitsco-legodacta-store.com and select "Machines and Robotics".


This item is a completely new answer by Robert Munafo.

Subject: 3.5 What is Spirit.ocx?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

"Spirit.ocx" is an ActiveX component (a type of dynamically loaded software module) that runs under Windows and communicates with the RCX. It knows how to take compiled RCX programs and send them to the RCX through the serial port, and receive data back from the RCX (for monitoring, testing sensors, etc.) Some of the programming solutions use spirit.ocx to communicate with the RCX (although they create the RCX programs themselves). Spirit.ocx is installed when you install the RIS software from the CD-ROM.


This item is a completely new answer by Robert Munafo.

Subject: 3.6 Can I use Visual Basic?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Yes. The LEGO group has released, but does not provide technical support for, the instructions and necessary files for using Visual basic as a programming platform for the RCX. Start at the MindStorms site http://www.legomindstorms.com/ and click on the "Software Developer's Kit" link near the bottom.


Subject: 3.7 Can I use C++?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-14
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

The C++ language is available if you program the RCX using LegOS. LegOS is a complete replacement of the RCX firmware with a C (and partial C++) compiler that creates native Hitachi H8 code. It allows access to all 32K of RAM, direct control of the display, use of the H8's power management features, and many other useful things.

However, LegOS is only for the adventuresome or the experienced programmer. As of this writing there are still fairly frequent reports of strange hangs, and for that matter it's really easy to hang the RCX just from bugs in your own program. Since there is no easy way to examine the RCX's memory after your program hangs, debugging can be very frustrating.

That said, the places to go to learn about LegOS are:

The official LegOS home page
Luis Villa's HOWTO


This item is a completely new answer by Robert Munafo.

Subject: 3.8 Can I use other languages?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

One very popular platform is the NQC (Not Quite C) language and RCXCC (RCX Command Center) development environment. This is available for Windows and Linux, and it's free. It gives you just as much power as the Visual Basic platform.


Subject: 3.9 How big of a program can I write?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


Subject: 3.10 How sophisticated of a program can I write?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


This item is a completely new answer by Robert Munafo.

Subject: 3.11 Can I make two or more bricks talk to each other?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

This is easy, and is possible in all programming environments. RCXs communicate with each other by sending a number out their built-in IR port. The number is called a "message" and can be from 0 to 255.


Subject: 3.12 Can I make the brick send data back to the PC in real time?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


Subject: 3.13 Can I use the IR port on my laptop?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


Subject: 3.14 Can I use the IR port on my Palm Pilot?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


Subject: 3.15 Can I use learnable remote controllers?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels


This item is a completely new answer by Robert Munafo.

Subject: 3.16 Can I control the RCX's LCD display?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

If you're using Visual Basic or NQC, you can tell the display to display the system clock, and then set the clock's value. However you can only set the clock value to constants, so it takes a lot of if-then tests if you want to display a lot of different possble values.

LegOS allows direct control of the display.


This item is a completely new answer by Robert Munafo.

Subject: 4.1 What is inside the brick?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Kekoa Proudfoot took his RCX apart and took pictures, which can be seen on graphics.stanford.edu/~kekoa/rcx.

His page also includes a complete listing of the bytecodes interpreted by the firmware and pseudocode telling what each bytecode does.


This item is a completely new answer by Robert Munafo.

Subject: 4.2 How do I use more than three sensors (inputs)?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

There are several approaches.

The simplest is to connect the sensors to the same input. This is most useful for two sensors one of which is a touch sensor. When the touch sensor is off (untouched) it has infinite resistance and allows you to read the other sensor value. When the touch sensor is on you cannot read the other sensor's value. Sometimes this is acceptable, it depends on your design.

Normally you would want to read the input in "raw" mode. However, if you don't need to read both sensors at the same time, you can connect certain combinations (such as a touch sensor and a light sensor) to the same input, and your program can switch input modes (sensor type) based on which sensor it needs to read.

Two touch sensors on the same input can be connected in two different ways. The obvious way makes tham act like an OR function: if either of the touch sensors is touched the RCX will see it. However, you can also connect the sensors so they work like an AND function. This approach is called "wiring in series".

To wire two sensors in series, you have to connect the two sensors and the RCX in a "ring" with three 9V connecting cables. Each device (RCX and sensors) has a 2 x 2 pad where you connect the leads. Connect one lead to contact half of the pad and the other lead to contact the other half. Note that on each 9V lead, only one of the two conductors is being used, and note also that when you connect the 2 x 2 connectors to the 2 x 2 contacts, if it's rotated 90 degrees it won't make contact at all. Look carefully at the pads and connectors to determine the proper orientation. On the RCX this is tricky on inputs 1 and 3 because your 2x2 connectors ends up pressing the View or Prgm button. To avoid this, use a fourth 9V connecting cable to raise it up a bit (or of course you can connect the "loop" to the other end of that fourth cable)

A similar wiring scheme can be used to connect a touch sensor in series with another type of sensor, so that that sensor is only connected to the RCX when the touch sensor is pressed. Conbining two or more sets of sensors would allow you to share multiple sensors on the same input, using the touch sensors to control which sensor is connected. Depending on your robot design, this could be useful. For example, you could have one light sensor that's connected only when the front bumper hits something, and other that's connected only when the back bumper hits something.

Multiple touch sensors can be connected to one input with resistors, either in series or parallel, and the input can be read in raw mode (or as a temperature or light input if you're using RCX Code). If the resistors have different values, different combinations of touch sensors will create different input values. Here's are two examples of that method implemented by modifying a 2 x 8 conducting plate:

www.plazaearth.com/usr/gasperi/3rmux.htm
www.akasa.bc.ca/tfm/lego_resistor.html


This item is a completely new answer by Robert Munafo.

Subject: 4.3 How do I make a temperature sensor?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Any type of temperature-sensitive resistor or resistive element will work, as long as it will take 9 volts or -9V without frying. The thermistor available from Radio Shack as catalog number 271-110A works well. This has to be connected in some way to a LEGO® conducting plate to make it useful in robot designs. Examples are shown at:

www.akasa.bc.ca/tfm/lego_temp.html
www.plazaearth.com/usr/gasperi/temp.htm


This item is a completely new answer by Robert Munafo.

Subject: 4.4 How do I make a rotation counter?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

To make a counter, first you need to have a rotation sensor.

As already mentioned, the fiber optic module and the polarity switch are both adaptable for use as rotation sensors. Another solution is to construct a rotating wheel with a light or touch sensor to detect holes or protrusions on the wheel (the light sensor approach is more universal because the wheel spins more freely). This can be done entirely out of LEGO® parts, as shown (for example) at: http://www.plazaearth.com/usr/gasperi/HBANGLE.HTM. Once you have a rotation sensor, you make it into a "counter" by continually monitoring it in your program and updating a variable that keeps track of the rotation count. This can be done easily in NQC or Visual Basic, but not in RCX Code.


This item is a completely new answer by Robert Munafo.

Subject: 4.5 How do I make a sound sensor?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-15
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

A rather complex circuit is required to read sound volume level in an intuitive manner, if you want to respond to high-frequency sound, or if you want to use your sensor in the RCX Code environment. The circuit amplifies the signal from the microphone to make it sensitive at a distance, turns it from AC to DC and detects peaks so you don't have to analyze the waveform yourself, and sends the result through a bridge rectifier so the sensor can be connected in either polarity to the RCX input. The circuitry (not including microphone) can be fit into a space about 2 x 4 x 3 units in size. Here are two Web pages describing specific implementations:

http://www.plazaearth.com/usr/gasperi/sound.htm

http://www.kabai.com/lego/lego.htm

If you're reading the input at a sufficiently high rate, a much simpler solution is to hook up a microphone directly to the RCX input. Depending on your programming environment and the speed of your program, you can read the input at a rate of about once every 1.5 to 3 milliseconds (about 330 to 670 Hz). Also, your sensitivity will drop off drastically above the sampling frequency, and you'll have to take several samples and compute the RMS power level yourself. But if all you want to do is react to loud or close sounds, particularly low-frequency sounds, then it's a viable and much simpler solution.

Passive microphones (the kind that don't use an internal battery)

are essentially sound-dependent resistors and most have a resistance range that lends well to being used as an RCX input (actually this isn't quite true — a microphone is a resistive load, an inductor and a small current source in series, but when you put 9 volts across the microphone you can ignore the current source and the inductive reactance isn't big enough to have an effect). The microphone would be attached and wired to a LEGO® conducting plate in a way similar to the light and temperature sensors discussed elsewhere here.

Other things to note: "Mini condensor" mics will only be useful if they are the kind that don't have extra connections for a DC power supply. A cardioid (directional) mic is probably more useful than a nondirectional mic because it allows you to determine direction just by rotating. A "crystal earphone" is a small high-impedence speaker and as such it actually works fairly well as a microphone.


This item is a completely new answer by Robert Munafo.

Subject: 4.6 How do I get more than three motors (outputs)?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Many simple mechanical methods involve transmissions that engage one gear or another based on which way you turn the motor.

A similar approach implemented electrically is to use diodes to direct electricity to one of two devices based on the voltage polarity. For an example of this, see http://www.akasa.bc.ca/tfm/legolm.html.

You can also use a motor driving several polarity switches (available as kit number 5120 from LEGO® Shop At Home), using cam linkages so that only one switch is on at any one time, then driving several motors (up to four has been suggested) in parallel through the switches from a second motor output. This approach lets you use 3 or more motors from two motor outputs, albeit only one at a time.


This item is a completely new answer by Robert Munafo.

Subject: 4.7 How do I make a bend sensor?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

A bend sensor detects bending or flexing of something, and the essential component can be found in a Nintendo Power Glove (which is discontinued but can be found on the used videogame accessories market). For an example construction, see http://ex.stormyprods.com/lego/#bend


This item is a completely new answer by Robert Munafo.

Subject: 4.8 What other types of sensors can be built?
Content-Language: en
Topic-Level: 0
Revision: Robert Munafo, 1999-07-13
Location: /robotics/rcx/
Comment: Topic-level is inaccurate pending a reference for topic levels

Many different types of sensors are described at http://www.plazaearth.com/usr/gasperi/lego.htm


This item is a merge of the answers submitted by Janet and Carl McIver and Robert Munafo.

Subject: 5.1 What are some other Web resources for LEGO® Mindstorms and robotics?
Content-Language: en
Topic-Level: 1
Originator: Janet and Carl McIver, 1999-01-01
Revision: Robert Munafo, 1999-07-13
Reference: http://www.lugnet.com/news/display.cgi?lugnet.robotics:2106
Location: /robotics/

A good place to start is to search the RCX discussion areas on LUGNET. It is likely that your topic has already been discussed there. Start at the excellent LUGNET robotics forum

There is also a MindStorms Web Ring, linking many MindStorms-related web sites. The web ring index is at http://members.tripod.com/~ssncommunity/webrings/legoms_index.html.

Here are some other popular RCX-based pages, listed in no particular order:

Utrect University LEGO® Robot Links
http://www.cs.uu.nl/~markov/lego/links/index.html

The NQC Home Page
http://www.enteract.com/~dbaum/lego/nqc/

Hacking the Radio Shack ultrasonic tape measure
http://www.cs.uwa.edu.au/~mafm/robot/rs-tape-measure.html

Zircon (and similar) studfinder hack
http://www.rdrop.com/users/marvin/parts/issue14.pdf

A supplier of range IR and object detection devices called DIRRS and IRRODS, as well as a nice selection of other robotics hardware
http://www.hvwtech.com/index.html

Where I get my LEGO® Mindstorms and other robotics stuff
http://www.robotstore.com/

Parallax Basic Stamp I and II microcontrollers, with free software
http://www.parallaxinc.com/company/

The Seattle Robotics Society
http://www.seattlerobotics.org/

The Robotics FAQ
http://www.frc.ri.cmu.edu/robotics-faq/

Clearinghouses for information on robotics
http://www.robohoo.com/
http://www.hut.fi/Misc/Electronics/index.html


end of MindStorms FAQ


revised since last TOC posting: 1.2, 1.6, 2.4, 2.5, 2.7, 3.7, 4.5

Geometry, provided by Jef Poskanzer (jef@netcom.com), with more accurate stud spacing by Robert Munafo. (Thanks also to the MIT course notes.) *All measurements in mm.*

side: __ __ __ __ top: +----------------+ +----------------+ | () () () () | | | | | | | | () () () () | +----------------+ +----------------+ spacing of knob centers: 7.985 diameter of knobs: 5 height of block: 9.582   end: __ __ bottom: +================+ +--------+ # -- -- -- # | | # ( )( )( ) # | | # -- -- -- # +--------+ +================+ height of knobs: 1.7 thickness of block walls: 1.5 outer diameter of cylinders: 6.31 thickness of cylinder walls: 0.657

(height of block) = (spacing of knob centers) * 6 / 5

(thickness of block walls) = ((spacing of knob centers) - (diameter of knobs)) / 2

(height of knobs) = (height of block) / 3 - (thickness of block walls)

(outer diameter of cylinders) = sqrt(2) * (spacing of knob centers) - (diameter of knobs)

(thickness of cylinder walls) = ((outer diameter of cylinders) - (diameter of knobs)) / 2


Robert Munafo's home pages on HostMDS   © 1996-2016 Robert P. Munafo.aboutcontact    mrob    mrob27    @mrob_27
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2016 May 15. s.11