Sunteți pe pagina 1din 41

1.

ABSTRACT
This project is based on Automobile Surveillance Robot with Camera Interfacing as
suggested by Prof. P. U. Chavan and Prof. P. P. Bhujbal .The objective of this project is to
design and build a manually controlled wireless surveillance robot.
The main purpose of the project is to be able to roam around in a given environment
while transmitting back real time data (video) to the PC. This real time data can be then
used by the controller (human) to control the robot around.
Also,the surveillance robot must be compact and self contained with wireless
transmission of data.

1
KJ College of Engineering and Management Research
Engineering

Department of E&TC

2. LITERATURE REVIEW
With the advanced technologies, it is possible to make and implement a wireless
surveillance robot which will prove beneficial for surveillance purpose in day to day life.
Our aim here is to design a surveillance robot that can be controlled manually using a
laptop/PC. The robot will consist of a video camera which will provide live video feed on the
desktop and the controller will manually control the robot using this live video by giving
commands like forward, left, right, etc. Since the main purpose of the robot is surveillance we
have named the project as Automobile Surveillance Robot with Camera Interfacing .
To start working on the surveillance robot we have gone through IEEE papers on the
various surveillance techniques. We have gone through the magazines like Electronics for
you and Power Electronics. We searched for the new technologies being developed in the
field of surveillance on various websites
The group conducted a literature survey among other students, faculty, family and
friends, and visited few companies, so as to identify the areas in our project from the
design stage itself.
Majority of the people in the survey came up with similar suggestions /requirements as
noted below:

Cost efficiency.

Durability (Due to every day usage).

Intelligent interfacing

Real time data (video) transmission

2
KJ College of Engineering and Management Research
Engineering

Department of E&TC

2.1.

Problem Statement

There are number of places in which human intervention is not possible. Also security of
homes and commercial organizations is of prime concern due to robbery and other
malpractices. Surveillance finds a number of applications in industries as well.

3
KJ College of Engineering and Management Research
Engineering

Department of E&TC

3. INTRODUCTION
Robots are being used in variety of industrial applications for various activities like pick
and place, painting, assembling of subsystems and in hazardous places for material handling
etc.
Robots are becoming more and more intelligent as technology advances in the areas of
CPU speed, sensors, memories etc. And there are ever demanding applications even in
defense. With the rapid growth in camera technology, more and more intelligent devices or
systems have been embedded into it for service, security and entertainment, including
distributed computer systems, telescopes, manipulators and mobile robots.
The increasing need for automated surveillance of various environments, such as airports,
warehouses, production plants, etc. has stimulated the development of intelligent systems
based on mobile sensors. Differently from traditional non-mobile surveillance devices, those
based on mobile robots are still in their initial stage of development, and many issues are
currently open for investigation (Everett, H., 2003), (DehuaI, Z. et al. 2007). The use of
robots significantly expands the potential of surveillance systems, which can evolve from the
traditional passive role, in which the system can only detect events and trigger alarms, to
active surveillance, in which a robot can be used to interact with the environment, with
humans or with other robots for more complex cooperative actions (Burgard, W. et al. 2000),
(Vig, L. & Adams, J.A., 2007).
Wireless video surveillance is an important research area in the commercial sector as
well. Technology has reached a stage where mounting cameras to capture video imagery is
cheap, but finding available human resources to sit and watch that imagery is expensive.
Surveillance cameras are already prevalent in commercial establishments, with camera
output being recorded to tapes that are either rewritten periodically or stored in video
archives. At the same time web camera connected to the microcontroller keeps on capturing
what is going on there at the host place and saves it into the computer.
In the last years, several worldwide projects have attempted to develop mobile security
platforms. A notable example is the Mobile Detection Assessment and Response System
4
KJ College of Engineering and Management Research
Engineering

Department of E&TC

