4
MIT International Journal of Electrical and Instrumentation Engineering, Vol. 2, No. 2, Aug. 2012, pp. (98-101) 98 Design of Microcontroller Based 4 in 1 Robot AlkaVerma Department of EE & I Engineering Moradabad Institute of Technology Moradabad, 244001, INDIA Email: [email protected] Prakhar Gupta Moradabad Institute of Technology Moradabad, 244001, INDIA Email: [email protected] Ruchi Gupta Moradabad Institute of Technology Moradabad, 244001, INDIA Email: [email protected] ABSTRACT This paper presents a new microcontroller based robot working in 4 modes namely Line Follower, Edge Detector, and Obstacle Detector and Path Finder. In this paper the above objective is achieved by using ATMEGA168 Microcontroller alongwith combination of sensors and switches and LED. Keywords: Line Follower, Edge Detector, Obstacle Detector, Path Finder, Microcontroller, Sensor, Switches, Motor. I. INTRODUCTION In this paper a robot that is capable of obstacle avoidance, line following, path finding and edge detection. These four modes (obstacle avoider, line follower, path finder, and edge detector) are controlled through switching pad i.e. by simply pressing the switch we can change the mode of robot randomly which is desired. Initially the robot is work as edge detector. It will perform the function with the help of infrared sensors. Edge detection technique will help the robot to detect the edges and avoid the falling of the robot by moving back and then turning left or right. Second mode is obstacleavoider [2], [4]. It will detect the obstacle in its front and will avoid the colliding of the robot with the obstacle.Third mode of the robot is line follower. The robot is designed to search for a black line on the ground. Once the line is found, the robot tracks the line from end to end and reverses direction when it encounters an obstacle in the path of the line. Fourth mode of the robot is path finder. An important problem in robotics is that of generating a path between initial and final point with robot. This is called the robot path finding problem. For solving this problem we analyze, design and develop a robot which analyzes its surroundings to reach a destination provided by the user such that it avoids all obstacles on its way and reach its destination [1],[3]. All four modes (obstacle avoider, line follower, path finder, and edge detector) is done with the help of infrared sensors. There are different sensors are used and the sensitivity of the sensors can be varied with the potentiometer attached with the sensors. II. THEORETICAL CONSIDERATION Figure 1 shows the entire components used in the robot working as a single system to achieve a goal. Figure 1: Basic Block Diagram (i) Power Supply Voltage provide through adaptor is 12v but ATMEGA168 requires only 5V. This voltage conversion is done using IC7805 which is a three pin IC. Capacitor C1 is used to reduce the ripples in the input side. Capacitor C2 is used to store energy and provide the extra charge when the load requires extra current. In pin 7 an LED is used to indicate that the power is turned ON. [4],[5] Figure 2: Voltage Regulator Circuit ISSN 2230-7656 (c) MIT Publications

MIT International Journal of Electrical and ...mitpublications.org/yellow_images/1362471407_logo_7.pdf · MIT International Journal of Electrical and Instrumentation Engineering,

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MIT International Journal of Electrical and ...mitpublications.org/yellow_images/1362471407_logo_7.pdf · MIT International Journal of Electrical and Instrumentation Engineering,

MIT International Journal of Electrical and Instrumentation Engineering, Vol. 2, No. 2, Aug. 2012, pp. (98-101) 98

Design of Microcontroller Based 4 in 1 Robot

AlkaVermaDepartment of EE & I Engineering Moradabad Institute of Technology

Moradabad, 244001, INDIAEmail: [email protected]

Prakhar GuptaMoradabad Institute of Technology

Moradabad, 244001, INDIAEmail: [email protected]

Ruchi GuptaMoradabad Institute of Technology

Moradabad, 244001, INDIAEmail: [email protected]

