PROJECT No 1: SEGWAY or LegWay Build your own LegWay!

You can find many self balancing NXT on the web, but what does it take to make your own Segway? This page won't tell you all the details about self balancing robots, but instead it provides simple step-by-step instructions to creating your own Segway.

What will you make?

You can create your own LegWay (shown above) during this block week course and program it to move, avoid obstacles and keep its balance. It should balances on two wheels as it drives around any flat hard surface (even sloped surfaces) while avoiding walls and other objects. What do you need? • The HiTechnic Gyro Sensor • A MINDSTORMS NXT set • The programming software that comes with your NXT set

The LegWay can be built with Any NXT set. Whether you have You can build the segway with the NXT #8527 set, the NXT 2.0 #8547 , or even the NXT this set plus a Gyro Sensor Education #9797, you can build the Anyway with just the pieces you have. The same goes for the programming software: it doesn't matter which version you have.

Building the LegWay

Once you've collected everything you need, you are ready to build your LegWay. Follow the figures below and follow the step-by-step building instructions. Make sure that you carefully connect the cables as shown.

STEP No. 1: STEP No. 2:

STEP No. 3: STEP No. 4:

STEP No. 5: STEP No. 6:

STEP No. 7:

Loading the program

The final task if for you to program the to behave as expected (i.e., balance on two wheels as it drives around any flat hard surface, and avoids walls and other objects).

When you have completed your program (or want to test parts of it) all you need to do is transfer your program to your NXT brick by following these steps.

• Launch the NXT programming software, and open your program. • Connect your robot to the with a USB cable. • To use this program, the firmware on the NXT brick must be 1.28 or higher. If you have the NXT 2.0 set skip, you can this step. If you do not have the NXT 2.0 kit, you must update your NXT firmware: o Click here to download the latest firmware, and unzip it to your computer in the following location: Program Files or Program Files (x86)\LEGO Software\ NXT\engine\Firmware o Restart the programming software, go to 'tools' and click 'Update NXT firmware'. o Select Firmware v1.29, and click 'Download'. o Wait for the NXT to be updated. Your NXT screen will go out (this is normal). Your NXT will switch on automatically when the download has completed.

• Open the NXT window. • In the window that pops up, select your NXT from the list, and then click the 'Memory' tab. • Click 'Download'. Select the program you previously saved on your Desktop (Anyway.rxe), and click 'OK'. • Using the same method, download the following sounds to your robot: "Object Detected.rso", "Hello.rso", "OK.rso", "03.rso", "02.rso", "01.rso", and "Start.rso". You will find these files in the following folder: Program Files or Program Files (x86)\LEGO Software\LEGO MINDSTORMS NXT\engine\Sounds • You can now close the NXT Window by clicking 'close'.

Comments:

• You will have to consider what wheel type (e.g., diameter) are you using when programming your robot. This might be important as this will determine how the robot balances and will determine the robot’s speed based on wheel revolutions. • You can include in your program a selection option where you select the speed at which your robot should move around. When testing your program you might want to have a 'still' option which will balance the robot in place. If the balancing aspect works then you can move and start considering 'slow' or 'fast robot motions in your program. • You will need to calibrate your gyro sensor. For this, lay the robot still (i.e. on the ground) and run a gyro calibration program. At that time your robot will calibrate the gyro sensor. Do not move the robot until the program finishes. • When testing hold your robot upright (in its balanced position) as it starts the program. Make sure that as you start the program, there should be no objects within 3 feet of the robot's eyes. If there are objects then the robot might try to avoid them before it balances itself.

Show your LegWay to the instructor to receive marks for your project.

You are required to show a working LegWay to the course instructor to receive credit for your work. When you are finish please disassemble your robot, pack away all the components that you were given and return the items to the course instructor who will check that everything is returned before you are given credit for your work. Attention!

Students will be charged for the entire NXT kit and devices given if parts are missing!