(MDARS) (Everett, H. & Gage, D.W., 1999). The aim of this project was that of developing
a multi- robot system able to inspect warehouses and storage sites, identifying anomalous
situations, such as flooding and fire, detect intruders, and determine the status of inventoried
objects using specialized RF transponders. In the RoboGuard project (Birk, A. & Kenn, H.,
2001), a semi-autonomous mobile security device uses a behavior-oriented architecture for
navigation, while sending video streams to human watch-guards. The Airport Night
Surveillance Expert Robot (ANSER) (Capezio, F. et al. 2005) consists of an Unmanned
Ground Vehicle (UGV) using non-differential GPS unit for night patrols in civilian airports
and similar wide areas, interacting with a fixed supervision station under control of a human
operator. A Robotic Security Guard (Duckett, T. et al. 2004) for remote surveillance of
indoor environments has been also the focus of a research project at the Learning Systems
Laboratory of AASS. The objective of this project was that of developing a mobile robot
platform able to patrol a given environment, acquire and update maps, keep watch over
valuable objects, recognize people, discriminate intruders from known persons, and provide
remote human operators with a detailed sensory analysis.
We introduce a surveillance robot having mobile capabilities which can be controlled
manually using a PC console application, i.e., Visual Basic (VB). The on board cameras
provides real time transmission of live video on the desktop depending on which the
controller gives the suitable command to move the robot in the given environment. Going
wireless reduces the cost of cabling and gives it the flexibility to approach the areas where
the wired robots cannot reach.

5
KJ College of Engineering and Management Research
Engineering

Department of E&TC

4. BLOCK DIAGRAM

Fig. 4. 1. Block Diagram of Surveillance Robot

6
KJ College of Engineering and Management Research
Engineering

Department of E&TC

4.1.

Block Diagram (Working) :

A 5V supply is given to the AVR controller to ON the surveillance robot. Also, a 9V


battery is connected to the wireless camera.
When the camera gets on we get a live video feed on the desktop.
Using this live video feed the controller gives various commands such as forward,
left, right, stop, etc using Visual Basic PC console application.
These commands are transferred wirelessly over wireless RF 433 Mhz link.
Upon receiving the commands from the controller the robot moves in the given
direction using two DC motors.

7
KJ College of Engineering and Management Research
Engineering

Department of E&TC

5. BLOCK DIAGRAM DESCRIPTION


5.1.

RF Transmission/Reception

RF refers to radio frequency, the mode of communication for wireless technologies of all
kinds, including cordless phones, radar, ham radio, GPS, and radio and television broadcasts.
In our project, we have successfully implemented RF technology for data transmission as
well as reception.

RF waves are electromagnetic waves which propagate at the speed of light, or 186,000
miles per second (300,000 km/s). The frequencies of RF waves, however, are slower than
those of visible light, making RF waves invisible to the human eye.

The frequency of a wave is determined by its oscillations or cycles per second. One cycle
is one hertz (Hz); 1,000 cycles is 1 kilohertz (KHz); 1 million cycles is 1 megahertz (MHz);
and 1 billion cycles is 1 gigahertz (GHz). A station on the AM dial at 980, for example,
broadcasts using a signal that oscillates 980,000 times per second, or has a frequency of 980
KHz. A station a little further down the dial at 710 broadcasts using a signal that oscillates
710,000 times a second, or has a frequency of 710 KHz. With a slice of the RF pie licensed to
each broadcaster, the RF range can be neatly divided and utilized by multiple parties.

8
KJ College of Engineering and Management Research
Engineering

Department of E&TC

5.2.

Liquid Crystal Display (LCD)

Most of the projects with the any microcontroller (8051/PIC/AVR/ARM) require some
form of display. In market various displays are available like 7-segment, 5*7 matrix LED and
LCD, bar graph, LCD, etc. Its important for deciding the required display set for our project.
Selection of display depends on various factors like power consumption, ambient light
conditions, surrounding temperature, visibility from long distance, total information to be
display, cost of display, circuit/lines required for display interfacing, etc.
The most common way to accomplish this is with the LCD (Liquid Crystal Display).
LCDs have become a cheap and easy way to get text display for an embedded system.
Following figure shows the basic pin diagram of 16*2 LCD display:-

Fig.5.2.1. LCD 16*2

9
KJ College of Engineering and Management Research
Engineering

Department of E&TC

In our system we prefer to choose a LCD instead of LED or 7-Seg display because of
the following reasons:
1) It has the ability to display numbers, characters and graphics whereas LED displays
are limited to numbers and a few characters.
2)

There is refreshing controller in the LCD which reduces the overhead of the CPU.
3) Ease of programming for characters and graphics.
We have used the 16 by 2 LCD that means that it can display the two lines containing
16 characters each. The Pixel Matrix is of 7 by 5 pixels that are each character can be
displayed using 7 columns of the pixels and 5 rows of the pixels.
To control the operation of the LCD three control signals are used they are as follows,

1)

Enable (EN): It is used to enable the display to perform any operation with it.

2)

