IRIS LEARNINGS
CHAPTER-1
INTRODUCTION
1.1 ROBOTICS
Robotics is the branch of technology that deals with the design, construction,
operation, and application of robots, as well as computer systems for their control,
sensory feedback, and information processing. These technologies deal with
automated machines that can take the place of humans in dangerous environments or
manufacturing processes, or resemble humans in appearance, behavior, and/or
cognition
Robotics is the branch of technology that deals with the design, construction,
operation, structural disposition, manufacture and application of robots.
A robot may not injure a human being or, through inaction, allow a human
being to come to harm.
3
A robot must obey any orders given to it by human beings, except where such
orders would conflict with the First Law.
A robot must protect its own existence as long as such protection does not
conflict with the First or Second Law.
1.3 ROBOT
We can not exactly define that what robot is, but we can say that A robot can be electrical, mechanical or elctro-mechnical setup.
It can be programmable or non- programmable.
It can be Manual or automated controlled.
Autonomous robots- can act on their own, independent of any controller. The
basic idea is to program the robot to respond a certain way to outside stimuli.
Sensors: On or around the device that are able to sense the environment and
give useful feedback to the device.
1.7 CHARACTERISTICS
Some features are added using header files like <avr/io.h>, <util/delay.h>.
scanf() and printf() are removed as the inputs are scanned from the sensors and
outputs are given to the ports.
Control structures remain the same like if-statement, for loop, do-while etc.
1.9 MICROCONTROLLER
Microcontroller has I/O ports, Memory, timers etc all integrated on chip itself
CHAPTER 2
INTRODUCTION TO COMPONENTS
2.1 DC GEARED MOTORS
Motor which takes DC pulse input and gives rotating motion in steps, rather
than turning smoothly as a conventional motor does.
Inside the motor, coils are switched on and off in a specific sequence to cause
the motor shaft to turn through the desired angle.
2.4 RESISTOR
2.5 CAPACITORS
A capacitor is a device for storing electric charge. A capacitor is a passive electronic
component consisting of a pair of conductors separated by a dielectric (insulator).
This is a measure of a capacitor's ability to store charge. A large capacitance means
that more charge can be stored. Capacitance can be measured using formula:
q=C
where
C = capacitance,
q= charge
V = potential difference.
Unit of Capacitance is Farads(F).
Types of capacitor :
Polarized capacitor
Non polarized capacitor
10
2.6 DIODES :
Diode is an electronic component which permits the flow of current in one direction
only. Today diodes are made up of semiconductor material; therefore they are often
called semiconductor diodes or crystal diodes. They have a number of uses like:
PN junction diode :
Zener Diode :
Zener Diode works in reverse bias.
11
2.7 TRANSISTORS :
A transistor is a semiconductor device used to amplify and
switch electronic signals. It is made of a solid piece of semiconductor material,
with at least three terminals for connection to an external circuit.
12
Device with three terminals where one terminal can be use to control the flow
of current through the other two terminals.
Transistor are of two types:
1. n-p-n( A straight switch )
When base of n-p-n is connected with logic high voltage then it short
circuit emitter and collector (SWITCH ON).
When base of n-p-n is connected with logic low voltage then it open
circuit both emitter and collector (SWITCH OFF).
When base of p-n-p is connected with logic high voltage then it open
circuit emitter and collector (SWITCH OFF).
When base of p-n-p is connected with logic low voltage then it short
circuit both emitter and collector (SWITCH ON).
13
A light dependent resistor is a semiconductor electrical device that has a very high
resistance to the flow of electrical current in the absence of light.
When light strikes the device, it lowers its resistance, allowing electrical current to
flow through it and on to other devices or electrical circuits.
2.9 SWITCH
SPST
SPDT
DPST
DPDT
S- Single D-Double
14
P-Pole T-Throw
CHAPTER 3
SENSORS
3.1 SENSOR
A device that sense a change in any physical quantity like heat, light, sound, pressure,
magnetism, or a particular motion and responds by sending a signal in the form of
electrical quantity(e.g voltage)
Application includes automobiles, aero space, machines, medical, manufacturing and
robotics
3.3 IR SENSOR
15
16
17
CHAPTER 4
INTEGRATED CIRCUITS
4.1 ICS USED IN ROBOTICS
L293D
555
LM358
IC 7805(voltage controlled)
4.2 L293D IC
19
20
21
4.4 555 IC
4.5 LM 358
The LM358 IC consists of two independent operational amplifiers which were
designed specifically to operate from a single power supply over a wide range of
voltages. It have two op-amp
22
4.6 IC 7805
It is a voltage regulator integrated circuit.
It designed to automatically maintain a constant voltage level
23
FEATURES
Output current range up to 1A
Output voltage 5V
Input voltage range up to 12V
Short circuit protection
CHAPTER 5
MICROCONTROLLER ATmega8
24
5.1 INTRODUCTION :
ATmega8 is a low-power CMOS 8-bit microcontroller based on the AVR
RISC architecture.
By executing powerful instructions in a single clock cycle, the ATmega8
achieves throughput approaching 1 MIPS per MHz
In order to maximize performance and parallelism, the AVR uses a Harvard
architecture.
5.3FEATURES OF ATmega8 :
The main features of ATmega8 microcontroller are:
High-performance, Low-power AVR 8-bit Microcontroller
25
5.5What is AVR?
They consume less power and can be operated in different power saving
modes.
5.7 RISC
It is a very fast architecture which executes one instruction per clock cycle.
27
A Von Neumann architecture has only one bus which is used for both data
transfers and instruction fetch
GND: Ground.
28
RESET: A low level on this pin for longer than the minimum pulse length will
generate a reset, even if the clock is not running.
AVCC : The supply voltage pin for the A/D Converter, Port C (3..0).It should
be externally connected to VCC, even if the ADC is not used. If the ADC is
used, it should be connected to VCC through a low-pass filter.
5.11
PORTS
PORT D (PD7-PD0)
29
PINx
PORTx
DDRx
DDRx Register
DDRx=0b00000000(In Binary)
DDRx=0b11111111(In Binary)
PORTx Register
If DDRx=0xFF(Output port)
Writing logic 1 to PORTx will make output high i.e 5v for that particular pin.
Writing 0 to PORTx will make output low i.e 0v for that particular pin.
If DDRx=Ox00(Input port):
30
If corresponding PORTx bit is set to 1, Internal pull up resistors are enabled i.e
if we do not connect this pin to anything it still reads as 1.
PINx Register
If any/all bits of DDRx is set to 0(input)for a particular pin, we can read data
from PINx
If any/all bits of DDRx is set to 1(output), then reading PINx register gives the
same data which has been output on that particular pin.
31
CHAPTER 6
SOFTWARES USED
6.1 DEVELOPMENT PROCESS OF EMBEDDED C PROJECTS :
Write C programs in AVR Studio IDE(Integrated Development Environment)
Compile them into a .hex file using the AVR-GCC compiler (which integrates
into AVR Studio)
Simulate the target AVR program and debug the code within AVR Studio
Program the actual chip using the USBasp device, which is attached to our
target board with a special 6-pin cable
Once programmed, the chip runs the program in your circuit
32
33
Then choose AVR Simulator from the debug platform and ATmega8
from device list.
Click finish.
34
35
CHAPTER 7
BASIC ROBOTS
7.1 LINE FOLLOWING ROBOT
This simple robot is designed to be able to follow a black or white line on the ground
without getting off the line too much. The robot has four sensors installed underneath
the front part of the body, and two DC motors drive wheels moving forward. This
robot uses a comparator chip as its brains, which makes it a relatively easy first robot
to build
A circuit inside takes input signal from four sensors and controls the speed of wheels
rotation. The control is done in such a way that when a sensor senses a black line, the
motor slows down or even stops. Then the difference of rotation speed makes it
possible to make turns.
Working Principle:
This Robot follows the black line which is drawn over the white surface or it follows
the white line which is drawn over the black surface. The LDRS (Light Dependent
Resistors) are used to sense the line. When the light from the LEDS fall on the white
surface, it gets reflected and if it falls on the black surface, it is not reflected this
principle is used to scan the Lines for the Robot.
36
Circuit Explanation:
Step 1: Let us assume that the switch is on the black line position and black line to be
followed is on the white surface.
Step 2: When the robot is turned ON the LEDs on the LDR module will turn ON and
the LDRs mounted beneath the robot will start getting reflections from the surface
due to the light emitted by the LEDs on the surface.
Step 3: for black color there would not be any reflection from the surface and the
resistance of the LDR will remain high, producing large voltage drop across the
respective LDR pair which has detected the black color.
Step 4: On the other hand the voltage drop across the other pair of LDR will be less as
white surface reflects light emitted from the LEDs back to the LDR because of which
its resistance reduces thus producing less voltage drop across the LDR pair which is
on the white surface.
Step 5: These two voltage levels from the two LDR pairs will be fed as an input to the
comparator.
37
Step 6: The comparator then compares these inputs and gives out two outputs at pin
no.1 and pin no. 7
Step 7: Out of these two outputs one will be low and the other will be high always.
Step 8: These two outputs are then given to the NPN transistors
Step 9: The NPN transistors are responsible to drive the motors and they will conduct
only after getting a high signal at its base terminal.
Step 10: Thus the high output from the comparator will turn ON the corresponding
transistor while the other transistor will remain OFF as it gets low signal at its base
terminal from the comparators output which is low.
Thus, the LDRs will keep on scanning the track and ultimately following black/white
line in a ZIG-ZAG fashion.
38
Figure 7.3
Detection Robot
2. Two 100rpm motors are used to rotate the 2 wheels. Motor take the electrical
energy from the battery and converts it to mechanical energy by rotating the
wheel.
This robot can pick and place objects from one location to another.
39
One 30rpm motor is used to rotate the gear, which in-turn rotates the second
gear attached to it. This moves the robotic arm up and down.
One 30rpm motor is used to pull the gripper outwards which opens and closes
the gripper to pick and drop things.
Four DPDT switches are used to control the movement of the robotic arm.
Two switches are used to move the robot in the forward, backward, left
and right directions
PARTS OF ROBOT
Sensor
Controller
Actuator
End-effectors
Power source
ASSEMBLING
Fix the four clamps below the chassis with the help of screws.
40
Insert the two 30rpm motors into the clamps and attach it with the two wheels
by inserting the motor shafts into the wheels
Attach the two L-clamps on top of the chassis with the help of screws
Attach the two 30rpm motors with the L-clamp using nuts and bolts
Attach one 10rpm motor with 1 gear and interlink it with the other gear. The
second gear is to be placed inside the arm chassis.
Assemble the gripper chassis, spring and hinge using nuts and bolts.
Attach one end of the plastic wire to the second 10rpm motor and the other end to
gripper side having the spring.
41
CHAPTER 8
PROGRAMMING ON PROJECTS FOR ATmega8
42
#include<avr/io.h>
void main()
{
int left_sensor,right_sensor;
DDRB=0xff;
DDRC=0x00;
while(1)
{
right_sensor=PINC&0b0010000;//right sensor on pc5
left_sensor=PINC&0b0001000;//left sensor on pc4
if(right_sensor==0b0010000 && left_sensor==0b0000000)
PORTB=0b00000010;//turn left
if(right_sensor==0b0000000 && left_sensor==0b0001000)
43
PORTB=0b00000100;//turn right
if(right_sensor==0b0000000 && left_sensor==0b0000000)
PORTB=0b00000110;//move forward
if(right_sensor==0b0010000 && left_sensor==0b0001000)
PORTB=0b00000000;//stop
}
}
#include <avr/io.h>
#include <util/delay.h>
int move_backward=0b00001001;
int right_turn=0b00000101;
int move_forward=0b00000110;
int left_turn=0b00001010;
int left_sensor_on=0b0000001;
int right_sensor_on=0b0000010;
int front_sensor_on=0b0000100;
int left_sensor_off=0b0000000;
int right_sensor_off=0b0000000;
int front_sensor_off=0b0000000;
void wait(float x)
44
{
for(int i=0;i<(int)(1302*x);i++)
_delay_loop_1(0);
}
void main ()
{
DDRB = 0xFF; //Output port
DDRC = 0b0000000; //input port
int left_sensor = 0;
int right_sensor = 0;
int front_sensor = 0;
while(1) //create an infinite loop
{
left_sensor = (PINC & 0b0000001);
right_sensor = (PINC & 0b0000010);
front_sensor = (PINC & 0b0000100);
if(( left_sensor==left_sensor_off) & (right_sensor==right_sensor_off) &
(front_sensor==front_sensor_on))
{
PORTB = move_backward;
//move backward
wait(2.0);
PORTB=right_turn;
wait(1.0);
45
}
if((left_sensor==left_sensor_off) & (right_sensor==right_sensor_off) &
(front_sensor==front_sensor_off))
{
PORTB=move_forward;
//move forward
}
if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_off) &
(front_sensor==front_sensor_off))
{
PORTB=move_backward;
wait(2.0);
PORTB=right_turn;
wait(1.0);
}
if(( left_sensor==left_sensor_off) & (right_sensor==right_sensor_on) &
(front_sensor==front_sensor_off))
{
PORTB=move_backward;
wait(2.0);
PORTB=left_turn;
wait(1.0);
}
if(( left_sensor==left_sensor_off) & (right_sensor==right_sensor_on) &
(front_sensor==front_sensor_on))
46
{
PORTB=move_backward;
wait(2.0);
PORTB=left_turn;
wait(1.0);
}
if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_on) &
(front_sensor==front_sensor_off))
{
PORTB=move_forward;
}
if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_off) &
(front_sensor==front_sensor_on))
{
PORTB=move_backward;
wait(2.0);
PORTB=right_turn;
wait(1.0);
}
if((left_sensor==left_sensor_on) & (right_sensor==right_sensor_on) &
(front_sensor==front_sensor_on))
{
PORTB=0b00000000;
//move forward
}
47
}
}
48
#include <avr/io.h>
49
#include <util/delay.h>
int move_backward=0b00001001;
int right_turn=0b00000101;
int move_fordward=0b00000110;
int left_turn=0b00001010;
int left_sensor_on=0b0010000;
int right_sensor_on=0b0100000;
int left_sensor_off=0b0000000;
int right_sensor_off=0b0000000;
void wait(float x)
{
for(int i=0;i<(int)(x*1302);i++)
_delay_loop_1(0);
}
int main (void)
{
DDRB = 0xFF; //Output port
DDRC = 0b0000000; //input port
int left_sensor = 0;
50
int right_sensor = 0;
//move backward
wait(1.5);
PORTB=right_turn;
wait(.5);
}
if((left_sensor==left_sensor_on) & (right_sensor==right_sensor_on))
{
PORTB=move_fordward;
//move forward
}
if(( left_sensor==left_sensor_off) & (right_sensor==right_sensor_on))
{
PORTB=move_backward;
wait(1.5);
PORTB=right_turn;
wait(.5);
51
}
if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_off))
{
PORTB=move_backward;
wait(1.5);
PORTB=left_turn;
wait(.5);
}
}
}
#include<avr/io.h>
#include<util/delay.h>
#define F_CPU 1000000UL
main()
{
DDRD=0xFF; //PORTD as output port
while(1)
{
PORTD=0b11111111;
_delay_ms(255);
PORTD=0b00000000;
_delay_ms(255);
}
}
53
CHAPTER 9
PROJECT COVERED
GSM controlled robots based on the DTMF (dual tone multiple frequency)
technology.
DTMF signaling is used for telecom signaling over analog telephone lines in
the voice frequency band between telephone handsets and other
communication devices and the switching centre.
Robotic control using the DTMF is achieved when the user at the transmitting
side pressed mobile phone keypad buttons and at the remote location receiver
receive the signal so that robots takes corresponding actions.
The multiple tones are the reason for calling the system multi frequency.
Tones are then decoded by switching centers to determine which keys are
pressed.
Excellent performance
18 pin package
56
Mount the circuit on the robot with auto answer mode on.
Connect one wire of the headphone to the wire and other to the ground.
OE is the output enable pin, high on this pin will enable the output.
57
DV is data valid pin, its a output pin, Set to high itself by IC when valid data
is available on these bits.
RT/GT and EST are pins for setting effective time duration of tone to check
for authenticity.
58
Now we can check respective bits with programming and respond based on
the bit pattern received.
Now based on the input pattern we can instruct the motor with specific
commands and make the robot move in different directions.
59
{
int DTMF=0;
DDRB=0xFF;
DDRC=0b0000000;
while(1)
{
DTMF=PINC;
DTMF=DTMF&0b0001111;
if(DTMF==2)
{
PORTB=0b00000101;
}
if(DTMF==4)
{
PORTB=0b00001010;
}
if(DTMF==6)
{
PORTB=0b00000101;
}
if(DTMF==8)
{
PORTB=0b00001001;
60
}
if(DTMF==11)
{
PORTB=0b00001111;
}
}
}
61
62
63
ALGORITHM
Now press the keys on the remote phone and you will see the LEDs blinking.
CONCLUSION
Although most robots in use today are designed for specific tasks, the goal is to make
universal robots, robots flexible enough to do just about anything a human can do.
65
Finally after having completed this project I would like to state that the field of
robotics is infinite. With every small circuit or every small component we can do a lot
of things.
What I have done is a very nominal project as compared to the field of robotics. But I
have learnt a lot from this and hope to use this newly gained knowledge in future not
only in projects but in day to day life as well. Starting with this project I would like
continue developing other different projects in the future.
Being knowledgeable is very good quality and I would like to dwell that quality in
me. I hope that the work on robotics that I have done would help me and others in
future as well.
LIST OF REFERENCES
www.wikipedia.org/wiki/Asimov
66
www.extreamelectronic.com
www.google.com
BIBLIOGRAPHY
67