Académique Documents
Professionnel Documents
Culture Documents
CHAP TER 1
INTRODUCTION
1.1 OVERVIEW
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, behaviour, and/or cognition. Many of today's robots are inspired by nature
contributing to the field of bio- inspired robotics.
The concept of creating machines that can operate autonomously dates back to classical
times, but research into the functionality and potential uses of robots did not grow substantially
until the 20th century. Throughout history, robotics has been often seen to mimic human
behaviour, and often manage tasks in a similar fashion. Today, robotics is a rapidly growing
field, as technological advances continue; research, design, and building new robots serve
various practical purposes, whether domestically, commercially, or militarily. Many robots do
jobs that are hazardous to people such as defusing bombs, mines and exploring shipwrecks.
from a die casting machine and stack them. Commercial and industrial robots are widespread
today and used to perform jobs more cheaply, or more accurately and reliably, than humans.
They are also employed in jobs which are too dirty, dangerous, or dull to be suitable for
humans. Robots are widely used in manufacturing, assembly, packing and packaging, transport,
earth and space exploration, surgery, weaponry, laboratory research, safety, and the mass
production of consumer and industrial goods.
At present mostly (lead-acid) batteries are used as a power source. Many different types
of batteries can be used as a power source for robots. They range from lead acid batteries which
are safe and have relatively long shelf lives but are rather heavy to silver cadmium batteries that
are much smaller in volume and are currently much more expensive. Designing a battery
powered robot needs to take into account factors such as safety, cycle lifetime and weight.
Generators, often some type of internal combustion engine, can also be used. However, such
designs are often mechanically complex and need fuel, require heat dissipation and are relatively
heavy. A tether connecting the robot to a power supply would remove the power supply from the
robot entirely. This has the advantage of saving weight and space by moving all power
generation and storage components elsewhere. However, this design does come with the
drawback of constantly having a cable connected to the robot, which can be difficult to manage.
Potential power sources could be pneumatic (compressed gases), hydraulics (liquids), flywheel
energy storage, organic garbage (through anaerobic digestion).
1.3.2 ACTUATORS
Actuators are like the "muscles" of a robot, the parts which convert stored energy into
movement. By far the most popular actuators are electric motors that spin a wheel or gear, and
linear actuators that control industrial robots in factories. But there are some recent advances in
alternative types of actuators, powered by electricity, chemicals, or compressed air. The majority
DEPT OF ECE
of robots use electric motors, often brushed and brushless DC motors in portable robots, or AC
motors in industrial robots and CNC machines. These motors are often preferred in systems with
lighter loads, and where the predominant form of motion is rotational. Various types of linear
actuators move in and out instead of rotating, and often have quicker direction changes,
particularly when very large forces are needed such as with industrial robotics. They are
typically powered by compressed air (pneumatic actuator) or oil (hydraulic actuator).
1.3.3 SENSORS
1.3.4 MANIPULATOR
Robots need to manipulate objects; pick up, modify, destroy, or otherwise have an effect.
Thus the "hands" of a robot are often referred to as end effectors, while the "arm" is referred to
as a manipulator. Most robot arms have replaceable effectors, each allowing them to perform
some small range of tasks. Some have a fixed manipulator which cannot be replaced, while a few
have one very general purpose manipulator, for example a humanoid hand.
DEPT OF ECE
CHAP TER 2
PROJECT DEFINITION
Aim of the project is to design embedded system to create a wireless spy robot for secret
monitoring purpose, which can be used for safety and security purpose where the security
threads are high and to find the human body inside the building blocks that are destroyed by
earthquake or building crashes and focuses. An embedded system is a combination of computer
circuitry and software that is built into a product for purposes such as control, monitoring and
communication without human intervention. Embedded systems are at the core of every modern
electronic product, ranging from toys to medical equipment to aircraft control systems.
Embedded systems span all aspects of modern life and there are many examples of their use. The
uses of embedded systems are virtually limitless, because every day new products are introduced
to the market that utilizes embedded system in novel ways. An embedded system contains at
least one microprocessor which performs the logic operations for the system. Many embedded
systems use one or more microcontrollers, which are a type of microprocessor that emphasizes
self-sufficiency and cost-effectiveness, instead of a general purpose microprocessor. A typical
microcontroller contains sufficient memory and interfaces for simple applications, whereas
general-purpose microprocessors require additional chips to provide these functions, including at
least one ROM (read-only memory) chip to store the software. Project uses Microchips
microcontroller IC named Peripheral Interface Controller (PIC) and Microchips Integrated
Development Environment, MPLAB, to simulate and assemble the written code.
In this project the robot consist of wireless camera, PIR sensor and motor drivers. The
robot is an all-terrain vehicle, it can move anywhere like a spy. It is a belted vehicle as military
tanker. The wireless camera captures all traveled areas of the robot. The PIR sensor detects the
human intrusion in protected areas or person trapped inside building blocks destroyed by earth
quake. These values are fed to the microcontroller and transmitted to PC through Bluetooth. At
that time RF transmitter also transmit the signals to the PC via RF receiver and tuner card.
DEPT OF ECE
CHAP TER 3
LITERATURE SURVEY
DEPT OF ECE
have been proposed to help them and to perform tasks that neither humans dogs nor existing
tools can do. For this project, we will focus only on robots which will work in a disaster
environment of manmade structure, like collapsed buildings. They are called Urban Search and
Rescue (USAR) robots.
Published in: IEEE transactions-2012
Avatar III Security Robots can significantly augment your existing security capabilities.
Robots stationed around an area can be activated at a moments notice to inspect a situation of
interest significantly reducing incident response times in the process. It can be used hundreds
of miles away from a central Security Operations Centre they run through your existing Wi-Fi
network and recharge at remote docking stations that plug into existing power outlets. Control
software installs on a PC or Mac and uses a handheld controller to provide on-site, ad-hoc robot
control over existing Wi-Fi networks. Just unpack the robot and start patrolling through your
existing security infrastructure. Wireless, real-time video and two-way audio feeds allow the
robot to act as a mobile camera platform, public announcement system, and remote
communication tool. Groups of Avatar III Security Robots can provide coverage for cents-onthe-dollar when compared to traditional security deployments.
Each Avatar III Security Robot comes with 100% flipper-to-flipper hardware coverage
and free technical support. We also make customization and integration simple. We work with a
network of integrators to make sure each Avatar III Security Robot deployment meets your
unique security needs and works with your existing infrastructure. Stair climbing ability, built- in
IR night vision, and dock-connector charging work to ensure full range of movement for robot
security patrols. The robots rugged track system also works almost anywhere carpets, wet
floors, rugged outdoor terrain, and slick concrete.
Published in: Elsevier-2011
DEPT OF ECE
CHAP TER 4
SYSTEM DESCRIP TION
DEPT OF ECE
The details of hardware components used in the system are given below.
PICs are popular with both industrial developers and hobbyists alike due to their low
cost, wide availability, large user base, extensive collection of application notes, availability of
low cost or free development tools, and serial programming (and re-programming with flash
memory) capability. They are also commonly used in educational programming as they often
come with the easy to use 'PIC logicator' software. System consists of a PIC microcontroller unit
of pic-16F family. The PIC processor used in this category is 877A.
The PIC16F877A features 256 bytes of EEPROM data memory, self programming, an
ICD,
2Comparators,
channels
of
10-bit
Analog-to-Digital
(A/D)
converter,
capture/compare/PWM functions, the synchronous serial port can be configured as either 3- wire
Serial Peripheral Interface (SPI) or the 2-wire Inter-Integrated Circuit (IC) bus and a Universal
Asynchronous Receiver Transmitter (USART).
DEPT OF ECE
DEPT OF ECE
10
- Programmable input multiplexing from device inputs and internal voltage reference
- Comparator outputs are externally accessible
DEPT OF ECE
11
For practical reasons, many I/O pins have two or three functions. If a pin is used as any
other function, it may not be used as a general purpose input/output pin and every port has its
satellite, i.e. the corresponding TRIS register: TRISA, TRISB, TRISC etc. which determines
performance, but not the contents of the port bits.
By clearing some bit of the TRIS register (bit=0), the corresponding port pin is
configured as output. Similarly, by setting some bit of the TRIS register (bit=1), the
DEPT OF ECE
12
corresponding port pin is configured as input. This rule is easy to remember 0 = Output, 1 =
Input.
Port A is an 8-bit wide, bidirectional port. Bits of the TRISA and ANSEL control the
PORTA pins. All Port A pins act as digital inputs/outputs. Five of them can also be analog inputs
(denoted as AN):
Similar to bits of the TRISA register which determine which of the pins will be
configured as input and which as output, the appropriate bits of the ANSEL register determine
whether the pins will act as analog inputs or digital inputs/outputs.
DEPT OF ECE
13
Port B is an 8-bit wide, bidirectional port. Bits of the TRISB register determine the
function of its pins.
Similar to Port A, a logic one (1) in the TRISB register configures the appropriate port
pin as input and vice versa. Six pins on this port can act as analog inputs (AN). The bits of the
ANSELH register determine whether these pins act as analog inputs or digital inputs/outputs:
Each Port B pin has an additional function related to some of the built- in peripheral units,
which will be explained in later chapters. All the port pins have built in pull- up resistor, which
make them ideal for connection to push-buttons, switches and couplers. In order to connect these
resistors to the microcontroller ports, the appropriate bit of the WPUB register should be set.
DEPT OF ECE
14
Port C is an 8-bit wide, bidirectional port. Bits of the TRISC Register determine the
function of its pins. Similar to other ports, a logic one (1) in the TRISC Register configures the
appropriate port pin as an input.
Port D is an 8-bit wide, bidirectional port. Bits of the TRISD register determine the
function of its pins. A logic one (1) in the TRISD register configures the appropriate port pin as
input.
DEPT OF ECE
15
DEPT OF ECE
16
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to
provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is
designed to provide bidirectional drive currents of up to600- mA at voltages from 4.5 V to 36 V.
Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar
stepping motors, as well as other high-current/high- voltage loads in positive-supply applications.
All inputs are TTL compatible. Each output is complete totem-pole drive circuit, with a
Darlington transistor sink and a pseudo-Darlington source.
Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and
4enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their
outputs are active and in phase with their inputs. When the enable input is low, those drivers are
disabled, and their outputs are off and in the high- impedance state. With the proper data inputs,
each pair of drivers forms a full- H (or bridge) reversible drive suitable for solenoid or motor
applications
_ Wide Supply-Voltage Range: 4.5 V to 36 V
_ Separate Input-Logic Supply
_ Internal ESD Protection
_ Thermal Shutdown
_ High-Noise-Immunity Inputs
_ Functionally Similar to SGS L293 and SGS L293D
_ Output Current 1 A Per Channel (600 mA for L293D)
_ Peak Output Current 2 A Per Channel (1.2 A for L293D)
_ Output Clamp Diodes for Inductive Transient Suppression (L293D)
DEPT OF ECE
17
DEPT OF ECE
18
WORKING
The working of the gears is very interesting to know. It can be explained by the principle
of conservation of angular momentum. The gear having smaller radius will cover more RPM
than the one with larger radius. However, the larger gear will give more torque to the smaller
gear than vice versa. The comparison of angular velocity between input gear (the one that
transfers energy) to output gear gives the gear ratio. When multiple gears are connected together,
conservation of energy is also followed. The direction in which the other gear rotates is always
the opposite of the gear adjacent to it.
In any DC motor, RPM and torque are inversely proportional. Hence the gear having
more torque will provide a lesser RPM and converse. In a geared DC motor, the concept of pulse
width modulation is applied.In a geared DC motor, the gear connecting the motor and the gear
head is quite small, hence it transfers more speed to the larger teeth part of the gear head and
makes it rotate. The larger part of the gear further turns the smaller duplex part. The small duplex
part receives the torque but not the speed from its predecessor which it transfers to larger part of
other gear and so on. The third gears duplex part has more teeth than others and hence it
transfers more torque to the gear that is connected to the shaft.
The DC motor works over a fair range of voltage. The higher the input voltage more is
the RPM (rotations per minute) of the motor. For example, if the motor works in the range of 612V, it will have the least RPM at 6V and maximum at 12 V.
In terms of voltage, we can put the equation as:
RPM= K1 * V, where,
K1= induced voltage constant
V=voltage applied
DEPT OF ECE
19
INTERNAL STRUCTURE
On opening the outer plastic casing of the gear head, gear assemblies on the top as well
as on bottom part of the gear head are visible. These gear assemblies are highly lubricated with
grease so as to avoid any sort of wear and tear due to frictional forces.
Shown below is the top part of the gear head. It is connected to rotating shaft and has one
gear that allows the rotation. A strong circular imprint shows the presence of the gear that rotates
the gear at the upper portion.
PIR sensors are motion detectors, which can be installed outside your home to detect
human intrusion. This sensor detects changes in infrared heat, caused by human movement and
DEPT OF ECE
20
immune to pets Passive infrared (PIR) sensors react to the infrared heat energy emitted by
people. PIR sensors are passive devices in that they only detect radiation; they do not emit. They
are designed to be maximally sensitive to objects that emit heat energy at a wavelength of around
10microns (the peak wavelength of the heat energy emitted by humans.
4.2.5 BLUETOOTH
This module enables you to wireless transmit & receive serial data. It is a drop in
replacement for wired serial connections allowing transparent two way data communication. Its
key features are
5V power operation
UART interface
10 meters range
Easy to use
Status LED
DEPT OF ECE
21
DEPT OF ECE
22
DEPT OF ECE
23
CHAP TER 5
HARDWARE IMPLEMENTTION
Transformer used here is a step down transformer. This Voltage is given to LM7805
voltage regulator IC. The input voltage to the LM7805 IC should be at least 2V greater than the
required output voltage.
Load Re g
vO / VO
iO / I O
DEPT OF ECE
24
Line regulation (source regulation SR) is the change in the line voltage. It depends on the
line voltage (230V10V)
Line Regulation=vo/V0
v1/V1
= ((4.75-5.75)/5.75)/ ((8-12/12))
=0.286V
Ripple factor of the power supply () =0.48
= 1/4*3fRC
Take R=330
C=1.8*10-5
=0.1F
MICROCONTROLLER
DEPT OF ECE
25
PIC microcontroller has 2 VDD pins (11 & 32) for 3.3v supply and 2 VSS pins (12 &
31) for ground. First pin of PIC IC is
V=5V
I=0.5mA
R2=5V / .5mA
=10K
For working in 1 micro second clock, a 4MHz crystal oscillator is used. The capacitors
C4 & C5 connected to the crystal oscillator. These are the stabilizing capacitors which stabilizes
oscillations from the crystal, without these capacitors the oscillations produced by the crystal
oscillator will die out and the crystal oscillator will not be able to produce the clock frequency of
4MHz
0.7
5
f= 4MHZ
I= 0.5mA
DEPT OF ECE
26
The above figure shows the circuit diagram of the proposed system. It consists of a PIC
16F877a microcontroller, two PIR sensors, two motor driver ICs, a Bluetooth module & a7805
voltage regulator. A constant voltage of 5V is applied to the 11 th & 32nd pin of microcontroller,
4th pin of Bluetooth module, 3rd pin of PIR sensors & various pins of the motor driver ICs
through voltage regulator LM7805. The output of the PIR sensor is obtained from pin 2. The
output of the 1st PIR sensor is connected to the RB0 (pin 33) of the microcontroller. RB0 acts as
the external interrupt. The output from the 2 nd sensor is given to the RB1 (Pin 34) of
microcontroller. The operating frequency of the microcontroller is determined by the 13 th & 14th
pin. The operating frequency of the proposed system is 4Mhz. for the efficient working of the
motors; it should get a voltage of 12V & 1A current. The motor driver L293D increases the
voltage from 5V to 12V & current to 1A. The data from the microcontroller is sent to the
receiver through the Bluetooth module. The 2nd & 3rd pin of the module is connected to
DEPT OF ECE
27
microcontroller for this purpose. The motor driver L293D have 4 output pins. So two motors can
be connected using a motor driver IC. The direction of motors is determined by the o utput pins.
DEPT OF ECE
28
A wireless camera with a video receiver is connected to the robot which is independent to
theworking of microprocessor. The video signals are also transmitted to PC using RF.
The receiver section consists of two transceiver antennas and a PC. One antenna is used
to receive Bluetooth signals from the microcontroller. The motion of robot can be also controlled
through this section. The other antenna receives RF signals from the video camera and is given
to the PC through tuner card.
DEPT OF ECE
29
CHAP TER 6
SOFTWARE IMPLEMENTATION
The software system mainly includes the implementation of Smart Tanker Robot. Here
the program is used to control the movement of the robot as well as to detect human presence.
This is done using PIC 16F877A. The interfacing of the entire system is done as per the port
available with the PIC 16F877A. The program for the PIC microcontroller is done using MP lab
software and simulation of the program is done on Proteus Software.
The main steps of the program from which the system works is explained here.
6.1 ALGORITHM
Step 1: Start
Step 2: Turn on the system, initialize the PIR sensors, motor driver and Bluetooth module and
wireless camera
Step 3: Sense the command given by the user and move according to it.
Step 4: If PIR sensor detects human presence, stop the robot
Step 5: Turn the camera to the desired direction where the PIR sensor detected Human presence
Step 6: Send a message to the user saying that Human presence is detected
Step 5: Check of command from user, if a command is not received continue with Step 5
Step 6: If a command is received, turn camera to forward direction and more according to the
given command
Step 6: Stop.
DEPT OF ECE
30
DEPT OF ECE
31
DEPT OF ECE
32
DEPT OF ECE
33
1. Create the high level design. From the features and performance desired, decide which PIC
micro MCU or dsPIC DSC device is best suited to the application, and then design the associated
hardware circuitry. After determining which peripherals and pins control the hardware, write the
firmware. The software that will control the hardware aspects of the embedded application.
A language tool such as an assembler, which is directly translatable into machine code, or
a compiler that allows a more natural language for creating programs, should be used to write
and edit code. Assemblers and compilers help make the code understandable, allowing function
labels to identify code routines with variables that have names associated with their use, and with
constructs that help organize the code in maintainable structure.
2. Compile, assemble and link the software using the assembler and/or compiler and linker to
convert your code into ones and zeroes machine code for the PIC micro MCUs. This machine
code will eventually become the firmware (the code programmed into the microcontroller).
3. Test your code. Usually a complex program does not work exactly the way imagined, and
.bugs. Need to be removed from the design to get proper results. The debugger allows you to see
DEPT OF ECE
34
the .ones and zeroes. Execute, related to the source code you wrote, with the symbols and
function names from your program. Debugging allows you to experiment with your code to see
the value of variables at various points in the program, and to do .what if. Checks, changing
variable values and stepping through routines.
4. .Burn the code into a microcontroller and verify that it executes correctly in the finished
application
The MPLAB IDE has both built- in components and plug- in modules to configure the
System for a variety of software and hardware tools.
PROJECT MANAGER
The project manager provides integration and communication between the IDE and the
language tools.
EDITOR
The editor is a full- featured programmers text editor that also serves as a window into
the debugger.
The assembler can be used stand-alone to assemble a single file, or can be used with the
linker to build a project from separate source files, libraries and recompiled objects. The linker is
responsible for positioning the compiled code into memory areas of the target microcontroller.
DEPT OF ECE
35
DEBUGGER
The Microchip debugger allows breakpoints, single stepping, watch windows and all t he features
of a modern debugger for the MPLAB IDE. It works in conjunction with the editor to reference
information from the target being debugged back to the source code.
EXECUTION ENGINES
There are software simulators in MPLAB IDE for all PIC micro MCU and dsPIC DSC
devices. These simulators use the PC to simulate the instructions and some peripheral functions
of the PIC micro MCU and ds PIC DSC devices. Optional in-circuit emulator sand in-circuit
debuggers are also available to test code as it runs in the applications hardware.
MPLAB C18 and MPLAB C30 C compilers from Microchip provide fully integrated,
optimized code. Along with compilers from HI- TECH, IAR, micro Engineering Labs, CCS and
Byte Craft, they are invoked by the MPLAB IDE project manager to compile code that is
automatically loaded into the target debugger for instant testing and verification.
PROGRAMMERS
PICSTART Plus, Pick kit 1 and 2, PRO MATE II, MPLAB PM3 as well as MPLAB ICD
2 can program code into target devices. MPLAB IDE offers full control over programming both
code and data, as well as the Configuration bits to set the various operating modes of the target
microcontrollers or digital signal controllers.
DEPT OF ECE
36
IN-CIRCUIT EMULATORS
MPLAB ICE 2000 and MPLAB ICE 4000 are full- featured emulators for the PIC micro
MCU and dsPIC DSC devices. They connect to the PC via I/O ports and allow full control over
the operation of microcontroller in the target applications.
IN-CIRCUIT DEBUGGER
To start MPLAB IDE, double click on the icon installed on the desktop after installation
or select Start>Programs>Microchip>MPLAB IDE vx.xx>MPLAB IDE. A screen will display
the MPLAB IDE logo followed by the MPLAB IDE desktop
DEPT OF ECE
37
To show menu selections in this document, the menu item from the top row in MPLAB
IDE will be shown after the menu name like this Menu Name>Menu Item. To choose the Select
Device entry in the Configure menu, it would be written as Configure>Select Device. Choose
Configure>Select Device. In the Device dialog, select the PIC18F877Afrom the list if its not
already selected
The lights indicate which MPLAB IDE components support this device. A green light
indicates full support. A yellow light indicates preliminary support for an upcoming part by the
particular MPLAB IDE tool component. Components with a yellow light instead of a green light
are often intended for early adopters of new parts who need quick support and understand that
some operations or functions may not be available.. A red light indicates no support for this
device. Support may be forthcoming or inappropriate for the tool, e.g., ds PIC DSC devices
cannot be supported on MPLAB ICE 2000.
6.3.3 ORCAD
Orcad is a suite of tools from Cadence for the design and layout of printed circuit boards
(PCBs). We are currently using version 9.2 of the Orcad suite. This document will give you a
crash course in designing an entire circuit board from start to finish. This will be a very small
DEPT OF ECE
38
and simple circuit, but it will demonstrate the major concepts and introduce the tools behind
completing a PCB design. After you have completed this tutorial, you will know all the steps
needed to make PCBs using Orcad.
STEPS
1. STARTING A NEW SCHEMATIC PROJECT
DEPT OF ECE
39
Orcad allows you to have libraries of part symbols for use in schematic entry. These
libraries are kept in separate files that are included in the project workspace. This allows you to
reuse libraries in other designs. Enormous parts are already in existing Orcad libraries. You can
use these parts directly from these libraries. Open your schematic page from the Project window
if it is not open. Your schematic is located in psu.dsnSCHEMATIC1PAGE1 in the project
window. Now click on the Place Part tool from the right toolbar. The following dialog box
appears.
DEPT OF ECE
40
Orcad allows you to create your own libraries of part symbols. You can create symbols
for those parts, which you are unable to find in Orcad libraries, or you want to draw a part
symbol according to your own standard and convenience. We will now create symbols for some
of the parts in our design and use the rest from the Orcad built- in libraries. For this we have to
add a new library to our design. To do this, highlight the psu.dsn in the project window and click
File New Library. Right-click thelibrary1.olb file in the project window and select Save As...
Name the file psu symbols and place it in the libraries directory w that you created earlier. Your
project window will now look like the figure below. You are now ready to add parts to your
library.
To add a new part to your library, right-click the library file and select New Part. This
will bring up a dialog box for New Part Properties. Make the entries in the dialog box so that it
looks like the following.
DEPT OF ECE
41
Click OK to bring up the workspace for part creation. It should look like the picture
below. Tools for working with the part are located on the toolbar on the right-hand side of the
screen
SCHEMATIC ENTRY
You are now ready to start placing the electrical components for your design. The circuit
that we will be drawing is shown in the beginning of this tutorial in the hand drawn form. We
will need all the parts that are included in that circuit diagram. Open up the schematic page and
click the Place Part tool on the toolbar on the right side of the screen.
Here you will have to add those libraries, which contain your desired parts. As a novice
designer, you might experience difficulties in finding a particular part because there are so many
libraries and thousands of parts in each of them. But you can always do away with this difficulty
if you carefully read the library name. The Part Search feature will certainly be very helpful in
these circumstances.
DEPT OF ECE
42
It is better that you yourself design footprints of your components. This will ensure you
that the footprints you are using are correct. Once you will get enough knowledge and
experience about the packaging of electronic components, so that you will be able to locate the
desired footprint in these libraries then you can, of course, use them.
43
Start Orcad Layout. Layout has a separate tool for working with footprint libraries. To
start this tool, select Tools Library Manager. In the new window that opens, you will notice that
there are already several libraries available for use. These are the built- in libraries. For designing
a footprint, you can use either of the two approaches:
This is only possible if you have the component at your disposal at this step .Footprints
are composed of one or more pad stacks. These pad stacks define how a pin on a part looks on
each of the electrical and non-electrical layers. Each of your footprints will need at least one pad
stack defined. Lets take a look at a pad stack definition for an existing part. In the Library
Manager, select the library DIP100T and highlight the first part DIP.100/14/W.300/L.700. You
will see the part footprint in the Library Manager.
We will now set each layer individually. You can also select multiple layers at a time by
holding down the CTRL key when you click the layer name. First lets define the size of the drill
used for this part. The datasheet tells us that the pin dia can vary from 0.027 to 0.037 in. So we
should use a drill of dia greater than 37 mils.
DEPT OF ECE
44
Let us use a drill of 40 mils. Select the layers DRLDWG and DRILL. When you have
multiple layers selected, you will need to right click and choose Properties or press CTRL+E to
bring up the Edit Pad stack dialog. Choose the Round radio button and give the width and height
a value of 40. Click OK when done.
The changes you made should now be reflected in the spreadsheet. Now we will define
the amount of metal on the routing layers beyond the size of the drill. This is called the annular
ring. Each board shop will have requirements on the minimum annular ring size based on the
drill diameter. In most cases 20 mils is a safe bet. Select the TOP, BOTTOM layers and bring up
the Edit Pad stack dialog. Make the pads round and put the value of 60 (40+20 mils) in t he
height and width fields. The last thing we need to define is the solder mask. This is usually
defined as slightly larger (about 5 mils) that then annular rings on the top and bottom layers.
Select SMTOP and SMBOT and make them round pads with height and width of 65 (60+5
mils).
To export your design to Layout, you must first create a netlist. A netlist is a file that has
all the parts, footprints and nets for your design in a format that can be read by the layout
DEPT OF ECE
45
program. To start net list generation, highlight your dsn file and select Tools Create Netlist to
bring up the Create
DEPT OF ECE
46
throughout layout. To create a template, start Layout and select File New. When you see the
dialog, press Cancel. You should now see a blank workspace. You can use the same shortcut
keys that you used in Capture to zoom and center the design (I, O, and C).
3. STARTING LAYOUT
Now we have everything that we need to import our design into Layout so we can start
moving on to the third phase of our project. Start Orcad Layout or Layout Plus but not Layout
Engineers Edition and select FileNew. You will first be prompted for the template file you
created. It should be located in your libraries directory. Second, you will be asked for your
netlist. This should be located in your schematic directory. Third, you will be asked to give your
board file a name. Name this file psu and place it in the board directory. If all the footprint names
in your design match those in your library, then you should get no errors and you will see a
screen in layout like the one below.
DEPT OF ECE
47
All of your parts from schematics should be line up on the left side of the board. Learn a
few things about the Layout environment before you start placing these parts. First turn off DRC
(Design Rule Check) by clicking the button to vanish the dotted rectangle. We will use it later
when routing, but not now. Again you can use the same shortcut keys that you used in Capture to
zoom in, out and center the design (I, O, and C) and SHIFT+Hometo zoom all. You will
also notice that the workspace often gets too messy while working in Layout, so you will need to
refresh the screen very often. Use the Refresh All button or press Home key. Also on the toolbar,
there is a drop-down box of layers. You can select any layer and turn it visible or invisible. To
toggle a layer visible/ invisible, select the layer and hit the (minus) key on your keyboard.
You will also notice that there are a bunch of lines connecting your parts. These are
connections that are still un routed, and this is usually referred to as the Ratsnest. When placing
parts, it is sometimes useful to turn this off. So click the View Spreadsheet icon and select Nets.
Remember when you used this spreadsheet before? It had just one net called DEFAULT. Now,
every net in your design should appear in this spreadsheet. This spreadsheet can be a useful way
to see if you have misnamed nets in your schematics. Highlight every net by clicking the cell
labeled Net Name. Right-click and choose Properties. Uncheck the Routing Enabled box and
DEPT OF ECE
48
click OK. The ratsnest should have disappeared. You are now ready to place parts on your
design. To get into parts placement mode, make sure that the Component Tool is selected.
In addition to placing the components that are in your schematics, you can also place
non-electrical components right in Layout. You will do that now to place some mounting holes
on your board. While using the Component Tool, right-click and select New to bring up the Add
Component dialog box.
Give this component a reference designator of mh1. then click the footprint button and
select the board mounting hole footprint from psu _footprints library. check the non-electric
checkbox so that it becomes checked with a dark tick and uncheck the route enabled check box
since this is a non-electrical part. click ok when finished. the part will now be attached to your
cursor and you can place it on the board. place it at the edge of the board in the lower left corner.
AUTOROUTING
To let the Layout automatically route the board for you, select Auto Autoroute Board.
In a second or two, Layout will route the whole board. Click OK at the message. Then press
SHIFT+Home and your board should look like this.
DEPT OF ECE
49
Like the BASIC programming language, Visual Basic was designed to accommodate
beginner programmers. Programmers can not only create simple GUI applications, but to also
develop complex applications. Programming in VB is a combination of visually arranging
components or controls on a form, specifying attributes and actions for those components, and
writing additional lines of code for more functionality. Since VB defines default attributes and
actions for the components, a programmer can develop a simple program without writing much
DEPT OF ECE
50
code. Programs built with earlier versions suffered performance problems, but faster computers
and native code compilation has made this less of an issue. Though VB programs can be
compiled into native code executablefrom version 5 on, they still require the presence of around
1 MB of runtime libraries. Runtime libraries are included by default in Windows 2000 and later.
Earlier versions of Windows (95/98/NT), require that the runtime libraries be distributed with the
executable.
Forms are created using drag-and-drop techniques. A tool is used to place controls (e.g.,
text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers
associated with them. Default values are provided when the control is created, but may be
changed by the programmer. Many attribute values can be modified during run time based on
user actions or changes in the environment, providing a dynamic application. For example, code
can be inserted into the form resize event handler to reposition a control so that it remains
centered on the form, expands to fill up the form, etc. By inserting code into the event handler
for a keypress in a text box, the program can automatically translate the case of the text being
entered, or even prevent certain characters from being inserted.
Visual Basic can create executable (EXE files), ActiveX controls, or DLL files, but is
primarily used to develop Windows applications and to interface database systems. Dialog boxes
with less functionality can be used to provide pop- up capabilities. Controls provide the basic
functionality of the application, while programmers can insert additional logic within the
appropriate event handlers. For example, a drop-down combination box automatically displays a
list. When the user selects an element, an event handler is called that executes code that the
programmer created to perform the action for that list item. Alternatively, a Visual Basic
DEPT OF ECE
51
component can have no user interface, and instead provide ActiveX objects to other programs
via Component Object Model (COM). This allows for server-side processing or an add- in
module. The runtime recovers unused memory using reference counting, which depends on
variables passing out of scope or being set to nothing, avoiding the problem of memory leaks
common to other languages. There is a large library of utility objects, and the language provides
basic object oriented support. Unlike many other programming languages, Visual Basic is
generally not case sensitivethough it transforms keywords into a standard case configuration
and forces the case of variable names to conform to the case of the entry in the symbol table.
String comparisons are case sensitive by default.
DEPT OF ECE
52
CHAP TER 7
RESULT
DEPT OF ECE
53
DEPT OF ECE
54
The PIR sensor senses temperature ranging from 35-40 degrees Celsius. Thus any
presence of intruders may be human or animal are detected.
The sensed signal is then passed to the microprocessor as an external interrupt. Whenever
an interrupt is sensed, the robot stops its motion and the signal HUMAN DETECTED is
transmitted to PC using Bluetooth. The wireless camera automatically turns to the direction
where the signal is sensed simultaneously.
Fig 7.5 Simulation output when PIR sensor detects human presence at right side
DEPT OF ECE
55
Fig 7.6 Simulation output when PIR sensor detects human presence at left side
DEPT OF ECE
56
CHAP TER 8
CONCLUSION
The system presented here is for security operations in the protected area with wireless
secured communication. Security system available today is just a video camera or a burglar
alarm system. This system used a wireless communication system along with a wireless camera.
Thus this system becomes much more effective than the present system. The main attractive
feature of this system is that it is cost effective and reduces the human efforts take n in protected
area.
DEPT OF ECE
57
CHAP TER 9
FUTURE SCOPE
The application of this proposed system can be extended further to be used in military
purposes to find human intruders. This system can be used in those areas which are destroyed by
natural or manmade calamities such as earth quakes, fire hazards etc. Human presence under
destroyed building blocks can be detected where it is difficult for a man to reach and find the
affected people.
Using additional sensors such as gas sensors, metal detectors this system can be used for
gas leakage detection, bomb detection etc.
DEPT OF ECE
58
REFERENCES
DEPT OF ECE
59
APPENDIX
DEPT OF ECE
DEPT OF ECE
60
61
DEPT OF ECE
DEPT OF ECE
62
DEPT OF ECE
63
64
DEPT OF ECE
DEPT OF ECE
65
66
#include<pic.h>
#include<htc.h>
#define _XTAL_FREQ 4000000
void transmit(char i);
void string(char *s);
int i;
void forward()
{
RD0=1;
RD1=0;
RD2=1;
RD3=0;
}
void backward()
{
RD0=0;
RD1=1;
RD2=0;
RD3=1;
}
void left()
{
RD0=0;
RD1=0;
RD2=1;
RD3=0;
}
DEPT OF ECE
67
void right()
{
RD0=1;
RD1=0;
RD2=0;
RD3=0;
}
void stop()
{
RD0=0;
RD1=0;
RD2=0;
RD3=0;
}
void main()
{
GIE=1;
PEIE=1;
INTE=1;
RCIE=1;
TRISB0=1;
TRISB1=1;
TRISD=0;
PORTD=0X00;
CREN=1;
TXEN=1;
BRGH=1;
SPBRG=25;
SPEN=1;
SYNC=0;
DEPT OF ECE
68
while(1)
{
i=0;
if(RB1==1)
{
string("HUMAN DETECTED!!!");
stop();
RD4=1;
RD5=0;
__delay_ms(600);
RD4=0;
RD5=0;
while(i!=1);
RD4=0;
RD5=1;
__delay_ms(600);
RD4=0;
RD5=0;
while(RB1==1);
}
}
}
69
__delay_ms(600);
RD4=0;
RD5=0;
while(RCIF!=1);
RD4=1;
RD5=0;
__delay_ms(600);
RD4=0;
RD5=0;
}
if(RCIF==1)
{
i=1;
if(RCREG=='F'||RCREG=='f')
forward();
else if(RCREG=='B'||RCREG=='b')
backward();
else if(RCREG=='L'||RCREG=='l')
left();
else if(RCREG=='R'||RCREG=='r')
right();
else
stop();
}
}
void transmit(char i)
{
TXREG=i;
while(TRMT==0);
}
void string(char *s)
{
DEPT OF ECE
70
while(*s)
transmit(*s++);
}
DEPT OF ECE