R/W (Read/Write): This signal indicates to LCD processor that the operations being
performed is read operation or write operation.
If it is 1 it indicates the read operation and if it is 0 it indicates the write operation.
3) RS (Register Select) : There are two types of registers as command register and data
register. To select one of these registers RS signal is used.
If it is 0 the command register will be get selected and when it is 1 the data register
will be selected.
There are 8 lines for the data transfer between micro controller and LCD.
10
KJ College of Engineering and Management Research
Engineering

Department of E&TC

5.3.

DC Motors

DC motors are used to physically drive the application as per the requirement provided in
software. The dc motor works on 12V.
To drive a dc motor, we need a dc motor driver called L293D. This dc motor driver is
capable of driving 2 dc motors at a time. In order to protect the dc motor from a back EMF
generated by the dc motor while changing the direction of rotation, the dc motor driver have
an internal protection suit. We can also provide the back EMF protection suit by connecting 4
diode configurations across each dc motor.

11
KJ College of Engineering and Management Research
Engineering

Department of E&TC

5.4.

Wireless Camera

5.4.1. Color CMOS wireless

Camera apparatus: 1/3,1/4 picture sensor


System: PAL/CCIR NTSC/ETA
Validity pixel: 628x582 NTSC: 510X492
Output power: 50Mw/200Mw/300Mw
Transmission signal: Picture , Sound
Deliver the Distance: 50-100/200-300M
Voltage: +9V
Current: 200mA/300mA
Power Consumption: =<400mW

5.4.2. Manual Modulated Receiver

High receiver sensitivity:+18Db


Receive Signal: Picture, Sound
Voltage: DC 9V
Current: 500mA

6. CIRCUIT DIAGRAM
12
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig. 6.a. Circuit Diagram

7. CIRCUIT DIAGRAM EXPLANATION


13
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig.7.a. AVR Microcontroller


7.1.

Reset Circuit

Reset is used for putting the microcontroller into a 'known' condition. That practically
means that microcontroller can behave rather inaccurately under certain undesirable
conditions. In order to continue its proper functioning it has to be reset, meaning all registers
would be placed in a starting position. Reset is not only used when microcontroller doesn't
behave the way we want it to, but can also be used when trying out a device as an interrupt in
program execution, or to get a microcontroller ready when loading a program.
In order to prevent from bringing a logical zero to MCLR pin accidentally, MCLR has to
be connected via resistor to the positive supply pole and a capacitor from MCLR to the
ground. Resistor should be between 5 and 10K and the capacitor can be in between 1f to10
f. This kind of resistor capacitor combination, gives the RC time delay for the c to reset
properly.

14
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig.7.1.1. Reset Circuit


As shown in the above circuit we are connecting an RC circuit to the MCLR (pin9) of
C .The AVR C has an active low reset, therefore we connect an RC circuit. As shown the
capacitor is initially at 0v.It charges via the supply through a 10 kohm resistance in series,
therefore the reset time of our circuit is:
R*C = 10kohm * 10 f

= 100 msec

Recommended time of reset = 1

msec

Here the RC time can vary from 10 msec to 100 msec.

7.2.

Crystal Circuit

15
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Pins OSC1 & OSC2 are provided for connecting a resonant network to form oscillator.
Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic
internal clock frequency of the microcontroller. The manufacturers make available PIC
designs that can run at specified maximum & minimum frequencies, typically 1 MHz to 16
MHz.
P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1

State 1 State 2

State 3 State 4 State 5

State 6

One Machine Cycle

Fig.7.2.1. Crystal Circui


Here we are connecting two ceramic capacitors which are basically used for filtering. In
other words to give a pure square wave to the C we are connecting the two capacitors.
The basic rule for placing the crystal on the board is that it should be as close to the C as
possible to avoid any interference in the clock.
7.2.1. Why 11.0592 Mhz?
16
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Serial data communication needs often dictate the frequency of the oscillator because of
the requirement that internal counters must divide the basic clock rate to yield standard
communication baud rates. If the basic clock frequency is not divisible without a reminder,
then the resulting communication is not standard.

7.3.

Power Supply

17
KJ College of Engineering and Management Research
Engineering

Department of E&TC

The basic step in the designing of any system is to design the power supply required for
that system. The steps involved in the designing of the power supply are as follows,
1) Determine the total current that the system sinks from the supply.
2) Determine the voltage rating required for the different components.

Fig.7.3.1. Power supply


