I am sure that the biggest problem one faces in programming is turning 90 degrees. We Atomic Robot however have found a solution finally.

##
IN ORDER TO UNDERSTAND THIS METHOD, KNOWLEDGE IN CIRCLE GEOMETRY IS NEEDED

Before we tell you our method, Your robot needs to have the following requirements.

- 2 OR 4 WHEELS MUST BE DRIVEN BY 2 MOTORS. (RACK AND PINION STEERING OR ACKERMANN STEERING MECHANISMS CANNOT USE THIS METHOD.)
- YOUR ROBOT MUST NOT SLIP WHILE IT TURNS.

Finding out whether your robot slips while turning is tough. Usually your eyes don't detect it.
However we did invent a way to find out whether your robot is slipping or not.

To do that you need to follow a simple experiment. Using Pivot turn method make your robot turn.

The one motor blocks are found in the crossed region. The duration is in degrees and you can keep any random number. I CHOSE 30.

MOTOR B AND C MUST MOVE IN OPPOSITE DIRECTIONS. If you tried this program, you will notice that the robot moves in a perfect circles. Such a turn is called a **Pivot Turn.**

Now put the robot in the landscape and execute the program. Measure the degrees the robot turned.

Again execute the program . Measure the degrees the robot turned again. If the values are approximately equal then your robot is not slipping and you can continue.

However if the values are not equal then the robot's tires is slipping. In other words the robot's tires is resisting friction and every time the degrees turned by the robot will change.

** AT SUCH A CIRCUMSTANCE YOU WILL HAVE TO CHANGE THE MECHANISM OF THE ROBOT TO A MECHANISM WHICH EXHIBITS LOWER FRICTION OR LESS SLIPPING.**

You have already been introduced to the pivot turn as shown above. We will use a pivot turn to make your robot turn exactly 90 DEGREES. First try keeping 90

degrees in the duration block for each motor. Execute the program.

You may notice that 90 degrees motor movement does not mean 90 degree rotation of your entire robot. In other words, we need to calculate the number of degrees each motor has to move for the entire robot to move 90 degrees.

TO DO THIS WE NEED TO KNOW CERTAIN BASIC TERMS.

The diameter of the tire is represented by d.

The distance between the wheels of the robot is represented by b.

The angle you want to turn is represented by Ө

so now Ө = 90 degrees.

The circumference of the tire of the robot is given by the formula= πD

(Formula for circumference of a circle,π is a constant and is = 22/7)

So the robot in one rotation moves about πD cm.

B is the diameters of the circle around which the robot moves. so the circumference of the circle is = bπ. We want to move 90 degrees. So the distance our robot has to move for making a 90 degree turn is 90/360*bπ

(This is a typical formula to found out the length of quadrants of a circle. It is advised to learn the basics of circle geometry before proceeding.)

IN OTHER WORDS Bπ /4.

Our robot has to move Bπ /4 length to complete a 90 degree turn. Our robot on the other hand moves Dπ cm for every rotation. So how many rotations will make it move Bπ /4 CM.

**The answer is Bπ /4 DIVIDED BY Dπ **

This will give you the number of rotations. BUT USUALLY THIS VALUE IS TOO SMALL. You may want to convert it to degrees.

AS 1 rotation= 360 degree, the final formula is

B/4D * 360

The formula for finding the angle of the motors for any degree is

B/D * Ө

So now we have managed to calculate the number of degrees our motor needs to move for making the robot move any amount of degrees.

REMEMBER THIS VALUE VARIES FOR EVERY ROBOT AS B AND D ARE DIFFERENT.

To program the robot simply enter this value of degrees in your pivot turn program block. Inverse the direction of each motor for different turning methods.

THIS WEBSITE gives you insight on Programming pivot turn and other turns. Hope it helps. Please refer it if you do not have previous experience in these turns.

The common diameter (D) of NXT wheels is

This wheel has a diameter of 5.65cm

This wheel has a diameter of 7.91 cm

HAPPY PROGRAMMING

THANK YOU