Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER 1
INTRODUCTION
1.1 General
A movable spy robot with a remote controller is implemented. The robot is not quite huge
one and designed to be easy in transportation. The remote controller is to control the robot to
reach the desirable destination. The spy robot is made up of PICs microcontroller, a wireless
camera, an antenna, batteries and four movable wheels. The robot will transmit the images
that are spied via antenna to the laptop for a good spying system.
The user will get required information due to a movable the spy robot and seeing the
images when it spies. The system is to build a spy robot that has a wireless camera and the
capabilities to control the movement by using the remote controller. The images will appear
on the laptop which is intended for the visual. In this research, the wireless camera is
involved the two direction to rotate left and right. It is just only to monitor the images around
the robot. The block diagram of remote operated spy robot is shown in figure.
Scope of the project is to handle the spy in efficient way and to operate the spy anywhere
in the world through internet that is to reduce the human energy and time. It is also has the
scope for security purpose and industrial purpose.
The project is to design and develop an intelligence robot to detect dangerous Gas/Smoke
by using a microcontroller. The robot is designed to move as per the command given by the
controller. To move in all the direction like forward, reverse, right and left. If any gas/smoke
detected, robot will switch ON the Alarm Unit. The video and audio are monitored at the
remote PC. For transmitting audio and video, wireless camera has been used.
DEPARTMENT OF EEE 1
EMBEDDED SYTEMS SPY ROBOT
The proposed system composed of surveillance robot, wireless charge control station.
Surveillance robot is rectangular shape and it has three wheels. It communicates with device
through wireless medium such as Bluetooth. Robot has some sensors like Humidity,
Temperature, Ultra sonic and PIR. Humidity sensor senses the Humidity around the robot.
While Temperature sensor senses the climate changes based on the numerical temperature
value. Ultra sonic sensor senses the object present in the way in which the robot has to go.
PIR sensor senses the presence of human near the robot. These sensor notations and the
information can be received in the mobile with the use of a GSM module. Each and every
change can be sensed and the changes can be seen in a mobile through a message. The
wireless charging system charges the battery in the robot and it gives the power to all the
other modules.
The proposed system SPY ROBOT uses Embedded System with a technique of
PIC16F866 micro controller with a software of keil uv vision.
By using the hardware components DC gear motor, Batteries, RF module, IR sensor, light
emitting diodes, transmitter, receiver and spy camera. Spy camera is connected to the internet
and operation of the robot is done within a some range and section of viewing can be done
throughout the world via internet
DEPARTMENT OF EEE 2
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 2
EMBEDDED SYSTEM
Embedded systems are controlled by one or more main processing cores that are
typically either microcontrollers or digital signal processors (DSP). The key characteristic,
however, is being dedicated to handle a particular task, which may require very powerful
processors. For example, air traffic control systems may usefully be viewed as embedded, even
though they involve mainframe computers and dedicated regional and national networks
between airports and radar sites.
Since the embedded system is dedicated to specific tasks, design engineers can optimize
it to reduce the size and cost of the product and increase the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.
Physically embedded systems range from portable devices such as digital watches and
MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants. Complexity varies from low, with a single
microcontroller chip, to very high with multiple units, peripherals and networks mounted inside
a large chassis or enclosure.
In general, "embedded system" is not a strictly definable term, as most systems have
some element of extensibility or programmability. For example, handheld computers share
some elements with embedded systems such as the operating systems and microprocessors
which power them, but they allow different applications to be loaded and peripherals to be
connected. Moreover, even systems which don't expose programmability as a primary feature
generally need to support software updates.
DEPARTMENT OF EEE 3
EMBEDDED SYTEMS SPY ROBOT
On a continuum from "general purpose" to "embedded", large application systems will have
subcomponents at most points even if the system as a whole is "designed to perform one or a
few dedicated functions."and is thus appropriate to call "embedded". A modern example of
embedded system is shown in fig: 2.1.
Labelled parts include microprocessor (4), RAM (6), flash memory (7).Embedded
systems programming is not like normal PC programming. In many ways, programming for an
embedded system is like programming PC 15 years ago. The hardware for the system is usually
chosen to make the device as cheap as possible. Spending an extra dollar a unit in order to
make things easier to program can cost millions. Hiring a programmer for an extra month is
cheap in comparison. This means the programmer must make do with slow processors and low
memory, while at the same time battling a need for efficiency not seen in most PC applications.
Below is a list of issues specific to the embedded field.
2.2 History
DEPARTMENT OF EEE 4
EMBEDDED SYTEMS SPY ROBOT
controllers evolved from traditional electromechanical sequencers, via solid state devices, to
the use of computer technology.
One of the first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the
project's inception, the Apollo guidance computer was considered the riskiest item in the
Apollo project as it employed the then newly developed monolithic integrated circuits to reduce
the size and weight. An early mass-produced embedded system was the Automatics D-17
guidance computer for the Minuteman missile, released in 1961. It was built
from transistor logic and had a hard disk for main memory. When the Minuteman II went into
production in 1966, the D-17 was replaced with a new computer that was the first high-volume
use of integrated circuits.
2.3 Tools
Debugging tools are another issue. Since you can't always run general programs on your
embedded processor, you can't always run a debugger on it. This makes fixing your program
difficult. Special hardware such as JTAG ports can overcome this issue in part. However, if
you stop on a breakpoint when your system is controlling real world hardware (such as a
motor), permanent equipment damage can occur. As a result, people doing embedded
programming quickly become masters at using serial IO channels and error message style
debugging.
DEPARTMENT OF EEE 5
EMBEDDED SYTEMS SPY ROBOT
2.4 Debugging
Embedded debugging may be performed at different levels, depending on the facilities
available. From simplest to most sophisticate they can be roughly grouped into the following
areas:
Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic.
External debugging using logging or serial port output to trace operation using either a
monitor in flash or using a debug server like the Remedy Debugger which even works
for heterogeneous multicore systems.
An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via
a JTAG or Nexus interface. This allows the operation of the microprocessor to be
controlled externally, but is typically restricted to specific debugging capabilities in the
processor.
An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
A complete emulator provides a simulation of all aspects of the hardware, allowing all
of it to be controlled and modified and allowing debugging on a normal PC.
Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor.
stop operation.
Because an embedded system is often composed of a wide variety of elements, the
debugging strategy may vary. For instance, debugging a software (and microprocessor) centric
embedded system is different from debugging an embedded system where most of the
processing is performed by peripherals (DSP, FPGA, co-processor). An increasing number of
embedded systems today use more than one single processor core.
A common problem with multi-core development is the proper synchronization of software
execution. In such a case, the embedded system design may wish to check the data traffic on
the busses between the processor cores, which requires very low-level debugging, at signal/bus
level, with a logic analyzer, for instance.
DEPARTMENT OF EEE 6
EMBEDDED SYTEMS SPY ROBOT
Reliability
Embedded systems often reside in machines that are expected to run continuously for
years without errors and in some cases recover by themselves if an error occurs.
Therefore the software is usually developed and tested more carefully than that for
personal computers, and unreliable mechanical moving parts such as disk drives, switches or
buttons are avoided.
The system cannot safely be shut down for repair, or it is too inaccessible to repair.
Examples include space systems, undersea cables, navigational beacons, bore-hole
systems, and automobiles.
The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backups are selected by an operator. Examples include aircraft navigation, reactor
control systems, safety-critical chemical factory controls, train signals, engines on
single-engine aircraft.
The system will lose large amounts of money when shut down: Telephone switches,
factory controls, bridge and elevator controls, funds transfer and market making,
automated sales and service.
A variety of techniques are used, sometimes in combination, to recover from errors—
both software bugs such as memory leaks, and also soft errors in the hardware:
Watchdog timer that resets the computer unless the software periodically notifies the
watchdog
Subsystems with redundant spares that can be switched over to
software "limp modes" that provide partial function
DEPARTMENT OF EEE 7
EMBEDDED SYTEMS SPY ROBOT
Software Architecture
In this design, the software simply has a loop. The loop calls subroutines, each of which
manages a part of the hardware or software.
Some embedded systems are predominantly interrupt controlled. This means that tasks
performed by the system are triggered by different kinds of events. An interrupt could be
generated for example by a timer in a predefined frequency, or by a serial port controller
receiving a byte. These kinds of systems are used if event handlers need low latency and the
event handlers are short and simple.
Cooperative Multitasking
The advantages and disadvantages are very similar to the control loop, except that
adding new software is easier, by simply writing a new task, or adding to the queue-interpreter.
Primitive Multitasking
This is the level at which the system is generally considered to have an "operating
system" kernel. Depending on how much functionality is required, it introduces more or less
of the complexities of managing multiple tasks running conceptually in parallel.
DEPARTMENT OF EEE 8
EMBEDDED SYTEMS SPY ROBOT
As any code can potentially damage the data of another task (except in larger systems using
an MMU) programs must be carefully designed and tested, and access to shared data must be
controlled by some synchronization strategy, semaphores or a non-blocking synchronization
scheme.
Embedded systems which are used to perform a specific task or operation in a specific
time period those systems are called as real-time embedded systems. There are two types of
real-time embedded systems.
These embedded systems follow an absolute dead line time period i.e.., if the tasking is
not done in a particular time period then there is a cause of damage to the entire equipment.
Soft Real Time embedded systems :These embedded systems follow a relative dead line time
period i.e.., if the task is not done in a particular time that will not cause damage to the
equipment.
Ex: Consider a TV remote control system, if the remote control takes a few milliseconds delay
it will not cause damage either to the TV or to the remote control. These systems which will
not cause damage when they are not operated at considerable time period those systems comes
under soft real-time embedded systems.
Whenever a person comes near the door, it captures the image of a person and sends to
the desktop of your computer which is connected to internet. This gives an alerting message
with image on to the desktop of your computer, and then you can open the door lock just by
clicking the mouse. Fig: 2.2 show the network communications in embedded systems.
DEPARTMENT OF EEE 9
EMBEDDED SYTEMS SPY ROBOT
The central processing unit (c.p.u) can be any one of the following microprocessor,
microcontroller, digital signal processing.
Among these Microcontroller is of low cost processor and one of the main advantage
of microcontrollers is, the components such as memory, serial communication
interfaces, analog to digital converters etc.., all these are built on a single chip.
The numbers of external components that are connected to it are very less according to
the application
Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements.
DEPARTMENT OF EEE 10
EMBEDDED SYTEMS SPY ROBOT
1. Consumer applications:
At home we use a number of embedded systems which include microwave oven, remote
control, VCD players, DVD players, camera etc….
2. Office automation
DEPARTMENT OF EEE 11
EMBEDDED SYTEMS SPY ROBOT
3. Industrial automation
Today a lot of industries are using embedded systems for process control. In industries
we design the embedded systems to perform a specific operation like monitoring temperature,
pressure, humidity ,voltage, current etc.., and basing on these monitored levels we do control
other devices, we can send information to a centralized monitoring station.
In critical industries where human presence is avoided there we can use robots which are
programme
DEPARTMENT OF EEE 12
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 3
MICROCONTROLLER
Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial
values.
DEPARTMENT OF EEE 13
EMBEDDED SYTEMS SPY ROBOT
Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like
interrupts, timer input, control signals, serial communication signals RxD and TxD,
etc.
Pins 18 & 19 − These pins are used for interfacing an external crystal to get the
system clock.
Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order
address bus signals are also multiplexed using this port.
Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read
a signal from the external program memory.
Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.
Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to
demultiplex the address-data signal of port.
Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order
address and data bus signals are multiplexed using this port.
DEPARTMENT OF EEE 14
EMBEDDED SYTEMS SPY ROBOT
8051 models may also have a number of special, model-specific features, such as UARTs,
ADC, Op Amps, etc…
In the following diagram, the system bus connects all the support devices to the CPU. The
system bus consists of an 8-bit data bus, a 16-bit address bus and bus control signals. All other
devices like program memory, ports, data memory, serial interface, interrupt control, timers,
and the CPU are all interfaced together through the system bus.
DEPARTMENT OF EEE 15
EMBEDDED SYTEMS SPY ROBOT
8051 microcontrollers have 4 I/O ports each of 8-bit, which can be configured as input or
output. Hence, total 32 input/output pins allow the microcontroller to be connected with the
peripheral devices.
Pin configuration: i.e. the pin can be configured as 1 for input and 0 for output as
per the logic state.
o Input/Output (I/O) pin − All the circuits within the microcontroller must
be connected to one of its pins except P0 port because it does not have pull-up
resistors built-in.
DEPARTMENT OF EEE 16
EMBEDDED SYTEMS SPY ROBOT
o When P0 port is configured as an output then other ports consisting of pins with
built-in pull-up resistor connected by its end to 5V power supply, the pins of
this port have this resistor left out.
In order to apply logic 1 (5V) on this output pin, it is necessary to build an external pullup
resistor.
Port 1
P1 is a true I/O port as it doesn’t have any alternative functions as in P0, but this port can be
configured as general I/O only. It has a built-in pull-up resistor and is completely compatible
with TTL circuits.
Port 2
P2 is similar to P0 when the external memory is used. Pins of this port occupy addresses
intended for the external memory chip. This port can be used for higher address byte with
addresses A8-A15. When no memory is added then this port can be used as a general
input/output port similar to Port 1.
Port 3
In this port, functions are similar to other ports except that the logic 1 must be applied to
appropriate bit of the P3 register.
DEPARTMENT OF EEE 17
EMBEDDED SYTEMS SPY ROBOT
The microcontroller unit (MCU) is now big, or rather small, in electronics. It is one of the most
trivial products, such as a musical birthday card or electronic price tag, can include an MCU.
They are an important factor in the digitization of Analog systems, such as sound systems or
pretty useful to know how they work. The computer or digital controller has three main
elements: input and output devices, which communicate with the outside world; a processor,
to make calculations and handle data operations; and memory, to store programs and data.
Figure 1.1 shows these in a little more detail. Unlike the conventional microprocessor system
(such as a PC), which has separate chips on a printed circuit board, the microcontroller contains
all these elements in one chip. The MCU is essentially a computer on a chip; however, it still
needs input and output devices, such as a keypad and display, to form a working system. The
microcontroller stores its program in ROM (read only memory). In the past, UV (ultraviolet)
erasable programmable ROM (EPROM) was used for prototyping or small batch production,
and one-time programmable ROM for longer product runs. Programmable ROM chips are
programmed in the final stages of manufacture, while EPROM could be programmed by the
user.
DEPARTMENT OF EEE 18
EMBEDDED SYTEMS SPY ROBOT
The range of microcontrollers now available developed because the features of the MCU used
in any particular circuit must be as closely matched as possible to the actual needs of the
● Range of interfaces.
The PIC16F877A is useful as a reference device because it has a minimal instruction set but
a full range of peripheral features. The general approach to microcontroller application design
DEPARTMENT OF EEE 19
EMBEDDED SYTEMS SPY ROBOT
followed here is to develop a design using a chip that has spare capacity, and then later select
a related device that has the set of features most closely matching the application requirements.
If necessary, we can drop down to a lower range (PIC10/12 series), or if it becomes clear that
more power is needed, we can move up to a higher specification chip (PIC18/24 series). This
is possible as all devices have the same core architecture and compatible instructions sets.
The most significant variation among PIC chips is the instruction size, which can be 12, 14, or
16 bits. The A suffix indicates that the chip has a maximum clock speed of 20 MHz, the main
upgrade from the original 16F877 device. These chips can otherwise be regarded as identical,
the suffix being optional for most purposes. The 16F877A pin-out is seen in Figure 1.2 and
the internal architecture in Figure 1.3 . The latter is a somewhat simplified version of the
definitive block diagram in the data sheet. Program Execution The chip has 8k (8096 / 14 bits)
of flash ROM program memory, which has to be programmed via the serial programming pins
PGM, PGC, and PGD. The fixed-length instructions contain both the operation code and
operand (immediate data, register address, or jump address). The mid-range PIC has a limited
number of instructions (35) and is therefore classified as a RISC (reduced instruction set
computer) processor.
DEPARTMENT OF EEE 20
EMBEDDED SYTEMS SPY ROBOT
DEPARTMENT OF EEE 21
EMBEDDED SYTEMS SPY ROBOT
enable pin.
Comparator2 output.
DEPARTMENT OF EEE 22
EMBEDDED SYTEMS SPY ROBOT
8. RE0/!RD/AN5 PORTE Digital I/O-Read control for parallel slave port- Analog input 5
9. RE1/!WR/AN6 Digital I/O-Write control for parallel slave port- Analog input 6
10. RE2/!CS/AN7 Digital I/O-Chip Select control for parallel slave port-
Analog input 7.
I2C mode.
DEPARTMENT OF EEE 23
EMBEDDED SYTEMS SPY ROBOT
28. RD5/PSP5 Digital I/O-Parallel Slave Port Data.
Depending on the device selected, there are either five ports or three ports available. Some pins of
the I/O ports are multiplexed with an alternate function from the peripheral features on the device.
In general, when a peripheral is enabled, that pin may not be used as a general purpose I/O pin. Each
port has three registers for its operation. These registers are:
DEPARTMENT OF EEE 24
EMBEDDED SYTEMS SPY ROBOT
The data latch (LAT register) is useful for read-modify-write operations on the value that the I/O pins
are driving.
PORTA is a 7-bit wide, bi-directional port. The corresponding Data Direction register is TRISA. Setting
a TRISA bit (= 1) will make the corresponding PORTA pin an input (i.e., put the corresponding output
driver in a Hi-Impedance mode). Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an
output (i.e., put the contents of the output latch on the selected pin). Reading the PORTA register
reads the status of the pins, whereas writing to it will write to the port latch. The Data Latch register
(LATA) is also memory mapped. Read-modify-write operations on the LATA register reads and writes
the latched output value for PORTA. The RA4 pin is multiplexed with the Timer0 module clock input
to become the RA4/T0CKI pin. The RA4/ T0CKI pin is a Schmitt Trigger input and an open drain output.
All other RA port pins have TTL input levels and full CMOS output drivers. The other PORTA pins are
multiplexed with Analog inputs and the Analog VREF+ and VREF- inputs. The operation of each pin is
selected by clearing/setting the control bits in the ADCON1 register (A/D Control Register1). The TRISA
register controls the direction of the RA pins, even when they are being used as Analog inputs. The
user must ensure the bits in the TRISA register are maintained set when using them as Analog inputs.
PORTB is an 8-bit wide, bi-directional port. The corresponding Data Direction register is TRISB. Setting
a TRISB bit (= 1) will make the corresponding PORTB pin an input (i.e., put the corresponding output
driver in a Hi-Impedance mode). Clearing a TRISB bit (= 0) will make the corresponding PORTB pin an
output (i.e., put the contents of the output latch on the selected pin). The Data Latch register (LATB)
is also memory mapped. Read-modify-write operations on the LATB register reads and writes the
latched output value for PORTB. Each of the PORTB pins has a weak internal pull-up. A single control
DEPARTMENT OF EEE 25
EMBEDDED SYTEMS SPY ROBOT
bit can turn on all the pull-ups. This is performed by clearing bit RBPU (INTCON2<7>). The weak pull-
up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled
on a Power-on Reset Four of the PORTB pins, RB7:RB4, have an interrupt- on-change feature. Only
pins configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured as an
output is excluded from the interrupt- on-change comparison). The input pins (of RB7:RB4) are
compared with the old value latched on the last read of PORTB. The “mismatch” outputs of RB7:RB4
are OR’ed together to generate the RB Port Change Interrupt with flag bit, RBIF (INTCON<0>). This
interrupt can wake the device from SLEEP. The user, in the Interrupt Service Routine, can clear the
a) Any read or write of PORTB (except with the MOVFF instruction). This will end the
mismatch condition.
b) Clear flag bit RBIF. A mismatch condition will continue to set flag bit RBIF. Reading
PORTB will end the mismatch condition and allow flag bit RBIF to be cleared.
PORTC is an 8-bit wide, bi-directional port. The corresponding Data Direction register is TRISC. Setting
a TRISC bit (= 1) will make the corresponding PORTC pin an input (i.e., put the corresponding output
driver in a Hi-Impedance mode). Clearing a TRISC bit (= 0) will make the corresponding PORTC pin an
output (i.e., put the contents of the output latch on the selected pin). The Data Latch register (LATC)
is also memory mapped. Read-modify-write operations on the LATC register reads and writes the
latched output value for PORTC. PORTC is multiplexed with several peripheral functions PORTC pins
have Schmitt Trigger input buffers. When enabling peripheral functions, care should be taken in
defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an out-
put, while other peripherals override the TRIS bit to make a pin an input. The user should refer to the
DEPARTMENT OF EEE 26
EMBEDDED SYTEMS SPY ROBOT
This section is applicable only to the PIC18F4X2 devices. PORTD is an 8-bit wide, bi-directional port.
The corresponding Data Direction register is TRISD. Setting a TRISD bit (= 1) will make the
corresponding PORTD pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode).
Clearing a TRISD bit (= 0) will make the corresponding PORTD pin an output (i.e., put the contents of
the output latch on the selected pin). The Data Latch register (LATD) is also memory mapped. Read-
modify-write operations on the LATD register reads and writes the latched output value for PORTD.
PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually configurable as an
input or output. PORTD can be configured as an 8-bit wide microprocessor port (parallel slave port)
by setting control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL. See Section 9.6 for
This section is only applicable to the PIC18F4X2 devices. PORTE is a 3-bit wide, bi-directional port. The
corresponding Data Direction register is TRISE. Setting a TRISE bit (= 1) will make the corresponding
PORTE pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a
TRISE bit (= 0) will make the corresponding PORTE pin an output (i.e., put the contents of the output
latch on the selected pin). The Data Latch register (LATE) is also memory mapped. Read-modify-write
operations on the LATE register reads and writes the latched output value for PORTE. PORTE has three
pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7) which are individually configurable as inputs or
outputs. These pins have Schmitt Trigger input buffers. PORTE pins are multiplexed with analog inputs.
When selected as an analog input, these pins will read as '0's. TRISE controls the direction of the RE
pins, even when they are being used as analog inputs. The user must make sure to keep the pins
DEPARTMENT OF EEE 27
EMBEDDED SYTEMS SPY ROBOT
3.5 Clock Options
The 877 chip has two main clock modes, CR and XT. The CR mode needs a simple capacitor and resistor
circuit attached to CLKIN, whose time constant (RC) determines the clock period. R should be between
For example, if R=10 k Ω and C=10nF, the clock period will be around 2. C . R . 200 μ s
(calculated from the CR rise/fall time) and the frequency about 5kHz. This option is
acceptable when the program timing is not critical. The XT mode is the one most commonly
used, since the extra component cost is small compared with the cost of the chip itself and
accurate timing is often a necessity. An external crystal and two capacitors are fitted to
CLKIN and CLKOUT pins. The crystal frequency in this mode can be from 200 KHz to 4
MHz and is typically accurate to better than 50 ppm (parts per million) or 0.005%. A
convenient value is 4Mz, as this is the maximum frequency possible with a standard crystal
and gives an instruction execution time of 1.000 μ s (1 million instructions per second, or 1
Mips).
A low-speed crystal can be used to reduce power consumption, which is proportional to clock
speed in CMOS devices. The LP (low-power) mode supports the clock frequency range 32–
200 kHz. To achieve the maximum clock speed of 20MHz, a high-speed (HS) crystal is
needed, with a corresponding increase in power consumption. The MCU configuration fuses
must be set to the required clock mode when the chip is programmed. Many PIC chips now
have an internal oscillator, which needs no external components. It is more accurate than the
RC clock but less accurate than a crystal. It typically runs at 8 MHz and can be calibrated
DEPARTMENT OF EEE 28
EMBEDDED SYTEMS SPY ROBOT
RESET:-
6. RESET Instruction
Most registers are unaffected by a RESET. Their status is unknown on POR and unchanged by all other
RESETS. The other registers are forced to a “RESET state” on Power-on Reset, MCLR, WDT Reset,
Brownout Reset, MCLR Reset during SLEEP and by the RESET instruction. Most registers are not
affected by a WDT wake-up, since this is viewed as the resumption of normal operation. Status bits
from the RCON register, RI, TO, PD,POR and BOR, are set or cleared differently in different RESET
situations. These bits are used in software to determine the nature of the RESET. The Enhanced MCU
devices have a MCLR noise filtering the MCLR Reset path. The filter will detect and ignore small pulses.
The MCLR pin is not driven low by any internal RESETS, including the WDT.
DEPARTMENT OF EEE 29
EMBEDDED SYTEMS SPY ROBOT
A Power-on Reset pulse is generated on-chip when VDD rise is detected. To take advantage of the POR
circuitry, just tie the MCLR pin directly (or through a resistor) to VDD. This will eliminate external RC
components usually needed to create a Power-on Reset delay. A minimum rise rate for VDD is
specified. When the device starts normal operation (i.e., exits the RESET condition), device operating
parameters (voltage, frequency, temperature, etc.) must be met to ensure operation. If these
conditions are not met, the device must be held in RESET until the operating conditions are met.
Serial data connections are useful because only one or two signal wires are needed compared
with at least eight data lines for a parallel bus plus control signals. The typical PIC
microcontroller offers a choice of serial interfaces. The best one for any given
communication channel depends on the distance between nodes, the speed, and the number of
DEPARTMENT OF EEE 30
EMBEDDED SYTEMS SPY ROBOT
3.7 USART:
asynchronous means no separate clock signal is needed to time the data reception, so only a
data send, data receive, and ground wires are needed. It is quick and simple to implement if a
limited data bandwidth is acceptable. A common application is connecting the PIC chip to a
host PC for uploading data acquired by the MCU subsystem (Figure 1.10). The USART link
can send data up to 100 meters by converting the signal to higher-voltage levels (typically 12
V). The digital signal is inverted and shifted to become bipolar (symmetrical about 0 V, line
The PIC 16F877 has a dedicated hardware RS232 port, but CCS C allows any pin to be set
up as an RS232 port, providing functions to generate the signals in software. The basic form
of the signal has 8 data bits and a stop and start bit. The bit period is set by the baud rate. A
typical value is 9600 baud, which is about 10k bits per second. The bit period is then about
DEPARTMENT OF EEE 31
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 4
SOFTWARE DESCRIPTION
When starting a new project, simply select the microcontroller you use from the Device
Database and the µVision IDE sets all compiler, assembler, linker, a memory options for you.
Numerous example programs are included to help you get started with the most popular
embedded 8051 devices.
The Keil µVision Debugger accurately simulates on-chip peripherals (I²C, CAN, UART, SPI,
Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules) of your 8051
device. Simulation helps you understand hardware configurations and avoids time wasted on
setup problems. Additionally, with simulation, you can write and test applications before
target hardware is available.
When you are ready to begin testing your software application with target hardware, use the
MON51, MON390, MONADI, or FlashMON51 Target Monitors, the ISD51 In-System
Debugger, or the ULINK USB-JTAG Adapter to download and test program code on your
target system.
DEPARTMENT OF EEE 32
EMBEDDED SYTEMS SPY ROBOT
Mobizen Screen Recorder is a nice screen recorder app which enables you to record whatever
is happening on your phone's screen. The user interface of this app is very interactive, which
allows even novices and people with no experience of using screen recorders the chance to
record the perfect videos. There is an Air Circle option offered by this app which appears on
the right-hand side of the screen. Tapping on this option reveals the three main features of this
screen recorder app, Record, Circle menu and Capture. You can find a brief intro of each
feature underneath their titles, explaining what the feature is all about.
The first feature of the Mobizen Screen Recorder is 'Record'. This feature is for recording the
screen of your phone. Once you have tapped on this option of the app, anything that you are
doing on your Smartphone will get recorded. You can use this option for recording high-quality
videos of your games.
To record a video of your game, all you have to do is to tap on the Record option while you are
playing the game. This screen recorder app will begin recording the screen as well as the game
sounds immediately. You can pause or stop the recording at any time by clicking on the Record
option again. The video recorded by the app will get stored on the SD Card if you have one
installed in your Smartphone. Otherwise, it will get stored in the internal memory.
Mobizen Screen Recorder also gives you the opportunity of capturing screenshots by providing
you the 'Capture' option. Like the Record feature, this feature is also very easy-to-use. For
capturing a snapshot of the screen of your phone with this screen recorder app, you have to
simply tap on the 'Capture' option. The app is going to instantly capture the screen and store
the image in the Gallery of your Smartphone.
Aside from the screen recording and screen capture options, Mobizen Screen Recorder offers
up a wide range of video editing tools to you as well. You can find them by tapping on the
Circle menu option of the app. The video editing tools that are made available to you by this
DEPARTMENT OF EEE 33
EMBEDDED SYTEMS SPY ROBOT
screen recorder app include addition of an intro video, addition of an outro video, trimming of
the video, addition of background music and screen capture. These tools are offered to help
you enhance the quality of your videosMobizen Screen Recorder has a settings menu too which
can be accessed by clicking on the settings icon that is located inside the Circle menu. There
are various customization options available in this settings menu of the app. You can enable or
disable them to customize the app according to your preferences.
A smart feature of this screen recorder app is Face cam. This feature allows you to not only
record a video of the game you are playing but also to record your video and voice as well
while you are playing it. In order to make use of this feature, you will have to enable it in the
settings menu of the app.
4.3 Features:
DEPARTMENT OF EEE 34
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 5
BASIC COMPONENTS
5.1 Diode:
BASIC COMPONENTS:
Semiconductor Diodes:
Most modern diodes are based on semiconductor P-N junctions. In a P-N diode,
conventional current can flow from the P-type side (the anode) to the N-type side (the
cathode), but not in the opposite direction. A semiconductor diode s current-voltage, or I-V,
characteristic curve is ascribed to the behaviour of the so-called depletion layer or depletion
zone which exists at the P-N junction between the differing semiconductors. When a P-N
junction is first created, conduction band (mobile) electrons from the N-doped region diffuse
into the P-doped region where there is a large population of holes (places for electrons in
which no electron is present) with which the electrons recombine. When a mobile electron
recombines with a hole, the hole vanishes and the electron is no longer mobile. Thus, two
charge carriers have vanished. The region around the P-N junction becomes depleted of
charge carriers and thus behaves as an insulator.
DEPARTMENT OF EEE 35
EMBEDDED SYTEMS SPY ROBOT
7805 Voltage regulator 5V DC Voltage Regulator Data Sheet / Specs The 7805 provides circuit
designers with an easy way to regulate DC voltages to 5v.
Encapsulated in a single chip/package (IC), the 7805 is a positive voltage DC regulator that has
only 3 terminals. They are: Input voltage, Ground, Output Voltage. Although the 7805 were
primarily designed for a fixed-voltage output(5V). 7812 Voltage regulator
12V DC Voltage Regulator Data Sheet / Specs The 78012 provides circuit designers with an
easy way to regulate DC voltages to 12v. Encapsulated in a single chip/package (IC), the 78012
is a positive voltage DC regulator that has only 3 terminals. They are: Input voltage, Ground,
Output Voltage. Although the 78012 were primarily designed for a fixed-voltage output (12V).
7812 Voltage regulator It is indeed possible to use external components in order to obtain DC
output voltages of: 5V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 20V, 24V. Note that the input voltage
must, of course, be greater than the required output voltage, so that it can be regulated
downwards
5.3 Capacitor:
In the Regulated power supply the rating of the chosen capacitor filter is 1000µF.
DEPARTMENT OF EEE 36
EMBEDDED SYTEMS SPY ROBOT
When there is a potential difference (voltage) across the conductors, a static electric field
develops across the dielectric, causing positive charge to collect on one plate and negative
charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is
characterized by a single constant value, capacitance, measured in farads. This is the ratio of
the electric charge on each conductor to the potential difference between them.
The capacitance is greatest when there is a narrow separation between large areas of conductor,
hence capacitor conductors are often called "plates," referring to an early means of
construction. In practice, the dielectric between the plates passes a small amount of leakage
current and also has an electric field strength limit, resulting in a breakdown voltage, while the
conductors and leads introduce an undesired inductance and resistance. Capacitors are widely
used in electronic circuits for blocking direct current while allowing alternating current to pass,
in filter networks, for smoothing the output of power supplies, in the resonant circuits that tune
radios to particular frequencies, in electric power transmission systems for stabilizing voltage
and power flow, and for many other purposes.
5.4 Transistor:
An NPN transistor can be considered as two diodes with a shared anode. In typical operation,
the base-emitter junction is forward biased and the base–collector junction is reverse biased. In
an NPN transistor, for example, when a positive voltage is applied to the base–emitter junction,
the equilibrium between thermally generated carriers and the repelling electric field of the
depletion region becomes unbalanced, allowing thermally excited electrons to inject into the
base region. These electrons wander (or "diffuse") through the base from the region of high
concentration near the emitter towards the region of low concentration near the collector. The
DEPARTMENT OF EEE 37
EMBEDDED SYTEMS SPY ROBOT
electrons in the base are called minority carriers because the base is doped p-type which would
make holes the majority carrier in the base.
Transistors can be regarded as a type of switch, as can many electronic components. They are
used in a variety of circuits and you will find that it is rare that a circuit built in a school
Technology Department does not contain at least one transistor. They are central to electronics
and there are two main types; NPN and PNP. Most circuits tend to use NPN. There are hundreds
of transistors which work at different voltages but all of them fall into these two categories.
Transistors are manufactured in different shapes but they have three leads (legs). The BASE -
which is the lead responsible for activating the transistor.
The COLLECTOR - which is the positive lead. The EMITTER - which is the negative lead.
The diagram below shows the symbol of an NPN transistor. They are not always set out as
shown in the diagrams to the left and right, although the ‘tab’ on the type shown to the left is
usually next to the ‘emitter.
DEPARTMENT OF EEE 38
EMBEDDED SYTEMS SPY ROBOT
5.5 Resistors:
DEPARTMENT OF EEE 39
EMBEDDED SYTEMS SPY ROBOT
In electronics, an LED circuit or LED driver is an electrical circuit used to power a light-
emitting diode (LED). The circuit must provide sufficient current to light the LED at the
required brightness, but must limit the current to prevent damaging the LED. The voltage
drop across an LED is approximately constant over a wide range of operating current;
therefore, a small increase in applied voltage greatly increases the current. Very simple
circuits are used for low-power indicator LEDs. More complex, current source circuits are
required when driving high-power LEDs for illumination to achieve correct current
regulation .
DEPARTMENT OF EEE 40
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 6
HARDWARE DESCRIPTION
RF Module
IR Sensor
Light Emitting Diodes (LED’s)
DC Gear Motors
L293D
PIC16F866
6.1 RF Module
An RF module (radio frequency module) is a (usually) small electronic circuit used to
transmit and/or receive radio signals on one of a number of carrier frequencies. RF modules
are widely used in electronic design owing to the difficulty of designing radio circuitry. Good
electronic radio design is notoriously complex because of the sensitivity of radio circuits and
the accuracy of components and layouts required to achieve operation on a specific frequency.
Design engineers will design a circuit for an application which requires radio communication
and then "drop in" a radio module rather than attempt a discrete design, saving time and
money on development.
RF modules are most often used in medium and low volume products for consumer
applications such as garage door openers, wireless alarm systems, industrial remote controls,
smart sensor applications, and wireless home automation systems. They are sometimes used
to replace older infra red communication designs as they have the advantage of not requiring
line-of-sight operation.
Several carrier frequencies are commonly used in commercially-available RF modules,
including 433.92 MHz, 315 MHz, 868 MHz and 915 MHz. These frequencies are used
because of national and international regulations governing the used of radio for
communication.
The RF module, as the name suggests, operates at Radio Frequency. The corresponding
frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is
DEPARTMENT OF EEE 41
EMBEDDED SYTEMS SPY ROBOT
represented as variations in the amplitude of carrier wave. This kind of modulation is known
as Amplitude shift keying(ASK).
The RF module is often used along with a pair of encoder/decoder. The encoder is used
for encoding parallel data for transmission feed while reception is decoded by a
decoder. HT12E-HT12D, HT640-HT648, etc. are some commonly used encoder/decoder pair
ICs.
DEPARTMENT OF EEE 42
EMBEDDED SYTEMS SPY ROBOT
RF Transmitter
Pin
Function Name
No
RF Receiver
Pin
Function Name
No
DEPARTMENT OF EEE 43
EMBEDDED SYTEMS SPY ROBOT
4 Supply voltage; 5V Vcc
Vehicle monitoring
Remote control
Telemetry
Small-range wireless network
Wireless meter reading
Access control systems
Wireless home security systems
Area paging
DEPARTMENT OF EEE 44
EMBEDDED SYTEMS SPY ROBOT
Industrial data acquisition system
Radio tags reading
RF contactless smart cards
Wireless data terminals
Wireless fire protection systems
Biological signal acquisition
Hydrological and meteorological monitoring
Robot remote control
Wireless data transmissions
Digital video/audio transmission
Digital home automation, such as remote light/switch
6.2 IR SENSORS
The wavelengths of these regions and their applications are shown below.
The frequency range of infrared is higher than microwave and lesser than visible light.
An infrared sensor emits and/or detects infrared radiation to sense its surroundings as shown
in fig 6.2.1 the working of any Infrared sensor is governed by three laws: Planck’s Radiation
law, Stephen – Boltzmann law and Wien’s Displacement law. Planck’s law states that “every
object emits radiation at a temperature not equal to 00K”. Stephen – Boltzmann law states that
“at all wavelengths, the total energy emitted by a black body is proportional to the fourth
power of the absolute temperature”. According to Wien’s Displacement law, “the radiation
curve of a black body for different temperatures will reach its peak at a wavelength inversely
proportional to the temperature”.
DEPARTMENT OF EEE 45
EMBEDDED SYTEMS SPY ROBOT
6.2.2 IR Transmitter
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations.
Hence, they are called IR LED’s. Even though an IR LED looks like a normal LED, the
radiation emitted by it is invisible to the human eye.
DEPARTMENT OF EEE 46
EMBEDDED SYTEMS SPY ROBOT
6.2.3 IR Receiver
Infrared receivers are also called as infrared sensors as they detect the radiation from
an IR transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared
Photodiodes are different from normal photo diodes as they detect only infrared radiation.
The picture of a typical IR receiver or a photodiode is shown below fig 6.2.3.
DEPARTMENT OF EEE 47
EMBEDDED SYTEMS SPY ROBOT
Different types of IR receivers exist based on the wavelength, voltage, package, etc. When
used in an infrared transmitter – receiver combination, the wavelength of the receiver should
match with that of the transmitter.
It is universal that black colour absorbs the entire radiation incident on it and white
colour reflects the entire radiation incident on it. Based on this principle, the second
positioning of the sensor couple can be made. The IR LED and the photodiode are placed side
by side. When the IR transmitter emits infrared radiation, since there is no direct line of
contact between the transmitter and receiver, the emitted radiation must reflect back to the
photodiode after hitting any object. The surface of the object can be divided into two types:
DEPARTMENT OF EEE 48
EMBEDDED SYTEMS SPY ROBOT
reflective surface and non-reflective surface. If the surface of the object is reflective in nature
i.e. it is white or other light colour, most of the radiation incident on it will get reflected back
and reaches the photodiode. Depending on the intensity of the radiation reflected back,
current flows in the photodiode.
If the surface of the object is non-reflective in nature i.e. it is black or other dark colour,
it absorbs almost all the radiation incident on it. As there is no reflected radiation, there is no
radiation incident on the photodiode and the resistance of the photodiode remains higher
allowing no current to flow. This situation is similar to there being no object at all. The
positioning and enclosing of the IR transmitter and Receiver is very important. Both the
transmitter and the receiver must be placed at a certain angle, so that the detection of an object
happens properly. This angle is the directivity of the sensor which is +/- 45 degrees.
In order to avoid reflections from surrounding objects other than the object, both the
IR transmitter and the IR receiver must be enclosed properly. Generally the enclosure is made
of plastic and is painted with black colour.
Appearing as practical electronic components in 1962, the earliest leds emitted low-intensity
infrared light.[7] Infrared leds are still frequently used as transmitting elements in remote-
control circuits, such as those in remote controls for a wide variety of consumer electronics.
DEPARTMENT OF EEE 49
EMBEDDED SYTEMS SPY ROBOT
The first visible-light leds were also of low intensity and limited to red. Modern leds are
available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.
Early leds were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-
segment displays and were commonly seen in digital clocks. Recent developments have
produced leds suitable for environmental and task lighting. Leds have led to new displays and
sensors, while their high switching rates are useful in advanced communications technology.
DEPARTMENT OF EEE 50
EMBEDDED SYTEMS SPY ROBOT
A P-N junction can convert absorbed light energy into a proportional electric current. The
same process is reversed here (i.e. the P-N junction emits light when electrical energy is
applied to it). This phenomenon is generally called electroluminescence, which can be defined
as the emission of light from a semiconductor under the influence of an electric field. The
charge carriers recombine in a forward-biased P-N junction as the electrons cross from the N-
region and recombine with the holes existing in the P-region. Free electrons are in
the conduction band of energy levels, while holes are in the valence energy band. Thus the
energy level of the holes is less than the energy levels of the electrons. Some portion of the
energy must be dissipated to recombine the electrons and the holes. This energy is emitted in
the form of heat and light.
The electrons dissipate energy in the form of heat for silicon and germanium diodes but
in gallium arsenide phosphide (GaAsP) and gallium phosphide (GaP) semiconductors, the
electrons dissipate energy by emitting photons. If the semiconductor is translucent, the
junction becomes the source of light as it is emitted, thus becoming a light-emitting diode.
However, when the junction is reverse biased, the LED produces no light and—if the potential
is great enough, the device is damaged.
DEPARTMENT OF EEE 51
EMBEDDED SYTEMS SPY ROBOT
Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet
or winding with a "North" polarization, while green represents a magnet or winding with a
"South" polarization).
DEPARTMENT OF EEE 52
EMBEDDED SYTEMS SPY ROBOT
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator,
field magnet(s), and brushes. In most common DC motors (and all that beamers will see), the
external magnetic field is produced by high-strength permanent magnets1. The stator is the
stationary part of the motor -- this includes the motor casing, as well as two or more permanent
magnet pole pieces. The rotor (together with the axle and attached commutator) rotate with
respect to the stator. The rotor consists of windings (generally on a core), the windings being
electrically connected to the commutator. The above diagram shows a common motor layout
-- with the rotor inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are such that
when power is applied, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets.
As the rotor reaches alignment, the brushes move to the next commutator contacts, and
energize the next winding. Given our example two-pole motor, the rotation reverses the
direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field,
driving it to continue rotating.
In real life, though, DC motors will always have more than two poles (three is a very
common number). In particular, this avoids "dead spots" in the commutator. You can imagine
how with our example two-pole motor, if the rotor is exactly at the middle of its rotation
DEPARTMENT OF EEE 53
EMBEDDED SYTEMS SPY ROBOT
(perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-
pole motor, there is a moment where the commutator shorts out the power supply (i.e., both
brushes touch both commutator contacts simultaneously). This would be bad for the power
supply, waste energy, and damage motor components as well. Yet another disadvantage of
such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount
of torque it could produce is cyclic with the position of the rotor).
Like all electric motors or generators, torque is produced by the principle of Lorentz
force, which states that any current-carrying conductor placed within an external magnetic
field experiences a torque or force known as Lorentz force. Advantages of a brushed DC
motor include low initial cost, high reliability, and simple control of motor speed.
Disadvantages are high maintenance and low life-span for high intensity uses. Maintenance
involves regularly replacing the brushes and springs which carry the electric current, as well
as cleaning or replacing the commutator. These components are necessary for transferring
electrical power from outside the motor to the spinning wire windings of the rotor inside the
motor.
DEPARTMENT OF EEE 54
EMBEDDED SYTEMS SPY ROBOT
An assembly composed of an electric motor and a reduction gear in a single unit. The
most common types have planetary, planetary lantem, and wave transmissions. For greater
compactness, the driving gear of the reduction gear is mounted directly on the motor shaft.
Gearmotors are used in universal drivers for general use; they are manufactured serially by
specialized enterprises. They can operate in a horizontal, vertical, or tilted position, depending
on the lubrication system used.
6.5 L293D
The Device is a monolithic integrated high voltage, high current four channel driver
designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays
solenoids, DC and stepping motors) and switching power transistors. To simplify use as two
bridges each pair of channels is equipped with an enable input. A separate supply input is
provided for the logic, allowing operation at a lower voltage and internal clamp diodes are
included.
This device is suitable for use in switching applications at frequencies up to 5kHz.The
L293D is assembled in a 16 lead plastic package which has 4 center pins connected together
DEPARTMENT OF EEE 55
EMBEDDED SYTEMS SPY ROBOT
and used for heat sinking. The L293DD is assembled in a 20 lead surface mount which has 8
center pins connected together and used for heat sinking.
DEPARTMENT OF EEE 56
EMBEDDED SYTEMS SPY ROBOT
DEPARTMENT OF EEE 57
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 7
PROJECT DESCRIPTION
At the time of war where it can be used to collect information from the enemy terrain and
monitor that information at a far secure area, and safely devise a plan for the counter attack.
Tracking locations of terrorist organizations and then plan attack at suitable time.
Making a surveillance of any disaster affected area where human beings can’t go.
The above mentioned applications are not safe for the human beings to do, so we can
implement spy robots at the place of humans for the safety purpose.
7.2 BLOCK DIAGRAM
TRANSMITTER SECTION
Power supply
selection
Micro
Motor controller Decoder
Driver section section
Motor RF RX
Section
RECEIVER SECTION
RF TX
Button
Section Encoder
Power
Supply
DEPARTMENT OF EEE 58
EMBEDDED SYTEMS SPY ROBOT
DEPARTMENT OF EEE 59
EMBEDDED SYTEMS SPY ROBOT
1 - Enable 1-2, when this is HIGH the left part of the IC will work and when it is low the
left part won’t work.
2 - INPUT 1, when this pin is HIGH the current will flow though output 1
3 - OUTPUT 1, this pin should be connected to one of the terminal of motor
4,5 - GND, ground pins
6 - OUTPUT 2, this pin should be connected to one of the terminal of motor
7 - INPUT 2, when this pin is HIGH the current will flow though output 2
8 - VCC2, this is the voltage which will be supplied to the motor.
16 - VCC1, this is the power source to the IC. So, this pin should be supplied with 5 V
15 - INPUT 4, when this pin is HIGH the current will flow though output 4
14 - OUTPUT 4, this pin should be connected to one of the terminal of motor
13,12 - GND, ground pins
11 - OUTPUT 3, this pin should be connected to one of the terminal of motor
10 - INPUT 3, when this pin is HIGH the current will flow though output 3
DEPARTMENT OF EEE 60
EMBEDDED SYTEMS SPY ROBOT
9 - Enable 3-4, when this is HIGH the right part of the IC will work and when it is low the
right part won’t work.
The decoders are a series of CMOS LSIs for remote control system applications. They
are paired with Holteks series of encoders. For proper operation, a pair of
encoder/decoder with the same number of addresses and data format should be chosen.
The decoders receive serial addresses and data from a programmed 212 series of
encoders that are transmitted by a carrier using an RF or an IR transmission medium.
They compare the serial input data three times continuously with their local addresses.
If no error or unmatched codes are found, the input data codes are decoded and then
transferred to the output pins. The VT pin also goes high to indicate a valid
transmission. The series of decoders are capable of decoding information that consist
of N bits of address and 12EN bits of data. Of this series, the HT12D is arranged to
provide 8 address bits and 4 data bits and HT12 F is used to decode12 bits of address
information.
Features:
Operating voltage: 2.4V~12V
Low power and high noise immunity CMOS technology
Low standby current
Capable of decoding 12 bits of information
Pair with Holtek s212 series of encoders
Binary address setting
Received codes are checked 3 times
Address/Data number combination E HT12D: 8 address bits and 4 data bits E
HT12F: 12 address bits only
Built-in oscillator needs only 5% resistor
Valid transmission indicator
Easy interface with an RF or an infrared transmission medium
Minimal external components
Applications:
Burglar alarm system
DEPARTMENT OF EEE 61
EMBEDDED SYTEMS SPY ROBOT
Smoke and fire alarm system
Garage door controllers
Car door controllers
Pin Diagram :
DEPARTMENT OF EEE 62
EMBEDDED SYTEMS SPY ROBOT
The decoders are a series of CMOS LSIs for remote control system applications. They
are
paired with Holteks series of encoders. For proper operation, a pair of encoder/decoder
with the same number of addresses and data format should be chosen. The decoders
receive serial addresses and data from a programmed series of encoders that are
transmitted by a carrier using an RF or an IR transmission medium. They compare the
serial input data three times continuously with their local addresses. If no error or
unmatched codes are found, the input data codes are decoded and then transferred to
the output pins. The VT pin also goes high to indicate a valid transmission. The 2 12
series of decoders are capable of decoding information that consist of N bits of address
and 12_N bits of data. Of this series, the HT12D is arranged to provide 8 address bits
and 4 data bits, and HT12F is used to decode 12 bits of address information.
DEPARTMENT OF EEE 63
EMBEDDED SYTEMS SPY ROBOT
Pin description:
Connection
7.6 RECEIVER
Receiver consists of the following sections
Button Section
Power Supply
Encoder
RF TX
DEPARTMENT OF EEE 64
EMBEDDED SYTEMS SPY ROBOT
Features:
Operating voltage
2.4V~5V for the HT12A
2.4V~12V for the HT12E
Low power and high noise immunity CMOS technology
Low standby current: 0.1_A (typ.) at VDD=5V
HT12A with a 38kHz carrier for infrared transmission medium
Applications:
DEPARTMENT OF EEE 65
EMBEDDED SYTEMS SPY ROBOT
Cordless telephones
Other remote control systems
Pin Diagram:
DEPARTMENT OF EEE 66
EMBEDDED SYTEMS SPY ROBOT
The encoders are a series of CMOS LSIs for remote control system applications. They are
capable of encoding information which consists of N address bits and 12_N data bits. Each
address/ data input can be set to one of the two logic states. The programmed addresses/data
are transmitted together with the header bits via an RF or an infrared transmission medium
upon receipt of a trigger signal. The capability to select a TE trigger on the HT12E or a DATA
trigger on the HT12A further enhances the application flexibility of the 2 12series of encoders.
The HT12A additionally provides a 38kHz carrier for infrared systems.
DEPARTMENT OF EEE 67
EMBEDDED SYTEMS SPY ROBOT
Pin description:
Pin Name I/O Internal Description
NMOS TRANSMISSION
GATE PROTECTION
DIODE (HT12E)
low
Momentary: VSS
DEPARTMENT OF EEE 68
EMBEDDED SYTEMS SPY ROBOT
TE I CMOS IN Pull-high Transmission enable,
active low
7.8.1 WORKING
The spy robot works on the principle of Embedded systems by giving instructions to the
microcontroller through transmitter. By following the commands of the transmitter the spy
robot moves in the corresponding direction. This is done through receiver section which is
consists of encoder, motor driver, microcontroller, RF TX.
By using Mobizen app we can capture the videos and pictures by operating the spy robot
through internet. These type of robots can be used irrespective of conditions.
Software programme
sbit data0 at RB7_bit;
sbit data1 at RB6_bit;
sbit data2 at RB5_bit;
sbit data3 at RB4_bit;
DEPARTMENT OF EEE 69
EMBEDDED SYTEMS SPY ROBOT
stop_motor();
FW_motor();
RW_motor();
left();
right();
int res=0,rep;
void main()
{
ANSEL=ANSELH=0;
data0_dir=data1_dir=data2_dir=data3_dir=1;
m11_dir=m12_dir=m21_dir=m22_dir=0;
m11=m12=m21=m22=0;
ANSEL=ANSELH=0;
delay_ms(100);
while(1)
{
stop_motor();
FW_motor();
DEPARTMENT OF EEE 70
EMBEDDED SYTEMS SPY ROBOT
m11=m22=1; delay_ms(5);
}
left()
{
m11=m21=0; delay_ms(5);
m12=m22=1; delay_ms(5);
} right()
{
m12=m22=0; delay_ms(5);
m11=m21=1; delay_ms(5);
}
DEPARTMENT OF EEE 71
EMBEDDED SYTEMS SPY ROBOT
DEPARTMENT OF EEE 72
EMBEDDED SYTEMS SPY ROBOT
DEPARTMENT OF EEE 73
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 8
8.1 ADVANTAGES:
Consistency and performance.
It can move from one location to another location.
Robotic workers never get tired.
Can be made to perform even the most dangerous tasks.
8.2 APPLICATIONS:
Military applications.
Surveillance along border.
Search and rescue operation.
Maneuvering in hazardous environment
DEPARTMENT OF EEE 74
EMBEDDED SYTEMS SPY ROBOT
CHAPTER 9
9.1 CONCLUSION
The wireless spy robot has been designed in such a way that it can fulfill the needs of the
rescue, detection and searching for human beings at hazardous area. It has many applications
and only tends to spy around the spy robot in this system. In this research, wireless remote
control system for moving spy robot and CCD rotate is considered battery.
DEPARTMENT OF EEE 75
EMBEDDED SYTEMS SPY ROBOT
This operation system is the spy robot with wireless remote control. The CCD camera can
modify range more than 100ft .The wireless camera can be able to upgrade with the 360
degree left and right directions by using PIC program so that the functionality is having a
movement at many sides. Moreover, this camera can upgrade to move up and down
directions. Instead of DC motors which driver the CCD camera, stepper motors can also be
used. The spy robot can be commanded directly by laptop keyboard without using remote
controller. For the advance of spy robot, it can be built a robot with wireless visual system
that the user can observe and control the situation via computer or mobile.
DEPARTMENT OF EEE 76
EMBEDDED SYTEMS SPY ROBOT
REFERENCES
[1] www.circuitstoday.com “Mobile Operated Spy Robot”
[4] Microchip, “PIC16F87X Data Sheet 40-pin8- Bit CMOS FLASH Micro controller”, ISO 9001/
QS-9000, Microchip Technology Incorporated, USA, 2001.
[5] D. Ibrahim, “Microcontroller Based Applied Digital Control”, ISBN: 0-470-86335-8, John Wiley
& Sons, Ltd, England, 2006.
[6] J. Iovine, “PIC Robotics: A Beginner‟s Guide to Robotics Projects Using the PICmicro”,
McGraw-Hill, 2004.
[7] T. Wilmshurst, “Designing Embedded Systems with PIC Microcontrollers”, ISBN-10: 0-7506-
6755-9, Elsevier, 2007.
[8] P. Robert, “Introduction to Gear Design”, Continuing Education and Development, Course No:
M03-016, 2012.
DEPARTMENT OF EEE 77