Professional Documents
Culture Documents
1. INTRODUCTION
2. PREVIOUS WORKING
3. PRINCIPLE OF WORKING
4. CIRCUIT DESCRIPTION
5 PROGRAMMING
8 LIMITATIONS
9 METHODOLOGY
DECLARATION
I the undersigned solemnly declare that the report of the project work entitled
“Infrared Light Detector”is based on my own work carried out during the course of my study under
the supervision of Prof. Miss Shradhha Tiwari.
I assert that the statements made and conclusions drawn are an outcome of my research work.
I further declare that to the best of my knowledge and belief the report does not contain any part of
any work which has been submitted for the award of PhD degree or any other
degree/diploma/certificate in this University or any other University.
This is to certify that the report submitted is an outcome of the project work entitled
“Infrared Light Follower” carried out by Chandresh Kumar Baghel, Medhavi Mahobe,
Meenketan Rathore, Prawesh Kumar Mandavi bearing Roll No. 3072806007, 3072806018,
3072806019 ,3072806027 respectively under my guidance and supervision for the award of
Degree of Bachelor in Engineering in Electronics and Telecommunication of Chhattisgarh Swami
Vivekanand Technical University, Bhilai (C.G.), India
iii) Fulfils the requirement of the Ordinance relating to the B.E. degree of the University and
----------------------------------
(Prof Miss Shradhha Tiwari)
Dept. of ET&Tc
Govt. Engineering College
Bilaspur (C.G.),495009
The project work as mention above is hear by being recommended and forwarded for
examination and evaluation .
---------------------------------
(Sign of Head of the Dept. with seal)
INTRODUCTION
1.INTRODUCTION
The robots of the movies, such as C-3PO and the Terminator are portrayed
asfantastic, intelligent, even dangerous forms of artificial life. However, robots of today
arenot exactly the walking, talking intelligent machines of movies, stories and our dreams.
But still the robots of today are no way close to what our movies portray them to be.
This is not only due to drawbacks in processor technology, but also in various other fields
such as vision, motor control so and so forth. Robots are now working in dangerous places,
such as nuclear disposal, space explorers, fire fighting, etc.
Robots have the potential to change our economy,our health,our standard of living,our
knowledge and the world in which we live. As the technology progresses, we are finding new
ways to use robots.Each new use brings new hope and possibilities, but also potential dangers
and risks.Robotics is not only a science,but it is also an art.The bots we build reflect the ideas
and personalities we portray. There are many different versions of robots that can be made.
From turtle bots to vehicles like the Mars rovers to rovers like R2D2. From walkers that have
anywhere from 1 to 10 legs to robotic arms to androids. Whatever you can dream you can
create . The level of expertise you want your robot to have and how much learning and
research you want to do is up to you. For those who have relative experience in computer
programming and electronics, this may come easier to you than anyone new to the hobby.
Those who build models, RC vehicles, and other art work will find it challenging to modify
some of their previous projects.
We have seen how ants always travel in a line, following an invisible route in search
of food, or back home. How on roads we follow lanes to avoid accidents and traffic jams.
Ever thought about a robot which follows line? A perfect or near perfect mimic of mother-
nature? After all the purpose of robotics is to recreate in terms of machines what we see
around to solve a problem or fulfill a requirement.
In case the robot was of track before entering and intersection, any one of the
sidesensors, will sense the intersection earlier than other and hence the robot will decide a
turn.
Robots can be programmed to perform very useful, detailed, and difficult tasks; they
are. Some tasks are impossible for humans to perform quickly and productively. For instance,
imagine trying to solder 28 filament wires to a 1/4in square sliver of silicon in 2 s to make an
integrated circuit chip. It’s not very likely that a human would be able to accomplish this task
without a machine. But machine task performance,as impressive as it is, isn’t intelligence.
PREVIOUS WORKING
2.PREVIOUS WORKING:
• Gurenteed Teleop
We know that the wavelength of visible light is given by 4000-7000 A,using this
fact every light emmiting object emits the light in range,if the light will come under the
analog optical sensors area the the microcontroller store the intensity in its memory and it
will make offset to this wavelength.
The sensors used are silicon phototransistors and Cadmium Sulfide (CdS)
photocells. Both of these sensors allow less current to flow when they are dark than when
lighted. Phototransistors change their conductance while photocells change their resistance
depending on the intensity of the light falling on them.
All of the detectors on this page use LM339 Quad or LM393 dual voltage
comparator integrated circuits to detect the change in voltage across the sensor. For
information on Voltage Comparators please see the Voltage Comparator Information page at
this site. All of the circuits on this page are configured to have the LED's turn on when the
sensor element is dark (covered by a train.) The LED's can also be made to turn off when a
train is detected. The supply voltage for the circuits is specified as 12 volts but this can be
changed if needed. In some cases the values of some resistors may have to be adjusted to
compensate. If the emitter and detector (aka phototransistor) are not blocked, then the output
on pin 2 of the 74LS14 will be high (apx. 5 Volts). When they are blocked, then the output
will be low (apx. 0 Volts). The 74LS14 is a Schmitt triggered hex inverter. A Schmitt trigger
is a signal conditioner. It ensures that above a threshold value, we will always get "clean"
HIGH and LOW signals. Not Blocked Case: Pin 2 High Current from Vcc flows through the
detector. The current continues to flow through the base of Q2. Current from Vcc also flows
through R2, and Q2's Drain and Emitter to ground. As a result of this current path, there will
be no current flowing through Q1's base. The signal at U1's pin 1 will be low, and so pin 2
will be high. Blocked Case: Pin 2 Low Current "stops" at the detector. Q2's base is not turned
on. The current is re-routed passing through R2 and into the base of Q1. This allows current
to flow from Q1's detector and exiting out Q1's emitter. Pin 1 is thus high and pin 2 will be
low.
4.CIRCUIT DESCRIPTION:-
figure 1.1
PROGRAMMING:-
The programming for the project is is to be done in embedded ‘c’ language which generate a
hex code which is to be feed in microcontroller using the serial port DB9,we use amediator
language microvision for executable to hex code generation.We know that the
microcontroller compatible language does not uinderstand the ‘c’s exe. File.
Software requirement:
• Embedded ‘c’
• Keil Software
Keil software makes hex code file according to the program,then this hex file feeded
in to the microcontroller using flash magic software.
TASK PERFORM BY ROBOT
TASK PERFORM BY ROBOT:
This robot can sense the light which are in fixed infrared frequency and follow to the
infrared emmiting object.
REQUIREMENT & EQUIPMENT DESCRIPTION
REQUIREMENT :
SR NO COMPONENT QUANTITY
1 MICROCONTROLLER PIC 16F873 U1 1
2 CHASIS 1
3 MOTOR DRIVER 1
4 D.C. GEARED MOTOR 2
5 BATTERY 1
6 INFRARED SENSOR 2
7 MAX 232 1
8 ADC 74HC148U3 1
9 SERIAL BUS 1
10 REGULAOR 7805 1
11 WHEEL 2
EQUIPMENT DESCRIPTION:
2. D.C. MOTORS
DC motors are widely used, inexpensive, small and powerful for their size.
Reduction gearboxes are often required to reduce the speed and increase the torque output
of the motor. Unfortunately more sophisticated control algorithms are required to achieve
accurate control over the axial rotation of these motors. Although recent developments in
stepper motor technologies have come a long way, the benefits offered by smooth control
and high levels of acceleration with DC motors far outweigh any disadvantages.
Several characteristics are important when selecting DC motors and these can be
split into two specific categories. The first category is associated with the input ratings of
the motor and specifies its electrical requirements, like operating voltage and current.
The second category is related to the motor's output characteristics and specifies the
physical limitations of the motor in terms of speed, torque and power.
Example specifications of the motors used are given below:
Characteristic Value
• Operating Voltage: 6V to 12V
• Operating Current: 2A Max. (Stall)
• Speed: 2400 rpm
• Torque: 30 gm-cm
As noticed, the torque provided can hardly move 30gm of weight around with
wheel diameter of about 2cm. This is a fairly a huge drawback as the robot could easily
weigh about a kg. This is accomplished by gears which reduce the speed (2400 rpm is
highly impractical) and effectively increase the torque. If the speed is reduced by using a
gear system by a factor of ρ then the torque is increased by the same factor. For
example, if the speed is reduced from 2400 rpm, to 30 rpm, then the torque is increased
by a factor of (2400/30 = 80) in other words the torque becomes 30 80 2400 gm-cm or
2.4 kg-cm which is more than sufficient.
Geared D.C. motors were used which can operate in the range from 0V to .
The D.C. motors have a speed of 2400rpm and a torque of 15gm-cm. The gears decrease
the speed to 30rpm at 6V and thus considerably increasing the torque so that the robot can
carry the load of its frame and the lead-acid battery. Two such motors are used in the rear
of the robot, and a dummy castor is fixed to the front to stabilize the robot.
The entire motor control circuitry is shown in the above figure along with the
internal circuitry of the L293D motor control IC. The table below clearly indicated the
operation of the IC.
IN1 IN2 IN3 IN4 OPERATION
to IN1 and L D to IN2. The same is done to IN3 & IN4. Now we have 1 directional
control per motor. The ENABLE of each motor section is given PWM inputs to further
improve on the control. Now, each motor has a direction control and a speed control. The
clamping diodes are built into the chip which prevent the back EMF generated by the
motors to harm the H-bridge. The inversion was achieved using the 74HCT04 HEX
inverter IC having a slew rate of about 6ns which is negligible compared to the reaction
time of the H-bridge itself.
The Explanation is simple, If A & D are turned on, then the current flows in the direction
shown in the figure below.
If B & C are turned on, then the motor rotates in counter clockwise direction.
If you turn on the two upper circuits, the motor resists turning, so you effectively
have a breaking mechanism. The same is true if you turn on both of the lower circuits.
This is because the motor is a generator and when it turns it generates a voltage. If the
terminals of the motor are connected (shorted), then the voltage generated counteracts the
motors freedom to turn. It is as if you are applying a similar but opposite voltage to the
one generated by the motor being turned. In other words, it acts like a brake. Any other
state like A & C = ON or B & D = ON will cause a direct path to ground causing a very
high current to pass through the relays thus causing a burnt fuse (if it exists).
The following figure shows an H-
Bridge using only transistors. The same
theory
applies.
Figure 3.5: H-Bridge using transistors.
Usually, the above circuitry can be used only for direction control. The Existing H-Bridge
is further modified to include another transistor, now making speed control possible too.
This is shown in the figure below.
The same direction rules apply, but now the motor will behave as per the direction
control only when a ‘1’ is given to the EN input. Speed control is usually done by giving
a PWM signal, and the duty cycle is varied to vary the speed of the motor. Usually
protection diodes are also incorporated across the transistors to catch the back voltage that
is generated by the motor's coil when the power is switched on and off. This fly-back
voltage can be many times higher than the supply voltage! If diodes are not used, the
transistors have a good chance to get burnt.
VOLTAGE REGULATOR
It has been shown that practically all electronic devices need DC supply. A direct
voltage of constant magnitude requires to be supplied, for the smooth and efficient
functioning of these devices. A properly designed voltage regulator ensures that,
irrespective of change in supply voltage, load impedance or temperature, the DC supply is
maintained at a constant level. This is achieved by incorporating some type of feedback in
the regulator circuit.
An IC voltage regulator unit contains all the circuitry required in a single IC. Thus
there are no discrete components and the circuitry needed for the reference source, the
comparator and control elements are fabricated on a single chip. Even the over load and
short-circuit protection mechanism is integrated into the IC. IC voltage regulators are
designed to provide either a fixed positive or negative voltage, or an adjustable voltage
which can be set for any value ranging between two voltage levels.
The circuit requires two voltage sources; one for the digital IC’s (+5V) and a
+12V to the motors. The motor is supplied 12V unregulated supply directly from the
battery as regulation would be difficult and unnecessary; whereas the digital IC’s and the
microcontroller require a perfect ripple free +5V to function properly. The L7805C is a
5V voltage regulator IC. The capacitors added to the input of the voltage regulator are to
isolate the spikes generated by the motor from the input and to reduce noise. The 10μ F
capacitor at the output is to maintain stability and improve regulation. These are standard
values. The 0.1μ F capacitor is used at the input because of the fact that high value
capacitors have poor high frequency response
4.THE IR SENSORS
Figure 4.8:
Reflective sensor
The drop across the emitter when forward biased is around 1.4V. According to the
data sheets, to have sustained radiation, a max of 40mA must flow through to avoid
damage. A safe margin is allowed and a current of 16mA is considered for the design.
for, Vcc = 5V
Vd = 1.4V
Id = 16mA
For the emitter, the collector resistor was determined experimentally on a trial and
error basis. It was decided to use a value of 56 kΩ. For this value, the potential across the
detector is normally 4.6V, when an object reflects the rays towards the detector, then the
5. COMPARATOR
The reference voltage is generated by the 20k POT and given to all the
comparators to the non-inverting input. When the respective sensor is on the line, the
emitted light is absorbed by the line and the transistor is the cut-off mode, thus a potential
of 4.6V is given to the inverting input which is greater than Vref (which is chosen to be
2.5V), thus the output of the comparator goes low. When the sensor is not on the line
(reflective white surface) the potential across the detector is usually 0.6V. Thus the output
of the comparator goes high (the non-inverting input has a greater potential). Thus the
output of the comparator goes low only when the sensor is over the line. The comparator
is open collector, and hence a pull-up resistor of 10 kΩ is required at the output.
7 sensors are totally used. They are in the form shown in the figure below, also
their outputs are also shown. The top view is chosen as it would be easier to infer the
process involved.
Figure 4.12: The sensor array
The sensors are mounted on a separate board along with the biasing resistors and a
2 pin connector supplies the power to the sensor array. And the output of each sensor is
connected to the main board via an 8 pin connector to the comparators on the main board.
This priority encoder accepts 8 input request lines 0–7 and outputs 3 lines A0–A2.
The priority encoding ensures that only the highest order data line is encoded. The
extreme sensors are given to the higher order inputs so that they are given a higher
priority compared to the inner sensors so that no required turn is left out of the priority
process. This is shown in the figure shown below. The truth table is also shown.
As can be noticed from the truth table, the 74HC148 is an active low priority
encoder. The chip has an active low enable (EI) input which is always grounded. If the
robot is not on any line, all the input lines will be high, thus the GS line will go high. This
pin is used as the input to the microcontroller for it to decide if it is on a line or not. The
0’th input is always connected to +Vcc = 5V thus allowing the other inputs to generate an
output from 0 to 6. The chip used is 74HC148 which is a high speed CMOS priority
encoder.
Noticing the placement of the sensors A, B & G, it can be noticed that under no
conditions will all of them detect a line (go low). This will only happen when the line is
too thick, or when the robot is lifted off the surface. Only when all the lines go low, will
the NOR gate’s output go high. This line is used by the microcontroller to sense a surface.
The NOR gate used is the 74HCT27 which is a high speed CMOS gate.
LIMITATIONS
LIMITATIONS:
• Choice of line is made in the hardware abstraction and cannot be changed by
software.
• Calibration is difficult, and it is not easy to set a perfect value.
• The steering mechanism is not easily implemented in huge vehicles and impossible for
non-electric vehicles (petrol powered) .
• Few curves are not made efficiently, and must be avoided.
• Lack of a four wheel drive, makes it not suitable for a rough terrain.
• Use of IR even though solves a lot of problems pertaining to interference, makes it
hard to debug a faulty sensor.
• Lack of speed control makes the robot unstable at times.
METHODOLOGY
METHODOLOGY
The first idea was to use optical imaging (CCD cameras) to see the line. This was
later given up due to various reasons including complexity and unavailability of
components. Later a choice was made to use an array of sensors which solved most of
the problems pertaining to complexity.
The resistor values used in the sensor array were experimentally determined rather
than theoretical mathematical design calculations. This was done as the data sheets of
the proximity sensor was not available anywhere and most of the parameters had to be
determined experimentally.
The L293D chip is used as it was a much better option than forming an H-Bridge
out of discrete transistors, which would make the design unstable and prone to risk of
damage.
The PIC microcontroller was used as it is the only device I have a full practical
knowledge about, and most of all a RISC processor which are better suited for realtime
operations. Thus the midrange devices were chosen. The part 16F873 was used
as it has 2 CCP modules which I could use in PWM mode thus simplifying the
software routines which I’d otherwise had to write to generate the PWM control for
the motors.
A priority encoder was used to reduce the number of I/O lines used, which
reduces it to 5 which otherwise would require 7 and a lot of additional complexity in
software which only results is sluggish operation and inefficiency.
Extra hardware was added to let the robot know if it is on a surface or not. This
helps it from not running off a table or preserving battery if manually lifted off the
floor.
BIBLIOGRAPHY
BIBLIOGRAPHY:
Integrated circuit -
By Millman &Halkias- McGraw Hill
Electrical machines volume 2
By B.L.Thareja
Let us ‘c’
By Yashawant Kanetkar
The 8051 Microcontroller And Embedded
By M.A. Mazidi
Programming and Customizing the PIC microcontroller
by Myke Predko Second edition – McGraw Hill
PICmicro Mid-Range MCU Family Reference Manual
by MICROCHIP
Design with PIC microcontrollers
by John B. Peatman – PEARSON Education
PIC Robotics, A beginner’s guide to robotics projects using the PICmicro
by John Iovine – McGraw Hill
Digital logic and computer design
by M. Morris Mano - Prentice – Hall of India PVT limited
Digital Systems Principles & applications
by Ronald J. Tocci Sixth Edition - Prentice – Hall of India PVT limited
WEBSITES REFERRED