The bridge rectifier and capacitor i/p filter produce an unregulated DC voltage which is
applied at the I/P of 7805.As the minimum dropout voltage is 2v for IC 7805, the voltage
applied at the input terminal should be at least 7 volts.
C1 (1000 f / 65v) is the filter capacitor and C2 and C3 (100n f) is to be connected across
the regulator to improve the transient response of the regulator.
Assuming the drop out voltage to be 2 volts, the minimum DV voltage across the capacitor
C1 should be equal to 7volts (at least).

7.4.

LCD

18
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig.7.4.a. Interfacing LCD


7.4.1. LCD Power SourcesLCD has 2 Power Sources
1) VCC and GND is at 1 and 2 NO. pins of LCD. Used to drive the LCD 3mA current
consumption.
2) VCC and GND is at 15 and 16 NO. pins of LCD used to drive the backlight of LCD
100 mA current
Total current consumption = 3mA + 100mA = 103 mA
So, in order to reduce the current requirement we are connecting a 330 ohm resistance in
series with the backlight pin VCC. This reduces the current consumption (100mA / 330ohm
=0.303 mA).
Therefore new total current consumption = 0.303mA+3 mA =3.303 mA.

7.4.2.

LCD Data and Control lines

19
KJ College of Engineering and Management Research
Engineering

Department of E&TC

LCD has 8 / 4 data lines and 3 control lines .The 4 data lines of LCD (pin 11 to pin
14 ) are connected to the B port of PIC C (B4 to B7) .
The control lines of LCD are RS, R/W ,E.
1) Register Select (RS)The LCD RS pin is for selecting the data or the code register, it connected to pin 35 ie B2.
If RS=0 , the instruction command code register is selected, allowing the user to send a
command such as clear display , cursor at home, etc.
If RS=1, the data register is selected, allowing the user to send data to be displayed on the
LCD.
2) Read/ Write (R/W)The LCD R/W is for choosing between reading or writing on LCD.
R/W=1 when reading.
R/W=0 when writing.
Here R/W is connected to ground, i.e., R/W=0.
3) Enable (E)LCD pin E is for enabling or disabling the LCD which connected to pin 34, i.e., B1.
The enable pin is used by the LCD to latch information presented to its data pins. A high-tolow pulse must be applied to this pin.

7.5.

Voltage Regulator 7805:

20
KJ College of Engineering and Management Research
Engineering

Department of E&TC

We need the regulated 5 V output for the most of the ICs used in our system. Now the
output of bridge rectifier is unregulated DC. To get 5V regulated Dc output from it we have
used regulator IC 7805.
Following fig shows the pin out diagram of the regulator IC 7805.

The 7805 is a three terminal positive voltage regulator IC which gives regulated 5V
D.C. output. The maximum input voltage that can be applied to input pin is the 35 V.
The minimum difference between input and output voltage required is the 2 V. The pin no
1 is the input pin where the unregulated input voltage is applied. Pi no.2 is connected to the
ground, whereas pin no.3 is the output pin at which the regulated 5V output can be obtained.
The 7805 is designed with adequate heat sinking and can deliver output currents in
excess of 1 A. It has internal thermal overload protection and internal short circuit
current limiting. For proper operation a common ground is required between input and
output voltages.

8. PCB LAYOUT

21
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig.8.a. PCB layout

9. PCB LAY OUT AND ARTWORK

22
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Layout basically means placing or arranging things in a specific order on the

PCB.

Layout means placing of components in an order. This placement is made such that the
interconnection lengths are optimal .At the same time, it also aims at providing accessibility
to the components for insertion testing and repair.
The PCB layout is the starting point for the final artwork preparation layout design should
reflect the concept of final equipment.

There are several factors, which we must keep in

mind for placing the layout.


9.1.

Schematic Diagram:

The schematic diagram forms main input document for preparation of the layout .For this
purpose the software for PCB design, PROTEUS was used.
9.2.

Electrical and thermal requirement:

The PCB designer must be aware of the circuit performance in critical aspects of the same
concerning electrical conditions and the environment to be used in.
9.3.

Mechanical requirement:

The designer should have the information about physical size of the board, type of
installation of board (vertical/horizontal). The method of cooling adopted, front panel
operated components etc.
9.4.

Component placing requirement:

All components are to be placed first in a configuration that demands only the minimum
length for critical conductors. These key components are placed first and the others are
grouped around like satellites.

9.5.

Components mounting requirements:

All components must be placed parallel to one another as far as possible .i.e. in the same
direction and orientation mechanical over stressing of solder should be avoided.
23
KJ College of Engineering and Management Research
Engineering

Department of E&TC

9.6.

Layout Methodology:

For proper layout design minimal steps to be followed are:


1. Get the final circuit diagram and component list.
2. Choose the board types, single sided / double sided / multilayer
3. Identify the appropriate scale for layout.
4. Select suitable grid pattern.
5. Choose the correct board size keeping in view the constraints.
6. Select appropriate layout technique, manual / automated.
7. Document in the form of the layout scale.
9.7.

Art Work:

Art work is accurately scaled configuration of the printed circuit from which the master
pattern is made photographically.
9.7.1. Art Work Rule:
Rules followed while selecting artwork symbol takes:
1) Minimum spacing between conductor and pad should be 0 / 35 mm in
2) 1:1 scale.
3) Minimum spacing between parallel conductors should be 0.4 mm in 1:1 scale.
4) The area of non-PTH solder pad should not be less than 5 sq.mm.
5) The width of current carrying conductors should be determined for max. temp. rise of
20 C .

9.7.2. General Art Work Rules:


1) When there is higher conductor density assumes the conductors parallel to any one of
the edge of the board.
24
KJ College of Engineering and Management Research
Engineering

Department of E&TC

2) When conductors have to be placed in other direction preference should be given to


the 45 direction or to the 30 / 60direction.
3) Whenever there is sufficient space available the conductors can be run in any
direction so as to achieve sorted possible interconnection.
4) As far as possible, design and the conductor on the solder pad.
5) Conductor forming sharp internal angles must be avoided.
6) When a member of conductor has to run between two pads the conductor lines are run
perpendicular w.r.t. the center-to-center line of pair of pads.
7) Equally distributed spacing is to be provided when three or more conductors run
along a direction and / or between two pads.
8) Minimum spacing is provided when three or more lines run along a direction and / or
between two pads.
9) The diameter of solder pad should be approximately 8 times the drilled hole diameter.

10.
10.1.

SPECIFICATIONS

Hardware Used
1) AVR ATMEGA16
2) Wireless Camera
3) RF module for wireless link

25
KJ College of Engineering and Management Research
Engineering

Department of E&TC

4) Two DC motors
5) Power supply
6) LCD 16*2
10.1.1. Introduction to Microcontroller AVR ATMEGA 16
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.

Fig.10.1.1. AVR ATMEGA 16

Features:
High-performance, Low-power Atmel, 8-bit Microcontroller

Advanced RISC Architecture


131 Powerful Instructions Most Single-clock Cycle Execution
32 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16MHz
On-chip 2-cycle Multiplier

High Endurance Non-volatile Memory segments


32Kbytes of In-System Self-programmable Flash program memory
1024Bytes EEPROM
26
KJ College of Engineering and Management Research
Engineering

Department of E&TC

2Kbytes Internal SRAM


Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
Data retention: 20 years at 85C/100 years at 25C
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
Programming Lock for Software Security
JTAG (IEEE std. 1149.1 Compliant) Interface
Boundary-scan Capabilities According to the JTAG Standard
Extensive On-chip Debug Support
Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface

Peripheral Features
Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

Mode
Real Time Counter with Separate Oscillator
Four PWM Channels
8-channel, 10-bit ADC
8 Single-ended Channels
7 Differential Channels in TQFP Package Only
2 Differential Channels with Programmable Gain at 1x, 10x, or 200x
Byte-oriented Two-wire Serial Interface
Programmable Serial USART
Master/Slave SPI Serial Interface
Programmable Watchdog Timer with Separate On-chip Oscillator
On-chip Analog Comparator

Special Microcontroller Features


Power-on Reset and Programmable Brown-out Detection
Internal Calibrated RC Oscillator
External and Internal Interrupt Sources
Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby
and Extended Standby

I/O and Packages


32 Programmable I/O Lines
40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF
Operating Voltages
2.7V - 5.5V for ATmega32L
4.5V - 5.5V for ATmega32
Speed Grades
0 - 8MHz for ATmega32L
0 - 16MHz for ATmega32
Power Consumption at 1MHz, 3V, 25C
27
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Active: 1.1mA
Idle Mode: 0.35mA
Power-down Mode: < 1A

Fig.10.1.2. Pin outs of AVR ATMEGA 16

28
KJ College of Engineering and Management Research
Engineering

Department of E&TC

10.2.

Software Used
1) AVR Studio
2) Ponyprog Programmer

10.2.1. Introduction to Embedded C


