How to Build a Mindstorms Robot

Lego Mindstorms is a kit that contains over 600 pieces that you use to build and program fully functional robots. You start your design by connecting sensors and motors to the NXT computer, or brain, and then use the Mindstorms software to create a program that determines how the robot acts. You can build a robot that walks on two feet, a car that drives around, or a machine with no recognizable features at all. The NXT kit contains all the pieces needed to create any robot you want.

Things You'll Need

  • Lego Mindstorms NXT kit
  • Computer
  • Black electrical tape
  • White floor


  1. Build the Robot

    • 1

      Connect one end of a connector cable to port B of the NXT brain; connect the other end to a motor. The motors work in ports A, B or C; other sensors work in ports 1, 2, 3 or 4.

    • 2

      Connect a gear to the rotating end of the motor. Attach a track over the entire motor to make a tire for a tank or similar robot.

    • 3

      Connect the motor to the NXT brain using the Lego building pieces. Attach Lego bars and axles to the brain, and snap them into the motors to attach the brain and motors together.

    • 4

      Create another wheel and attach it to the other side of the NXT brain. Connect the connector cord to port C. Make sure the wheels can touch the floor without any other Lego pieces touching the floor.

    • 5

      Connect one end of a connector cable to port 1 of the NXT brain, and the other end to the color sensor. The color sensor is the rectangular object with a glass bulb at the end.

    • 6

      Connect Lego pieces to the color sensor in such a way that the front of the sensor points to the ground, with about a half-inch of space between the light bulb on the color sensor and the floor. You program this sensor to recognize the color of the floor.

    • 7

      Build the rest of the robot using Lego pieces. Do not make the robot too heavy, or it will not move well on the floor. Also make sure that you can press the buttons on the front of the NXT brain. Other than that, be as creative as you want.

    Program the Robot

    • 8

      Start the Lego Mindstorms program on your computer. Select a new project.

    • 9

      Add a loop to the beginning of your program. The loop control will automatically snap to the front of your program's chain, which looks like a Lego bar piece. Your program will execute in sequence, starting from the first element of the chain to the last. Any controls not connected to the chain appear faded, and will not execute with your program. All subsequent controls go inside the loop to make a program that runs until you physically stop it.

    • 10

      Add a "Move" control to the front of your chain. This control handles the rotating motors on your robot, turning them like wheels to move your robot. By default, this control uses ports B and C. Change the "Duration" property to "Unlimited" to make the robot continuously move.

    • 11

      Add a "Wait Light Sensor" control to the end of the chain. Change the "Light" value from ">" (greater than) to "<" (less than). This control will cause the light sensor to continuously measure the light in front of it, waiting for a value less than 50 (the default value) to appear. When pointed at a white floor, the light sensor will make the robot will move forward while it waits to see a dark floor, at which point it will turn around.

    • 12

      Add another "Move" control after the wait sensor. Change the "Duration" property to "Degress" and change the number to 180. Move the "Steering" bar to the far left so the robot will make a left turn. This function only happens when the conditions of the wait sensor are met.

    • 13

      Connect one end of the USB cord to the computer, and the other end to your robot. Click the "Download" button to load your program onto your robot. When loading is finished, disconnect the robot from the USB cord.

    • 14

      Use black electrical tape to create a circle or square on a white floor. Put your robot in the designated area. Turn on the NXT brain, and press start to run the program. The robot will drive forward while the light sensor sees a white floor. When it sees a black edge, it will stop, turn around, and drive away.

Tips & Warnings

  • You can program the other sensors similarly to how you programmed the ultrasonic sensor. The touch sensors respond to touch, the ultrasonic sensor responds to motion. The color sensor can also act as a lamp.
  • When possible, use Lego pieces to hide the connector cables within the body of the robot, or wrap them around other parts. Exposed cords can get tangled or caught on objects, and be pulled out.
Related Searches


You May Also Like

Related Ads

Read Article

Top 10 Advantages of Having Kids After 35