You are on page 1of 74

MEMS based WIRELESS CONTROLLED ROBOT WITH

VOICE AND VIDEO CAMERA

CHAPTER 1

ABSTRACT

The main theme of this proposal is to control a robotic vehicle by using MEMS
sensor. This equipment will be more helpful in coal mining and bore wells and rescue
operations. It would be useful in secret surveillance also depends on the requirement. In this
project we are using few wireless technologies for instructions transmission and video live
streaming.

The main aim of this project is video coverage at require pleases with the help of the
digital camera. The robot is controlled by depending upon the tilt direction and its wireless
communication. The video will be transmitted to the receiver using the AV transmitter.

In the same way, if the tilt is to the left side then another device is going to be
controlled. The tilt is in left side or right side direction the related need will be announced.
This device is very helpful for paralysis and physically challenged persons. This device is
portable, and this system operation is entirely driven by wireless technology. User can wear it
to any movable part and can operate it by tilting the MEMS sensor.
CHAPTER 2

INTRODUCTION

2.1 EMBEDDED SYSTEMS:

An embedded system is a special-purpose computer system designed to perform one


or a few dedicated functions, sometimes with real-time computing constraints. It is usually
embedded as part of a complete device including hardware and mechanical parts. In contrast,
a general-purpose computer, such as a personal computer, can do many different tasks
depending on programming. Embedded systems have become very important today as they
control many of the common devices we use.

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it, reducing the size and cost of the product, or increasing 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 an exactly defined term, as many systems have
some element of programmability. For example, Handheld computers share some elements
with embedded systems — such as the operating systems and microprocessors which power
them — but are not truly embedded systems, because they allow different applications to be
loaded and peripherals to be connected.
An embedded system is some combination of computer hardware and software, either
fixed in capability or programmable, that is specifically designed for a particular kind of
application device. Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, and toys (as well as the more obvious cellular phone
and PDA) are among the myriad possible hosts of an embedded system. Embedded systems
that are programmable are provided with a programming interface, and embedded systems
programming is a specialized occupation.

Certain operating systems or language platforms are tailored for the embedded
market, such as Embedded Java and Windows XP Embedded. However, some low-end
consumer products use very inexpensive microprocessors and limited storage, with the
application and operating system both part of a single program. The program is written
permanently into the system's memory in this case, rather than being loaded into RAM
(random access memory), as programs on a personal computer are.

2.2 NEED FOR EMBEDDED SYSTEMS:

The uses of embedded systems are virtually limitless, because every day new products
are introduced to the market that utilizes embedded computers in novel ways. In recent years,
hardware such as microprocessors, microcontrollers, and FPGA chips have become much
cheaper. So when implementing a new form of control, it's wiser to just buy the generic chip
and write your own custom software for it. Producing a custom-made chip to handle a
particular task or set of tasks costs far more time and money. Many embedded computers
even come with extensive libraries, so that "writing your own software" becomes a very
trivial task indeed. From an implementation viewpoint, there is a major difference between a
computer and an embedded system. Embedded systems are often required to provide Real-
Time response. The main elements that make embedded systems unique are its reliability and
ease in debugging.

2.2.1 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:
a) Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
b) 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 multi core systems.
c) 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.
d) An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
e) 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.
f) Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as assembly code or source-code.

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.

2.2.2 RELIABILITY:

Embedded systems often reside in machines that are expected to run continuously for
years without errors and in some cases recover by them 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.
Specific reliability issues may include:
a) 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.
b) The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backup s are selected by an operator. Examples include aircraft navigation,
reactor control systems, safety-critical chemical factory controls, train signals, engines
on single-engine aircraft.
c) 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:
a) Watchdog timer that resets the computer unless the software periodically notifies the
watchdog
b) Subsystems with redundant spares that can be switched over to
c) software "limp modes" that provide partial function
d) Designing with a Trusted Computing Base (TCB) architecture[6] ensures a highly
secure & reliable system environment
e) An Embedded Hypervisor is able to provide secure encapsulation for any subsystem
component, so that a compromised software component cannot interfere with other
subsystems, or privileged-level system software. This encapsulation keeps faults from
propagating from one subsystem to another, improving reliability. This may also
allow a subsystem to be automatically shut down and restarted on fault detection.
f) Immunity Aware Programming.

2.3 APPLICATIONS OF EMBEDDED SYSTEM:

We are living in the Embedded World. You are surrounded with many embedded
products and your daily life largely depends on the proper functioning of these gadgets.
Television, Radio, CD player of your living room, Washing Machine or Microwave Oven in
your kitchen, Card readers, Access Controllers, Palm devices of your work space enable you
to do many of your tasks very effectively. Apart from all these, many controllers embedded
in your car take care of car operations between the bumpers and most of the times you tend to
ignore all these controllers.

In recent days, you are showered with variety of information about these embedded
controllers in many places. All kinds of magazines and journals regularly dish out details
about latest technologies, new devices; fast applications which make you believe that your
basic survival is controlled by these embedded products. Now you can agree to the fact that
these embedded products have successfully invaded into our world. You must be wondering
about these embedded controllers or systems. What is this Embedded System?

The computer you use to compose your mails, or create a document or analyze the
database is known as the standard desktop computer. These desktop computers are
manufactured to serve many purposes and applications.

You need to install the relevant software to get the required processing facility. So,
these desktop computers can do many things. In contrast, embedded controllers carryout a
specific work for which they are designed. Most of the time, engineers design these
embedded controllers with a specific goal in mind. So these controllers cannot be used in any
other place.

Theoretically, an embedded controller is a combination of a piece of microprocessor


based hardware and the suitable software to undertake a specific task.

These days designers have many choices in microprocessors/microcontrollers.


Especially, in 8 bit and 32 bit, the available variety really may overwhelm even an
experienced designer. Selecting a right microprocessor may turn out as a most difficult first
step and it is getting complicated as new devices continue to pop-up very often.

In the 8 bit segment, the most popular and used architecture is Intel's 8031. Market
acceptance of this particular family has driven many semiconductor manufacturers to develop
something new based on this particular architecture. Even after 25 years of existence,
semiconductor manufacturers still come out with some kind of device using this 8031 core.

2.3.1 MILITARY AND AEROSPACE SOFTWARE APPLICATIONS:

From in-orbit embedded systems to jumbo jets to vital battlefield networks, designers
of mission-critical aerospace and defence systems requiring real-time performance,
scalability, and high-availability facilities consistently turn to the LynxOS® RTOS and the
LynxOS-178 RTOS for software certification to DO-178B.

Rich in system resources and networking services, LynxOS provides an off-the-shelf


software platform with hard real-time response backed by powerful distributed computing
(CORBA), high reliability, software certification, and long-term support options.
The LynxOS-178 RTOS for software certification, based on the RTCA DO-178B
standard, assists developers in gaining certification for their mission- and safety-critical
systems. Real-time systems programmers get a boost with Linux Works' DO-178B RTOS
training courses.

2.3.2 COMMUNICATIONS APPLICATIONS:

"Five-nine" availability, Compact PCI hot swap support, and hard real-time
response—Linux OS delivers on these key requirements and more for today's carrier-class
systems. Scalable kernel configurations, distributed computing capabilities, integrated
communications stacks, and fault-management facilities make Linux OS the ideal choice for
companies looking for a single operating system for all embedded telecommunications
applications—from complex central controllers to simple line/trunk cards.

Linux Works Jump start for Communications package enables OEMs to rapidly
develop mission-critical communications equipment, with pre-integrated, state-of-the-art,
data networking and porting software components—including source code for easy
customization.

The Lynx Certifiable Stack (LCS) is a secure TCP/IP protocol stack designed especially
for applications where standards certification is required.

2.3.3 ELECTRONICS APPLICATIONS AND CONSUMER DEVICES:

As the number of powerful embedded processors in consumer devices continues to rise,


the BlueCat® Linux® operating system provides a highly reliable and royalty-free option for
systems designers.

And as the wireless appliance revolution rolls on, web-enabled navigation systems,
radios, personal communication devices, phones and PDAs all benefit from the cost-effective
dependability, proven stability and full product life-cycle support opportunities associated
with BlueCat embedded Linux. BlueCat has teamed up with industry leaders to make it easier
to build Linux mobile phones with Java integration.
For makers of low-cost consumer electronic devices who wish to integrate the LinuxOS
real-time operating system into their products, we offer special MSRP-based pricing to
reduce royalty fees to a negligible portion of the device's MSRP.

2.3.4 INDUSTRIAL AUTOMATION AND PROCESS CONTROL SOFTWARE:

Designers of industrial and process control systems know from experience that
LynuxWorks operating systems provide the security and reliability that their industrial
applications require.

From ISO 9001 certification to fault-tolerance, POSIX conformance, secure partitioning


and high availability, we've got it all. Take advantage of our 20 years of experience.

2.4 MICROCONTROLLER VERSUS MICROPROCESSOR:

What is the difference between a Microprocessor and Microcontroller? By


microprocessor is meant the general purpose Microprocessors such as Intel's X86 family
(8086, 80286, 80386, 80486, and the Pentium) or Motorola's 680X0 family (68000, 68010,
68020, 68030, 68040, etc). These microprocessors contain no RAM, no ROM, and no I/O
ports on the chip itself. For this reason, they are commonly referred to as general-purpose
Microprocessors.

A system designer using a general-purpose microprocessor such as the Pentium or the


68040 must add RAM, ROM, I/O ports, and timers externally to make them functional.
Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier
and much more expensive, they have the advantage of versatility such that the designer can
decide on the amount of RAM, ROM and I/O ports needed to fit the task at hand. This is not
the case with Microcontrollers.

A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of


RAM, ROM, I/O ports, and a timer all on a single chip. In other words, the processor, the
RAM, ROM, I/O ports and the timer are all embedded together on one chip; therefore, the
designer cannot add any external memory, I/O ports, or timer to it. The fixed amount of on-
chip ROM, RAM, and number of I/O ports in Microcontrollers makes them ideal for many
applications in which cost and space are critical. In many applications, for example a TV
remote control, there is no need for the computing power of a 486 or even an 8086
microprocessor. These applications most often require some I/O operations to read signals
and turn on and off certain bits.
2.5 PERIPHERALS
A close-up of the SMSC LAN91C110 (SMSC 91x) chip, an embedded Ethernet chip

