Autonomous Bot Making
Autonomous Bot Making
in
AUTONOMOUS ROBOTICS
Components
Locomotion System
Power Supply
Sensors
Microcontrollers
Motor Driver
Speed Control
Line Follower-Algorithm
www.robotix.in
LOCOMOTION SYSTEM
DIFFERENTIAL
DRIVE
A differential drive is
the most basic drive,
which consists of two
sets of wheels that can
be driven
independently.
www.robotix.in
MOTION
LEFT WHEEL
RIGHT WHEEL
Forward
Backward
Left Turn
Right Turn
www.robotix.in
Drives
www.robotix.in
Power Supply
Our power supply consists of the rectifier circuit and
the transformer.
A rectifier is an electrical device that
converts alternating current (AC), current that
periodically reverses direction, to direct
current (DC), current that flows in only one direction.
www.robotix.in
Power Supply
www.robotix.in
www.robotix.in
www.robotix.in
Sensor Components
LED-LDR Circuit
Comparator Circuit
www.robotix.in
LED-LDR
A line follower is basically a robot or a
machine that takes external inputs
(sensory feeds) and decides whether it
is on the path or off it.
Let us consider that we are trying to
follow a certain white line on a black
background.
LED - LDR
LED LDR sensors come into the picture here. For
detecting a white line on a black surface the bot
must be able to distinguish between them.
In an electric circuit distinguishing a difference in
any field is achieved using difference in voltages.
The sensors basically provide this voltage difference.
Here we take the example of a differential drive with
a LED-LDR sensor array for line following.
www.robotix.in
LED-LDR
LED
LDR
and
www.robotix.in
LED-LDR
LED-LDR sensor unit is used for detecting surfaces that
reflect light at intensity different from the adjoining
surfaces.
**LED (Light Emitting Diode) : Small elongated bulb-like
object that emits light. Available commonly in red, green,
white etc.
**LDR (Light Dependent Resistor) : Small resistor, resistance
depending (non-linear) upon the intensity of incident light
The resistance usually varies in the range of ~10k ohms.
Hence a 10k ohm resistance should be used in series with a
LDR.
www.robotix.in
Comparator
www.robotix.in
www.robotix.in
Sensor Interfacing
Light Sensing Module using LED-LDR combination. As high intensity of light falls on the LDR,
its resistance drops and the potential at -ve terminal of comparator increases. If this potential
is less than that at the +ve terminal, a high signal is obtained as output.
www.robotix.in
Calibration
Resistance of an LDR changes depending on the intensity of light that is
incident on it.
Light (from LED) reflected from white surface -> brighter (i.e. more intense)
Light reflected from the black surface ->Less intense
Two different voltages achieved, thus separating white from black.
Using these two voltages a mean voltage is decided which is used as the
reference voltage. This is termed as calibration.
In comparator circuit,
Voltage higher than reference -> HIGH
Voltage lower than reference -> LOW
www.robotix.in
Final Circuit
www.robotix.in
www.robotix.in
Final Circuit
www.robotix.in
The Microcontroller
www.robotix.in
www.robotix.in
Pin Configuration
www.robotix.in
www.robotix.in
Pin Configuration-Contd.
www.robotix.in
www.robotix.in
www.robotix.in
www.robotix.in
S1
1
0
0
0
1
S2
0
1
0
1
0
S3
0
1
0
0
1
S4
1
0
0
1
0
Result
Motor rotates in one direction
Motor rotates in opposite direction
Motor free runs (coasts)
Motor brakes
Motor brakes
www.robotix.in
S1
S3
www.robotix.in
S2
S4
H Bridge Working
www.robotix.in
The current provided by the MCU is of the order of 5mA and that required
by a motor is ~500mA. Hence, motor cant be controlled directly by MCU
and we need an interface between the MCU and the motor.
A Motor Driver IC like L293D or L298 is used for this purpose which has
two H-bridge drivers. Hence, each IC can drive two motors
Note that a motor driver does not amplify the current; it only acts as a
switch (An H bridge is nothing but 4 switches).
www.robotix.in
L293D
www.robotix.in
Motor Driver
www.robotix.in
Drivers are enabled in pairs, with drivers 1 and 2 being enabled by the
Enable pin. When an enable input is high (logic 1 or +5V), the associated
drivers are enabled and their outputs are active and in phase with their
inputs.
When the enable pin is low, the output is neither high nor low
(disconnected), irrespective of the input.
To move the motor in opposite direction just interchange the logic applied
to the two inputs of the motors.
www.robotix.in
www.robotix.in
Speed Control:
www.robotix.in
Speed Control
www.robotix.in
www.robotix.in
Line Following
www.robotix.in
www.robotix.in
www.robotix.in
www.robotix.in
Algorithm : 2 Sensors
There is a minimum of two sensors required for this task, one for detecting
each edge of the line. If the LED LDR sensor gives a high when above the floor
and a low when above the ridge, then the simple algorithm for line following
will be :
Left Sensor
Right Sensor
Left Motor
Right Motor
1
0
1
1
1
0
1
0
1
1
1
0
www.robotix.in