You are on page 1of 19

NSS COLLEGE OF ENGINEERING

PALAKKAD, KERALA-678008

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING MINI PROJECT REPORT-2011

PHOTOVORE ROBOT
GUIDED BY SUBMITTED BY

Prof. P Nandakumar HOD Dept. ECE

Vignesh J.R Tonoy Kumar Halder Vpin.P Mathew. K. John

NSS COLLEGE OF ENGINEERING


PALAKKAD, KERALA-678008

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE
This is to certify that, this is a bonafide record of the project entitled PHOTOVORE ROBOT done by the team consisting of the following team members.Vignesh J.R, Tonoy Kumar Halder, Vipin.P, Mathew.K. John in partial fulfillment of the requirements for the award of the Degree of B.Tech in Electronics & Communication Engineering under university of Calicut.

Staff in Charge & Guided by

Head Of Dept. Prof.P.NANDAKUMAR HOD Dept. ECE

ACKNOWLEDGEMENT

First of all, we thank the almighty GOD, for granting us the strength, courage and knowledge to complete this project successfully. We express our profound gratitude to Prof. P.NANDAKUMAR Head of the dept, NSSCE for all his guidance and support.

And last but not the least, we express our sincere thanks to all the teaching and non teaching staff of our department, our classmates and family members for their help in the successful completion of this project.

PROJECT TEAM

ABSTRACT
Our project, PHOTOVORE ROBOT is one which follows the visible beam of light. This robot is also known as light chasing robot. The two LDR sections detects the light source. The output from these sections are given to the PIC16F877A microcontroller. Microcontroller then process this information according to the program and generate the corresponding outputs. These outputs switch the relays which controls the motor.

CONTENTS

1. INTRODUCTION 2. BLOCK DIAGRAM 3. BLOCK DIAGRAM DISCRIPTIONS 4. CIRCUIT DIAGRAM 5. CIRCUIT OPERATION 6. PROGRAM 7. APPLICATIONS 8. CONCLUSION 9. REFERENCES

INTRODUCTION
Building a simple and easy microcontroller based robot is always a fascinating topic to be discussed, especially for the robotics newbie enthusiast.Our project, the light chaser robot using the simplest possible circuit for the microcontroller based robot brain, locomotion motor and the sensor. One of the most frustrating parts when building your first microcontroller based robot is to program it and to download it into the microcontroller flash ram. This is the project of a Light Chaser robot. The robot will turn towards the brightest light and move forward chasing or following it. It has two motors (left & right) in order to make the turns.When the light is right in front of the sensors, there will be no shadow and both sensors will be equally illuminated, i.e.: both motors will be running and the robot will move forward. The robot steering use the simple method called the differential drive; when the two servos rotate on the same direction the robot will move forward, and the robot will rotate to left or right when the corresponding motor rotation is restricted.

BLOCK DIAGRAM

BL

L
The si le and cheapest sensor that can be used is a special made resistor (made from Cadmium Sulfide) called Li ht Dependent Resistor or LDR for short The LDR will vary its resistance according to the light intensity fall on its surface; the bright light intensity will make its resistance decrease significantly (about 1K Ohm to 5 K Ohm) while on the completely dark it resistance will s increase as high as 100 K Ohm

MICROCONTROLLER
The microcontroller used here is PIC16F877A. It is an is high performance RISC CPU, with 35- single word instructions. Main features: Low-power, high-speed Flash/EEPROM technology Wide operating voltage range (2.0V to 5.5V) Commercial and Industrial temperature ranges Low-power consumption y Operating speed: DC 20 M z clock input. DC 200 ns instruction cycle

y y y y

1024 words of program memory Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory.

PIN DIAGRAM

RELAY
A rel is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal.

MOTOR
A DC motor is an electric motor that runs on direct current (DC) electricity. The motor used is a 12V brushed DC electric motor that generates torque directly from DC power supplied to the motor by using internal commutation, stationary permanent or electromagnets, and rotating electrical magnets. Advantages of a brushed DC motor include low initial cost, high reliability, and simple control of motor speed.

Liquid Crystal Displays (LCD)


An LCD is a small low cost display. It is easy to interface with a micro-controller because of an embedded controller (the black blob on the back of the board). This controller is standard across many displays (HD 44780) which means many micro-controllers (including the Arduino) have libraries that make displaying messages as easy as a single line of code. The LCD requires 3 "control" lines from the microcontroller. Enable (E) This line allows access to the display through R/W and RS lines. When this line is low, the LCD is disabled and ignores signals from R/W and RS. When (E) line is high, the LCD checks the state of the two control lines and responds accordingly. Read/Write (R/W) This line determines the direction of data between the LCD and microcontroller. When it is low, data is written to the LCD. When it is high, data is read from the LCD. Register select (RS) With the help of this line, the LCD interprets the type of data on data lines. When it is low, an instruction is being written to the LCD. When it is high, a character is being written to the LCD.