Embedded systems talk with the outside world via peripherals, such as:

1. Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485, etc.


2. Synchronous Serial Communication Interface: I2C, SPI, SSC and ESSI (Enhanced
Synchronous Serial Interface)
3. Universal Serial Bus (USB)
4. Multi Media Cards (SD cards, Compact Flash, etc.)
5. Networks: Ethernet, LonWorks, etc.
6. Fieldbuses: CAN-Bus, LIN-Bus, PROFIBUS, etc.
7. Timers: PLL(s), Capture/Compare and Time Processing Units
8. Discrete IO: aka General Purpose Input/Output (GPIO)
9. Analog to Digital/Digital to Analog (ADC/DAC)
10. Debugging: JTAG, ISP, ICSP, BDM Port, BITP, and DB9 ports.
2.6 ARM7 LPC2148 THEORY:

Over the last few years, the ARM architecture has become the most pervasive 32-
bitarchitecture in the world, with wide range of ICs available from various IC
manufacturers. ARM processors are embedded in products ranging from cell/mobile phones
to automotive braking systems. A worldwide community of ARM partners and third-party
vendors has developed among semiconductor and product design companies, including
hardware engineers, system designers, and software developers. ARM7 is one of the widely
used micro-controller family in embedded system application. This section is humble effort
for explaining basic features of ARM-7.

ARM is a family of instruction set architectures for computer processors based on a


reduced instruction set computing (RISC) architecture developed by British company ARM
Holdings. A RISC-based computer design approach means ARM processors require
significantly fewer transistors than typical processors in average computers. This approach
reduces costs, heat and power use. These are desirable traits for light, portable, battery-
powered devices—including smartphones, laptops, tablet and notepad computers), and
other embedded systems. A simpler design facilitates more efficient multi-core CPUs and
higher core counts at lower cost, providing higher processing power and improved energy

efficiency for servers and supercomputers.

According to ARM Holdings, in 2010 alone, producers of chips based on ARM


architectures reported shipments of 6.1 billion ARM Based processors, representing 95% of
smartphones, 35% of digital televisions and set-top boxes and 10% of mobile computers. It is
the most widely used 32-bit instruction set architecture in terms of quantity produced.
Figure:2.6.1 ARMLPC2148 PIN OUT

Features:

a) 16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.

b) 8 to 40 kB of on-chip static RAM and 32 to 512 kB of on-chip flash program

memory.

c) 128 bit wide interface/accelerator enables high speed 60 MHz operation.

d) In-System/In-Application Programming (ISP/IAP) via on-chip boot-loader

software.

e) Single flash sector or full chip erase in 400 ms and programming of 256 bytes in 1

ms.

f) Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with

the on-chip RealMonitor software and high speed tracing of instruction execution.

g) USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint RAM.

h) In addition, the LPC2146/8 provide 8 kB of on-chip RAM accessible to USB by

DMA.

i) One or two (LPC2141/2 vs. LPC2144/6/8) 10-bit A/D converters provide a total

of 6/14 analog inputs, with conversion times as low as 2.44 s per channel.

j) Single 10-bit D/A converter provides variable analog output.


k) Two 32-bit timers/external event counters (with four capture and four compare

channels each), PWM unit (six outputs) and watchdog.

l) Low power real-time clock with independent power and dedicated 32 kHz clock

input.

m) Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus

n) (400 kbit/s), SPI and SSP with buffering and variable data length capabilities.

o) Vectored interrupt controller with configurable priorities and vector addresses.

p) Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.

q) Up to nine edge or level sensitive external interrupt pins available.

2.6.1 INTERNAL FEATURES:

The ARM7TDMI-S is a general purpose 32-bit microprocessor, which offers high

performance and very low power consumption. The ARM architecture is based on Reduced

Instruction Set Computer (RISC) principles, and the instruction set and related decode

mechanism are much simpler than those of microprogrammed Complex Instruction Set

Computers. This simplicity results in a high instruction throughput and impressive real-time

interrupt response from a small and cost-effective processor core.

Pipeline techniques are employed so that all parts of the processing and memory

systems can operate continuously. Typically, while one instruction is being executed, its

successor is being decoded, and a third instruction is being fetched from memory. The

ARM7TDMI-S processor also employs a unique architectural strategy known as THUMB,

which makes it ideally suited to high-volume applications with memory restrictions, or

applications where code density is an issue.

The key idea behind THUMB is that of a super-reduced instruction set. Essentially,

the ARM7TDMI-S processor has two instruction sets:

a. The standard 32-bit ARM instruction set.


b. A 16-bit THUMB instruction set.

The THUMB set’s 16-bit instruction length allows it to approach twice the density of

standard ARM code while retaining most of the ARM’s performance advantage over a

traditional 16-bit processor using 16-bit registers. This is possible because THUMB code

operates on the same 32-bit register set as ARM code. THUMB code is able to provide up to

65% of the code size of ARM, and 160% of the performance of an equivalent ARM

processor connected to a 16-bit memory system.

2.6.2 ON CHIP FLASH MEMORY SYSTEM:

The LPC2141/2/4/6/8 incorporate a 32 kB, 64 kB, 128 kB, 256 kB, and 512 kB Flash
memory system, respectively. This memory may be used for both code and data storage.
Programming of the Flash memory may be accomplished in several ways: over the serial
built-in JTAG interface, using In System Programming (ISP) and UART0, or by means of In
Application Programming (IAP) capabilities. The application program, using the
IAPfunctions, may also erase and/or program the Flash while the application is running,
allowing a great degree of flexibility for data storage field firmware upgrades, etc. When the
LPC2141/2/4/6/8 on-chip bootloader is used, 32 kB, 64 kB, 128 kB, 256 kB, and 500 kB of
Flash memory is available for user code. The LPC2141/2/4/6/8 Flash memory provides
minimum of 100,000 erase/write cycles and 20 years of data-retention.
2.6.3 ON CHIP STATIC RAM:

On-chip Static RAM (SRAM) may be used for code and/or data storage. The on-chip
SRAM may be accessed as 8-bits, 16-bits, and 32-bits. The LPC2141/2/4/6/8 provide 8/16/32
kB of static RAM, respectively. The LPC2141/2/4/6/8 SRAM is designed to be accessed as a
byte-addressed memory.
Word and halfword accesses to the memory ignore the alignment of the address and
access the naturally-aligned value that is addressed (so a memory access ignores address bits
0 and 1 for word accesses, and ignores bit 0 for halfword accesses). Therefore valid reads and
writes require data accessed as halfwords to originate from addresses with address line 0
being 0 (addresses ending with 0, 2, 4, 6, 8, A, C, and E in hexadecimal notation) and data
accessed as words to originate from addresses with address lines 0 and 1 being 0 (addresses
ending with 0, 4, 8, and C in hexadecimal notation). This rule applies to both off and on-chip
memory usage.
The SRAM controller incorporates a write-back buffer in order to prevent CPU stalls
during back-to-back writes. The write-back buffer always holds the last data sent by software
to the SRAM. This data is only written to the SRAM when another write is requested by
software (the data is only written to the SRAM when software does another write). If a chip
reset occurs, actual SRAM contents will not reflect the most recent write request (i.e. after a
"warm" chip reset, the SRAM does not reflect the last write operation).
Any software that checks SRAM contents after reset must take this into account. Two
identical writes to a location guarantee that the data will be present after a Reset.
Alternatively, a dummy write operation before entering idle or power-down mode will
similarly guarantee that the last data written will be present in SRAM after a subsequent
Reset.
2.6.4 FLASH PROGRAMMING ISSSUES:

Since the Flash memory does not allow accesses during programming and erase
operations, it is necessary for the MAM to force the CPU to wait if a memory access to a
Flash address is requested while the Flash module is busy. (This is accomplished by asserting
the ARM7TDMI-S local bus signal CLKEN.) Under some conditions, this delay could result
in a Watchdog time-out. The user will need to be aware of this possibility and take steps to
insure that an unwanted Watchdog reset does not cause a system failure while programming
or erasing the Flash memory.
In order to preclude the possibility of stale data being read from the Flash memory, the
LPC2141/2/4/6/8 MAM holding latches are automatically invalidated at the beginning of any
Flash programming or erase operation. Any subsequent read from a Flash address will cause
a new fetch to be initiated after the Flash operation has completed.
2.6.5 CONTROL FUNCTIONS:

The System Control Block includes several system features and control registers for a
number of functions that are not related to specific peripheral devices. These include:
a) Crystal Oscillator
b) External Interrupt Inputs
c) Miscellaneous System Controls and Status
d) Memory Mapping Control
e) PLL
f) Power Control
g) Reset
h) APB Divider
i) Wakeup Timer
Each type of function has its own register(s) if any are required and unneeded bits are
defined as reserved in order to allow future expansion. Unrelated functions never share the
same register addresses.

CHAPTER 3

BLOCK DIAGRAM

Fig 3.1 block diagram

Objectives:

a) Wireless data transmission.


b) Robot with obstacle detection.
c) Forms the surveillance system for combing areas.

d) Monitors large spaces in industrial environment.


