Date post: | 28-Nov-2014 |
Category: |
Documents |
Upload: | manoj-naik-p |
View: | 939 times |
Download: | 1 times |
1
Acknowledgement
We would like to take this opportunity to express our thanks and gratitude to all the persons
who have directly or indirectly availed us in guiding our project.
The assiduous help presumed by our guide Mr. M J Sampath Kumar and our co-guide
Mr. S B Rudraswamy was an inevitable part of the successful consummation of our project.
We also thank all other seen as well as unseen members who made us available all the
hardware resources as well as other inevitable help for the successful completion of the
project.
We are also grateful to Mr. Yatisha L for giving his precious and valuable suggestions.
-Anup Ratnakar Raikar
-Manjunath K.
-Manoj Naik P.
-Mayur K.
2
Abstract
„Robotics‟-the word has a deep meaning. Robotics in turn takes the scale of development by
employing various branches, tools, and mechanisms and performs a wide variety of functions
for the benefit of mankind. From this whole ocean of robotics, we have intended to build a
basic robot-„Spy Robot‟.
Being the students of 6th
sem Electronics & Communication branch, the concept that emerged
in our mind was to develop a Robot that can be controlled using Radio Frequency, where in
the robot a video transmission module has been integrated, which sends real time video
signals. Many time soldiers need to venture into the enemy canopy just to track their
activities, which is often a very risky job. Such dangerous job could be done using small a
spy robot.
The project is comprised of basically three modules, which handles all the basic
functionalities of the robot. The modules which we have integrated in this project are:
1. The controller part
2. Robot
3. Video transmitter, receiver and the display unit
Developed by:
-Anup Ratnakar Raikar
-Manjunath K.
-Manoj Naik P.
-Mayur K.
3
JSS MAHAVIDYAPEETHA
S. J. COLLEGE OF ENGINEERING. (An Autonomous Institution)
Department of Electronics & communication
SJCE, Mysore-570 006
CERTIFICATE
This is to certify that the project report entitled ‘Spy Robot’ is prepared by
Anup Ratnakar Raikar (USN No: 4JC08EC017)
Manjunath K (USN No: 4JC08ECO51)
Manoj Naik P (USN No: 4JC08ECO53)
Mayur K (USN No: 4JC08EC054)
Students of 6thsem Electronics and Communication branch have
satisfactorily completed their work.
___________________ ___________________
Signature of Guide Signature of Co-Guide
4
LIST OF CONTENTS Page No.
Chapter 1: Introduction 6
1.1: Description of Project 7
1.2: Goals of Project 7
1.3: User requirements 7
Chapter 2: Analysis and Implementation 8
2.1: Decomposition of problem 9
2.2: Technology used 9
2.3: Proposed solution 11
2.4: Hardware components used 14
And their description
2.5: Circuit diagrams and their description 16
Chapter 3: Programming of Microcontroller 20
3.1: Flowchart 22
3.2: Source code 26
Chapter 4: Future developments and Applications 32
4.1: Applications 33
4.2: What new can be added?? 33
Chapter 5: Conclusion and references 34
5.1: Problems we faced 35
5.2: Inference 35
5.3: References 35
5
LIST OF FIGURES Page No.
Fig 2.1.1: Decomposition of problem 9
Fig 2.3.1: Block diagram of the robot part 12
Fig 2.3.2: Block diagram of the controller part 13
Fig 2.5.1: DTMF encoder circuit 16
Fig 2.5.2: DTMF decoder circuit diagram 17
Fig 2.5.3: FM transmitter circuit diagram 17
Fig 2.5.4: FM receiver circuit diagram 18
Fig 2.5.5: Motor driving connections using L293D 19
Fig 4.1.1: Spy robot 33
LIST OF TABLES Page No.
Table 2.2.1: Tones and assignments in a DTMF system 10
Table 2.5.1: Operations performed 19
Table 3.1.1: Actions performed by the microcontroller 21
corresponding to the keys pressed
6
CHAPTER 1
INTRODUCTION
7
1.1 Description of Project
Robot- an electromechanical device automates the work in many applications like
military application, industrial power plant etc. Robots are reliable means to bring objects, do
settings etc at places where human interventions is rather impossible or can cause hazardous
effect on human health i.e, at nuclear power plants, chemical factories etc.
Spy robot is a RF controlled robot. A camera mounted on the robot sends real time
video signals on to the user side, which can be seen on a display. Robot movements can be
monitored looking at the display.
1.2 Goals of Project
Wireless control mechanism
Real time video streaming
1.3 User requirements
Looking at the present scenario, we have proposed the idea of building robot that
Can be controlled by a controller from remote place based on the video sent from
robot
Should be a non-autonomous robot
Robot should be made from the basic cost effective materials like wireless TV
camera, Microcontroller, etc..
8
CHAPTER 2
ANALYSIS AND
IMPLEMENTATION
9
2.1 Decomposition of Problem
Fig 2.1.1: Decomposition of Problem
2.2 Technology used
DTMF (Dual Tone Multi-Frequency):
In this project, robot movements are controlled by the keypad. In the course, when
any button is pressed, tone corresponding to the button pressed will be received at the
receiver part. This received tone is called Dual Tone Multi-Frequency (DTMF) tone. The
received tone is processed by microcontroller AtMega16 with the help of DTMF decoder
CM8870. The decoder decodes the DTMF tone into its equivalent binary number and this
binary number is sent to the microcontroller. The microcontroller is programmed to take a
decision for any given input and outputs its decision to the motor driver in order to drive the
motors to control the movement of robot and the camera mounted on the robot.
DTMF assigns a specific frequency (consisting of two separate tones) to each key so
that it can easily be identified by the electronic circuit. The signal generated by the DTMF
encoder is a direct algebraic summation, in real time, of the amplitudes of two sine (cosine)
waves of different frequencies, i.e., pressing ‘5’ will send a tone made by adding 1336 Hz
and 770 Hz to the other end of the line. The tones and assignments in a DTMF system are
shown in Table.
Display
Unit
Robot Display
Unit
FM receiver
+
DTMF decoder
Stepper motor
control
10
Table 2.2.1: Tones and assignments in a DTMF system
Frequency Modulation:
The FM band covers 88-108 MHz. There are signals from many radio transmitters in
this band inducing signal voltages in the aerial. The RF amplifier selects and amplifies the
desired station from the many. It is adjustable so that the selection frequency can be altered.
This is called tuning.
FM is used in radio broadcasting, for the transmission of the sound signal in standard
(NTSC)TV, for private land-mobile radio systems, for direct-satellite broadcasting, and for
cordless and cellular telephone systems etc.
Frequency Demodulation:
The FM receiver is designed using the popular Sony chip CXA1619BS used for
AM/FM receiver circuits. The chip is a 30 pin dual-in–line package with the following
functional blocks
Front-end block (RF amplifier, mixer , oscillator)
IF stage
FM discriminator
AF Power amplifier
The signal from the antenna is fed to IC CXA1619BS, which suppresses adjacent
channels and allows only the selected high frequency signal.
11
2.3 Proposed solution
The system consists of three basic blocks, each performing important functions. They are
1. Robot
2. Display unit and
3. Controller.
Robot:
It consists chassis with mechanical components similar to normal car on which a
camera is placed to gather visual information about its surroundings.
It has the following sub-blocks with specific functions:
Antenna: It receives the control signals (FM modulated) transmitted from the
controller and gives it to the FM receiver.
FM Receiver: It receives the FM modulated control signals and demodulates it to
produce DTMF signals.
DTMF decoder: The DTMF signals from the FM receiver are decoded in this DTMF
decoder to produce digital control signals which is used by the microcontroller to
control the motion of the robot.
Microcontroller: It uses control signals from the DTMF decoder to generate signals to
drive the motors.
Driver IC: As the signal strength from the microcontroller is not enough to drive the
motor, microcontroller drives the motor with the help of the driver IC from optimum
current levels.
Motors: They are driven by the driver IC, is connected to the wheels for motion.
Camera and Video Transmission Module: It produces video signals which are given
to the video transmission module which transmits the video signals.
Power supply: A 12V DC rechargeable battery is used for all the components of the
robot.
12
Fig 2.3.1: Block diagram of the robot part
Display unit:
It consists of PC, interfacing module, receiver module for video reception, power
supply and an antenna. Video signals from the robot are received at the receiver module and
is given to the PC for display through the interfacing module which most of the times consists
of TV tuner card.
Controller:
It essentially consists of a keypad, a power supply, a DTMF encoder, a FM
transmitter and an antenna. Keypad consists of keys for controlling the robot’s movement.
Depending on the key pressed, the DTMF encoder generates DTMF signals which are
modulated by the FM transmitter at a frequency of 100 MHz and transmitted using an
antenna.
13
Fig 2.3.2: Block diagram of the controller part
14
2.4 Hardware components used and their description
1. AtMega16:
The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR
enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the
ATmega16 achieves throughputs approaching 1 MIPS per MHz allowing the system designer
to optimize power consumption versus processing speed.
Features:
Operating voltages: 4.5 to 5.5 V
High endurance and non-volatile memory segments
16kB of In-System self-programmable flash program memory
512 bytes EEPROM
1kB internal SRAM
Write/Erase cycles: 10,000 flash/100,000 EEPROM
Data retention: 20 years at 85°C/100 years at 25°C
2. L293D:
The L293D is designed to provide bidirectional drive currents of up to 600-mA at
voltages from 4.5 V to 36 V.
Features:
Wide Supply-Voltage Range: 4.5 V to 36 V
Output current 600 mA
Peak output current 1.2 A per channel
3. CM8870:
The CM8870 is a full DTMF receiver that integrates both bandsplit filter and decoder
functions into a single 18-pin DIP package. The CM8870 decoder uses a digital counting
technique to determine the frequencies of the limited tones and to verify that these tones
correspond to standard DTMF frequencies.
Features:
Low power consumption
15
Inexpensive 3.8 MHz time base
Single 5 V power supply
Supply voltage: 6 V max
Current on any pin: 10 mA max
4. UM91214B/ UM91215B:
The UM91215 is a single chip, silicon gate, CMOS integrated circuit with an on-chip
oscillator for a 3.58 MHz crystal or ceramic resonator. It provides dialing pulse or dual tone
multi-frequency dialing.
Features:
Wide operating voltage range: 2 V to 5.5 V
Key-in beep tone output
Uses inexpensive ceramic resonator (3.8 MHz)
5. CXA1619BS:
CXA1619BS is a one-chip FM/AM radio IC designed for radio-cassette tape
recorders and headphone tape recorders.
Features:
Low current consumption (Vcc: 3 V)
For FM, ID: 5.8 mA (typically)
Supply voltage: 14 V max
6. Radio AV Receiver and Camera:
These two components were used for the purpose of video transmission and reception.
A monitor is used to display the received signals.
Features:
Wireless transmission and reception
Small size
Light weight
Low power consumption
High sensitivity
Easy installation
Easy to concea
16
2.5 Circuit diagrams
DTMF encoder:
+5V
3.2V
C1
C2
C3
R1
R2
R3
R4
TONE O/P
GND
Fig 2.5.1: DTMF encoder circuit
Circuit description:
The figure above shows the circuit diagram of the DTMF encoder which resembles
the telephone set. It uses DTMF encoder integrated circuit, Chip UM 91215B. This IC
produces DTMF signals. It contains four row frequencies & three column frequencies. The
pins of IC 91215B from 12 to 14 produces high frequency column group and pins from 15 to
18 produces the low frequency row group. By pressing any key in the keyboard
corresponding DTMF signal is available in its output pin at pin no.7. For producing the
appropriate signals it is necessary that a crystal oscillator of 3.58MHz is connected across its
pins 3 & 4 so that it makes a part of its internal oscillator.
By pressing the number 5 in the key pad the output tone is produced which is the
resultant of addition of two frequencies, at pin no. 13 & pin no.16 of the IC and respective
tone which represents number '5' in key pad is produced at pin no.7 of the IC .
6
1 U 12
2 M 13
9 14
3 1 15
2 16
4 1 17
5 18
B 7
5
XTA
L
3.8
MH
z
6
1 U 12
2 M 13
9 14
3 1 15
2 16
4 1 17
5 18
B 7
5
1 2 3
4 5 6
7 8 9
* 0 # *
17
DTMF decoder:
Fig 2.5.2: DTMF decoder circuit diagram
Circuit description:
Detecting DTMF tones requires the capability to detect and differentiate between the
8 DTMF frequencies. It is also important to have a technique of detecting and rejecting false
tones caused by noise (e.g., speech). The input fed at pin2 is compared for the frequencies
corresponding to the key pressed. Equivalent code for the key pressed is obtained from the
pins 11, 12, 13, 14.
FM transmitter:
Fig 2.5.3: FM transmitter circuit diagram
i/p
18
Circuit description:
This wireless microphone circuit uses only a single transistor, with few additional
passive components. This FM transmitter is very compact and need only a single cell 1.5Volt
battery. The transmission range could be between 30-50m radius in open air, and practically
depends on the surrounding transmission path and obstacles.
FM receiver:
Fig 2.5.4: FM receiver circuit diagram
Circuit description:
The signal from band pass filter is fed to FM RF IN pin 13 of the IC. The tuning of
the signal is done by selecting the RF frequency and the local oscillator frequency with the
help of L2-C2 and L3-C3 tank circuit respectively. Fine tuning is done through ganged
capacitors. The heterodyning is done in the FM FE block which generates the IF signal of
10.7 MHz. The signal through FM IF (pin 18) is now sent to the FM IF block inside the
chip .This is done only after it is passed through a 10.7 MHz Ceramic filter (CF2).
The FM IF selects and amplifies the IF signal and generates the AF signal using the
FM discriminator block .The output of the IF block is the audio signal that is delivered to
pin 22 and then to pin 25 (AF IN) through a coupling capacitor. The FM discriminator is
tuned to 10.7 MHz using the ceramic/crystal resonator (CF3). The AF signal (demodulated
output from IF block using the FM discriminator) is further amplified (to drive the ear
phones) by the AF power amplifier. The volume at the output (ear phone) is controlled by
using a variable resistor (potentiometer) of maximum 50kOhm resistor RV1.The audio
signal is then fed to earphone through pin 28 and capacitor C21.
19
L293D driver connections:
Fig 2.5.5: Motor driving connections using L293D
Table 2.5.1: Operations performed
Left Motor Right Motor Robot Movement
Forward
Forward
Backward
Backward
Forward
Reverse
Forward
Backward
Forward
Right
Left
Backward
20
CHAPTER 3
PROGRAMMING OF
MICROCONTROLLER
21
Table 3.1.1: Actions performed corresponding to the keys pressed
a
Number
Pressed
Output of
DTMF Decoder
Input to the
Microcontroller
Output of
Microcontroller
Action
Performed
1 0x01
00000001
0x02
00000010
0x03
00000011
0x04
00000100
0x05
00000101
0x06
00000110
0x07
00000111
0x08
00001000
0x09
00001001
0x0A
00001010
0x0B
00001011
0x0C
00001100
PORTB=
0b00001111
Lights ON
0x01
00000001
2 0x02
00000010
0x02
00000010
PORTC=
0b00000101
Forward
3
4
5
6
7
8
9
*
0
#
0x03
00000011
0x04
00000100
0x05
00000101
0x06
00000110
0x07
00000111
0x08
00001000
0x09
00001001
0x0A
00001010
0x0B
00001011
0x0C
00001100
0x03
00000011
0x04
00000100
0x05
00000101
0x06
00000110
0x07
00000111
0x08
00001000
0x09
00001001
0x0A
00001010
0x0B
00001011
0x0C
00001100
PORTC=
0b00001001
PORTB=
0b00000000
PORTC=
0b00000110
PORTB=
0b00000000
PORTC=
0b00001010
-
PORTC=
0b00000000
Camera Up
Left
Halt
Right
Lights OFF
Backward
Camera Down
Retrace
Future use
System Stop
1
22
3.1: Flowchart:
Start
Configure input and
output ports
Read
PORTD
Is
PORTD=
?
LEDs ON Back PORTD=1
PORTD=2
Move Forward Save
Is
Camangle <
max value
?
PORTD=3
yes Move Camera
Up
Back
back
no
Next1
23
Is
Camangle >
min value
?
Next1
Move Backward Save PORTD=4
Wheels stop
rotating Save
PORTD=5
Move Right Save PORTD=6
LEDs OFF Back PORTD=7
Move Backward Save PORTD=8
PORTD=9
Move Camera
Down
Back
Next2
yes
no
24
Is
Counter =
final value
?
yes
no
Next2
Read the
reverse code
Rotate wheels
Increment
counter
Clear the code from
memory
Back
Do nothing Back
PORTD=*
PORTD=0
Stop the
wheels
PORTD=#
Is
Camangle =
0
?
no
Back
Next2
Next3
Back
Back1
yes
25
Next3
Is
Camangle >
0
?
Move camera
down
yes
Move camera
up
no
Back1
Save
Save the reverse
code
Delete the first
wheel status
Back
Generate the
reverse code for
the present code
26
3.2: Source code
#include <avr/io.h>
#define F_CPU 1000000
#include <util/delay.h>
int main()
{ intA[60]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int i, count, flag, temp;
int stpr[8]={1,3,2,66,64,192,128};
int stprcount;
int camangle;
DDRA= 0xff;
DDRB= 0xff;
DDRC= 0xff;
DDRD= 0x00;
PORTA= 0x00;
PORTB= 0x00;
PORTC= 0x00;
PORTD= 0xff;
count= 0;
flag= 0;
temp= 0;
27
stprcount= 0;
camangle= 0;
while(1)
{
switch(PIND)
{
case 64:
case 79: PORTC=5; //0b00000101; forward key 2
temp=10;
flag=1;break;
case 16:
case 31: PORTC=10; //0b00001010; backward key 8
temp=5;
flag=1;break;
case 32:
case 47: PORTC=9; //0b00001001; left key 4
temp=6;
flag=1;break;
case 96:
case 111: PORTC=6; //0b00000110; right key 6
temp=9;
flag=1;break;
28
case 160:
case 175: PORTC=0; //0b00000000; stop key 5
temp=0;
flag=1;break;
case 128:
case 143: PORTB=15; //0b00001111; LED ON key 1
flag=0;break;
case 224:
case 239: PORTB=0; //0b00000000; LED OFF key 7
flag=0;break;
case 192:
case 207: flag=0;
if(camangle<100) // Camara up key 3
{
PORTA=stpr[stprcount];
stprcount=stprcount+1;
_delay_ms(100);
camangle=camangle+1;
if(stprcount==8)
stprcount=0;
} break;
29
case 144:
case 159: flag=0;
if(camangle>-100) // Camara down key 9
{
PORTA=stpr[stprcount];
stprcount=stprcount-1;
_delay_ms(100);
camangle=camangle-1;
if(stprcount==-1)
stprcount=7;
}
break;
case 48:
case 63: PORTC=0; //0b00000000; Stop and Reset key 12
while(camangle!=0)
{
if(camangle<0)
{
camangle=camangle+1;
PORTA=stpr[stprcount];
stprcount=stprcount+1;
_delay_ms(100);
30
if(stprcount==8)
stprcount=0;
}
else
if(camangle>0)
{
camangle=camangle-1;
PORTA=stpr[stprcount];
stprcount=stprcount-1;
_delay_ms(100);
if(stprcount==-1)
stprcount=7;
}
} break;
case 80:
case 95: flag=0; // Retrace path key 10
for (i=0;i<60;i++)
{ PORTC= A[i];
_delay_ms(500);
A[i]= 0;
PORTC= 0;
_delay_ms(50);
31
} break;
default: PORTB= 0; //0b00000000; Do nothing
PORTC= 0;
flag= 0; break;
}
// Codes to store path trail
If (flag==1)
{ flag= 0;
_delay_ms(1);
count= count+1;
if (count==500)
{ count=0;
for(i=59;i>0;i--)
{A[i]=A[i-1];
}
A[0]=temp;
}
}
}
}
32
CHAPTER 4
FUTURE DEVELOPMENTS AND
APPLICATIONS
33
And finally….!!
Fig 4.1.1.: Spy robot
4.1: Applications
It can be used in spying purposes to get the confidential details of anybody from
remote area without making our life in danger.
The camera which has been installed can provide the live streaming of the places
where a human can’t reach (especially during natural calamities like earthquake).
It can be also used by our defense agency in many cases.
Wireless security and surveillance in hot spots
Search and rescue operation
Manoeuvring in hazardous environment
Caves exploration
34
4.2: What new can be added..??
GPS technology can be integrated
Image/ Video capture option
Locomotion of the robot on other terrains
360 degree rotation of the camera so that we can get complete view of the robot’s
environment
Voice controlled locomotion of robot instead of button control
(Key ‘0’ is reserved for the purpose of future use)
CHAPTER 5
35
CONCLUSION AND
REFERENCES
5.1: Problems we faced…..
Stepper motor interfacing
We thought of including angular rotation for the camera and enabling a focus of
about 180 degrees. Fortunately, we were able to write the source code for about 90
degree movements (algorithm similar to stepper motor programming using
microprocessor 8086).
Enabling all the PORTC pins of AtMega16
We were able to rectify this problem with the help of internet sources.
36
FM reception
Because of this we were not able to properly decode the received signals. So our
idea was to use a preset at the FM transmitter module. Our idea worked fairly well!!
Retrace program
We thought of including about 10 seconds retrace option in our program.
Present path details were stored in the flash memory of AtMega16 (similar to the
stack operation). Soon after calling the retrace option, path status was popped off the
stack.
5.2: Inference
The Robotics- the word has a deep meaning. Robotics in turn takes the scale of
development by employing various branches, tools, mechanism and performs a wide variety
of functions for the benefit of mankind. From this whole ocean of robotics, we have finally
built a basic robot- “Spy Robot” quite successfully.
But still this is not the end… It’s the beginning of the new era of robotics. Still we
have a long way to traverse in which we further decide to extend our robotic art to work out
for a specific application as well as increase its functionalities by proper deployment of
sensors and developing new architectures and designs even more accurately. Even this can
be extended to control the robot from the internet as well as by making an appropriate mobile
application too, even with lesser cost.
Thus the scope of further expansion of this project – “Spy Robot” is endless.
5.3: References
www.avrfreaks.com
www.wikipedia.org
www.alldatasheets.com
Google web search