ABSTRACTThis paper presents a new microcontroller based robot working in 4 modes namely Line Follower, Edge Detector, and Obstacle Detector and Path Finder. In this paper the above objective is achieved by using ATMEGA168 Microcontroller alongwith combination of sensors and switches and LED.Keywords: Line Follower, Edge Detector, Obstacle Detector, Path Finder, Microcontroller, Sensor, Switches, Motor.

I. INTRODUCTIONIn this paper a robot that is capable of obstacle avoidance, line following, path finding and edge detection. These four modes (obstacle avoider, line follower, path finder, and edge detector) are controlled through switching pad i.e. by simply pressing the switch we can change the mode of robot randomly which is desired. Initially the robot is work as edge detector. It will perform the function with the help of infrared sensors. Edge detection technique will help the robot to detect the edges and avoid the falling of the robot by moving back and then turning left or right. Second mode is obstacleavoider [2], [4]. It will detect the obstacle in its front and will avoid the colliding of the robot with the obstacle.Third mode of the robot is line follower. The robot is designed to search for a black line on the ground. Once the line is found, the robot tracks the line from end to end and reverses direction when it encounters an obstacle in the path of the line.

Fourth mode of the robot is path finder. An important problem in robotics is that of generating a path between initial and final point with robot. This is called the robot path finding problem. For solving this problem we analyze, design and develop a robot which analyzes its surroundings to reach a destination provided by the user such that it avoids all obstacles on its way and reach its destination [1],[3]. All four modes (obstacle avoider, line follower, path finder, and edge detector) is done with the help of infrared sensors. There are different sensors are used and the sensitivity of the sensors can be varied with the potentiometer attached with the sensors.

II. THEORETICAL CONSIDERATION Figure 1 shows the entire components used in the robot working as a single system to achieve a goal.

Figure 1: Basic Block Diagram

(i) Power SupplyVoltage provide through adaptor is 12v but ATMEGA168 requires only 5V. This voltage conversion is done using IC7805 which is a three pin IC. Capacitor C1 is used to reduce the ripples in the input side. Capacitor C2 is used to store energy and provide the extra charge when the load requires extra current. In pin 7 an LED is used to indicate that the power is turned ON. [4],[5]

Figure 2: Voltage Regulator Circuit

ISSN 2230-7656 (c) MIT Publications

Page 2: MIT International Journal of Electrical and ...mitpublications.org/yellow_images/1362471407_logo_7.pdf · MIT International Journal of Electrical and Instrumentation Engineering,

MIT International Journal of Electrical and Instrumentation Engineering, Vol. 2, No. 2, Aug. 2012, pp. (98-101) 99

(ii) ATMEGA168 Microcontroller—A microcontroller is a small computer on a single integrated circuit containing a processor core, memory and programmable input/output peripherals. At mega 168 is high-performance, low-power Atmel 8-bit AVR RISC-based microcontroller. It combines 16KB flash memory, 1KB SRAM, 512B EEPROM, an 8-channel/10-bit A/D converter.. The program memory is of flash type with 16kb which is sufficient for our design [8].

(iii) SensorsAn IR sensor is used to detect obstacles, line, edge and path. IR reflective sensors have emitter (IR LED) and receiver (Photo-Transistor or Photo-diode). If white surface is present beneath the IR LED, IR rays are reflected and are sensed by the receiver, while in case of black surface, the lights gets absorbed and hence receiver does not sense IR rays.[9] It tries to move to its destination avoiding the obstacles with the help of wheels mounted on D.C. motor which in turn is controlled by the microcontroller. The robot might encounter obstacles when it moves to its destination. To detect such obstacles or follows the line we use five IR LEDs as the transmitter and photo diodes as the receiver. The three sensors are placed in the front (left, middle, right), and remaining two are placed at the lower left and lower right.[10] The obstacle detection unit is also interfaced with the micro controller such that it lets the micro controller know about following the line strips and the obstacles detected. The robot manoeuvres itself to avoid the obstacles with the help of its microcontroller which controls the motors using differential drive logic.