e) Wireless transmission over RF.
Technology is the word coined for the practical application of scientific knowledge in
the industry. The advancement in technology cannot be justified unless it is used for
leveraging the user’s purpose. Technology, is today, imbibed for accomplishment of several
tasks of varied complexity, in almost all walks of life. The society as a whole is exquisitely
dependent on science and technology. Technology has played a very significant role in
improving the quality of life. One way through which this is done is by automating several
tasks using complex logic to simplify the work.
The main aim of this project is video coverage at required places with the help of
digital camera and high power LED. Robot is controlled by depending upon the tilt directions
and its wireless communication. The video will be transmitted to the receiver using AV
transmitter. At receiver end, these can be seen on TV. It is a very low cost survey line system
used to monitor a larger area. We are using RF communication to send commands to robot.
RF Communication ranges in between 30 KHz to 300 GHz. RF communication works by
creating electromagnetic waves at a source and being able to pick up those electromagnetic
waves at a particular destination. These electromagnetic waves travel through the air at near
the speed of light. The wavelength of an electromagnetic signal is inversely proportional to
the frequency; the higher the frequency, the shorter the wavelength.
MEMS is a Micro Electro Mechanical Sensor which is a highly sensitive sensor and
capable of detecting the tilt. The project consists of two micro controller based motherboards.
One motherboard consists of a controller interfaced with MEMS Accelerometer sensor
technology to control the direction of the robot, a RF transmitter to send commands to robot
and it will provide a channel for wireless communication, a LED indicator. This entire board
acts as a remote to control the movement of the robot as well as receive the information from
the robot. The other board is present with the Robot itself. It is interfaced with some DC
motors for moving the robot, a RF receiver for receiving the instructions from the transmitter.
The innovative feature in the system is it automatically detects the light intensity and
switches ON the light source if intensity of light is low which helps in better vision of
surroundings. The Microcontroller is programmed using Embedded C language. This project
finds its major applications while we are monitoring larger areas like political canvassing,
cricket stadiums, international conferences, worship places, banking etc. This project assures
us with more reliable and highly secured system. The microcontroller will act as the mediator
between the input module and output module.

CHAPTER 4

COMPONENTS
The major components which are required for this project are:

a) Micro controller
b) MEMS accelerometer sensor
c) Regulated power supply
d) RF transmitter and receiver modules
e) Motor drivers
f) Crystal oscillator
g) LCD
h) Dc motor
i) Reset
j) Camera
k) Av transmitter and receiver’

1. AT89C52 MICROCONTROLLER
A microcontroller is a general-purpose device, but that is meant to read data, perform limited
calculations on that data and control its environment based on those calculations. The prime
use of a microcontroller is to control the operation of a machine using a fixed program that is
stored in ROM and that does not change over the lifetime of the system.
The microcontroller design uses a much more limited set of single- and double-byte
instructions that are used to move data and code from internal memory to the ALU. The
microcontroller is concerned with getting data from and to its own pins; the architecture and
instruction set are optimized to handle data in bit and byte size.

The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller with


4k bytes of Flash Programmable and erasable read only memory (EROM). The device is
manufactured using Atmel’s high-density non-volatile memory technology and is
functionally compatible with the industry-standard 80C51 microcontroller instruction set and
pin out. By combining versatile 8-bit CPU with Flash on a monolithic chip, the Atmel’s
AT89c51 is a powerful microcomputer, which provides a high flexible and cost- effective
solution to many embedded control applications.

Features:

a) 80C51 based architecture


b) 4-Kbytes of on-chip Reprogrammable Flash Memory
c) 128 x 8 RAM
d) Two 16-bit Timer/Counters
e) Full duplex serial channel
f) Boolean processor
g) Four 8-bit I/O ports, 32 I/O lines
h) Memory addressing capability
a. 64K ROM and 64K RAM
i) Power save modes:
a. Idle and power-down
j) Six interrupt sources
k) Most instructions execute in 0.3 us
l) CMOS and TTL compatible
m) Maximum speed: 40 MHz @ Vcc = 5V
n) Industrial temperature available
o) Packages available:
i. 40-pin DIP
ii. 44-pin PLCC
iii. 44-pin PQFP
2. REGULATED POWER SUPPLY

Transformer:

A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors—the transformer's coils. A varying current in the
first or primary winding creates a varying magnetic flux in the transformer's core, and thus a
varying magnetic field through the secondary winding. This varying magnetic field induces a
varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is
called mutual induction.

Fig 4.1: Transformer Symbol

(or)

Transformer is a device that converts the one form energy to another form of energy
like a transducer.

Fig 4.1.1: Transformer

Basic Principle:
A transformer makes use of Faraday's law and the ferromagnetic properties of an iron
core to efficiently raise or lower AC voltages. It of course cannot increase power so that if the
voltage is raised, the current is proportionally lowered and vice versa.

Fig 4.1.2 : Basic Principle

Transformer Working:

A transformer consists of two coils (often called 'windings') linked by an iron core, as
shown in figure below. There is no electrical connection between the coils, instead they are
linked by a magnetic field created in the core.
Fig 4.1.3: Basic Transformer

Transformers are used to convert electricity from one voltage to another with minimal
loss of power. They only work with AC (alternating current) because they require a changing
magnetic field to be created in their core. Transformers can increase voltage (step-up) as well
as reduce voltage (step-down).

Alternating current flowing in the primary (input) coil creates a continually changing
magnetic field in the iron core. This field also passes through the secondary (output) coil and
the changing strength of the magnetic field induces an alternating voltage in the secondary
coil. If the secondary coil is connected to a load the induced voltage will make an induced
current flow. The correct term for the induced voltage is 'induced electromotive force' which
is usually abbreviated to induced e.m.f.

The iron core is laminated to prevent 'eddy currents' flowing in the core. These
are currents produced by the alternating magnetic field inducing a small voltage in the core,
just like that induced in the secondary coil. Eddy currents waste power by needlessly heating
up the core but they are reduced to a negligible amount by laminating the iron because this
increases the electrical resistance of the core without affecting its magnetic properties.

Transformers have two great advantages over other methods of changing voltage:

1. They provide total electrical isolation between the input and output, so they can be
safely used to reduce the high voltage of the mains supply.
2. Almost no power is wasted in a transformer. They have a high efficiency (power out /
power in) of 95% or more.

Classification of Transformer:

 Step-Up Transformer
 Step-Down Transformer

Step-Down Transformer:

Step down transformers are designed to reduce electrical voltage. Their primary
voltage is greater than their secondary voltage. This kind of transformer "steps down" the
voltage applied to it. For instance, a step down transformer is needed to use a 110v product in
a country with a 220v supply.

Step down transformers convert electrical voltage from one level or phase
configuration usually down to a lower level. They can include features for electrical isolation,
power distribution, and control and instrumentation applications. Step down transformers
typically rely on the principle of magnetic induction between coils to convert voltage and/or
current levels.

Step down transformers are made from two or more coils of insulated wire wound
around a core made of iron. When voltage is applied to one coil (frequently called the
primary or input) it magnetizes the iron core, which induces a voltage in the other coil,
(frequently called the secondary or output). The turn’s ratio of the two sets of windings
determines the amount of voltage transformation.
Fig 4.1.4: Step-Down Transformer

An example of this would be: 100 turns on the primary and 50 turns on the secondary,
a ratio of 2 to 1.

Step down transformers can be considered nothing more than a voltage ratio device.

With step down transformers the voltage ratio between primary and secondary will
mirror the "turn’s ratio" (except for single phase smaller than 1 kva which have compensated
secondary). A practical application of this 2 to 1 turn’s ratio would be a 480 to 240 voltage
step down. Note that if the input were 440 volts then the output would be 220 volts. The ratio
between input and output voltage will stay constant. Transformers should not be operated at
voltages higher than the nameplate rating but may be operated at lower voltages than rated.

Because of this it is possible to do some non-standard applications using standard


transformers.

Single-phase step-down transformers 1 kva and larger may also be reverse connected
to step-down or step-up voltages. (Note: single phase step up or step down transformers sized
less than 1 KVA should not be reverse connected because the secondary windings have
additional turns to overcome a voltage drop when the load is applied. If reverse connected,
the output voltage will be less than desired.)

Step-Up Transformer:
A step-up transformer has more turns of wire on the secondary coil, which makes a
larger induced voltage in the secondary coil. It is called a step-up transformer because the
voltage output is larger than the voltage input.

Step-up transformer 110v 220v design is one whose secondary voltage is greater than
its primary voltage. This kind of transformer "steps up" the voltage applied to it. For instance,
a step up transformer is needed to use a 220v product in a country with a 110v supply.

A step up transformer 110v 220v converts alternating current (AC) from one voltage
to another voltage. It has no moving parts and works on a magnetic induction principle; it can
be designed to "step-up" or "step-down" voltage. So, a step-up transformer increases the
voltage and a step down transformer decreases the voltage.

The primary components for voltage transformation are the step up transformer core
and coil. The insulation is placed between the turns of wire to prevent shorting to one another
or to ground.

This is typically comprised of Mylar, Nomex, Kraft paper, varnish, or other materials.
As a transformer has no moving parts, it will typically have a life expectancy between 20 and
25 years.

Fig 4.1.6: Step-Up Transformer

Applications

Generally, these Step-Up Transformers are used in industries applications only.

Turns Ratio and Voltage


The ratio of the number of turns on the primary and secondary coils determines the ratio of
the voltages...

...where Vp is the primary (input) voltage, Vs is the secondary (output) voltage, Np is the
number of turns on the primary coil, and Ns is the number of turns on the secondary coil.

Diodes:

Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows
the direction in which the current can flow. Diodes are the electrical version of a valve and
early diodes were actually called valves.

Fig 4.1.7: Diode Symbol

A diode is a device which only allows current to flow through it in one direction. In
this direction, the diode is said to be 'forward-biased' and the only effect on the signal is that
there will be a voltage loss of around 0.7V. In the opposite direction, the diode is said to be
'reverse-biased' and no current will flow through it.

Rectifier

The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR)


Rectifier converts AC current or voltages into DC current or voltage. There are two different
rectification circuits, known as 'half-wave' and 'full-wave' rectifiers. Both use components
called diodes to convert AC into DC.

The Half-wave Rectifier

The half-wave rectifier is the simplest type of rectifier since it only uses one diode, as
shown in figure.
Fig 4.1.8: Half Wave Rectifier

Figure 2 shows the AC input waveform to this circuit and the resulting output. As
you can see, when the AC input is positive, the diode is forward-biased and lets the current
through. When the AC input is negative, the diode is reverse-biased and the diode does not
let any current through, meaning the output is 0V. Because there is a 0.7V voltage loss
across the diode, the peak output voltage will be 0.7V less than Vs.

While the output of the half-wave rectifier is DC (it is all positive), it would not be
suitable as a power supply for a circuit. Firstly, the output voltage continually varies between
0V and Vs-0.7V, and secondly, for half the time there is no output at all.
The Full-wave Rectifier

The circuit in figure 3 addresses the second of these problems since at no time is the
output voltage 0V. This time four diodes are arranged so that both the positive and negative
parts of the AC waveform are converted to DC. The resulting waveform is shown in figure 4.

