Académique Documents
Professionnel Documents
Culture Documents
CLEANER ROBOT
By
Harish Bhute (0178ec091030)
Mukesh Kumar Sharma (0178ec091048)
Nikita Kaushal (0178ec091055)
June 2012
i
DECLARATION
We, Harish Bhute , Mukesh Kumar Sharma, and Nikita Kaushal the
students of Bachelor of Engineering
ii
CERTIFICATE
This is to certify that the work embodied in this Minor Project entitled IR
Obstacle Detector With Vacuum Cleaner has been satisfactorily completed by the
students of final year, Mr. Harish Bhute, Mr. Mukesh Kumar Sharma, and Miss.
Nikita Kaushal. The work was carried out satisfactorily under the supervision and
guidance of the undersigned in the Department of Electronics and Communication
Engineering, Jai Narain College of Technology and Science, Bhopal for the partial
fulfillment of the requirement of degree of Bachelor of Engineering during the
Academic year 2011-2012.
Approved
Prof. Ashok Agrawal
Dr. B D Shukla
Head of Department
Director
iii
ACKNOWLEDGEMENT
This gives us a great pleasure to express our deep sense of gratitude to our
project supervisor Prof. Amit Sawaskade, Associate Professor of Electronics and
Communication Engineering for guidance, suggestion, support, help and
constructive criticisms throughout the period of project work. Without his able
guidance it would not have been possible to complete the project in time.
We are greatly indebted to Prof. Ashok Agrawal, Head, Department of
Electronics and Communication Engineering for his keen interest in this work and
time to time guidance, encouragement and providing required facilities for
completing the project work. We are grateful to Dr. Meghna Dubey, Principal,
JNCTS for his guidance and critical comments which improved the quality of
this report. Thanks are due to Dr. B D Shukla, Director, JNCTS for providing
necessary help and time to time necessary guidance in completion of this task.
Then other faculty members, friends, etc, may be added accordingly in the
acknowledgement to which the students want to acknowledge for their help and
guidance in the project.
iv
CONTENTS
DECLARATION
ii
CERTIFICATE
iii
ACKNOWLWEDGEMENTS
iv
1. INTRODUCTION
01
2. REWVIEW OF LITERATURE
05
2.1
Construction
07
2.1.1
Hardware Unit
07
2.1.2
Software Unit
13
29
2.2.1
Sensors
29
2.2.2
Microcontroller
29
2.2.3
Driver
30
2.2.4
Motors
30
2.2.5
Blower
31
2.2
2.3
31
2.4
Testing
32
2.5
Applications
33
2.6
33
3. COMPONENTS
34
3.1
Microcontroller ATMEGA8L
35
3.2
IC L293D
36
3.3
IC LM324N
37
3.4
IC 7805
38
3.5
Resistor
38
3.6
IR LED
39
3.7
Photodiode
40
4. RESULTS
41
5. REFERENCES
... 42
6. APPENDICES
43
6.1
Datasheet
43
6.2
Program
48
LIST OF FIGURS
Figure 2.1
... 06
Figure 2.2
IR Sensor circuit
... 10
Figure 2.3
Controller Circuit
... 12
Figure 2.4
18
Figure 2.5
... 19
Figure 2.6
... 20
Figure 3.1
Microcontroller ATMEGA8L
... 35
Figure 3.2
IC L293D
... 36
Figure 3.3
IC LM324N
37
Figure 3.4
IC 7805
38
Figure 3.5
Resistor
39
Figure 3.6
IR LED
39
Figure 3.7
Photodiode
40
Figure 6.1
45
Figure 6.2
46
Figure 6.3
47
Figure 6.4
48
1.
INTRODUCTION
first sensor often incorporated into a mobile robot is a distance sensor, which is
usually in the form of an infrared or ultrasonic sensor. In both cases, a pulse (of
light or sound) is sent and its reflection is timed to get a sense of distance. Usually
these values are sent to the controller many times each second.
Robot Shop offers a wide variety of sensors applicable to almost any
robotics project. If you are looking for a distance sensor, we offer them in a
variety of configurations and optimal distances to suit almost any budget. If you
are looking for a more professional solution for measuring distances, take a look
at our selection of scanning laser rangefinders, which are able to scan over >180
degrees (and less than 1 degree of accuracy) in well under 1 second.IR Pair is
used as sensor to detect the presence of objects. IR LED is used for detecting
objects.
In this project mainly when ever robot senses any obstacle
automatically diverts its position to left or right and follows the path. Robot
consists of two motors, which control the side pair wheels of each and help in
moving forward and backward direction. Robot senses the object with help of
obstacle sensor. IR pair is used for detecting the obstacle. The two basic parts for
working with IR are the emitter and the detector. The emitter is typically an LED
that emits near-infrared light.
Infrared (IR) light is electromagnetic radiation with a wavelength
longer than that of visible light, measured from the nominal edge of visible red
light at 0.74 micrometers (m), and extending conventionally to 300 m. These
wavelengths correspond to a frequency range of approximately 1 to 400 THz, and
include most of the thermal radiation emitted by objects near room temperature.
Microscopically, IR light is typically emitted or absorbed by molecules when they
change their rotational-vibration movements.
Infrared light is used in industrial, scientific, and medical applications.
Night-vision devices using infrared illumination allow people or animals to be
observed without the observer being detected. In astronomy, imaging at infrared
wavelengths allows observation of objects obscured by interstellar dust. Infrared
02
Imaging cameras are used to detect heat loss in insulated systems, observe
changing blood flow in the skin, and overheating of electrical apparatus.
IR LED IR detectors are specially filtered for Infrared lighted are not
good at detecting visible light. On the other hand, photocells are good at detecting
yellow/green visible light, not well at IR light.
IR detectors have a demodulator inside that looks for modulated IR at
38 KHz. Just shining an IR LED wont be detected, it has to be PWM blinking at
38KHz. Photocells do not have any sort of demodulator and can detect any
frequency (including DC) within the response speed of the photocell (which is
about 1KHz).
and output low (0V) or they do not detect any and output high (5V). Photocells
act like resistors, the resistance changes depending on how much light they are
exposed to.
A photodiode is a type of photo detector capable of converting light
into either current or voltage, depending upon the mode of operation. The
common, traditional solar cell used to generate electric solar power is a large area
photodiode.
Photodiodes are similar to regular semiconductor diodes except that
they may be either exposed (to detect vacuum UV or X-rays) or packaged with a
window or optical fiber connection to allow light to reach the sensitive part of the
device. Many diodes designed for use specifically as a photodiode use a PIN
junction rather than a p-n junction, to increase the speed of response. A
photodiode is designed to operate in reverse bias. In this project we develop a
robot such that it will be moving according to path assigned to it if at all there is
any obstacle in between then the robot stops and change its direction. This sort of
project is very much useful in the industries where the automated supervision is
required.
This project is basic stage of any automatic robot. This robot has
sufficient intelligence to cover the maximum area of provided space. It has a
infrared sensor which are used to sense the obstacles coming in between the path
of robot. It will move in a particular direction and avoid the obstacle which is
coming in its path.
03
04
2. REVIEW OF LITERATURES
This robot has sufficient intelligence to cover the maximum area of
provided space. It has an infrared sensor which is used to sense the obstacles
coming in between the path of robot. It will move in a particular direction and
avoid the obstacle which is coming in its path.
It uses IR (Infra Red) sensors and two IR transmitting circuitry. When
the obstacle comes in path of robot IR beam is reflected from the obstacle then
sensor gives zero voltage to c. This zero voltage is detected then c decides to
avoid the obstacle by taking left or right turn. If the sensor gives +5v to c that
means there is no obstacle present in its path so it goes straight until any obstacle
is detected.
The two IR transmitter circuits are fitted on front and left side of
robot. The two IR sensors are placed near to transmitters IR LEDs. The
connections can be given from main circuit to sensors using simple twisted pair
cables. Two motors namely right motor and left motor are connected to driver IC
(L293D). L293D is interface with c. Micro-controller sends logic 0 & logic 1 as
per the programming to driver IC which moves motors forward or reverse
direction.
Now let us see all the things in our project.
05
06
2.1
Construction
Hardware Unit
The hardware part includes the structure of robot that is Electronics and
Communication structure, PCB (printed circuit board), blower, and battery. In this
unit all the connections are being made along with the PCB now let us see in brief
how it can be done.
2.1.1.1
PCB Connection
The PCB is printed circuit board having circuit made with cooper
layer on the plate there are various steps to design a PCB for that the basic thing
required is circuit. So, the circuits required for the system are:
07
2.1.1.2.1 IR Sensor Circuit
An infrared sensor is an electronic device that emits and/or detects infrared
radiation in order to sense some aspect of its surroundings. Infrared sensors can
measure the heat of an object, as well as detect motion. Many of these types of
sensors only measure infrared radiation, rather than emitting it, and thus are
known as passive infrared (PIR) sensors.
All objects emit some form of thermal radiation, usually in the infrared
spectrum. This radiation is invisible to our eyes, but can be detected by an
infrared sensor that accepts and interprets it. In a typical infrared sensor like a
motion detector, radiation enters the front and reaches the sensor itself at the
center of the device. This part may be composed of more than one individual
sensor, each of them being made from piezoelectric materials, whether natural or
artificial.
IR Sensor includes photodiode and IR LED which play the role of
receiver and transmitter respectively.
2.1.1.2.1.1 IR LED
An IR LED, also known as IR transmitter, is a special purpose LED that transmits
infrared rays in the range of 760 nm wavelength. Such LEDs are usually made of
gallium arsenide or aluminum gallium arsenide. They, along with IR receivers, are
commonly used as sensors.
The appearance is same as a common LED. Since the human eye
cannot see the infrared radiations, it is not possible for a person to identify
whether the IR LED is working or not, unlike a common LED. To overcome this
problem, the camera on a cell phone can be used. The camera can show us the IR
rays being emanated from the IR LED in a circuit.
08
2.1.1.2.1.2 Photodiode
A photodiode is a type of photo detector capable of converting light into either
current or voltage, depending upon the mode of operation. The common,
traditional solar cell used to generate electric solar power is a large area
photodiode. It is use to sense the reflected IR rays which reflect due to presence of
obstacle and due to it robot change its path.
This sensor uses IR (Infra Red) sensors and two IR transmitting
circuitry. When the obstacle comes in path of robot IR beam is reflected from the
obstacle then sensor gives zero voltage to c. This zero voltage is detected then
c decides to avoid the obstacle by taking left or right turn. If the sensor gives
+5v to c that means there is no obstacle present in its path so it goes straight
until any obstacle is detected. The sensor circuit is shown in figure 2.2.
It uses IR (Infra Red) sensors and two IR transmitting circuitry.
When the obstacle comes in path of robot IR beam is reflected from the obstacle
then sensor gives zero voltage to c. This zero voltage is detected then c decides
to avoid the obstacle by taking left or right turn. If the sensor gives +5v to c that
means there is no obstacle present in its path so it goes straight until any obstacle
is detected.
The two IR transmitter circuits are fitted on front and left side of
robot. The two IR sensors are placed near to transmitters IR LEDs. The
connections can be given from main circuit to sensors using simple twisted pair
cables.
09
10
After having the circuit it is easy to design PCB. Circuit is traced in PCB by using
different software here we have used PCB Express software to design layout then
it is etched and further the component are soled in it.
2.1.1.2.2 Controller Circuit
A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer
on a single integrated circuit containing a processor core, memory, and
programmable input/output peripherals.
Microcontrollers are used in automatically controlled products and
devices, such as automobile engine control systems, implantable medical devices,
remote controls, office machines, appliances, power tools, toys and other
embedded systems. By reducing the size and cost compared to a design that uses a
separate microprocessor, memory, and input/output devices, microcontrollers
make it economical to digitally control even more devices and processes. Mixed
signal microcontrollers are common, integrating analog components needed to
control non-digital electronic systems.
Here we are giving code to Microcontroller according to those codes
our robot move; these codes are created by programming logic in Keil software
and latter burn in microcontroller by flash magic software. These codes control
the motor by the logic of 0 and by logic 1 and through this direction of robot is
control.
But for the purpose of providing this logic to motor we use an IC that
is L293D Having 16 pin it get input by output of microcontroller this make robot
an intelligent or autonomous robot this IC also amplifies the current and provide
to motor .
11
12
After having the circuit it is easy to design PCB. Circuit is traced in PCB by using
different software here we have used PCBExpress software to design layout then
it is etched and further the component are solded in it.
Now when all the PCBs are connected according to required condition
and the electro-Electronics and Communication structure is ready still the system
will not work without software unit.
Let us discuss the software unit.
2.1.2
Software Unit
1. Choose a method to use for creating the PCB. Your choice will usually be based
on the availability of materials needed by the method, the technical
13
Difficulty level of the method or the quality of PCB you desire to obtain. Here's a
brief summary of the diff- availability of many materials such as the etchant and
it is somewhat slow. The quality of PCB obtained varies according to the
materials you use but generally, it is a good method for simple to intermediate
levels of complexity circuits. Circuits involving more close wiring and tiny wires
usually use other methods.
3. UV etching method: this method requires more expensive materials that might
not be available everywhere. However, the steps are simple; it requires less safety
measures and can produce finer and more complicated circuit layouts.
4. Mechanical etching/routing method: this method requires special machines that
will mechanically etch away unnecessary copper from the board or route empty
separators between wires. It can be expensive if you intend to buy one of those
machines and usually leasing them requires the availability of a workshop nearby.
However, this method is good if you need to create many copies of the circuit and
also can produce fine PCBs.
5. Laser etching method: this is usually used by large production companies, but
can be found on some universities. The concept is similar to mechanical etching
but LASER beams are used to etch the board. It is usually hard to access such
machines, but if your local university is one of the lucky ones having such
machine, you can use their facilities if they allow it.
3. Shortcut
14
2 .
Make sure you gathered all the materials needed by the method of your
choosing.
3. Draw the circuit layout on the copper coated board. This is only applicable in
the first two methods. More details can be found on the detail section of your
method of choice.
4 . Etch the board. Look for the details sections for how to etch the board. This
process removes any unnecessary copper from the board leaving only wiring of
the final circuit.
5 . Drill mounts points. Drilling machines used for that are usually custom
machines designed specifically for this purpose. However, with some adjustments
a usual drilling machine will do the job at home.
6 . Mount and solder the electronic components on board.
2.1.2.2 Acid etching method specific steps
1 . Choose your etching acid. Ferric chloride is a common choice for an etchant.
However, you can use Ammonium Per sulfate crystals or other chemical
solutions. No matter what choice for the chemical etchant, it will always be a
dangerous material, so besides following the general safety precautions mentioned
in this article, you should also read and follow any additional safety instructions
that come with the etchant.
2 . Draw the PCB layout. For acid etching, you need to draw the circuitry using
an etchant resistant material. Special markers can be found easily for this specific
purpose if you intend to do the drawing by hand (not appropriate for medium to
large circuits). Laser printers' ink is the most commonly used material however.
The steps to use laser printers for drawing the circuit layout are as follows:
1 . Print the PCB layout on a glossy paper. You should ensure the circuit is
mirrored before doing that (most PCB layout programs have this as an option
when printing). This only works using a laser printer.
2 . Put the glossy side, with the printing on it, facing the copper.
3 . Iron the paper using an ordinary clothes iron. The amount of time this will
take depends on the type of paper and ink used.
15
4 . Immerse the board and paper in hot water for a few minutes (up to 10
minutes).
5 . Remove the paper. If certain areas seem particularly difficult to peel off, you
can try soaking a bit more. If everything went well, you will have a copper board
with your PCB pads and signal lines traced out in black toner.
6. Prepare the acid etchant. Depending on the acid etch that you choose, there
might be additional instructions. For example, some crystallized acids require
being dissolved in hot water, but other etchants are ready to use.
7 . Submerge the board in the acid.
8 . Make sure to stir every 3-5 minutes.
9. Take the board out and wash it when all unnecessary copper is etched away
from the board.
10. Remove the insulating drawing material used. There are special solvents
available for almost all types of insulating drawing material used in drawing PCB
layouts. However, if you don't have access to any of these materials, you can
always use a sand paper (a fine one).
PCB Express
For designing of PCB layout we are using this software with the help
drawn in PCB Express software and of it only upper layer that is copper layer is
chosen to provide proper connectivity in circuit. Hence we get two PCB layout of
sensor and controller both
16
Figure 2.3 shows PCB layout of IR sensor, figure 2.4 shows PCB layout of
controller circuit.
Steps to design PCB are:
1. Fire up Express SCH.
2. You will see a Welcome to Express PCB .. screen. You may go through
the quick start guide, but if you are reading this, that wont be necessary Click
Ok.
3. Well first need to place some components. Say we want to make a Voltage
Regulator circuit.
4. Click on the component and symbol manager that is. the button to which I
have shown an arrow pointing
5. Youll see the above window. Click
17
18
19
20
2.1.2.4
Keil Software
Keil was founded in 1982 by Gnter und Reinhard Keil, initially as a
German GbR. In April 1985 the company was converted to Keil Elektronik GmbH to
market add-on products for the development tools provided by many of the silicon
vendors. Keil implemented the first C compiler designed from the ground-up specifically
for the 8051 microcontroller.
window. Your project usb.prj will be active. Click on Project and confirm usb.prj
is visible.
21
2.1.2.5 CREATING A NEW SOURCE CODE FILE
The pathname for this file (example.c) is c:\c51eval\examples\tutorial\example.c.
Type this program in
if you do not have this directory: This tutorial needs example.c in c:\c51eval\bin.
1) Do this step if you do not have the source. Open the File menu and choose
New to go to the Vision integrated editor. Use the editor to type in example.c .
When you have entered the file, do a save as to the c:\c51eval\bin directory. The
filename should be example.c . This will keep things easy to follow.
2) If you have the source code as a file, choose Open and get example.c in the
usual fashion. Source code. This sample program uses a number of simple C
source lines to demonstrate the Keil tool set.
3) Open the File menu and choose Save as. Save this file in the indicated
directory. This tutorial uses the directory: c:\c51eval\bin and the filename
example.c. Normally your project and source code would be in a directory of your
choosing.
4) At this point you have created a project called usb.prj and a C source file
called example.c.
The next step is to build your project. This includes compiling,
assembling, linking and locating and creating the hex file. The hex file would be
programmed into an EPROM and is not used here.
2.1.2.6
1) Open the Project menu and choose Edit Project. This is where you add various
files to your project. Note there are no files in the project yet.
2) Choose Add. This is where you add the files to your project.
3) Select the file: example.c and press Enter.
4) Choose Add then Close. Example.c will be listed in the Source Files window.
5) Make sure Include in Link/Lib is checked.
6) Choose Save.
22
With the tool configured, you are ready to run the compiler and linker using the
Make utility.
1. Click on the Build All icon (it has three arrows pointing downwards) or open
Options and select
Make.
If the program specified (example.c) has any errors; they will appear on the
screen. Use the editor to correct the error(s) in the source code and save the file.
You can double-click on the error of interest and Vision will take you to the
offending line in the source code. You can edit this line and rebuild the project by
repeating this section: beginning at step 1.
If there are no errors, the code is assembled and linked with the executable code
ready to be downloaded to the board. The Project Status window will state Make
Successful - HEX File Created if everything is working properly. Continue to the
next section.
The following files in the directory \bin are associated with this
project:
example.c original source file - needed for debugging purposes.
example.bak a backup file produced by Vision.
example.lst a listing file of the source example.
example.obj a relocatable object file. Needs to be linked.
usb.prj the Project File. Note that the output code assumes the name of the
project file.
usb.m51 map file.
usb.hex Intel Hex File Created by the Object to Hex Converter oh51.exe.
usb absolute object file with debugging information (if so set in the compiler
option)
This file is the input for the Keil simulator dScope and emulators. This
file is created by the linker.
23
2.1.2.7
Compiler
Added support for the AVR Studio 5.1 and Atmel Studio 6 debuggers in
Added support for the SSD1963 color TFT graphic controller (Advanced
license required)
license required)
Added function's memory address and size list to the .map file
header files for the SED1530, SPLC501C, ST7735 graphic LCD controllers.
24
the header file glcd_uc1701.h for the UC1701 graphic LCD controller
rev132_x0 in the header files for the SED1530, SPLC501C, ST7735, UC1701
graphic LCD controllers
files for the SED1530, SPLC501C, ST7735, UC1701 graphic LCD controllers
obtained even for low clock frequencies. Added a warning if the clock frequency
is too low and the desired delay can't be obtained.
Added the SCAN (XMEGA ADC channel scan register) member to the
Fixed: the strlcpy and strlcpyf functions (string.h) should copy maximum
n-1 characters.
CodeWizardAVR
LCD Vision
Added scrollbars to LCD preview if the image doesn't fit in the docking
panel
Fixed: Image inverting was functional only for text inserting mode
Chip Programmer
chips, which lead to programming failure when using parallel port, STK500 and
AVR910 programmers.
Enhanced the expression optimizer for cases when ANSI char to int
as function argument
Added 102x64 display support for the ST7565 graphic LCD controller
MMC/SD/SD HC Card
menu to allow SD card sockets without a /CD signal to be used
Improved the twi_init function (twi.h) for better handling recovery after a
bus conflict
Modified the snprintf, vsnprintf functions (stdio.h) so that they will return
the number of characters that would have been output, had the buffer been big
enough (as required by C99). Previous versions returned the number of characters
effectivelly written in the buffer (limited by the buffersize)
Xmega chips
file
CodeWizardAVR
graphic LCDs, only if the Use Image Storage in External Memory option is
enabled
Fixed: for XMega chips the peripheral clock frequency (not the system
27
Fixed: for XMega chips, in certain situations when using the differential
input mode, the ADC positive and negative input selections were reset to 0, when
switching the settings display between ADCA and ADCB
Fixed: for the ATtiny2313/4313 chips, when the Timer 0 OC0B output was
LCD Vision
Chip Programmer
Fixed: the WDP and WDWP Xmega fuse bits state was not correctly saved
in the project file, when the option to program the chip after build was enabled
Fixed: the Xmega D chips don't have the JTAGEN fuse. The JTAGUID
2.1.2.9
Algorithm
29
2.2.3 Driver
L293D is used as driver IC. Motors are connected to this IC. According to
program in c it drives the left and right motor. L293D is a dual H-bridge motor
driver integrated circuit (IC). Motor drivers act as current amplifiers since they
take a low-current control signal and provide a higher-current signal. This higher
current signal is used to drive the motors.
L293D contains two inbuilt H-bridge driver circuits. In its common
mode of operation, two DC motors can be driven simultaneously, both in forward
and reverse direction. The motor operations of two motors can be controlled by
input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the
2.2.5 Blower
Blowers for ventilation and for industrial processes that need an air flow. Fan
systems are essential to keep manufacturing processes working and consist of a
fan, an electric motor, a drive system, ducts or piping, flow control devices, and
air conditioning equipment (filters, cooling coils, heat exchangers, etc.).
Fans, blowers and compressors are differentiated by the method used
to move the air, and by the system pressure they must operate against. Blowers
can achieve much higher pressures than fans, as high as 1.20 kg/cm 2. They are
also used to produce negative pressures for industrial vacuum systems.
2.3
Although the concept & design of the project seemed perfect, there were
some problems faced while actual implementation:
2.3.1 Proving Proper Power to different circuit
Solution: taking high precaution in designing of circuit.
2.3.2 Availability of Burner
Solution: as burner kit is not easily available, so we have design & implement hardware
for burn the IC.
31
2.4
Testing
There is always necessary to check the work for that here we have
Continuity test
First of all we checked the PCB that all the tracks are as per the design
of PCB and showing continuity with the help of multimeter and PCB layout.
2.4.2
Soldering
In the next step, we soldered the required components. And then
checked that there are no any unwanted shorts occurred due to soldering without
putting IC's and keeping power supply off.
2.4.4
points i.e.+Vcc and GND at the respective points. We took care of not connecting
IC's in the circuit while performing this test.
2.4.5
Microcontroller test
For testing the microcontroller, we wrote the square wave generation
program for generating square wave on each port pin. Then we fed the program in
microcontroller and checked the output with the help of CRO by connecting the
microcontroller in the circuit. We took care of not connecting any other IC in the
circuit.
32
2.5
Applications
2.6
33
3. COMPONENTS
An electronic component is a basic electronic element that is available in a
discrete form (a discrete device or discrete component) that has two or more
electrical terminals (or leads). These leads connect, usually soldered to a printed
circuit board, to create an electronic circuit (a discrete circuit) with a particular
function (for example an amplifier, radio receiver, or oscillator). Basic electronic
components may be packaged discretely, as arrays or networks of like
components, or integrated inside of packages such as semiconductor integrated
circuits, hybrid integrated circuits, or thick film devices. The following list of
electronic components focuses on the discrete version of these components,
treating such packages as components in their own right.
So the components used in our project are:
1. Microcontroller ATMEGA8L
2. IC 293D
3. IC LM324N
4. IC 7805
5. Potentiometer 20k
6. Resistor 1k ohm
7. IR LED
8. Photo diode
9. Battery
10. Soldering wire
Let us discuss all components in brief
34
ATMEGA8L Features:
High-performance, Low-power AVR 8-bit Microcontroller Advanced RISC
Architecture
130 Powerful Instructions Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Nonvolatile Program and Data Memories
8K Bytes of In-System Self-Programmable Flash
In-System Programming by On-chip Boot Program
Special Microcontroller Features
Power-on Reset and Programmable Brown-out Detection
Internal Calibrated RC Oscillator
External and Internal Interrupt Sources
35
I/O and Packages
23 Programmable I/O Lines
28-lead PDIP, 32-lead TQFP, and 32-pad MLF
Operating Voltages 2.7 - 5.5V (ATmega8L)
3.2 IC L293D
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act
as current amplifiers since they take a low-current control signal and provide a
higher-current signal. This higher current signal is used to drive the motors.
3.3
IC LM324N
LM324 is a 14pin IC consisting of four independent operational amplifiers (opamps) compensated in a single package. Op-amps are high gain electronic voltage
amplifier with differential input and, usually, a single-ended output. The output
voltage is many times higher than the voltage difference between input terminals
of an op-amp.
These op-amps are operated by a single power supply LM324 and need
for a dual supply is eliminated. They can be used as amplifiers, comparators,
oscillators, rectifiers etc. The conventional op-amp applications can be more
easily implemented with LM324.
37
3.4 IC 7805
Fixed voltage Positive and Negative regulator ICs are used in circuits to give
precise regulated voltage.78 XX series regulator IC can handle maximum 1
ampere current. The Regulator ICs require minimum 1.5 higher input voltage than
their voltage rating. For example 7805 IC requires minimum 6.5 volts to give 5
volt output. Here are some circuit designs of IC 7805 to monitor the output
voltage.
3.5 Resistor
A resistor is a passive two-terminal electrical component that implements
electrical resistance as a circuit element. The current through a resistor is in direct
proportion to the voltage across the resistor's terminals. Thus, the ratio of the
voltage applied across a resistor's terminals to the intensity of current through the
circuit is called resistance.
V= IR
where I is the current through the conductor in units of amperes, V is
the potential difference measured across the conductor in units of volts, and R is
the resistance of the conductor in units of ohms. More specifically, Ohm's law
states that the R in this relation is constant, independent of the current.
38
Resistors are common elements of electrical networks and electronic
circuits and are ubiquitous in electronic equipment. Practical resistors can be
made of various compounds and films, as well as resistance wire (wire made of a
high-resistivity alloy, such as nickel-chrome). Resistors are also implemented
within integrated circuits, particularly analog devices, and can also be integrated
into hybrid and printed circuits.
3.6
IR LED
3.7 Photodiode
A photodiode is a type of photo detector capable of converting light
into either current or voltage, depending upon the mode of operation. The
common, traditional solar cell used to generate electric solar power is a large area
photodiode.
40
4. RESULTS
Thus, we believe that our project will be beneficial for various purposes & hence
our efforts will be fruitful. So, we made a successfully obstacle detector robot
having application of vacuum cleaner which have ability to move freely anywhere
and along with it, it have ability to create its own path and it avoid obstacle by
artificial intelligence provided by programming in microcontroller to perform
action and IR sensor to sense the obstacle, it also clean the area where it move
with vacuum cleaner which is its application.
41
5. REFERENCES
1. "Atmels Self-Programming Flash Microcontrollers" by Odd Jostein
Svendsli 2003
2. http://www.semico.com
3. Heath, Steve (2003). Embedded systems design. EDN series for design
engineers (2 ed.). Newnes. pp. 1112. ISBN 9780750655460.
42
6. APPENDICES
6.1
Datasheet
6.1.1 ATMEGA8L
6.1.2 IC 7805
6.1.3 IC LM324N
6.1.4 IC 293D
6.1.1 ATMEGA8L
1. Introduction
512Bytes EEPROM
Peripheral Features
Capture
43
2. Mode
and
5. Standby
Operating Voltages
Speed Grades
0 - 8MHz (ATmega8L)
0 - 16MHz (ATmega8)
Active: 3.6mA
6. 8-bit
7. with 8KBytes
8. In-System
9. Programmable
10. Flash
45
6.1.3 IC LM324N
Internally frequency-compensated for unity gain
Large DC voltage gain: 100dB
Wide bandwidth (unity gain): 1MHz (temperature-compensated)
Wide power supply range Single supply: 3VDC to 30VDC or dual
Supplies: 1.5VDC to 15VDC
Very low supply current drain: essentially independent of supply
Voltage (1mW/op amp at +5VDC)
Low input biasing current: 45nADC (temperature-compensated)
Low input offset voltage: 2mVDC and offset current: 5nADC
Differential input voltage range equal to the power supply voltage
Large output voltage: 0VDC to VCC-1.5VDC swing
46
6.1.4 IC 293D
Terminations: 100 % matte tin, standard, tin/lead available
Compliant terminations
Molded case available in six case codes
Compatible with High Volume automatic pick and place equipment
Optical character recognition qualified
Meets IEC specification QC300801/US0001 and
EIA535BAAC mechanical and performance requirements
Compliant to RoHS Directive 2002/95/EC
Moisture sensitivity level 1
47
6.2
Program
#include <mega8.h>
#include <delay.h>
// Declare your global variables here
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port B initialization
// Func7=In Func6=In Func5=In Func4=Out Func3=Out Func2=Out Func1=Out
Func0=In
// State7=T State6=T State5=T State4=0 State3=0 State2=0 State1=0 State0=P
PORTB=0x01;
DDRB=0x1E;
// Port C initialization
// Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTC=0x00;
DDRC=0x00;
48
// Port D initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In
Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=P State0=P
PORTD=0x03;
DDRD=0x00;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=0x00;
TCNT0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer 1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer 2 Stopped
// Mode: Normal top=FFh
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// External Interrupt(s) initialization
// INT0: Off
49
// INT1: Off
MCUCR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;
while (1)
{
if(PIND.0==1)
{
PORTB.1=1,PORTB.2=0,PORTB.3=1,PORTB.4=0;
delay_ms(100);
}
else
{
PORTB.1=0,PORTB.2=0,PORTB.3=0,PORTB.4=0;
delay_ms(400);
PORTB.1=0,PORTB.2=1,PORTB.3=0,PORTB.4=1;
delay_ms(300);
PORTB.1=0,PORTB.2=1,PORTB.3=1,PORTB.4=0;
delay_ms(400);
}
}
}
Chip type
Program type
Clock frequency
Memory model
External SRAM size
Data Stack size
: ATmega8L
: Application
: 1.000000 MHz
: Small
:0
: 256
50