Looking around, we find ourselves to be surrounded by various types of embedded
systems. Be it a digital camera or a mobile phone or a washing machine, all of them has
some kind of processor functioning inside it. Associated with each processor is the
embedded software. If hardware forms the body of an embedded system, embedded
processor acts as the brain, and embedded software forms its soul. It is the embedded
software which primarily governs the functioning of embedded systems.
During infancy years of microprocessor based systems, programs were developed using
assemblers and fused into the EPROMs. There used to be no mechanism to find what the
program was doing. LEDs, switches, etc. were used to check correct execution of the
program. Some very fortunate developers had In-circuit Simulators (ICEs), but they were
too costly and were not quite reliable as well.
As time progressed, use of microprocessor-specific assembly-only as the programming
language reduced and embedded systems moved onto C as the embedded programming
language of choice. C is the most widely used programming language for embedded
processors/controllers. Assembly is also used but mainly to implement those portions of the
code where very high timing accuracy, code size efficiency, etc. are prime requirements.
Initially C was developed by Kernighan and Ritchie to fit into the space of 8K and to write
(portable) operating systems. Originally it was implemented on UNIX operating systems. As
it was intended for operating systems development, it can manipulate memory addresses.
Also, it allowed programmers to write very compact codes. This has given it the reputation as
the language of choice for hackers too.

29
KJ College of Engineering and Management Research
Engineering

Department of E&TC

As assembly language programs are specific to a processor, assembly language didnt


offer portability across systems. To overcome this disadvantage, several high level languages,
including C, came up. Some other languages like PLM, Modula-2, Pascal, etc. also came but
couldnt find wide acceptance. Amongst those, C got wide acceptance for not only embedded
systems, but also for desktop applications. Even though C might have lost its sheen as
mainstream language for general purpose applications, it still is having a strong-hold in
embedded programming. Due to the wide acceptance of C in the embedded systems,
various kinds of support tools like compilers & cross-compilers, ICE, etc. came up and all
this facilitated development of embedded systems using C.
Subsequent sections will discuss what is Embedded C, features of C language,
similarities and difference between C and embedded C, and features of embedded C
programming.
10.2.2. Embedded Systems Programming
Embedded systems programming is different from developing applications on a
desktop computers. Key characteristics of an embedded system, when compared to PCs,
are as follows:

Embedded devices have resource constraints (limited ROM, limited RAM, limited

stack space, less processing power)


Components used in embedded system and PCs are different; embedded systems

typically uses smaller, less power consuming components.


Embedded systems are more tied to the hardware.
Two salient features of Embedded Programming are code speed and code size.

Code speed is governed by the processing power, timing constraints, whereas code size is
governed by available program memory and use of programming language. Goal of
embedded system programming is to get maximum features in minimum space and
minimum time.

30
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Embedded systems are programmed using different type of languages:

Machine Code
Low level language, i.e., assembly
High level language like C, C++, Java, Ada, etc.
Application level language like Visual Basic, scripts, Access, etc.
Assembly language maps mnemonic words with the binary machine codes that the

processor uses to code the instructions. Assembly language seems to be an obvious choice
for programming embedded devices. However, use of assembly language is restricted to
developing efficient codes in terms of size and speed. Also, assembly codes lead to higher
software development costs and code portability is not there. Developing small codes are not
much of a problem, but large programs/projects become increasingly difficult to manage in
assembly language. Finding good assembly programmers has also become difficult
nowadays. Hence high level languages are preferred for embedded systems programming.
Use of C in embedded systems is driven by following advantages

It is small and reasonably simpler to learn, understand, program and debug.

C Compilers are available for almost all embedded devices in use today, and
there is a large pool of experienced C programmers.

Unlike assembly, C has advantage of processor-independence and is not specific


to any particular microprocessor/ microcontroller or any system. This makes it
convenient for a user to develop programs that can run on most of the systems.

As C combines functionality of assembly language and features of high


level languages, C is treated as a middle-level computer language or high
level assembly language

It is fairly efficient

31
KJ College of Engineering and Management Research
Engineering

Department of E&TC

It supports access to I/O and provides ease of management of large


embedded projects.