Fig 4.1.9: Full-Wave Rectifier

Fig 4.1.10: Full-Wave Rectification


When the AC input is positive, diodes A and B are forward-biased, while diodes C
and D are reverse-biased. When the AC input is negative, the opposite is true - diodes C and
D are forward-biased, while diodes A and B are reverse-biased.

While the full-wave rectifier is an improvement on the half-wave rectifier, its output
still isn't suitable as a power supply for most circuits since the output voltage still varies
between 0V and Vs-1.4V. So, if you put 12V AC in, you will 10.6V DC out.

Capacitor Filter

The capacitor-input filter, also called "Pi" filter due to its shape that looks like the
Greek letter pi, is a type of electronic filter. Filter circuits are used to remove unwanted or
undesired frequencies from a signal.

Fig 4.1.11: Capacitor Filter

A typical capacitor input filter consists of a filter capacitor C1, connected across the
rectifier output, an inductor L, in series and another filter capacitor connected across the load.

1. The capacitor C1 offers low reactance to the AC component of the rectifier output
while it offers infinite reactance to the DC component. As a result the capacitor shunts
an appreciable amount of the AC component while the DC component continues its
journey to the inductor L
2. The inductor L offers high reactance to the AC component but it offers almost zero
reactance to the DC component. As a result the DC component flows through the
inductor while the AC component is blocked.
3. The capacitor C2 bypasses the AC component which the inductor had failed to block.
As a result only the DC component appears across the load RL.
Fig 4.1.12: Centered Tapped Full-Wave Rectifier with a Capacitor Filter

Voltage Regulator:

A voltage regulator is an electrical regulator designed to automatically maintain a


constant voltage level. It may use an electromechanical mechanism, or passive or active
electronic components. Depending on the design, it may be used to regulate one or more AC
or DC voltages. There are two types of regulator are they.

 Positive Voltage Series (78xx) and


 Negative Voltage Series (79xx)

78xx:’78’ indicate the positive series and ‘xx’indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.

79xx:’78’ indicate the negative series and ‘xx’indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.

These regulators consists the three pins there are

Pin1: It is used for input pin.

Pin2: This is ground pin for regulator

Pin3: It is used for output pin. Through this pin we get the output.
Fig 4.1.13: Regulator

3. MEMS ACCELEROMETER:

An accelerometer is an electromechanical device that is used to measure


acceleration and the force producing it. Many types of accelerometers are available in the
market today. They can be divided according to the force (static or dynamic) that is to be
measured. Even today, one of the most commonly used one is the piezoelectric
accelerometer. But, since they are bulky and cannot be used for all operations, a smaller and
highly functional device like the MEMS accelerometer was developed. Though the first of its
kind was developed 25 years ago, it was not accepted until lately, when there was need for
large volume industrial applications. Due to its small size and robust sensing feature, they are
further developed to obtain multi-axis sensing.

Working:
One of the most commonly used MEMS accelerometer is the capacitive type. The
capacitive MEMS accelerometer is famous for its high sensitivity and its accuracy at high
temperatures. The device does not change values depending on the base materials used and
depends only on the capacitive value that occurs due to the change in distance between the
plates.

If two plates are kept parallel to each other and are separated by a distance ‘d’, and if ‘E’ is
the permittivity of the separating material, then capacitance produced can be written as

C0 = E0.E A/d = EA/d


EA = E0EA
A – Area of the electrodes
A change in the values of E, A or d will help in finding the change in capacitance and
thus helps in the working of the MEMS transducer. Accelerometer values mainly depend on
the change of values of d or A.

A typical MEMS accelerometer is shown in the figure below. It can also be called a
simple one-axis accelerometer. If more sets of capacitors are kept in 90 degrees to each other
you can design 2 or 3-axis accelerometer. A simple MEMS transducer mainly consists of a
movable microstructure or a proof mass that is connected to a mechanical suspension system
and thus on to a reference frame.

The movable plates and the fixed outer plates act as the capacitor plates. When
acceleration is applied, the proof mass moves accordingly. This produces a capacitance
between the movable and the fixed outer plates.
When acceleration is applied, the distance between the two plates displace as X1 and
X2, and they turn out to be a function of the capacitance produced.

From the image above it is clear that all sensors have multiple capacitor sets. All
upper capacitors are wired parallel to produce an overall capacitance C1 and the lower ones
produce an overall capacitance of C2.

If Vx is the output voltage of the proof mass, and V0 is the output voltage produced
between the plates, then
(Vx +V0) C1 + (Vx -V0) C2 = 0
We can also write

Vx =V0 [(C2-C1)/(C2+C1)] = (x/d) V0


The figure below shows the circuit that is used to calculate the acceleration, through
change in distance between capacitor plates. The output obtained for different values of
acceleration is also shown graphically.
When no acceleration is given (a=0), the output voltage will also be zero.

When acceleration is given, such as (a>0), the value of value of V x changes in


proportion to the value of V0.
When a deceleration is given, such as (a<0), the signals Vx and Vy become negative.
He demodulator produces an output equal to the sign of the acceleration, as it multiplies both
the values of Vy and V0 to produce VOUT, which has the correct acceleration sign and correct
amplitude.
The length of the distance, d and the proof mass weigh is surprisingly very small. The
proof mass weighs no more than 0.1 microgram and the output capacitance is approximately
20 aF and the plate distance is no more than 1.3 micrometres.

We must select the device in reference to its noise characteristics. If the acceleration value at
low gravity condition is to be found out, the noise characteristics could easily affect its
accuracy. An MEMS accelerometer is said to have three noise producing parameters – from
the signal conditioning circuit, from the vibrations produced by the springs, and from the
output measuring system.

MEMS Accelerometers – Applications

1. MEMS sensors are being used in latest mobile phones and gaming joysticks as step
counters, user interface control, and also for switching between different modes.

2. Used in mobile cameras as a tilt sensor so as to tag the orientation of photos taken.

3. To provide stability of images in camcorders and also to rotate the image to and fro
when you turn the mobile.

4. A 3D accelerometer is used in Nokia 5500 so as to provide easier tap and change


feature by which you can change mp3’s by tapping on the phone when it is lying inside the
pocket.

5. Used to protect hard disk drives in laptops from getting damaged when the PC falls to
the ground. The device senses the free fall and automatically switches off the hard disk.

6. Used in car crash airbag sensors, where it senses the sudden negative acceleration and
determines the correct time to open the airbag.
7. Used in real-time applications like military monitoring, missile launching, projectiles,
and so on.

4. ADC:

ADC is short for Analog Digital Converter, Sometimes called a A-D or A to D


Converter. An ADC is a device that converts a continuous analog signal to a multi-level
digital signal without altering its content. The signals that are monitored are sounds,
movement, and temperature into binary code for the PC.

(or)

Analog to digital (A/D, ADC) converters are electrical circuit devices that convert continuous
signals, such as voltages or currents, from the analog domain to the digital domain where the
signals are represented by numbers

