How To Program An Nxt Segway Labviewlasopafs



So., I am currently trying to program a Hytechnic Gyro on an NXT kit; I have a program that I have programmed myself with help from the web and it for the most part works. I have attached a picture of it to this query. How do I go about adjusting the wheels to turn to auto correct the pitch of the. Controlled NXT brick, Interactive Servo Motors, Sound, Ultrasonic and other sensors, Bluetooth communication and multiple downloading capabilities. The icon-based LEGO MINDSTORMS Education NXT Software is built on the LabVIEW™ software from National Instruments, an industry standard with applications in many engineering and research fi elds.

  • The first control program, SegWay, assumes that the robot is a single mass balanced on two wheels (motor #3 is not used with Segway control program). The second program, SegWay BT, requires that the robot features one more degree of freedom at the location of motor #3 (indicated in the figure).
  • The chapter contains a java program Sejway.java that can be used as a starting point for experiments with a self-balancing LEGO robot. 5 Robotic Ideas & Instructions, AnyWay - Build a SegWay in under an hour! 6 HITechnic, HTWay - A Segway type robot. 7 nxtprograms, NXT Segway with Rider. 8 HiTechnic Gyro Sensor. 9 The gyro sensor.
  • Jul 18, 2014 There are two files: Run kalmandesign3.m first to generate a linear state space model of the plant, design a Kalman filter to estimate the states from the gyro, accelerometer, and wheel encoders, and design a full state feedback controller. Then use NXTsegwaykalman3.mdl to generate code that can be embedded onto the NXT using the NXT target.

How To Program An Nxt Segway Labviewlasopafs Charger

Fun Projects for your LEGO® MINDSTORMS® NXT!

NXT Segway with Rider
Building:
Program:

Building Instructions

1

OR

You can use the NXT with either AA batteries or the NXT Rechargeable Battery Pack.

2

3

4

5

Insert the cross brace between the motors, keeping the wires routed under it as shown above. Wrap and then connect the B and C wires to the two motors as shown below, then finally attach the color sensor as shown, which should be connected to the port 3 wire.

6

7

8

9

10

11

12

Connect the body motor for the rider to port A. The ultrasonic sensor is not attached in this design.
NXT Segway with Rider Programming

Important Usage Information

Note: Unlike balancing robots that use a gyroscopic sensor or other special sensors, this design uses only the color sensor, which does not know which way is 'up' in an absolute sense, so it can only guess on its relative tilt based on the amount of reflected light received from the ground. As a result, getting a good balance is a bit of a challenge when you are using it. Please read the following important tips.

Getting the NXT Segway with Rider robot to balance requires good lighting and surface conditions for the color sensor, and also requires that you start the robot exactly balanced to begin with, so be prepared to experiment with different surfaces and lighting, and also some practice at getting the robot started out balanced to begin with. Here are some tips:

  • Lighting. External (room) lights can confuse the color sensor, especially if the amount of lighting or shadow varies as the robot moves around. For best results, find a location where the color sensor will be in shadow from any room lights, even as the robot moves forward and backward by a couple of feet in either direction. Also, florescent lights will interfere less than incandescent lights. In particular, make sure that when you remove your hand(s) to release the robot in the beginning, that the shadow/lighting conditions don't change at that point.

  • Surface. The robot requires a surface that has very uniform brightness. Blank white paper will work well, or any surface that is a uniform solid color with no pattern. A wood floor with a wood grain pattern, or a tile floor with texture will not work well, because the light reflection will vary as the robot moves.

  • Initial Balance. Since the color sensor cannot tell which way is up, the robot must start perfectly balanced to begin with, and then the program will try to maintain that balance position by trying to seek out the same reflected light reading that the color sensor had at the beginning of the program. Specifically, the robot must be physically balanced, which is not the same as holding it visually straight up. If you just hold it upright with your hand, it will not be physically balanced.

At the beginning of the program, the program will beep three times over three seconds, to give you time to get the robot balanced with your hands, then it measures the position at the 4th (higher tone) beep, so the goal is to have it perfectly balanced at the 4th beep. Then it starts to try to stay balanced automatically. Note that if you start the robot very close to but not quite balanced, it will drive forward or backward in the direction that it was leaning at the start. Getting a good start may require some practice, so be patient!

A good way to start the robot balanced is to start the program, then during the three beeps, support the robot only by the top of the driver's head (ultrasonic sensor) very lightly using one finger and thumb with an open gap, trying to keep the robot from leaning to either side very much at all.

The Programs

Two programs are provided for the NXT Segway with Rider, Segway and SegwayBT. Both of these programs balance the robot using a form of 'PID Controller'. See this Wikipedia article on PID Control for technical information on how a PID controller works.

The Segway program will make the robot automatically balance itself, based on its initial position, without any leaning movement by the rider. When using this program, you can lock the rider in place to keep him upright as explained below.

The SegwayBT program adds Bluetooth remote control to allow you to control the forward and backward lean of the rider from another NXT brick via Bluetooth. First, establish a Bluetooth connection from the second NXT (the remote control) to the Segway NXT on Connection 1, then run the SegwayRemote program on the remote control NXT and the SegwayBT program on the Segway NXT, starting with the Segway balanced. Now pressing the gray Left and Right arrow buttons on the remote control NXT will cause the rider to lean slightly in that direction. Use only slight movements (e.g. one or two presses in each direction), so that the Segway can keep up with the motion.

Download Pirates of the Caribbean Download (2003 Role playing Game) Blending role-playing elements with the strategy of ship-to-ship combat, Pirates of the Caribbean offers players a chance to set sail on the high seas as a treasure-hunting pirate. Click the 'Install Game' button to initiate the file download and get compact download launcher. Locate the executable file in your local folder and begin the launcher to install your desired game.

Locking the Rider in Place

When using the Segway program, which does not do any rider leaning, you can lock in the rider in place as shown below to make the robot easier to work with. Remember to remove the lock when using the SegwayBT program.

You can use either of these axles to hold the rider in place. The size 5 axle will look better, but the size 8 axle with stop is easier to insert and remove.

Challenges
  • The Segway and SegwayBT programs use a 'PID Controller' strategy to balance the robot. This type of control strategy can be used in several other applications of robotics. The article A PID Controller For Lego Mindstorms Robots provides a good introduction to PID control, as applied to line following with an NXT robot, by developing it and comparing it to simpler methods. Can you adapt the Segway program to re-use the PID strategy for another application such as line following?

  • The SegwayBT program does not modify the power to the wheels to make the robot go forward and backward. Rather, it simply leans the driver's body, which forces the robot to adjust to stay balanced, which has the effect of causing the robot to move forward and backward (somewhat like a real Segway getting started). Can you modify the control program to modify the motor power instead of the driver lean to achieve forward/backward movement?

  • The solid axle between the wheels is not necessary, but it prevents the robot from wandering sideways as it adjusts its balance. Try removing the center connection. Now can you imagine modifying the SegwayBT program to adjust the motor power to the wheels to make the robot turn left and right by remote control, while remaining balanced?

  • The Segway program is a basic PID controller that uses the color sensor's reading to determine an 'error' in its position and then tries to correct for it. If the robot starts not quite balanced, it will drive steadily in one direction, or perhaps even accelerate in that direction and then fall. The Segway program does not consider the robot's forward/backward position when determining the 'error' for the PID controller. Can you imagine modifying the error calculation to use the rotation sensor of one of the drive motors to add an error factor that increases as the robot wanders away from its starting point? Can the controller use this to keep the robot close to its starting point instead of wandering away? Will this affect its ability to stay balanced?

How To Program An Nxt Segway Labviewlasopafs Cost

'Segway' is a registered trademark of Segway, Inc.
Usenet software download.


Copyright
© 2007-2011 by Dave Parker. All rights reserved.
All project designs, images, and programs are protected by copyright. Please see the usage policy.

How

Annual License (365 Days)

Perpetual License (No Expiration)

Building License - Annual License (365 Days)

  • Contact us at support@robotc.net to purchase the licenses below:
    • 365-Days, 1 Classroom, 30 seats, $599
    • 365-Days, 2 Classroom, 60 seats, $699
    • 365-Days, 3 Classroom, 90 seats, $799
    • 365-Days, Unlimited Classroom, Unlimited seats, $999

Homework Packs

  • Contact us at support@robotc.net to purchase the licenses below:
    • 180-Days, $8.99 per license
    • 365-Days, $14.99 per license

ROBOTC and Robot Virtual Worlds bundles
Annual License (365 Days)

ROBOTC and Robot Virtual Worlds bundles
Perpetual License (No Expiration)

How To Program An Nxt Segway Labviewlasopafs Plus

Building License Bundle for ROBOTC for LEGO MINDSTORMS + Robot Virtual Worlds - LEGO

  • Contact us at support@robotc.net to purchase the licenses below:
    • 365-Days, 1 Classroom, 30 seats, $999
    • 365-Days, 2 Classroom, 60 seats, $1,199
    • 365-Days, 3 Classroom, 90 seats, $1,399
    • 365-Days, Unlimited Classroom, Unlimited seats, $1,699
How To Program An Nxt Segway Labviewlasopafs

How To Program An Nxt Segway Labviewlasopafs Manual

Segway

How To Program An Nxt Segway Labviewlasopafs Pro

Resources