Many of these advantages are offered by other languages also, but what sets C apart
from others like Pascal, FORTRAN, etc. is the fact that it is a middle level language; it
provides direct hardware control without sacrificing benefits of high level languages.
Compared to other high level languages, C offers more flexibility because C is
relatively small, structured language; it supports low-level bit-wise data manipulation.
Compared to assembly language, C Code written is more reliable and scalable, more
portable between different platforms (with some changes). Moreover, programs developed in
C are much easier to understand, maintain and debug. Also, as they can be developed more
quickly, codes written in C offers better productivity. C is based on the philosophy
Programmers know what they are doing; only the intentions are to be stated explicitly. It
is easier to write good code in C & convert it to an efficient assembly code (using high
quality compilers) rather than writing an efficient code in assembly itself. Benefits of
assembly language programming over C are negligible when we compare the ease with
which C programs are developed by programmers.
Objected oriented language, C++ is not apt for developing efficient programs in
resource constrained environments like embedded devices. Virtual functions & exception
handling of C++ are some specific features that are not efficient in terms of space and speed
in embedded systems. Sometimes C++ is used only with very few features, very much as C.
Ada, also an object-oriented language, is different than C++. Originally designed by the
U.S. DOD, it didnt gain popularity despite being accepted as an international standard twice
(Ada83 and Ada95). However, Ada language has many features that would simplify
embedded software development.
Java is another language used for embedded systems programming. It primarily finds
usage in high-end mobile phones as it offers portability across systems and is also useful
for browsing applications. Java programs require Java Virtual Machine (JVM), which
32
KJ College of Engineering and Management Research
Engineering

Department of E&TC

consume lot of resources. Hence it is not used for smaller embedded devices.
Dynamic C and B# are some proprietary languages which are also being used in
embedded applications.
Efficient embedded C programs must be kept small and efficient; they must be
optimized for code speed and code size. Good understanding of processor architecture
embedded C programming and debugging tools facilitate this.
10.2.3. Difference Between C AND Embedded C
Though C and embedded C appear different and are used in different contexts, they
have more similarities than the differences. Most of the constructs are same; the difference
lies in their applications.
C is used for desktop computers, while embedded C is for microcontroller based
applications. Accordingly, C has the luxury to use resources of a desktop PC like memory,
OS, etc. While programming on desktop systems, we need not bother about memory.
However, embedded C has to use with the limited resources (RAM, ROM, I/Os) on an
embedded processor. Thus, program code must fit into the available program memory. If
code exceeds the limit, the system is likely to crash.
Compilers for C (ANSI C) typically generate OS dependant executables. Embedded C
requires compilers to create files to be downloaded to the microcontrollers/microprocessors
where it needs to run. Embedded compilers give access to all resources which is not provided
in compilers for desktop computer applications.
Embedded systems often have the real-time constraints, which is usually not there with
desktop computer applications. Embedded systems often do not have a console, which is
available in case of desktop applications.

11.APPLICATIONS
In hospitals
33
KJ College of Engineering and Management Research
Engineering

Department of E&TC

In clinics
At residencies also
Can be used in military applications too

34
KJ College of Engineering and Management Research
Engineering

Department of E&TC

12.ADVANTAGES

Less time delays


Quick response time
Fully automate system
Low power requirement
Reduces use of paper for billing
Accurate billing
Digital display of weight.

35
KJ College of Engineering and Management
Research
Department of E&TC
Engineering

13.COMPONENTS LIST

COMPONENT DESCRIPTION
TRANSFORMER
MICROCONTROLLER
CAPACITORS

RATING
15V,1AMP
AVR
33PF

QUANTITY
1
1

0.01UF
Wireless Camera

UNIT
PRICE
100
300
2
2

0.1UF
2
1UFThe camera sends the live video feed on the3.5

CRYSTAL
RF
Module
DIODES
REGULATOR

desktop.
220UF(ELC)
5
The PC console application using which the
470UF(ELC)
5
controller gives commands to the
1000UF(ELC)
7
microcontroller.
1
12
The
RF
transmitter
on
the
user
(PC)
side
1N4007
4
1
LMwirelessly
7805
10
transmits the commands to the RF

RESISTORS

1K

Visual Basic

AVR Microcontroller

receiver which are then given to the AVR

0.25
microcontroller
1.2K
Upon receiving the commands from the user0.25
2.2K
The microcontroller processes them to give 0.25
4.7K
0.25
various movements like forward, right, etc to

DC Motors
LCD
16*2
RF Module
RS232
MAX232
DC MOTOR DRIVER
DC MOTOR
LCD

10Kthe robot
0.25
Gives the direction the robot.
330K
0.25
Displays the direction2 in which the robot is 1600
CC2550
moving.
L293D
16*2

6 Rs/m

1
1
2
1

30
90
300
120

14.RESULT

36
KJ College of Engineering and Management Research
Engineering

Department of E&TC

Fig.14. Final implementation of the Robot

