You are on page 1of 3

ATMEL

APPLICATIONS

NUMBER 9

FALL 2007

Intelligent Land Rover


An automatic robotic pathfinder using ATMEL 89C52.
By: K. Karthick Ramanathan, M. Vijay Kumar, and L. Vineeth, Under The Guidance of: Mr. D. Sivaraj Useful Links in this Article:
Atmel 89C52 (80C32 Microcontroller with 8K bytes Flash.) Datasheet: http://www.atmel.com/dyn/resources/prod_documents/doc0313.pdf Application Notes: Designing Boards with Atmel AT89C51,AT89C52, AT89C1051, and AT89C2051 for Writing Flash at In-Circuit Test http://www.atmel.com/dyn/resources/prod_documents/DOC0534.PDF AT89C52 Reliability Qualification Report http://www.atmel.com/dyn/resources/prod_documents/89C52.pdf

COMPONENTS USED:
Component Motors geared motors Motor Driver Microcontroller Ultrasonic Distance Meter Tactile Switches Specification 6 V DC L 293D ATMEL 89C52 Quantity 2 the rover 1 2 2 40 Use To move To drive the motors The brain of the rover. To sense pits To detect obstacles

SYNOPSIS Imagine how you could employ a land rover that would automatically reach a pre-programmed destination without any intervention by the user, and sensing all obstacles and pits on its way? It sounds like science fiction, but its a reality today, and has been designed by engineers at the PSG College of Technology in India. The land rover which will act on its own, finding its way through various obstacles and pits. This can have many diverse applications, including: Guiding tourists in an unfamiliar location, Traveling from room to room in a hospital to perform duties such as reminding patients to take medication, etc. ALGORITHM: We use two microcontrollers to control the robot. One is for sensing obstacles and driving the motor and the other is for sensing the presence of pits on the way.

There are four arrays of tactile switches in the front side of the robot to detect the presence of obstacles (Refer front view). When any of the switches is closed, it implies the presence of an obstacle. Whenever an obstacle is detected, the robot will take the following course (Refer obstacle detection course): 1. 2. 3. 4. Reverse for a small distance. Right and then straight for some distance. Left and the straight for some distance. Right.

Two ultrasonic distance meters are employed at either side of the rover (Left and Right, refer top view and front view). Whenever a pit is detected, the rover takes the following course: 1. Reverse for a very small distance. 2. Right turn if the pit is found on the left side, left turn if it is found on the right side. 3. Straight for some distance. 4. Left if the first turn was right and vice versa.

ATMEL

APPLICATIONS

ON-LINE

JOURNAL

Page 2

LOGIC BEHIND ULTRASONIC DISTANCE METER: The ultrasonic distance meter is made up of an ultrasound transmitter and a receiver. We excite the transmitter with 12 pulses of 40 kHz. A counter is started when the pulse is transmitted. When the receiver receives the 12 pulses, it gives a voltage which is used to stop the counter. When there is not pit, the count value will remain within certain threshold value, when the count exceeds the threshold value; it means that there is a pit in the side where the count has exceeded the threshold value. This counting process is done by a microcontroller, when the count exceeds the threshold value; it gives an interrupt to the microcontroller that is sending signals to the motor driver. Upon receiving this interrupt, the microcontroller goes into the interrupt service routine, where the above mentioned course of action is taken. SIGNALS TO THE DRIVER TO DRIVE THE MOTOR:
P0.0 1 0 0 1 P0.1 0 1 1 0 P0.2 0 1 0 1 P0.3 1 0 1 0 Direction of motion of the rover FORWARD REVERSE LEFT RIGHT

Side View

LOGIC BEHIND OBSTACLE DETECTION There are totally four arrays of tactile switches mounted on the front side of the rover. The switches in each array are shorted to act as a single switch. One end of the switch is connected to the ground; the other end is connected to the port P1 (Anywhere in P1). We will have four inputs to P1. When any one switch gets closed a LOW is sent to port P1 of the microcontroller. Whenever any pin of P1 goes LOW, the rover will take the actions as mentioned above in obstacle detection.

Bottom View

Top View

Top View

ATMEL

APPLICATIONS

ON-LINE

JOURNAL

Page 3

Microcontroller Used for Ultrasonics

SCHEMATIC:

Ultrasonic Distance Meter

The above robot can intelligently find the obstacles and pit and it will reach the destination. This technique is to be adopted in the wheel chair to make the blind people to move from one place to other place.

Main Microcontroller