(iv) Sensor ArrayIn this system five sensors are place at the front and lower side of a robot. A is the sensor on the lower left, B as the lower right sensor and IC’s the front left sensor, middle sensor as D and front right sensor named as E. For line follower when the sensor reads A=1 and B=1, then it is assumed that robot is on the tape at centre point and ready to move the robot in forward direction. The robot decides the next move according to the algorithm given below.[6],[7]

Table 1: Sensor Array Condition for Line Following Robot

A-Lower Left B-Lower Right Direction of Robot1 1 Forward1 0 Left0 1 Right

Table 2: Sensor Array Condition for Edge Detector Robot

A-Lower Left B-Lower Right Direction of Robot1 1 Forward1 0 Left0 1 Right

Table 3: Sensor Array Condition for Edge Detector

A-Front Left

B-Middle E-Front Right

Direction of

110–

1110

101–

ForwardLeftRightBackward and Right

(iv) LEDs and SwitchesLEDs and switches can be controlled using the controller. Four LEDs and four switches are used and connected with port PD0, PD1, PD2, PD3, PD4, PD5, PD6, PD7 respectively. LED glows, if and only if, the line follower, path finder, obstacle detector, edge detector mode works respectively and they are active high. LED’s require 1.5V - 2.3V for the operation.

(v) Motor Driver CircuitryL293D is a dual H-Bridge motor driver, so with one IC two DC motors can be interfaced which can be controlled in both clock-wise and counter clock-wise direction. L293D has output current of 600mA and peak output current of 1.2A per channel. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor driver.

Figure 3: Pin configuration of L293D IC

To control two DC motors chips are designed. For each motor there are two input and two output pins. The diagram with proper connection is shown in the diagram. The PIN 2 and PIN7 are used to control the motor one and pin 9 AND pins 15 are used to control motor B. These pins are connected to microcontroller for perform the desire operation. Pin1 and Pin9 are enable pins. If these pins are not connected to +5V, then motor stops.

Table 4: Signal at Pin 2 and 7 For Rotation of Motor A

Signal at PIN 2 Signal at PIN 7 Rotation of Motor ALowLowHighHigh

LowHighLowHigh

StopClockwiseAnticlockwiseStop

ISSN 2230-7656 (c) MIT Publications

Page 3: MIT International Journal of Electrical and ...mitpublications.org/yellow_images/1362471407_logo_7.pdf · MIT International Journal of Electrical and Instrumentation Engineering,

MIT International Journal of Electrical and Instrumentation Engineering, Vol. 2, No. 2, Aug. 2012, pp. (98-101) 100

III. WORKING AND IMPLEMENTATIONAs in the Figure 4, it is clearly shown that power supply is provided to the system through adaptor (12V, 500 mA). Adaptor is connected to the 7805 Voltage Regulator IC that converts 12V supply to 5V which is required to operate the microcontroller. 5 IR sensors and 5 switches are used in this system. Switches are connected to port D (PD4-PD7) while the sensors are connected to the port A(PA0-PA3) and port B (PB0). LEDs are connected to port D(PD0-PD3). The sensors work as input to the microcontroller. We are using ATMEGA168 microcontroller, the input of sensors is given to it. And for different input we have fixed different steps to be performed by the robot with the help of the programming, which will be done in Embedded ‘C’. And the movement of the robot will be done with D.C. motor and its motion will be controlled with the motor driver (L293D) which will control or move the robot according to the instruction given in the programming. A PBC layout of the above design is shown in Figure 5.

Figure 4: Overall Circuit Diagram

Figure 5: PCB Layour

Figure 6: Snapshot of the model

IV. RESULT AND DISCUSSIONSeveral running tests are made to verify the capability of the robot. The first test run was done by drawing the strip of black line and robot follow a line. In the second test of autonomous path finder obstacle e.g. a block are encountered in the path, robot avoids them by choosing an appropriate path and reach their final destination from initial destination easily. It was found that the robot satisfactorily detected the block. The third test run was done by placing an obstacle e.g. a block. It was found that the robot satisfactorily detected the block.The fourth test run was done and moving the robottowards the edge which it detected and hence changed its route.

