How does a segway balance
Download Programs ( help )
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.
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!Source: nxtprograms.com