CIRCUIT DIAGRAM

CIRCUIT FOR POWER SUPPLY

WORKING
For this to work, the robot needs at least two light detecting sensors, typically photoresistors, in front and spaced apart from each other. One on left side of the robot, the other located on the right side. The microcontroller read the analog value from both sensors. Then do a comparison the sensor that reads more light is the direction the robot should turn. For example, if the left photoresistor reads more light than the right photoresistor, the robot should turn or tend towards the left. If both sensors read about the same value, meaning the both get the same amount of light, then the robot should drive straight.

Here the motor rotation is based on the split brain approach.ie,the right motor is based on light from the left sensor, and the left motor with the data from the right sensor. The human brain to

an extent takes the split brain approach. Both halves of the brain, naturally connected by a nerve called the corpus callosum, share information between each other.

Fig:-Split brain approach

CIRCUIT OPERATION
The main components used in this robot are LDR sensors, PIC16F877A microcontroller, relay, dc motors and LCD display. When light falls on the LDR the resistance of the LDR changes, corresponding to this resistance change some voltage is produced at the output of the sensor circuit. When light incident on the LDR is more a high output voltage (logic 1) is produced at the output. Similarly if the light intensity is less than the output is low (logic 0). The sensor outputs are given to the input port of the microcontroller. The microcontroller will process this data based on the program and give the outputs to the corresponding output ports. These output lines are connected to the relay inputs. When the relay input is high it will connect the 12 v supply to the dc motor. And thus the motor become on. Here the LCD display is used to display the current status of the robot. It displays the direction of motion of the robot. The data transfer to the LCD module take place in the form of nibbles.

PROGRAM
#include "H:\STUDENT PROJECTS\NSSENGG\LIGHTFOLLOWROBO\main.h" #INCLUDE <LCD.C>

#BYTE TRISA=0X85 #BYTE TRISC=0X87 #BYTE TRISD=0X88

#BYTE PORTA=0X05 #BYTE PORTC=0X07 #BYTE PORTD=0X08

#BIT FRONT_LEFT_SEN =0X07.0 #BIT FRONT_RIGHT_SEN=0X07.1 #BIT REAR_LEFT_MOT=0X07.2 #BIT REAR_RIGHT_MOT=0X07.3

void main() { LCD_INIT();

TRISA=0X00; TRISC=0X03;

PORTA=0X00; PORTC=0X00; PORTD=0X00;

LCD_PUTC("\FLIGHT FOLLOW\n"); lcd_putc(" ROBOT ");

delay_ms(1000); lcd_putc("\fROBOT STATUS:READY\n"); lcd_putc("DIRCTN:STOP "); delay_ms(1000);

WHILE(TRUE)

{ IF(FRONT_LEFT_SEN==1 && FRONT_RIGHT_SEN==0) { lcd_gotoxy(8,2); lcd_putc("LEFT "); REAR_RIGHT_MOT=1; REAR_LEFT_MOT=0; delay_ms(100);

IF(FRONT_RIGHT_SEN==1 && FRONT_LEFT_SEN==0) {

lcd_gotoxy(8,2); lcd_putc("RIGHT"); REAR_LEFT_MOT=1; REAR_RIGHT_MOT=0; DELAY_MS(100);

} if(FRONT_RIGHT_SEN==1 && FRONT_LEFT_SEN==1) { lcd_gotoxy(8,2); lcd_putc("STAIT"); REAR_LEFT_MOT=1; REAR_RIGHT_MOT=1; delay_ms(100); } if(FRONT_RIGHT_SEN==0 && FRONT_LEFT_SEN==0) { lcd_gotoxy(8,2); lcd_putc("STOP "); REAR_LEFT_MOT=0; REAR_RIGHT_MOT=0; delay_ms(100); }

} }

APPLICATIONS
The main applications are:
y y y

Photovore robot are used as a smoke detectors. They are also widely used for solar charging.

CONCLUSION
The photovore robot was successfully made. The main constituents of our circuit are PIC16F774A, 16-PIN LCD module, LDR sensors and a motor .The PIC16F774A generates binary codes in accordance with the light beam falling on the LDRs. Motor will be rotating on the basis of these codes. The cost of our product is cheap compared to its benefits.

REFERENCE
Websites:
y www.wikip ia.org

y www. rmicro.com\blog y www.soci ty of robots.com y www.microchip.com

You might also like