V. CONCLUSIONThis paper demonstrates a prototype development of a Microcontroller Based Line Follower Robot (LFR), Edge Detector, Obstacle Avoider and Path Finder Robot (PFR) using IR sensors. One of the basic and most fundamental concepts with this robot based upon microcontroller chips is that it is preprogrammed. Due to these preprogramming robot can sensed the signal in real time from sensor and perform task according to the program which are already fixed. The proposed prototype systems is designed and demonstrated to recognize, understand and modify the actual performance and the movements of the robot following and finding the path by getting information in real time from five IR sensors connected to ATMEGA-168 microcontroller. A computer program is implemented in C-language and also controls the robot autonomously according to the received signals. The system has been tested successfully in indoors.

REFERENCES

[1] Nolfi, S. and Floreano, M.A. (2001), Evolutionary Robotics. The Biology, Intelligence, and Technology of Self-organizing Machines. MIT Press, Cambridge.

ISSN 2230-7656 (c) MIT Publications

Page 4: MIT International Journal of Electrical and ...mitpublications.org/yellow_images/1362471407_logo_7.pdf · MIT International Journal of Electrical and Instrumentation Engineering,

MIT International Journal of Electrical and Instrumentation Engineering, Vol. 2, No. 2, Aug. 2012, pp. (98-101) 101

[2] Ozawa S., Rosenfeld A., “Synthesis of a Road Image as seen from a Vehicle,” Pattern Recognition, 19(2), pp. l23-145, (1986).

[3] S.W. Nawawi, M.N. Ahmad, J.H.S Osman (2008). “Real-Time Control of a Two Wheeled Inverted Pendulum Mobile Robot”, Proceedings of World Academy of Science, Engineering and Technology Volume 29 May 2008.

[4] S. Skaff, G. Kantor, D. Maiwand and A.A. Rizzi, “Inertial Navigation and Visual Line Following for a Dynamical Hexapod Robot,” in Proc. Of IEEE/RSJ Intelligent Robots and Systems, pp. 27-31, 2003.

[5] Anjum Khalique Bhatti, Muhammad Iqbal Bhatti, Kamran Khowaja and Asadullah Shah’, Journal of Advanced Computer Science and Technology Research 1 (2011) 25-35.

[6] Román Osorio C., José A. Romero, Mario Peña C., Ismael López-Juárez’Inteligent Line Follower Mini-Robot System’ International Journal of Computers, Communications &Control’ Vol. I (2006), No. 2, pp. 73-83

[7] Pakdaman, M., Sanaatiyan, M.M.Tabari, Inst. of Babol, Babol, Iran’Design and Implementation of Line Follower Robot’Second International Conference on Computer and Electrical Engineering 2009. ICCEE ’09, 15 January 2010.

[8] Pakdaman, M.; Sanaatiyan, M.M. (2009), “Design and Implementation of Line Follower Robot,” Computer and Electrical Engineering, 2009. ICCEE ‘09. Second International Conference, Vol. 2, No., pp. 585-590, 28-30 Dec. 2009.

[9] Ong, Yin Chee; Abidin, M.S.B. (2006), “Design and Development of Two Wheeled Autonomous Balancing Robot”, Center for Artificial Intell. & Robotic (CAIRO), University Technology Malaysia, Kuala Lumpur. 4th Student Conference on Research and Development (SCOReD 2006), Shah Alam, Selangor, MALAYSIA, 27-28 June, 2006.

[10] Wallace R., Matsuzaki K., Goto Y., CrismanJ., Webb J. & Kanade T., “First Results in Robot Road Following.” Proc. IJCAI, Los Angeles, USA, Aug., (1985).

ISSN 2230-7656 (c) MIT Publications