TABLE 14.1. ANALYSIS OF RESULT IN TABULAR FORM

15. CONCLUSION
Thus we have successfully designed surveillance robot with camera interface which has
low time delay quick response time and low power requirements providing live camera feed
on the desktop and navigates as per the commands given by the user/controller.

37
KJ College of Engineering and Management Research
Engineering

Department of E&TC

16. FUTURE SCOPE


The video feed can be provided to the user directly at his/her home using web
technology.
Various sensors can be attached to find more applications in industries.
The size of the robot can be made more compact allowing it to access narrow
and hazardous environments.

38
KJ College of Engineering and Management Research
Engineering

Department of E&TC

17. REFERENCES
[1] Alireza Ghaffarkhah, and Yasamin Mostofi, Path Planning for Networked Robotic
Surveillance, IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 60, NO.
7, JULY 2012.
[2] Theodoros Theodoridis and Huosheng Hu, Action Classification of 3D Human
Models Using Dynamic ANNs for Mobile Robot Surveillance, Proceedings of the
2007 IEEE International Conference on Robotics and Biomimetics December 15 -18,
2007, Sanya, China.
[3] Hou-Tsan Lee,Wei-Chuan Lin, and Ching-Hsiang Huang. Indoor Surveillance
Security Robot with a Self-Propelled Patrolling Vehicle, Hindawi Publishing
Corporation

Journal

of

Robotics,

Volume

2011,

Article

ID

197105,

doi:10.1155/2011/197105.
[4] Donato Di Paola, Annalisa Milella, Grazia Cicirelli and Arcangelo Distante, An
Autonomous Mobile Robotic System for Surveillance of Indoor Environments,
Institute of Intelligent Systems for Automation (ISSIA) National Research Council
(CNR), Bari, Italy.

[5] M.Selvam,

SMART

PHONE

BASED

ROBOTIC

CONTROL

FOR

SURVEILLANCE APPLICATIONS, IJRET: International Journal of Research in


Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308.
[6] Dr. Shantanu K. Dixit, Mr. S. B. Dhayagonde, Design and Implementation of eSurveillance Robot for Video Monitoring and Living Body Detection, International
Journal of Scientific and Research Publications, Volume 4, Issue 4, April 2014 1 ISSN
2250-3153

39
KJ College of Engineering and Management Research
Engineering

Department of E&TC

MICROCONTROLLER AVR ATMEGA


http://www.atmel.com/products/microcontrollers/avr/megaavr.aspx
http://www.atmel.com/Images/doc2503.pdf
http://en.wikipedia.org/wiki/Atmel_AVR
http://www.google.co.in/search?
hl=en&biw=1024&bih=677&q=atmega32+frequency&revid=220574065&sa=X&ei=

UmN-UPD7KInxrQea4oCQDg&sqi=2&ved=0CHUQ1QIo
http://www.google.co.in/search?
hl=en&biw=1024&bih=677&q=avr+atmega32+architecture&revid=220574065&sa=
X&ei=UmN-UPD7KInxrQea4oCQDg&sq

12V DC MOTOR:

www.surplustraders.net/a/0082.shtml

www.alldatasheet.com/datasheet.../G5NB-1A-12VDC.html

theelectrostore.com/datasheets/tsukasa_tech_05.pdf

www.datasheetcatalog.com/intersil/63/

L293D: DC MOTOR DRIVER:

www.datasheetcatalog.com/datasheets_pdf/L/.../L293D.shtm

www.datasheetcatalog.org/datasheet/.../mXyzuxsr.pdf

www.datasheetcatalog.org/datasheet/texasinstruments/l293.pdf

www.solarbotics.com/assets/documentation/kit10.pdf

www.alldatasheet.com/datasheet-pdf/pdf/.../L293D.html

40
KJ College of Engineering and Management Research
Engineering

Department of E&TC

RS232:

www.datasheetcatalog.com/datasheet/M/MAX232.shtm

focus.ti.com/lit/ds/symlink/max232.pdf

www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf

en.wikipedia.org/wiki/RS-232

www.camiresearch.com/Data_Com.../RS232_standard.html

www.arcelect.com/rs232.htm

www.lammertbies.nl/comm/info/RS-232_specs.html

www.wisegeek.com/what-is-rs-232.htm

airborn.com.au/serial/rs232.html

www.omega.com/techref/pdf/rs-232.pdf

www.taltech.com/resources/intro-sc.html

41
KJ College of Engineering and Management Research
Engineering

Department of E&TC

S-ar putea să vă placă și