Most processing equipment today are digital in nature, and they work with signals
which are binary valued. In a digital or binary representation, a signal is represented by a
word, which is composed of a finite number of bits. The processing of signals is preferably
carried out in the digital domain because digital processing is fast, accurate and reliable.
Analog to digital converters are widely used for converting analog signals to corresponding
digital signals for many electronic circuits. Analog to digital converters allow the use of
sophisticated digital signal processing systems to process analog signals, which are common
in the real world. Many modern electronic systems require conversion of signals from analog
to digital or from digital to analog form. Circuits for performing these functions are now
required in numerous common consumer devices such as digital cameras, cellular telephones,
wireless data network equipment, audio devices such as MP3 players, and video equipment
such as digital video disk (DVD) players, high definition digital television (HDTV), and
numerous other products. Analog to digital converters (ADC's) form an essential link in the
signal processing pathway at the interface between the analog and digital domains. Advances
in ADC technology have increased the speed, lowered the cost, and reduced the power
requirements of analog to digital converters, and resulted in a proliferation of ADC
applications.

Conversion involves quantizing and encoding. Quantizing means partitioning the


analog signal range into a number of discrete quanta and determining to which quantum the
input signal belongs. Encoding means assigning a unique digital code to each quantum and
determining the code that corresponds to the input signal. The most common system is
binary, in which there are 2n quanta (where n is some whole number), numbered
consecutively; the code is a set of n physical two-valued levels or bits (1 or 0) corresponding
to the binary number associated with the signal quantum.

The illustration shows a typical three-bit binary representation of a range of input signals,
partitioned into eight quanta. For example, a signal in the vicinity of 3/8; full scale (between
5/16 and 7/16) will be coded 011 (binary 3).

A three-bit binary representation of a range of input signals.

There are four commonly used ADC’s:

 Parallel converter
 Successive approximation ADC
 Voltage-to-Frequency ADC
 Integrating ADC

Applications of ADC:

 Digital camera or scanner uses A/D converters to transform the variable charges in CCD
and CMOS chips into the binary data that represent pixels.
 Cell phone and digital desk phone has an ADC converter that converts the pressure of
sound waves into PCM code Etc.

IN OUR PROJECT WE ARE USING ADC0808:

This is 8-Bit µP Compatible A/D Converters with 8-Channel Multiplexer.

The ADC0808 data acquisition component is a monolithic CMOS device with an 8-bit
analog-to-digital converter,8-channel multiplexer and microprocessor compatible
Control logic. The 8-bit A/D converter uses successive approximation as the conversion
technique. The converter features a high impedance chopper stabilized comparator, a

256R voltage divider with analog switch tree and a successive approximation register. The 8-
channel multiplexer can directly access any of 8-single-ended analog signals.

The device eliminates the need for external zero and full-scale adjustments. Easy interfacing
to microprocessors is provided by the latched and decoded multiplexer address inputs and
latched TTL TRI-STATE outputs.

Features

 Easy interface to all microprocessors


 Operates ratio metrically or with 5 VDC or analog span adjusted voltage reference
 No zero or full-scale adjust required
 8-channel multiplexer with address logic
 0V to 5V input range with single 5V power supply
 Outputs meet TTL voltage level specifications
 ADC0808 equivalent to MM74C949
 ADC0809 equivalent to MM74C949-1

Key Specifications

 Resolution 8 Bits ( Resolution = Vref/2n)


 Total Unadjusted Error ±1⁄2 LSB and ±1 LSB
 Single Supply 5 VDC
 Low Power 15 Mw
FUNCTIONAL DESCRIPTION:

The ADC0808 shown in figure can be functionally divided into 2 basic sub circuits.
These two sub circuits are an analog multiplexer and an A/D converter. The multiplexer uses
8 standard CMOS analog switches to provide to up to 8 analog inputs. The switches are
selectively turned on, depending on the data latched into a 3-bit multiplexer address register.
The second functional block, the successive approximation A/D converter, transforms
the analog output of the multiplexer to an 8-bit digital word. The output of the multiplexer
goes to one of two comparator inputs. The other input is derived from a 256R resistor ladder,
which is tapped by a MOSFET transistor switch tree. The converter control logic controls the
switch tree, funneling a particular tap voltage to comparator. Based on the result of this
comparison, the control logic and the successive approximation register (SAR) will decide
whether the next tap to be selected should be higher or lower than the present tap on the
resistor ladder. This algorithm is executed 8 times per conversion, once every 8-clock period,
yielding a total conversion time of clock periods.

When the conversion cycle is complete the resulting data is loaded into the TRI-

STATE output latch. The data in the output latch can be then be read by the host system any

time before the end of the next conversion. The TRI-STATE capability of the latch allows

easy interfaces to bus oriented systems.

The operation on these converters by a microprocessor or some control logic is very

simple. The controlling device first selects the desired input channel. To do this, a 3-bit

channel address is placed on the A, B, C in and out pins; and the ALE input is pulsed

positively, clocking the address into the multiplexer address register. To begin the

conversion, the START pin is pulsed. On the rising edge of this pulse the internal registers

are cleared and on the falling edge the start conversion is initiated.

As mentioned earlier, there are 8 clock periods per approximation. Even though there

is no conversion in progress the ADC0808 is still internally cycling through these 8 clock

periods. A start pulse can occur any time during this cycle but the conversion will not

actually begin until the converter internally cycles to the beginning of the next 8 clock period

sequence. As long as the start pin is held high no conversion begins, but when the start pin is

taken low the conversion will start within 8 clock periods. The EOC output is triggered on the

rising edge of the start pulse. It, too, is controlled by the 8 clock period cycle, so it will go

low within 8 clock periods of the rising edge of the start pulse. One can see that it is entirely
possible for EOC to go low before the conversion starts internally, but this is not important,

since the positive transition of EOC, which occurs at the end of a conversion, is what the

control logic is looking for.

Once EOC does go high this signals the interface logic that the data resulting from the

conversion is ready to be read. The output enable(OE) is then raised high. This enables the

TRI-STATE outputs, allowing the data to be read. Figure shows the timing diagram.

CONTROL

MUX CONTROL LOGIC


address
register

SAR
8x1 TRI-
analog STATE
MUX Output
Latch

CONNECTION DIAGRAM:
SC
IN0 ALE
IN1
EOC
IN2 CHA

IN3 CHB EMBEDDED


IN4 ADC CONTROLLER
CHC
IN5

IN6

IN7

Data(D0-D7)

SC (Chip Selection): By using this selection Bit you can select the Chip. After selecting this
bit the chip is ready to do operation. By using HIGH(1) you can select the this pin as a active
high.

ALE (Address Latch Enable):

ALE is to enable address latch of ADC, so that the selected channel is activated. In
normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be
used for external timing or clocking. Note that one ALE pulse is skipped during each access
to external data memory. This pin is also the Program Pulse input (PROG) during Flash
programming.

EOC (End of Conversion): After End of ADC Conversion EOC bit is set to high.

CHANNEL SELECTION:
FLOW CHART:
START

CONFIGURE PINS

SELECT ADC CHANNEL


(CHA, CHB, CHC)

SET & CLEAR SC BIT


TO INITIATE THE CHIP

SET & CLEAR ALE BIT


TO ENABLE THE ALE

IS
COPY THE ADC PORT
EOC=1
DATA INTO MEMORY

STOP

5. TRIAC:

TRIACS are widely used in AC power control applications. They are able to switch
high voltages and high levels of current, and over both parts of an AC waveform. This makes
triac circuits ideal for use in a variety of applications where power switching is needed.

One particular use of triac circuits is in light dimmers for domestic lighting, and they
are also used in many other power control situations including motor control.
Triac basics

The triac is a development of the thyristor. While the thyristor can only control
current over one half of the cycle, the triac controls it over two halves of an AC waveform.

As such the triac can be considered as a pair of parallel but opposite thyristors with
the two gates connected together and the anode of one device connected to the cathode of the
other, etc..

The fact that the triac switching action occurs on both halves of an AC waveform
means that for AC power applications, the complete cycle can be used. For basic thyristor
circuits, only half the waveform is used and this means that basic circuits using thyristors will
not utilise both halves of the cycle. Two devices are required to utilise both halves. However
the triac only requires one device to control both halves of the AC waveform.
Triac symbol

The basic triac symbol used on circuit diagram indicates its bi-directional properties.
The triac symbol can be seen to be a couple of thyristor symbols in opposite senses merged
together.

Like a thyristor, a triac has three terminals. However, the names of these are a little
more difficult to assign, because the main current carrying terminals are connected to what is
effectively a cathode of one thyristor, and the anode of another within the overall device.
There is a gate which acts as a trigger to turn the device on. In addition to this the other
terminals are both called Anodes, or Main Terminals These are usually designated Anode 1
and Anode 2 or Main Terminal 1 and Main Terminal 2 (MT1 and MT2). When using triacs it
is both MT1 and MT2 have very similar properties.

How does a triac work?

Before looking at how a triac works, it helps to have an understanding of how a


thyristor works. In this way the basic concepts can be grasped for the simpler device and then
applied to a triac which is more complicated. The operation of the thyristor is covered in the
article in this section and accessible through the "Related Articles" box on the left of the page
and below the main menu.

For the operation of the triac, it can be imagined from the circuit symbol that the triac
consists of two thyristors in parallel but around different ways. The operation of the triac can
be looked on in this fashion, although the actual operation at the semiconductor level is rather
more complicated.
When the voltage on the MT1 is positive with regard to MT2 and a positive gate
voltage is applied, one of the thyristors conducts. When the voltage is reversed and a negative
voltage is applied to the gate, the other thyristor conducts. This is provided that there is
sufficient voltage across the device to enable a minimum holding current to flow.

Triac applications

Triacs are used in many applications. They are often used in low to medium power
AC switching requirements. Where large levels of power need to be switched, two thyristors /
SCRs tend to be used as they can be controlled more easily.

Nevertheless triacs are widely used in many applications:

 Lighting control - especially domestic dimmmers.

 Control of fans and small motors.

 General AC control

There are naturally many other triac applications, but these are some of the most common.

Using triacs

There are a number of points to note when using triacs. Although these devices operate very
well, to get the best performance out of them it is necessary to understand a few hints on tips
on using triacs.
It is found that because of their internal construction and the slight differences
between the two halves, triacs do not fire symmetrically. This results in harmonics being
generated: the less symmetrical the triac fires, the greater the level of harmonics that are
produced. It is not normally desirable to have high levels of harmonics in a power system and
as a result triacs are not favoured for high power systems. Instead for these systems two
thyristors may be used as it is easier to control their firing.

To help in overcoming the problem non-symmetrical firing ad the resulting


harmonics, a device known as a diac (diode AC switch) is often placed in series with the gate
of the triac. The inclusion of this device helps make the switching more even for both halves
of the cycle. This results from the fact that the diac switching characteristic is far more even
than that of the triac. Since the diac prevents any gate current flowing until the trigger voltage
has reached a certain voltage in either direction, this makes the firing point of the triac more
even in both directions.

6. TRIAC DRIVER
Also known as a Phototriac Coupler, a TRIAC Driver is a specific type of optocoupler
that is used exclusively to provide an optically-isolated gate drive current to a TRIAC. This
allows designers greater flexibility in selecting the gate drive current and isolation value
desired separately from the TRIAC required. The TRIAC Driver + TRIAC combination is a
common means of creating a discrete, high powered SSR.
TRIAC Drivers are composed of an input LED optically coupled to a photo-sensitive
TRIAC Driver chip. Upon application on an input current (2.5-15mA, typically) the input
LED shines light on the TRIAC Driver chip thereby allowing current flow through the
device. This current then flows to the gate of a discrete output TRIAC and allows the load to
be switched on or off.
All SSO TRIAC Drivers offer high input to output isolation, in load voltages from
400V to 800V, for both Zero Volt Cross (ZVC) and Random Phase (RP) switching. ZVC
TRIAC Drivers turn on a Discrete TRIAC within a small window near Zero Volts, and thus
avoid the creation of transients in the discrete Triac. In contrast, upon application of an input
current, Random Phase TRIAC Drivers will turn on anywhere within the AC line cycle and
are typically used in dimming applications. SSO TRIAC Drivers are offered in 4 pin SOP, 4
pin DIP/SMD and 6 pin DIP/SMD packages.
Features:

a) High input to output potential isolation (2.5 - 5kVrms)


b) Low input control current (as low as 2.5mA)
c) Variable load voltages (400V to 800V)
d) Random Phase and Zero Volt Switching
e) Offered in 4SOP, 4DIP/SMD and 6DIP/SMD packages

Applications:

a) Motor Control
b) Motor Starters
c) Dimmer Circuits (random phase devices)
d) Solenoid/Valve controls
e) Lighting controls
f) Static power switches
g) Temperature controls
h) Solid State Relays

7. RELAY

A relay is an electrically operated switch. These are remote control electrical switches that
are controlled by another switch, such as a horn switch or a computer as in a power train
control module, devices in industries, home based applications. Relays allow a small current
pin, 4-pin, 5-pin, and 6-pin, single switch or dual switches. Relays are used throughout the
automobile. Relays which come in assorted sizes, ratings, and applications, are used as
remote control switches. A typical vehicle can have 20 relays or more.
BASICS ON RELAY HANDLING
a) To maintain initial performance, care should be taken to avoid dropping or hitting the
relay.
b) Under normal use, the relay is designed so that the case will not detach. To maintain
initial performance, the case should not be removed. Relay characteristics cannot be
guaranteed if the case is removed.
c) Use of the relay in an atmosphere at standard temperature and humidity with minimal
amounts of dust, SO 2, H 2 S, or organic gases is recommended.
d) Please avoid the use of silicon-based resins near the relay, because doing so may
result in contact failure. (This applies to plastic sealed type relays, too.)
e) Care should be taken to observe correct coil polarity (+, –) for polarized relays.
f) Proper usage requires that the rated voltage be impressed on the coil. Use rectangular
waves for DC coils and sine waves for AC coils.
g) Be sure the coil impressed voltage does not continuously exceed the maximum
allowable voltage.
h) Absolutely avoid using switching voltages and currents that exceed the designated
values.
i) The rated switching power and life are given only as guides. The physical phenomena
at the contacts and contact life greatly vary depending on the type of load and the
operating conditions. Therefore, be sure to carefully check the
j) type of load and operating conditions before use.
k) Do not exceed the usable ambient temperature values listed in the catalog.
l) Use the flux-resistant type or sealed type if automatic soldering is to be used.
m) Use alcohol based cleaning solvents when cleaning is to be performed using a
n) sealed type relay.
o) Avoid ultrasonic cleaning of all types of relays.
p) Avoid bending terminals, because it may cause malfunction.
q) As a guide, use a Faston mounting pressure of 40 to 70N {4 to 7kgf}for relays
a. with tab terminals.

A relay is used to isolate one electrical circuit from another. It allows a low current control
circuit to make or break an electrically isolated high current circuit path. The basic relay
consists of a coil and a set of contacts. The most common relay coil is a length of magnet
wire wrapped around a metal core. When voltage is applied to the coil, current passes through
the wire and creates a magnetic field. This magnetic field pulls the contacts together and
holds them there until the current flow in the coil has stopped. The diagram below shows the
parts of a simple relay.

Fig 4.2: Relay


Operation:

When a current flows through the coil, the resulting magnetic field attracts an armature that is
mechanically linked to a moving contact. The movement either makes or breaks a connection
with a fixed contact. When the current is switched off, the armature is usually returned by a
spring to its resting position shown in figure 6.6(b). Latching relays exist that require
operation of a second coil to reset the contact position.

By analogy with the functions of the original electromagnetic device, a solid-state relay
operates a thyristor or other solid-state switching device with a transformer or light-emitting
diode to trigger it.

Pole and throw

Since relays are switches the terminology applied to switches is also applied to relays. A
relay will switch one or more poles, each of whose contacts can be thrown by energizing the
coil in one of three ways:

a) Normally-open (NO) contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called a Form A contact or
"make" contact.
b) Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called a Form B contact or
"break" contact.
c) Change-over (CO), or double-throw (DT), contacts control two circuits: one
normally-open contact and one normally-closed contact with a common terminal. It is
also called a Form C contact or "transfer" contact ("break before make"). If this type
of contact utilizes a "make before break" functionality, then it is called a Form D
contact.

SPST

SPST relay stands for Single Pole Single Throw relay. Current will only flow through the
contacts when the relay coil is energized.
Fig 4.2.1: SPST Relay

SPDT Relay

SPDT Relay stands for Single Pole Double Throw relay. Current will flow between the
movable contact and one fixed contact when the coil is De-energized and between the
movable contact and the alternate fixed contact when the relay coil is energized. The most
commonly used relay in car audio, the Bosch relay, is a SPDT relay.

Fig 4.2.2 : SPDT Relay

DPST Relay

DPST relay stands for Double Pole Single Throw relay. When the relay coil is energized, two
separate and electrically isolated sets of contacts are pulled down to make contact with their
stationary counterparts. There is no complete circuit path when the relay is De-energized.

Fig 4.2.3: DPST Relay


DPDT Relay

DPDT relay stands for Double Pole Double Throw relay. It operates like the SPDT relay but
has twice as many contacts. There are two completely isolated sets of contacts.

Fig 4.2.4: DPDT Relay

This is a 4 Pole Double Throw relay. It operates like the SPDT relay but it has 4 sets of
isolated contacts.

Figure: 4.2.5 Pole Double Throw relay

Types of relay:

1. Latching Relay
2. Reed Relay
3. Mercury Wetted Relay
4. Machine Tool Relay
5. Solid State Relay (SSR)
Latching relay
Latching relay, dust cover removed, showing pawl and ratchet mechanism. The ratchet
operates a cam, which raises and lowers the moving contact arm, seen edge-on just below it.
The moving and fixed contacts are visible at the left side of the image.

A latching relay has two relaxed states (bi-stable). These are also called "impulse", "keep",
or "stay" relays. When the current is switched off, the relay remains in its last state. This is
achieved with a solenoid operating a ratchet and cam mechanism, or by having two opposing
coils with an over-center spring or permanent magnet to hold the armature and contacts in
position while the coil is relaxed, or with a remanent core. In the ratchet and cam example,
the first pulse to the coil turns the relay on and the second pulse turns it off. In the two coil
example, a pulse to one coil turns the relay on and a pulse to the opposite coil turns the relay
off. This type of relay has the advantage that it consumes power only for an instant, while it is
being switched, and it retains its last setting across a power outage. A remanent core latching
relay requires a current pulse of opposite polarity to make it change state.

Figure: Latching relay


Reed relay

A reed relay has a set of contacts inside a vacuum or inert gas filled glass tube, which
protects the contacts against atmospheric corrosion. The contacts are closed by a magnetic
field generated when current passes through a coil around the glass tube. Reed relays are
capable of faster switching speeds than larger types of relays, but have low switch current and
voltage ratings.
Mercury-wetted relay

A mercury-wetted reed relay is a form of reed relay in which the contacts are wetted with
mercury. Such relays are used to switch low-voltage signals (one volt or less) because of their
low contact resistance, or for high-speed counting and timing applications where the mercury
eliminates contact bounce. Mercury wetted relays are position-sensitive and must be mounted
vertically to work properly. Because of the toxicity and expense of liquid mercury, these
relays are rarely specified for new equipment. See also mercury switch.

Machine tool relay

A machine tool relay is a type standardized for industrial control of machine tools, transfer
machines, and other sequential control. They are characterized by a large number of contacts
(sometimes extendable in the field) which are easily converted from normally-open to
normally-closed status, easily replaceable coils, and a form factor that allows compactly
installing many relays in a control panel. Although such relays once were the backbone of
automation in such industries as automobile assembly, the programmable logic controller
(PLC) mostly displaced the machine tool relay from sequential control applications.

Solid-state relay
A solid state relay (SSR) is a solid state electronic component that provides a similar function
to an electromechanical relay but does not have any moving components, increasing long-
term reliability. With early SSR's, the tradeoff came from the fact that every transistor has a
small voltage drop across it. This voltage drop limited the amount of current a given SSR
could handle. As transistors improved, higher current SSR's, able to handle 100 to 1,200
Amperes, have become commercially available. Compared to electromagnetic relays, they
may be falsely triggered by transients.
Fig 4.3 : Solid relay, which has no moving parts

Specification

a) Number and type of contacts – normally open, normally closed, (double-throw)


b) Contact sequence – "Make before Break" or "Break before Make". For example, the
old style telephone exchanges required Make-before-break so that the connection
didn't get dropped while dialing the number.
c) Rating of contacts – small relays switch a few amperes, large contactors are rated for
up to 3000 amperes, alternating or direct current
d) Voltage rating of contacts – typical control relays rated 300 VAC or 600 VAC,
automotive types to 50 VDC, special high-voltage relays to about 15 000 V
e) Coil voltage – machine-tool relays usually 24 VAC, 120 or 250 VAC, relays for
switchgear may have 125 V or 250 VDC coils, "sensitive" relays operate on a few
milli-amperes

Applications:

Relays are used:

a) To control a high-voltage circuit with a low-voltage signal, as in some types of


modems,
b) To control a high-current circuit with a low-current signal, as in the starter solenoid of
an automobile,
c) To detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays),
d) To isolate the controlling circuit from the controlled circuit when the two are at
different potentials, for example when controlling a mains-powered device from a
low-voltage switch. The latter is often applied to control office lighting as the low
voltage wires are easily installed in partitions, which may be often moved as needs
change. They may also be controlled by room occupancy detectors in an effort to
conserve energy,
e) To perform logic functions. For example, the boolean AND function is realized by
connecting relay contacts in series, the OR function by connecting contacts in parallel.
Due to the failure modes of a relay compared with a semiconductor, they are widely
used in safety critical logic, such as the control panels of radioactive waste handling
machinery.
f) As oscillators, also called vibrators. The coil is wired in series with the normally
closed contacts. When a current is passed through the relay coil, the relay operates
and opens the contacts that carry the supply current. This stops the current and causes
the contacts to close again. The cycle repeats continuously, causing the relay to open
and close rapidly. Vibrators are used to generate pulsed current.
g) To generate sound. A vibrator, described above, creates a buzzing sound because of
the rapid oscillation of the armature. This is the basis of the electric bell, which
consists of a vibrator with a hammer attached to the armature so it can repeatedly
strike a bell.
h) To perform time delay functions. Relays can be used to act as an mechanical time
delay device by controlling the release time by using the effect of residual magnetism
by means of a inserting copper disk between the armature and moving blade
assembly.

8. RELAY DRIVER:

The ULN2003A is an array of seven NPN Darlington transistors capable of


500 mA, 50 V output. It features common-cathode fly-back diodes for switching inductive
loads. It can come in PDIP, SOIC, SOP or TSSOP packaging. In the same family are
ULN2002A, ULN2004A, as well as ULQ2003A and ULQ2004A, designed for different logic
input levels.
The ULN2003A is also similar to the ULN2001A (4 inputs) and the ULN2801A,
ULN2802A, ULN2803A, ULN2804A and ULN2805A, only differing in logic input levels
(TTL, CMOS, PMOS) and number of in/outputs (4/7/8)

Darlington transistor:

A Darlington transistor (also known as Darlington pair) achieves very high current
amplification by connecting two bipolar transistors in direct DC coupling so the current
amplified by the first transistor is amplified further by the second one. The resultant current
gain is the product of those of the two component transistors:

The seven Darlington pairs in ULN2003 can operate independently except the
common cathode diodes that connect to their respective collectors.

Features:

The ULN2003 is known for its high-current, high-voltage capacity. The drivers can be
paralleled for even higher current output. Even further, stacking one chip on top of another,
both electrically and physically, has been done. Generally it can also be used for interfacing
with a stepper motor, where the motor requires high ratings which cannot be provided by
other interfacing devices.

Main specifications:

a) 500 mA rated collector current (single output)


b) 50 V output (there is a version that supports 100 V output)
c) Includes output fly-back diodes
d) Inputs compatible with TTL and 5-V CMOS logic

9. CRYSTAL OSCILLATOR:

An electronic circuit or electronic device that is used to generate periodically


oscillating electronic signal is called as an electronic oscillator. The electronic signal
produced by an oscillator is typically a sine wave or square wave. An electronic oscillator
converts the direct current signal into an alternating current signal. The radio and television
transmitters are broad casted using the signals generated by oscillators. The electronic beep
sounds and video game sounds are generated by the oscillator signals. These oscillators
generate signals using the principle of oscillation.
There are different types of oscillator electronic circuits such as Linear oscillators –
Hartley oscillator, Phase-shift oscillator, Armstrong oscillator, Clapp oscillator, Colpitts
oscillator, and so on, Relaxation oscillators – Royer oscillator, Ring oscillator, Multivibrator,
and so on, and Voltage Controlled Oscillator (VCO). In this article, let us discuss in detail
about Crystal oscillator like what is crystal oscillator, crystal oscillator circuit, working, and
use of crystal oscillator in electronic circuits

An electronic circuit that is used to generate an electrical signal of precise frequency by


utilizing the vibrating crystal’s mechanical resonance made of piezoelectric material. There
are different types of piezoelectric resonators, but typically, quartz crystal is used in these
types of oscillators. Hence, these oscillator electronic circuits are named as crystal oscillators.

Crystal Oscillator Circuit Diagram

The quartz crystal oscillator circuit diagram can be represented as follows:

Electronic Symbol for Piezoelectric Crystal Resonator


The above diagram represents the electronic symbol for a piezoelectric crystal resonator
which consists of two metalized electrodes and quartz crystal.

Equivalent Circuit Diagram of Quartz Crystal

The above figure shows the equivalent circuit diagram of quartz crystal in an electronic
oscillator that consists of resistor, inductor, and capacitors which are connected as shown in
the figure.

Crystal Oscillator Working

The atoms, molecules, ions are packed in an order in three spatial dimensions with
repeating pattern to form a solid that can be called as a crystal. The crystal can be made by
almost any object that is made of elastic material by using appropriate electrical transducers.
As every object consists of natural resonant frequency of vibration, steel consists of high
speed of sound and is also very elastic.

Thus, steel is frequently used instead of quartz in mechanical filters. This resonant
frequency depends on different parameters such as size, elasticity, speed of sound, and shape
of the crystal. In general, the shape of high frequency crystals is simple rectangular plate and
the shape of low frequency crystals is tuning fork shape as shown in the figure below.
High Frequency-Rectangular Plate Crystals and Low Frequency-Tuning Fork Crystals

Crystal oscillator circuit works on the principle of the inverse piezoelectric effect, i.e.,
a mechanical deformation is produced by applying an electric field across certain materials.
Thus, it utilizes the vibrating crystal’s mechanical resonance which is made of a piezoelectric
material for generating an electrical signal of a specific frequency.

These quartz crystal oscillators are highly stable, consists of good quality factor, they
are small in size, and are very economical. Hence, quartz crystal oscillator circuits are
superior compared to other resonators such as LC circuits, turning forks, and so on.
Generally, 8MHz crystal oscillator is used in microprocessors and microcontrollers.

The equivalent electrical circuit also represents the crystal action of the crystal. The
basic components used in the circuit, inductance L1 represent crystal mass, capacitance C1
represents compliance, resistance R1 represents the crystal’s internal structure friction, and
C0 is used to represent the capacitance that is formed because of crystal’s mechanical
moulding.

The quartz crystal oscillator circuit diagram consists of series resonance and parallel
resonance, i.e., two resonant frequencies. If the reactance produced by capacitance C1 is
equal and opposite to the reactance produced by inductance L1, then the series resonance
occurs. The series and parallel resonant frequencies are represented by fs and fp respectively,
and the values of fs and fp can be determined by using the following equations shown in the
figure below.
Series Resonant Frequency and Parallel Resonant Frequency

Thus, the impedance is approximately equal to the resistance R1 during this condition.
If the series resonant leg reactance is equal to the reactance caused due to capacitance C0,
then parallel resonance occurs. Thus, the external circuit if offered a very high impedance by
the crystal during this condition.

Impedance vs Frequency Graph

The above figure shows the graph between impedance and frequency of the quartz
crystal oscillator circuit. Typically, crystal oscillators are having a frequency range from
32KHz to 200MHz.

Use of Crystal Oscillator

In general, we know that, crystal oscillators are used in the microprocessors and
microcontrollers for providing the clock signals. Let us consider 8051 microcontroller for
which an external crystal oscillator circuit of 12MHz is essential, even though (based on
model) 8051 microcontroller is capable to run at 40 MHz (max). 8051 requires 12 clock
cycles for one machine cycle, such that to give effective cycle rate at 1MHz (considering
12MHz clock) to 3.33MHz (considering maximum 40MHz clock). This crystal oscillator is
used to generate clock pulses required for the synchronization of all the internal operations.

There are numerous applications for crystal oscillator in various fields and a few
crystal oscillator applications are shown below:

Application of Crystal Oscillator in Military and Aerospace

The use of crystal oscillator in military and aerospace, is to establish an


efficient communication system, for the navigation purpose, electronic warfare, in the
guidance systems, and so on.

Use of Crystal Oscillator in Research and Measurement

The crystal oscillator is used in research and measurement for celestrial navigation, space
tracking purpose, in the measuring instruments and medical devices, and so on.

Industrial Applications of Crystal Oscillator

There are a huge number of industrial applications of crystal oscillator such as in computers,
digital systems, instrumentation, phase locked loop systems, marine, modems, sensors,
telecommunications, disk drives, and so on.

Use of Crystal Oscillator in Automotive

Crystal oscillator is used for engine controlling, stereo, clock and to trip computer, and
in GPS system.

Consumer Applications of Crystal Oscillator

Crystal oscillators are used in many consumer goods such as cable television systems,
personal computers, video cameras, toys and video games, radio systems, cellular phones,
and so on.
10. ENCODER

An encoder is a device, circuit, transducer, software program, algorithm or person


that converts information from one format or code to another, for the purpose of
standardization, speed or compression.

Media

Software for encoding audio, video, images, or text into standardized formats:

 A compressor encodes data (e.g., audio/video/images) into a smaller form (see codec)
 An audio encoder converts analog audio to digital audio signals
 A video encoder converts analog video to digital video signals
 A multiplexer combines multiple inputs into one output
 An 8b/10b encoder creates DC balance on a communication transmission line

Transducers

Transducers (such as optical or magnetic encoders) sense position or orientation for use as a
reference or active feedback to control position:

 A rotary encoder converts rotary position to an analog (e.g., analog quadrature) or digital
(e.g., digital quadrature, 32-bit parallel, or USB) electronic signal.
 A linear encoder similarly converts linear position to an electronic signal.

Such encoders can be either absolute or incremental. The signal from an absolute
encoder gives an unambiguous position within the travel range without requiring knowledge
of any previous position. The signal from an incremental encoder is cyclical, thus ambiguous,
and requires counting of cycles to maintain absolute position within the travel range. Both
can provide the same accuracy; the absolute encoder is more robust to interruptions in
transducer signal, whereas the incremental encoder reports position changes in real time.

Telecommunications

 A device used to change a signal (such as a bitstream) or data into a code.

Electronic circuits

 A simple encoder assigns a binary code to an active input line.


 Priority encoders establish the priority of competing inputs (such as interrupt requests) by
outputting a binary code representing the highest-priority active input.

11. RF TRANSMITTER:

RF Link Transmitter - 434MHz

sku: WRL-08946

Description: This is only the 434MHz transmitter. This will work with the RF Links at
434MHz at either baud rate. Only one 434MHz transmitter will work within the same
location.

This wireless data is the easiest to use, lowest cost RF link we have ever seen! Use these
components to transmit position data, temperature data, even current program register values
wirelessly to the receiver. These modules have up to 500 ft range in open space. The
transmitter operates from 2-12V. The higher the Voltage, the greater the range - see range test
data in the documents section.

We have used these modules extensively and have been very impressed with their ease of use
and direct interface to an MCU. The theory of operation is very simple. What the transmitter
'sees' on its data pin is what the receiver outputs on its data pin. If you can configure the
UART module on a PIC, you have an instant wireless data connection. The typical range is
500ft for open area.
This is an ASK transmitter module with an output of up to 8mW depending on power supply
voltage. The transmitter is based on SAW resonator and accepts digital inputs, can operate
from 2 to 12 Volts-DC, and makes building RF enabled products very easy.
12.LCD:

Liquid crystal display is very important device in embedded system. It offers high
flexibility to user as he can display the required data on it. A liquid crystal display (LCD) is a
thin, flat electronic visual display that uses the light modulating properties of liquid
crystals (LCs). LCs do not emit light directly. LCDs therefore need a light source and are
classified as "passive" displays. Here the lcd has different memories to display data, those are
discussed below.

Block Diagram :

Display Data RAM

Display data RAM (DDRAM) stores display data represented in 8-bit character codes.
Its extended capacity is 80 X 8 bits, or 80 characters. The area in display data RAM
(DDRAM) that is not used for display can be used as general data RAM. So whatever you
send on the DDRAM is actually displayed on the LCD. For LCDs like 1x16, only 16
characters are visible, so whatever you write after 16 chars is written in DDRAM but is not
visible to the user.

Figure below will show you the DDRAM addresses of 2 Line LCD.
Character Generator ROM:

Now you might be thinking that when you send an ascii value to DDRAM, how the
character is displayed on LCD? so the answer is CGROM. The character generator ROM
generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes. It can generate
208 5 x 8 dot character patterns and 32 5 x 10 dot character patterns. User-defined character
patterns are also available by mask-programmed ROM.

BusyFlag
Busy Flag is an status indicator flag for LCD. When we send a command or data to
the LCD for processing, this flag is set (i.e., BF =1) and as soon as the instruction is executed
successfully this flag is cleared (BF = 0). This is helpful in producing and exact amount of
delayfortheLCDprocessing.
To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of
the LCD data bus (D7) act as busy flag. When BF = 1 means LCD is busy and will not accept
next command or data and BF = 0 means LCD is ready for the next command or data to
process.

Instruction Register (IR) and Data Register (DR)

There are two 8-bit registers in HD44780 controller Instruction and Data register.
Instruction register corresponds to the register where you send commands to LCD e.g LCD
shift command, LCD clear, LCD address etc. and Data register is used for storing data which
is to be displayed on LCD. When send the enable signal of the LCD is asserted, the data on
the pins is latched in to the data register and data is then moved automatically to the DDRAM
and hence is displayed on the LCD.
Data Register is not only used for sending data to DDRAM but also for CGRAM, the
address where you want to send the data, is decided by the instruction you send to LCD.
16 x 2 Alphanumeric LCD Module Features

 Intelligent, with built-in Hitachi HD44780 compatible LCD controller and RAM
providing simple interfacing
 61 x 15.8 mm viewing area
 5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line
 Can display 224 different symbols
 Low power consumption (1 mA typical)
 Powerful command set and user-produced characters
 TTL and CMOS compatible
 Connector for standard 0.1-pitch pin headers

Schematic

Specifications
Circuit Description

Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output.
While most Parallel Ports have internal pull-up resistors, there are a few which don't.
Therefore, by incorporating the two 10K external pull up resistors, the circuit is more
portable for a wider range of computers, some of which may have no internal pull up
resistors.

We make no effort to place the Data bus into reverse direction. Therefore, we hard
wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the
data lines. As a result, we cannot read back the LCD's internal Busy Flag which tells us if the
LCD has accepted and finished processing the last instruction. This problem is overcome by
inserting known delays into our program.

Potentiometer controls the contrast of the LCD panel. You can use a bench power
supply set to 5v or use a onboard +5 regulator. Remember a few de-coupling capacitors,
especially if you have trouble with the circuit working properly. The 2 line x 16 character
LCD modules are available from a wide range of manufacturers and should all be compatible
with the HD44780.
CHAPTER 5

SOFTWARE USED

Keil Cross Compiler

Keil C cross compiler: -


Keil is a German based Software development company. It provides several development
tools like
a) IDE (Integrated Development environment)
b) Project Manager
c) Simulator
d) Debugger
e) C Cross Compiler, Cross Assembler, Locator/Linker
Keil Software provides you with software development tools for the 8051 family of
microcontrollers. With these tools, you can generate embedded applications for the multitude
of 8051 derivatives. Keil provides following tools for 8051 development
1. C51 Optimizing C Cross Compiler,
2. A51 Macro Assembler,
3. 8051 Utilities (linker, object file converter, library manager),
4. Source-Level Debugger/Simulator,
5. µVision for Windows Integrated Development Environment.
The keil 8051 tool kit includes three main tools, assembler, compiler and linker.
An assembler is used to assemble your 8051 assembly program
A compiler is used to compile your C source code into an object file
A linker is used to create an absolute object module suitable for your in-circuit emulator.
8051 project development cycle: - these are the steps to develop 8051 project using keil
1. Create source files in C or assembly.
2. Compile or assemble source files.
3. Correct errors in source files.
4. Link object files from compiler and assembler.
5. Test linked application.

Keil development tools for the 8051 Microcontroller Architecture support every level of
software developer from the professional applications engineer to the student just learning
about embedded software development. The industry-standard Keil C Compilers, Macro
Assemblers, Debuggers, Real-time Kernels, Single-board Computers, and Emulators support
all 8051 derivatives and help you get your projects completed on schedule.

Why we use Keil Software?

The Keil 8051 Development Tools are designed to solve the complex problems facing
embedded software developers.

a) When starting a new project, simply select the microcontroller you use from
the Device Database and the µVision IDE sets all compiler, assembler,
linker, and memory options for you.
b) Numerous example programs are included to help you get started with the
most popular embedded 8051 devices.
c) 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.
d) 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.

Hardware and Software Requirements

The following requirements must be met for Monitor-51 to operate correctly:

a) 8051 CPU or derivative


b) 5 Kbyte external code memory (EPROM) starting at address 0 (loaded with Monitor-
51 software)
c) 256 Byte external data memory (XDATA RAM) and 5 Kbytes trace buffer
(optional). Additionally, the external data memory must be big enough to hold the
complete application (code and data). All these external data memory areas must be
von Neumann wired, this means that access is possible from XDATA and CODE
space. A common way to do this is to connect the CPU signals /PSEN and /RD to a
AND gate. The output of this AND gate is then connected to the /RD pin of the
RAM.
d) serial interface with a timer as baudrate generator.
e) Between 1 and 5 port pins if you are using a banked hardware (for 2 – 32 banks).
See example hardware schematics in the 8051 Utilities User’s Guide under “Bank
Switching Configuration” for more details. All these memory banks have to be von
Neumann wired!
f) additional 6 bytes stack space (IDATA) in the user program to be tested.

All other hardware components can be used by the application.

Von-Neumann wired code/xdata Memory:

The Monitor requires that the program you are debugging is located in RAM space. For
setting breakpoints in your code, the Monitor modifies the user code and inserts ACALL
instructions at all breakpoint locations. Therefore you need to configure your code memory as
von-Neumann memory. Von-Neumann means that you can read physically the same memory
bytes from code and xdata space. This is necessary to download software into code space
since the 8051 does not provide CPU instructions to write into code memory. Typically a
AND gate is used to combine the RD/ and PSEN/ signals of the CPU and generate a RD/
signal for the RAM device as shown in the figure on the left.

Serial Interface:

Monitor-51 works with any standard serial interface and requires only the signals
TRANSMIT DATA, RECEIVE DATA and SIGNAL GROUND from the RS232 or V.24
line. However, in most cases, some additional connections are required by the PC COM
interface, to enable transmit and receive data. If you are using a 9-PIN standard connector on
your application board you should therefore connect the pin 7 to pin 8, and pin 1 to pin 4 and
pin 6.
CHAPTER 6

WORKING

Objectives:
a) Wireless data transmission.
b) Robot with obstacle detection.
c) Forms the surveillance system for combing areas.

d) Monitors large spaces in industrial environment.


e) Wireless transmission over RF.

Technology is the word coined for the practical application of scientific knowledge in
the industry. The advancement in technology cannot be justified unless it is used for
leveraging the user’s purpose. Technology, is today, imbibed for accomplishment of several
tasks of varied complexity, in almost all walks of life. The society as a whole is exquisitely
dependent on science and technology. Technology has played a very significant role in
improving the quality of life. One way through which this is done is by automating several
tasks using complex logic to simplify the work.
The main aim of this project is video coverage at required places with the help of
digital camera and high power LED. Robot is controlled by depending upon the tilt directions
and its wireless communication. The video will be transmitted to the receiver using AV
transmitter. At receiver end, these can be seen on TV. It is a very low cost survey line system
used to monitor a larger area. We are using RF communication to send commands to robot.
RF Communication ranges in between 30 KHz to 300 GHz. RF communication works by
creating electromagnetic waves at a source and being able to pick up those electromagnetic
waves at a particular destination. These electromagnetic waves travel through the air at near
the speed of light. The wavelength of an electromagnetic signal is inversely proportional to
the frequency; the higher the frequency, the shorter the wavelength.
MEMS is a Micro Electro Mechanical Sensor which is a highly sensitive sensor and
capable of detecting the tilt. The project consists of two micro controller based motherboards.
One motherboard consists of a controller interfaced with MEMS Accelerometer sensor
technology to control the direction of the robot, a RF transmitter to send commands to robot
and it will provide a channel for wireless communication, a LED indicator. This entire board
acts as a remote to control the movement of the robot as well as receive the information from
the robot. The other board is present with the Robot itself. It is interfaced with some DC
motors for moving the robot, a RF receiver for receiving the instructions from the transmitter.
The innovative feature in the system is it automatically detects the light intensity and
switches ON the light source if intensity of light is low which helps in better vision of
surroundings. The Microcontroller is programmed using Embedded C language. This project
finds its major applications while we are monitoring larger areas like political canvassing,
cricket stadiums, international conferences, worship places, banking etc. This project assures
us with more reliable and highly secured system. The microcontroller will act as the mediator
between the input module and output module.
CHAPTER 7

CONCLUSION

Integrating features of all the hardware components used have been developed in it.
Presence of every module has been reasoned out and placed carefully, thus contributing to the
best working of the unit. Secondly, using highly advanced IC’s with the help of growing
technology implementation done much easier way. “MEMS based Wireless controlled Robot
with Voice and Video Camera” is a MEMS controlled device and also a robot control
wirelessly with a video camera fixed on it for physically challenged persons.

The system is designed to operate Robot using MEMS accelerometer sensor


wirelessly using RF technology and also displays the audio, video signals in TV by using
audio & video transmitter (Camera). This equipment will be more helpful in coal mining and
bore wells and also rescue operations .The micro controller is programmed in such a way that
the robot can be operated using MEMS accelerometer technology wirelessly using RF
communication. We can be extended this application using Zigbee technology, which
increases operating wireless distance from transmitter section to the receiver section.
CHAPTER 8

REFERENCES

[1]. A low-power 3-axis digital-output MEMS gyroscope with single drive and
multiplexed angular rate readout - STMicroelectronics, Cornaredo, Italy
[2]. Modelling and Simulation of the Fiber Optic Gyroscope (FOG) in Measurement-
WhileDrilling (MWD) Processes - EBRAHIM ASHOURI,ALIREZA KASHANINIA
Electrical Engineering Department Islamic Azad University – Central Tehran Branch

You might also like