Sie sind auf Seite 1von 77

BLUETOOTH OPEARATED ROBOT

CONTENTS

CHAPTER No TITLE
1 ABSTRACT
2 INTRODUCTION
HARDWARE
3 BLOCK DIAGRAM
4 BLOCK DIAGRAM DESCRIPTION
4.1 ABOUT MICROCONTROLER
4.2 LIQUID CRYSTAL DISPLAY
4.3 KEYPAD
4.4 BLUETOOTH
5 OVERALL CIRCUIT DIAGRAM
6 OVERALL CIRCUIT DIAGRAM DESCRIPTION
6.1 POWER SUPPLY CIRCUIT
6.2 MICROCONTROLLER CIRCUIT
6.3 RELAY DRIVER CIRCUIT
7 PCB DESIGN
7.1 INTRODUCTION
7.2 SOFTWARE
7.3 MANUFACTURING
7.4 PANELISATION
7.5 PLATING
7.6 ETCHING
7.7 SOLDER MASK
7.8 HOT AIR LEVELING
SOFTWARE
8 SOFTWARE TOOLS
8.1 KEILC COMPILER
8.2 SIMULATOR
9 ADVANTAGES
10 APPLICATIONS
11 CONCLUSION
12 REFERENCES
1. ABSTRACT

Bluetooth is a wireless technology standard for exchanging data over short

distances (using short wavelength radio transmissions )from fixed and mobile

devices, creating personal area networks (PANs) with high levels of security. We

operate the vehicle using the Bluetooth .our concept consists of a Bluetooth

module, dc motor and a computer.


2. INTRODUCTION

In our project the dc motor is used to run the robo model. The direction of the robo
model can be controlled by the dc motor itself. When the power supply to the left
side of the motor is stopped then the robot automatically turns to the right side and
vice versa. But this section can be done using Bluetooth module and computer. The
command to the Bluetooth is sent from the system. And the system is controlled by
the operator. The commands are received by the Bluetooth module and it is sent to
another blue tooth module which is fixed in the robo model. These commands are
sent to the control unit. The control unit controls the motors which are used to run
the vehicle.
3. BLOCK DIAGRAM
4. BLOCK DIAGRAM DESCRIPTION

4. 1 MICROCONTROLLER

INTRODUCTION TO MICROCONTROLLER

Microcontrollers are destined to play an increasingly important role in

revolutionizing various industries and influencing our day to day life more strongly than

one can imagine. Since its emergence in the early 1980's the microcontroller has been

recognized as a general purpose building block for intelligent digital systems. It is

finding using diverse area, starting from simple children's toys to highly complex

spacecraft. Because of its versatility and many advantages, the application domain has

spread in all conceivable directions, making it ubiquitous. As a consequence, it has

generate a great deal of interest and enthusiasm among students, teachers and

practicing engineers, creating an acute education need for imparting the knowledge of

microcontroller based system design and development. It identifies the vital features

responsible for their tremendous impact, the acute educational need created by them

and provides a glimpse of the major application area.

MICROCONTROLLER

A microcontroller is a complete microprocessor system built on a single IC.

Microcontrollers were developed to meet a need for microprocessors to be put into low

cost products. Building a complete microprocessor system on a single chip substantially

reduces the cost of building simple products, which use the microprocessor's power to
implement their function, because the microprocessor is a natural way to implement

many products. This means the idea of using a microprocessor for low cost products

comes up often. But the typical 8-bit microprocessor based system, such as one using a

Z80 and 8085 is expensive. Both 8085 and Z80 system need some additional circuits to

make a microprocessor system. Each part carries costs of money. Even though a

product design may requires only very simple system, the parts needed to make this

system as a low cost product.

To solve this problem microprocessor system is implemented with a single chip

microcontroller. This could be called microcomputer, as all the major parts are in the IC.

Most frequently they are called microcontroller because they are used they are used to

perform control functions.

The microcontroller contains full implementation of a standard

MICROPROCESSOR, ROM, RAM, I/0, CLOCK, TIMERS, and also SERIAL PORTS.

Microcontroller also called "system on a chip" or "single chip microprocessor system" or

"computer on a chip".

A microcontroller is a Computer-On-A-Chip, or, if you prefer, a single-chip

computer. Micro suggests that the device is small, and controller tells you that the

device' might be used to control objects, processes, or events. Another term to describe

a microcontroller is embedded controller, because the microcontroller and its support

circuits are often built into, or embedded in, the devices they control.

Today microcontrollers are very commonly used in wide variety of intelligent

products. For example most personal computers keyboards and implemented with a

microcontroller. It replaces Scanning, Debounce, Matrix Decoding, and Serial


transmission circuits. Many low cost products, such as Toys, Electric Drills, Microwave

Ovens, VCR and a host of other consumer and industrial products are based on

microcontrollers.

EVOLUTION OF MICROCONTROROLLER

Markets for microcontrollers can run into millions of units per application. At these

volumes of the microcontrollers is a commodity items and must be optimized so that

cost is at a minimum. .Semiconductor manufacturers have produced a mind-numbing

array of designs that would seem to meet almost any need. Some of the chips listed in

this section are no longer regular production, most are current, and a few are best

termed as "smoke ware": the dreams of an aggressive marketing department.

Sl.No
Manufacturer Chip Year No. No RAM ROM Other
Designation of of Features
Pins I/O
4 Bit MC
1. Texas TMS 1000 Mid 28 23 64 1K LED
Instruments 1970 Display
2. Hitachi HMCS 40 - 28 10 32 512 10 bit
ROM
3. Toshiba TLCS 47 - 42 35 128 2K Serial bit
I/O
8 bit MC
1. Intel 8048 1976 40 27 64 1K External
Memory
8K
2 Intel 8051 1980 40 32 128 4K External
Memory
128 K
3. Motorola 6081 1977 - 31 128 2K
4. Motorola 68HC11 1985 52 40 256 8K Serial
Port,
ADC,
5. Zilog Z8 - 40 32 128 2K External
Memory
128K,
16 Bit MC
1. Intel 80C196 - 68 40 232 8K External
Memory
64K,
Serial
Port,
ADC,
WDT,
PWM
2. Hitachi H8/532 - 84 65 1K 32K External
Memory
1M,
Serial
Port,
ADC,
PWM
3. National HPC16164 - 68 52 512 16K External
Memory
64K,
ADC,
WDT,
PWM
32 Bit MC
1. Intel 80960 - 132 20 MHz clock, 32 bit bus, 512
byte instruction cache
APPLICATION

Microcontrollers did you use today?

A microcontroller is a kind of miniature computer that you can find in all kinds of

Gizmos. Some examples of common, every-day products that have microcontrollers are

built-in. If it has buttons and a digital display, chances are it also has a programmable

microcontroller brain.

Every-Day the devices used by ourselves that contain Microcontrollers. Try to

make a list and counting how many devices and the events with microcontrollers you

use in a typical day. Here are some examples: if your clock radio goes off, and you hit

the snooze button a few times in the morning, the first thing you do in your day is

interact with a microcontroller. Heating up some food in the microwave oven and making

a call on a cell phone also involve operating microcontrollers. That's just the beginning.

Here are a few more examples: Turning on the Television with a handheld remote,

playing a hand held game, Using a calculator, and Checking your digital wrist watch. All

those devices have microcontrollers inside them, that interact with you. Consumer

appliances aren't the only things that contain microcontrollers. Robots, machinery,

aerospace designs and other high-tech devices are also built with microcontrollers.
PIN DIAGRAM

PIN DESCRIPTION

VCC

Supply voltage.

GND

Ground.

Port 0

Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can

sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as

highimpedance inputs. Port 0 may also be configured to be the multiplexed loworder

address/data bus during accesses to external program and data memory. In this mode

P0 has internal pullups. Port 0 also receives the code bytes during Flash programming,

and outputs the code bytes during program verification. External pullups are required

during program verification.


Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output

buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are

pulled high by the internal pullups and can be used as inputs. As inputs, Port 1 pins that

are externally being pulled low will source current (IIL) because of the internal pullups.

Port 1 also receives the low-order address bytes during Flash programming and

verification.

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output

buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are

pulled high by the internal pullups and can be used as inputs. As inputs, Port 2 pins that

are externally being pulled low will source current (IIL) because of the internal pullups.

Port 2 emits the high-order address byte during fetches from external program memory

and during accesses to external data memory that use 16-bit addresses (MOVX @

DPTR). In this application it uses strong internal pull-ups when emitting 1s. During

accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits

the contents of the P2 Special Function Register. Port 2 also receives the high-order

address bits and some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output

buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are

pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that
are externally being pulled low will source current (IIL) because of the pullups. Port 3

also serves the functions of various special features of the AT89C51 as listed below:

Port 3 also receives some control signals for Flash programming and

verification.

RST

Reset input. A high on this pin for two machine cycles while the oscillator is

running resets the device.

ALE/PROG

Address Latch Enable output pulse for latching the low byte of the address during

accesses to external memory. This pin is also the program pulse input (PROG) during

Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the

oscillator frequency, and may be used for external timing or clocking purposes. Note,

however, that one ALE pulse is skipped during each access to external Data Memory.

If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.

With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the

pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller

is in external execution mode.


PSEN

Program Store Enable is the read strobe to external program memory. When the

AT89C51 is executing code from external program memory, PSEN is activated twice

each machine cycle, except that two PSEN activations are skipped during each access

to external data memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the

device to fetch code from external program memory locations starting at 0000H up to

FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on

reset. EA should be strapped to VCC for internal program executions.

This pin also receives the 12-volt programming enable voltage (VPP) during

Flash programming, for parts that require 12-volt VPP.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating

circuit.

XTAL2

Output from the inverting oscillator amplifier. It should be noted that when idle is

terminated by a hard ware reset, the device normally resumes program execution, from

where it left off, up to two machine cycles before the internal reset algorithm takes

control. On-chip hardware inhibits access to internal RAM in this event, but access to

the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port

pin when Idle is terminated by reset, the instruction following the one that invokes Idle

should not be one that writes to a port pin or to external memory.


ARCHITECTURE OF 89C51
ADVANTAGES OF MICROCONTROLLERS:

1. If a system is developed with a microprocessor, the designer has to go for

external memory such as RAM, ROM or EPROM and peripherals and hence the size of

the PCB will be large enough to hold all the required peripherals. But, the micro

controller has got all these peripheral facilities on a single chip so development of a

similar system with a micro controller reduces PCB size and cost of the design.

One of the major differences between a micro controller and a microprocessor is

that a controller often deals with bits , not bytes as in the real world application, for

example switch contacts can only be open or close, indicators should be lit or dark and

motors can be either turned on or off and so forth.

INTRODUCTION TO ATMEL MICROCONTROLLER

SERIES: 89C51 Family, TECHNOLOGY: CMOS

The major Features of 8-bit Micro controller ATMEL 89C51:

 8 Bit CPU optimized for control applications

 Extensive Boolean processing (Single - bit Logic ) Capabilities.

 On - Chip Flash Program Memory

 On - Chip Data RAM

 Bi-directional and Individually Addressable I/O Lines

 Multiple 16-Bit Timer/Counters

 Full Duplex UART


 Multiple Source / Vector / Priority Interrupt Structure

 On - Chip Oscillator and Clock circuitry.

 On - Chip EEPROM

 SPI Serial Bus Interface

 Watch Dog Timer

POWER MODES OF ATMEL 89C51 ICROCONTROLLER:

To exploit the power savings available in CMOS circuitry. Atmel ’s Flash micro

controllers have two software-invited reduced power modes.

IDLE MODE:

The CPU is turned off while the RAM and other on - chip peripherals continue

operating. Inn this mode current draw is reduced to about 15 percent of the current

drawn when the device is fully active.

POWER DOWN MODE:

All on-chip activities are suspended while the on – chip RAM continues to hold its

data. In this mode, the device typically draws less than 15 Micro Amps and can be as

low as 0.6 Micro Amps


POWER ON RESET:

When power is turned on, the circuit holds the RST pin high for an amount of

time that depends on the capacitor value and the rate at which it charges.

To ensure a valid reset, the RST pin must be held high long enough to allow the

oscillator to start up plus two machine cycles. On power up, Vcc should rise within

approximately 10ms. The oscillator start-up time depends on the oscillator frequency.

For a 10 Mhz crystal, the start-up time is typically 1ms.With the given circuit, reducing

Vcc quickly to 0 causes the RST pin voltage to momentarily fall below 0V. How ever, this

voltage is internally l limited and will not harm the device.

MEMORY ORGANIZATION:

* Logical Separation of Program and Data Memory *

All Atmel Flash micro controllers have separate address spaces for porgram and

data memory as shown in Fig 1.The logical separation of program and data

memory allows the data memory to be accessed by 8 bit addresses . Which can be

more quickly stored and manipulated by an 8 bit CPU Nevertheless 16 Bit data memory

addresses can also be generated through the DPTR register.

Program memory can only be read. There can be up to 64K bytes of directly

addressable program memory. The read strobe for external program memory is the

Program Store Enable Signal (PSEN) Data memory occupies a separate address space

from program memory. Up to 64K bytes of external memory can be directly

addressed in the external data memory space. The CPU generates read and write

signals, RD and WR, during external data memory accesses. External program memory
and external data memory can be combined by an applying the RD and PSEN signals

to the inputs of AND gate and using the output of the fate as the read strobe to the

external program/data memory.

PROGRAM MEMORY:

The map of the lower part of the program memory, after reset, the CPU begins

execution from location 0000h. Each interrupt is assigned a fixed location in program

memory. The interrupt causes the CPU to jump to that location, where it executes

the service routine. External Interrupt 0 for example, is assigned to location 0003h. If

external Interrupt 0 is used, its service routine must begin at location 0003h. If the I

interrupt in not used its service location is available as general-purpose program

memory.

The interrupt service locations are spaced at 8 byte intervals 0003h for External

interrupt 0, 000Bh for Timer 0, 0013h for External interrupt 1,001Bh for Timer1, and so

on. If an Interrupt service routine is short enough (as is often the case in control

applications) it can reside entirely within that 8-byte interval. Longer service routines can

use a jump instruction to skip over subsequent interrupt locations. If other interrupts are

in use. The lowest addresses of program memory can be either in the on-chip Flash or

in an external memory. To make this selection, strap the External Access (EA) pin to

either Vcc or GND. For example, in the AT89C51 with 4K bytes of on-chip Flash, if the

EA pin is strapped to Vcc, program fetches to addresses 0000h through 0FFFh are

directed to internal Flash. Program fetches to addresses 1000h through FFFFh are

directed to external memory.

DATA MEMORY:
The Internal Data memory is dived into three blocks namely, Refer Fig

 The lower 128 Bytes of Internal RAM.

 The Upper 128 Bytes of Internal RAM.

 Special Function Register

Internal Data memory Addresses are always 1 byte wide, which implies an

address space of only 256 bytes. However, the addressing modes for internal RAM can

in fact accommodate 384 bytes. Direct addresses higher than 7Fh access one memory

space, and indirect addresses higher than 7Fh access a different Memory Space.

The lowest 32 bytes are grouped into 4 banks of 8 registers. Program

instructions call out these registers as R0 through R7. Two bits in the Program Status

Word (PSW) Select, which register bank, is in use. This architecture allows more

efficient use of code space, since register instructions are shorter than instructions that

use direct addressing.

The next 16-bytes above the register banks form a block of bit addressable

memory space. The micro controller instruction set includes a wide selection of single -

bit instructions and this instruction can directly address the 128 bytes in this area. These

bit addresses are 00h through 7Fh. either direct or indirect addressing can access all of

the bytes in lower 128 bytes. Indirect addressing can only access the upper 128. The

upper 128 bytes of RAM are only in the devices with 256 bytes of RAM.

The Special Function Register includes Ports latches, timers, peripheral controls

etc., direct addressing can only access these register. In general, all Atmel micro

controllers have the same SFRs at the same addresses in SFR space as the

AT89C51 and other compatible micro controllers. However, upgrades to the


AT89C51 have additional SFRs. Sixteen addresses in SFR space are both byte and bit

Addressable. The bit Addressable SFRs are those whose address ends in 000B. The bit

addresses in this area are 80h through FFh.

ADDRESSING MODES:

DIRECT ADDRESSING:

In direct addressing, the operand specified by an 8-bit address field in the

instruction. Only internal data RAM and SFR’s can be directly addressed.

INDIRECT ADDRESSING:

In Indirect addressing, the instruction specifies a register that contains the

address of the operand. Both internal and external RAM can indirectly address.

The address register for 8-bit addresses can be either the Stack Pointer or R0 or

R1 of the selected register Bank. The address register for 16-bit addresses can be only

the 16-bit data pointer register, DPTR.


INDEXED ADDRESSING:

Program memory can only be accessed via indexed addressing this addressing

mode is intended for reading look-up tables in program memory. A 16 bit base register

(Either DPTR or the Program Counter) points to the base of the table, and the

accumulator is set up with the table entry number. Adding the Accumulator data to the

base pointer forms the address of the table entry in program memory.

Another type of indexed addressing is used in the“ case jump ” instructions. In

this case the destination address of a jump instruction is computed as the sum of the

base pointer and the Accumulator data.

REGISTER INSTRUCTION:

The register banks, which contains registers R0 through R7, can be accessed by

instructions whose opcodes carry a 3-bit register specification. Instructions that access

the registers this way make efficient use of code, since this mode eliminates an address

byte. When the instruction is executed, one of four banks is selected at execution time

by the row bank select bits in PSW.

REGISTER - SPECIFIC INSTRUCTION:

Some Instructions are specific to a certain register. For example some instruction

always operates on the Accumulator, so no address byte is needed to point OT ir. In

these cases, the opcode itself points to the correct register. Instruction that register to

Accumulator as A assemble as Accumulator - specific Opcodes.

IMMEDIATE CONSTANTS:
The value of a constant can follow the opcode in program memory For example.

MOV A, #100 loads the Accumulator with the decimal number 100. The same number

could be specified in hex digit as 64h.

PROGRAM STATUS WORD:

Program Status Word Register in Atmel Flash Micro controller:

CY AC F0 RS1 RS0 OV --- P

PSW 7 PSW 0

PSW 6 PSW 1
PSW 5 PSW 2
PSW 4 PSW 3

PSW 0:

Parity of Accumulator Set By Hardware To 1 if it contains an Odd number of 1s,

Otherwise it is reset to 0.

PSW1:

User Definable Flag

PSW2:

Overflow Flag Set By Arithmetic Operations

PSW3:
Register Bank Select

PSW4:

Register Bank Select

PSW5:

General Purpose Flag.

PSW6:

Auxiliary Carry Flag Receives Carry Out from

Bit 1 of Addition Operands

PSW7:

Carry Flag Receives Carry Out From Bit 1 of ALU Operands.

The Program Status Word contains Status bits that refklect the current stae of

the CPU. The PSW shown if Fig resides in SFR space. The PSW conrains the Carry Bit,

The auxillary Carry (For BCD Operations) the two - register bank select bits, the

Overflow flag, a Parity bit and two user Definable status Flags.

The Carry Bit, in addition to serving as a Carry bit in arithmetic operations also

serves the as the “Accumulator” for a number of Boolean Operations .The bits RS0 and

RS1 select one of the four register banks. A number of instructions register to these

RAM locations as R0 through R7.The status of the RS0 and RS1 bits at

execution time determines which of the four banks is selected.

The Parity bit reflect the Number of 1s in the Accumulator .P=1 if the Accumulator

contains an even number of 1s, and P=0 if the Accumulator contains an even number of
1s. Thus, the number of 1s in the Accumulator plus P is always even. Two bits in the

PSW are uncommitted and can be used as general-purpose status flags.

INTERRUPTS

The AT89C51 provides 5 interrupt sources: Two External interrupts, two-timer

interrupts and a serial port interrupts. The External Interrupts INT0 and INT1 can each

either level activated or transistion - activated, depending on bits IT0 and IT1 in Register

TCON. The Flags that actually generate these interrupts are the IE0 and IE1 bits in

TCON. When the service routine is vectored to hardware clears the flag that generated

an external interrupt only if the interrupt WA transition - activated. If the interrupt was

level - activated, then the external requesting source (rather than the on-chip hardware)

controls the requested flag. Tf0 and Tf1 generate the Timer 0 and Timer 1 Interrupts,

which are set by a rollover in their respective Timer/Counter Register (except for Timer 0

in Mode 3). When a timer interrupt is generated, the on-chip hardware clears the flag

that generated it when the service routine is vectored to. The logical OR of RI and TI

generate the Serial Port Interrupt. Neither of these flag is cleared by hardware when the

service routine is vectored to. In fact, the service routine normally must determine

whether RI or TI generated the interrupt an the bit must be cleared in software.

In the Serial Port Interrupt is generated by the logical OR of RI and TI. Neither of

these flag is cleared by hardware when the service routine is vectored to. In fact, the

service routine normally must determine whether RI to TI generated the interrupt and

the bit must be cleared in software.

IE: INTERRUPT ENABLE REGISTER


EA - ET2 ES ET1 EX1 ET0 EX0
Enable bit = 1 enabled the interrupt
Enable bit = 0 disables it.
Symbol Position Function

EA IE. Global enable / disable all interrupts.


If EA = 0, no interrupt will be
Acknowledge.
If EA = 1, each interrupt source is
individually enabled to disabled by
setting or clearing its enable bit

- IE.6 Undefined / reserved

ET2 IE.5 Timer 2 Interrupt enable Bit

ES IE.4 Serial Port Interrupt enabled bit.

ET1 IE.3 Timer 1 Interrupt enable bit.

EX1 IE.2 External Interrupt 1 enable bit.

ET0 IE.1 Timer 0 Interrupt enable bit.

EX0 IE.0 External Interrupt 0 enable bit.

OSCILLATOR AND CLOCK CIRCUIT:

XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier

which is intended for use as a crystal oscillator in the pioerce configuration, in the

frequency range of 1.2 Mhz to 12 Mhz. XTAL2 also the input to the internal clock

generator.
To drive the chip with an internal oscillator, one would ground XTAL1 and XTAL2.

Since the input to the clock generator is divide by two filip flop there are no

requirements on the duty cycle of the external oscillator signal. However, minimum high

and low times must be observed.

The clock generator divides the oscillator frequency by 2 and provides a tow

phase clock signal to the chip. The phase 1 signal is active during the first half to each

clock period and the phase 2 signals are active during the second half of each clock

period.

CPU TIMING:

A machine cycle consists of 6 states. Each stare is divided into a phase / half,

during which the phase 1 clock is active and phase 2 half. Arithmetic and Logical

operations take place during phase1 and internal register - to register transfer take

place during phase 2

TRENDS AND DEVELOPMENTS IN MICRO CONTROLLER

The manner in which the use of micro controllers is shaping our lives is breathtaking.

Today, this versatile device can be found in a variety of control applications. CVTs,

VCRs, CD players, microwave ovens, and automotive engine systems are some of

these.

A micro controller unit (MCU) uses the microprocessor as its central processing unit

(CPU) and incorporates memory, timing reference, I/O peripherals, etc on the same

chip. Limited computational capabilities and enhanced I/O are special features.
The micro controller is the most essential IC for continuous process- based

applications in industries like chemical, refinery, pharmaceutical automobile, steel,

and electrical, employing programmable logic systems (DCS). PLC and DCS thrive

on the programmability of an MCU.

There are many MCU manufacturers. To understand and apply general concepts, it

is necessary to study one type in detail. This specific knowledge can be used to

understand similar features of other MCUs.

Micro controller devices have many similarities. When you look at the differences,

they are not so great either. Most common and popular MCUs are considered to be

mature and well-established products, which have their individual adherents and

devotees. There are a number of variants within each family to satisfy most memory,

I/O, data conversion, and timing needs of enduser applications.

The MCU is designed to operate on application-oriented sensor data-for example,

temperature and pressure of a blast furnace in an industrial process that is fed

through its serial or operated on under the control of software and stored in ROM.

Appropriate signals are fed via output ports to control external devices and systems.

APPLICATIONS OF MICROCONTROLLERS

Microcontrollers are designed for use in sophisticated real time applications such

as

1. Industrial Control

2. Instrumentation and

3. Intelligent computer peripherals


They are used in industrial applications to control

 Motor

 Robotics

 Discrete and continuous process control

 In missile guidance and control

 In medical instrumentation

 Oscilloscopes

 Telecommunication

 Automobiles

 For Scanning a keyboard

 Driving an LCD

 For Frequency measurements

 Period Measurements
4.3 KEYPAD

A numeric keypad, or numpad for short, is the small, palm-sized, seventeen key
section of a computer keyboard, usually on the very far right. The numeric keypad
features digits 0 to 9, addition (+), subtraction (-), multiplication (*) and division (/)
symbols, a decimal point (.) and Num Lock and Enter keys. Laptop keyboards often do
not have a numpad, but may provide numpad input by holding a modifier key (typically
lapelled "Fn") and operating keys on the standard keyboard. Particularly large laptops
(typically those with a 17 inch screen or larger) may have space for a real numpad, and
many companies sell separate numpads which connect to the host laptop by a USB
connection.

Numeric keypads usually operate in two modes: when Num Lock is off, keys 8, 6,
2, 4 act like an arrow keys and 7, 9, 3, 1 act like Home, PgUp, PgDn and End; when
Num Lock is on, digits keys produce corresponding digits. These, however, differ from
the numeric keys at the top of the keyboard in that, when combined with the Alt key on a
PC, they are used to enter characters which may not be otherwise available: for
example, Alt-0169 produces the copyright symbol. These are referred to as Alt codes.
On Apple Computer Macintosh computers, which lack a Num Lock key, the numeric
keypad always produces only numbers. The num lock key is replaced by the clear key.
5. OVER ALL CIRCUIT DIAGRAM
6. OVERALL CIRCUIT DIAGRAM DESCRIPTION

6.1 POWER SUPPLY DESCRIPTION

Block diagram

The ac voltage, typically 220V rms, is connected to a transformer, which steps


that ac voltage down to the level of the desired dc output. A diode rectifier then provides
a full-wave rectified voltage that is initially filtered by a simple capacitor filter to produce
a dc voltage. This resulting dc voltage usually has some ripple or ac voltage variation.
A regulator circuit removes the ripples and also remains the same dc value even
if the input dc voltage varies, or the load connected to the output dc voltage changes.
This voltage regulation is usually obtained using one of the popular voltage regulator IC
units.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

Block diagram (Power supply)


Working principle

Transformer

The transformer will step down the power supply voltage (0-230V) to (0-6V) level. Then
the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision
rectifier are it will give peak voltage output as DC; rest of the circuits will give only RMS
output.

Bridge rectifier

When four diodes are connected as shown in figure, the circuit is called as bridge
rectifier. The input to the circuit is applied to the diagonally opposite corners of the
network, and the output is taken from the remaining two corners.

Let us assume that the transformer is working properly and there is a positive
potential, at point A and a negative potential at point B. the positive potential at point A
will forward bias D3 and reverse bias D4.

The negative potential at point B will forward bias D1 and reverse D2. At this time
D3 and D1 are forward biased and will allow current flow to pass through them; D4 and
D2 are reverse biased and will block current flow.

The path for current flow is from point B through D1, up through RL, through D3,
through the secondary of the transformer back to point B. this path is indicated by the
solid arrows. Waveforms (1) and (2) can be observed across D1 and D3.
One-half cycle later the polarity across the secondary of the transformer reverse,
forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be
from point A through D4, up through RL, through D2, through the secondary of T1, and
back to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can
be observed across D2 and D4. The current flow through RL is always in the same
direction. In flowing through RL this current develops a voltage corresponding to that
shown waveform (5). Since current flows through the load (RL) during both half cycles
of the applied voltage, this bridge rectifier is a full-wave rectifier.

One advantage of a bridge rectifier over a conventional full-wave rectifier is that


with a given transformer the bridge rectifier produces a voltage output that is nearly
twice that of the conventional full-wave circuit.

This may be shown by assigning values to some of the components shown in


views A and B. assume that the same transformer is used in both circuits. The peak
voltage developed between points X and y is 1000 volts in both circuits. In the
conventional full-wave circuit shown—in view A, the peak voltage from the center tap to
either X or Y is 500 volts. Since only one diode can conduct at any instant, the
maximum voltage that can be rectified at any instant is 500 volts.

The maximum voltage that appears across the load resistor is nearly-but never
exceeds-500 v0lts, as result of the small voltage drop across the diode. In the bridge
rectifier shown in view B, the maximum voltage that can be rectified is the full secondary
voltage, which is 1000 volts. Therefore, the peak output voltage across the load resistor
is nearly 1000 volts. With both circuits using the same transformer, the bridge rectifier
circuit produces a higher output voltage than the conventional full-wave rectifier circuit.
IC voltage regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC units


contain the circuitry for reference source, comparator amplifier, control device, and
overload protection all in a single IC. IC units provide regulation of either a fixed positive
voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can be
selected for operation with load currents from hundreds of milli amperes to tens of
amperes, corresponding to power ratings from milli watts to tens of watts.

Circuit diagram (Power supply)

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi,


applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal,
with the third terminal connected to ground.
The series 78 regulators provide fixed positive regulated voltages from 5 to 24
volts. Similarly, the series 79 regulators provide fixed negative regulated voltages from 5
to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts
6.2 MICROCONTROLLER CIRCUIT

The microcontroller circuit is connected with reset circuit, crystal oscillator circuit, lcd
circuit the reset circuit is the one which is an external interrupt which is designed to
reset the program. And the crystal oscillator circuit is the one used to generate the
pulses to microcontroller and it also called as the heart of the microcontroller here we
have used 12mhz crystal which generates pulses upto 12000000 frequency which is
converted it machine cycle frequency when divided by 12 which is equal to 1000000hz
to find the time we have to invert the frequency so that we get one micro second for
each execution of the instruction.

The lcd that is liquid crystal display which is used to display the what we need the lcd
has fourteen pins in which three pins for the command and eight pins for the data. If the
data is given to lcd it is write command which is configured by the programmer
otherwise it is read command in which data read to microcontroller the data pins are
given to the to port0 and command pins are given to the port2.
Other than these pin a one pin configured for the contrast of the lcd. Thus the
microcontroller circuit works
6.3 BLUETOOTH

Bluetooth is a proprietary open wireless protocol for exchanging data over short distances (using
short length radio waves) from fixed and mobile devices, creating personal area networks
(PANs). It was originally conceived as a wireless alternative to RS-232 data cables. It can
connect several devices, overcoming problems of synchronization.

1 Name and logo

The word Bluetooth is an anglicised version of Danish Blåtand, the epithet of the tenth-century
king Harald I of Denmark and parts of Norway who united dissonant Danish tribes into a single
kingdom. The implication is that Bluetooth does the same with communications protocols,
uniting them into one universal standard.[1][2][3] Although blå in modern Scandinavic languages
means blue, during the Viking age it also could mean black. So a historically correct translation
of Old Norse Harald Blátönn could rather be Harald Blacktooth than Harald Bluetooth.

The Bluetooth logo is a bind rune merging the Germanic runes (Hagall) and (Berkanan).

2 Implementation

Bluetooth uses a radio technology called frequency-hopping spread spectrum, which chops up
the data being sent and transmits chunks of it on up to 79 bands of 1 MHz width in the range
2402-2480 GHz. This is in the globally unlicensed Industrial, Scientific and Medical (ISM)
2.4 GHz short-range radio frequency band.

In its basic rate (BR) mode, the modulation is Gaussian frequency-shift keying (GFSK). It can
achieve a gross data rate of 1 Mbit/s. In extended data rate (EDR) π/4-DQPSK and 8DPSK are
used, giving 2, and 3 Mbit/s respectively. Bluetooth provides a secure way to connect and
exchange information between devices such as mobile phones, telephones, laptops, personal
computers, printers, Global Positioning System (GPS) receivers, digital cameras, and video game
consoles.
The Bluetooth specifications are developed and licensed by the Bluetooth Special Interest Group
(SIG). The Bluetooth SIG consists of companies in the areas of telecommunication, computing,
networking, and consumer electronics.[4]

To be marketed as a bluetooth device, it must be qualified to standards defined by the SIG.

3 Uses

Bluetooth is a standard communications protocol primarily designed for low power consumption,
with a short range (power-class-dependent: 100m, 10m and 1m, but ranges vary in practice; see
table below) based on low-cost transceiver microchips in each device.[5] Because the devices use
a radio (broadcast) communications system, they do not have to be in line of sight of each other.
[4]

Maximum Permitted Power Range


Class
mW dBm (approximate)
Class 1 100 mW 20 dBm ~100 metres
Class 2 2.5 mW 4 dBm ~10 metres
Class 3 1 mW 0 dBm ~1 metres

In most cases the effective range of class 2 devices is extended if they connect to a class 1
transceiver, compared to a pure class 2 network. This is accomplished by the higher sensitivity
and transmission power of Class 1 devices.

Version Data Rate


Version 1.2 1 Mbit/s
Version 2.0 + EDR 3 Mbit/s

3.1 Bluetooth profiles


Main article: Bluetooth profile

In order to use Bluetooth, a device must be compatible with certain Bluetooth profiles. These
define the possible applications and uses of the technology.
3.2 ] List of applications

A typical Bluetooth mobile phone headset.


 Wireless control of and communication between a mobile phone and a hands-free
headset. This was one of the earliest applications to become popular.
 Wireless networking between PCs in a confined space and where little bandwidth is
required.
 Wireless communication with PC input and output devices, the most common being the
mouse, keyboard and printer.
 Transfer of files, contact details, calendar appointments, and reminders between devices
with OBEX.
 Replacement of traditional wired serial communications in test equipment, GPS
receivers, medical equipment, bar code scanners, and traffic control devices.
 For controls where infrared was traditionally used.
 For low bandwidth applications where higher USB bandwidth is not required and cable-
free connection desired.
 Sending small advertisements from Bluetooth-enabled advertising hoardings to other,
discoverable, Bluetooth devices[6].
 Wireless bridge between two Industrial Ethernet (e.g., PROFINET) networks.
 Three seventh-generation game consoles, Nintendo's Wii[7] and Sony's PlayStation 3 and
PSP Go, use Bluetooth for their respective wireless controllers.
 Dial-up internet access on personal computers or PDAs using a data-capable mobile
phone as a wireless modem like Novatel Mifi.
 Short range transmission of health sensor data from medical devices to mobile phone, set-
top box or dedicated telehealth devices[8].
3.3 Bluetooth vs. Wi-Fi IEEE 802.11 in networking

Bluetooth and Wi-Fi have many applications: setting up networks, printing, or transferring files.

Wi-Fi is intended for resident equipment and its applications. The category of applications is
outlined as WLAN, the wireless local area networks. Wi-Fi is intended as a replacement for
cabling for general local area network access in work areas.

Bluetooth is intended for non resident equipment and its applications. The category of
applications is outlined as the wireless personal area network (WPAN). Bluetooth is a
replacement for cabling in a variety of personally carried applications in any ambience.

Wi-Fi is a traditional Ethernet network, and requires configuration to set up shared resources,
transmit files, and to set up audio links (for example, headsets and hands-free devices). Wi-Fi
uses the same radio frequencies as Bluetooth, but with higher power, resulting in a stronger
connection. Wi-Fi is sometimes called "wireless Ethernet." This description is accurate, as it also
provides an indication of its relative strengths and weaknesses. Wi-Fi requires more setup but is
better suited for operating full-scale networks; it enables a faster connection and better range
from the base station.

The nearest equivalent in Bluetooth is the DUN profile, which allows devices to act as modem
interfaces.

3.3.1 Bluetooth devices


A Bluetooth USB dongle with a 100 m range. The MacBook Pro, shown, has a built in Bluetooth
adaptor.

Bluetooth exists in many products, such as telephones, the Wii, PlayStation 3, PSP Go, Lego
Mindstorms NXT and in some high definition watches[citation needed], modems and headsets. The
technology is useful when transferring information between two or more devices that are near
each other in low-bandwidth situations. Bluetooth is commonly used to transfer sound data with
telephones (i.e., with a Bluetooth headset) or byte data with hand-held computers (transferring
files).

Bluetooth protocols simplify the discovery and setup of services between devices. Bluetooth
devices can advertise all of the services they provide. This makes using services easier because
more of the security, network address and permission configuration can be automated than with
many other network types.

4 Computer requirements

A typical Bluetooth USB dongle.

An internal notebook Bluetooth card (14×36×4 mm).


A personal computer must have a Bluetooth adapter in order to communicate with other
Bluetooth devices (such as mobile phones, mice and keyboards). While some desktop computers
and most recent laptops come with a built-in Bluetooth adapter, others will require an external
one in the form of a dongle.

Unlike its predecessor, IrDA, which requires a separate adapter for each device, Bluetooth allows
multiple devices to communicate with a computer over a single adapter.

4.1 Operating system support

Apple has supported Bluetooth since Mac OS X v10.2 which was released in 2002.[9]

For Microsoft platforms, Windows XP Service Pack 2 and later releases have native support for
Bluetooth. Previous versions required users to install their Bluetooth adapter's own drivers,
which were not directly supported by Microsoft.[10] Microsoft's own Bluetooth dongles (packaged
with their Bluetooth computer devices) have no external drivers and thus require at least
Windows XP Service Pack 2.

GNU/Linux has two popular Bluetooth stacks, BlueZ and Affix. The BlueZ[11] stack is included
with most Linux kernels and was originally developed by Qualcomm. The Affix stack was
developed by Nokia. FreeBSD features Bluetooth support since its 5.0 release. NetBSD features
Bluetooth support since its 4.0 release. Its Bluetooth stack has been ported to OpenBSD as well.

5 Mobile phone requirements

A mobile phone that is Bluetooth enabled is able to pair with many devices. To ensure the
broadest support of feature functionality together with legacy device support, the Open Mobile
Terminal Platform (OMTP) forum has published a recommendations paper, entitled "Bluetooth
Local Connectivity"[12]
6 Specifications and features

The Bluetooth specification was developed in 1994 by Jaap Haartsen and Sven Mattisson, who
were working for Ericsson in Lund, Sweden.[13] The specification is based on frequency-hopping
spread spectrum technology.

The specifications were formalized by the Bluetooth Special Interest Group (SIG). The SIG was
formally announced on May 20, 1998. Today it has a membership of over 12,000 companies
worldwide. It was established by Ericsson, IBM, Intel, Toshiba, and Nokia, and later joined by
many other companies.

6.1 Bluetooth 1.0 and 1.0B

Versions 1.0 and 1.0B had many problems, and manufacturers had difficulty making their
products interoperable. Versions 1.0 and 1.0B also included mandatory Bluetooth hardware
device address (BD_ADDR) transmission in the Connecting process (rendering anonymity
impossible at the protocol level), which was a major setback for certain services planned for use
in Bluetooth environments.

6.2 Bluetooth 1.1



Ratified as IEEE Standard 802.15.1-2002[14]

Many errors found in the 1.0B specifications were fixed.

Added support for non-encrypted channels.

Received Signal Strength Indicator (RSSI).

6.3 Bluetooth 1.2

This version is backward compatible with 1.1 and the major enhancements include the following:


Faster Connection and Discovery

Adaptive frequency-hopping spread spectrum (AFH), which improves resistance to radio
frequency interference by avoiding the use of crowded frequencies in the hopping
sequence.

Higher transmission speeds in practice, up to 721 kbit/s, than in 1.1.

Extended Synchronous Connections (eSCO), which improve voice quality of audio links
by allowing retransmissions of corrupted packets, and may optionally increase audio
latency to provide better support for concurrent data transfer.

Host Controller Interface (HCI) support for three-wire UART.

Ratified as IEEE Standard 802.15.1-2005[15]

Introduced Flow Control and Retransmission Modes for L2CAP.

6.4 Bluetooth 2.0 + EDR

This version of the Bluetooth specification was released on November 10, 2004. It is backward
compatible with the previous version 1.2. The main difference is the introduction of an Enhanced
Data Rate (EDR) for faster data transfer. The nominal rate of EDR is about 3 megabits per
second, although the practical data transfer rate is 2.1 megabits per second.[16] The additional
throughput is obtained by using a different radio technology for transmission of the data.
Standard, or Basic Rate, transmission uses Gaussian Frequency Shift Keying (GFSK)
modulation of the radio signal with a gross air data rate of 1 Mbit/s. EDR uses a combination of
GFSK and Phase Shift Keying modulation (PSK) with two variants, π/4-DQPSK and 8DPSK.
These have gross air data rates of 2, and 3 Mbit/s respectively.[17]

According to the 2.0 + EDR specification, EDR provides the following benefits:

 Three times the transmission speed (2.1 Mbit/s) in some cases.


 Reduced complexity of multiple simultaneous connections due to additional bandwidth.
 Lower power consumption through a reduced duty cycle.

The Bluetooth Special Interest Group (SIG) published the specification as "Bluetooth 2.0 +
EDR" which implies that EDR is an optional feature. Aside from EDR, there are other minor
improvements to the 2.0 specification, and products may claim compliance to "Bluetooth 2.0"
without supporting the higher data rate. At least one commercial device, the HTC TyTN Pocket
PC phone, states "Bluetooth 2.0 without EDR" on its data sheet.[18]
6.5 Bluetooth 2.1 + EDR

Bluetooth Core Specification Version 2.1 + EDR is fully backward compatible with 1.2, and was
adopted by the Bluetooth SIG on July 26, 2007.[17] It supports theoretical data transfer speeds of
up to 3 Mbit/s. This specification includes the following features:

Extended inquiry response (EIR)


Provides more information during the inquiry procedure to allow better filtering of
devices before connection. This information may include the name of the device, a list of
services the device supports, the transmission power level used for inquiry responses, and
manufacturer defined data.
Sniff subrating
Reduces the power consumption when devices are in the sniff low-power mode,
especially on links with asymmetric data flows. Human interface devices (HID) are
expected to benefit the most, with mouse and keyboard devices increasing their battery
life by a factor of 3 to 10.[citation needed] It lets devices decide how long they will wait before
sending keepalive messages to one another. Previous Bluetooth implementations featured
keep alive message frequencies of up to several times per second. In contrast, the 2.1 +
EDR specification allows pairs of devices to negotiate this value between them to as
infrequently as once every 10 seconds.
Encryption pause/resume (EPR)
Enables an encryption key to be changed with less management required by the
Bluetooth host. Changing an encryption key must be done for a role switch of an
encrypted ACL link, or every 23.3 hours (one Bluetooth day) encryption is enabled on an
ACL link. Before this feature was introduced, when an encryption key is refreshed the
Bluetooth host would be notified of a brief gap in encryption while the new key was
generated; so the Bluetooth host was required to handle pausing data transfer (however
data requiring encryption may already have been sent before the notification that
encryption is disabled has been received). With EPR, the Bluetooth host is not notified of
the gap, and the Bluetooth controller ensures that no unencrypted data is transferred while
they key is refreshed.
Secure simple pairing (SSP)
Radically improves the pairing experience for Bluetooth devices, while increasing the use
and strength of security. See the section on Pairing below for more details. It is expected
that this feature will significantly increase the use of Bluetooth.[19]
Near field communication (NFC) cooperation
Automatic creation of secure Bluetooth connections when NFC radio interface is also
available. This functionality is part of SSP where NFC is one way of exchanging pairing
information. For example, a headset should be paired with a Bluetooth 2.1 + EDR phone
including NFC just by bringing the two devices close to each other (a few centimeters).
Another example is automatic uploading of photos from a mobile phone or camera to a
digital picture frame just by bringing the phone or camera close to the frame.[20][21]
Non-Automatically-Flushable Packet Boundary Flag (PBF)
Using this feature L2CAP may support both isochronous (A2DP media Streaming) and
asynchronous data flows (AVRCP Commands) over the same logical link by marking
packets as automatically-flushable or non-automatically-flushable by setting the
appropriate value for the Packet_Boundary_Flag in the HCI ACL Data Packet

6.6 Bluetooth 3.0 + HS

The 3.0 + HS specification[17] was adopted by the Bluetooth SIG on April 21, 2009. It supports
theoretical data transfer speeds of up to 24 Mbit/s, though not over the bluetooth link itself.
Instead, the bluetooth link is used for negotiation and establishment, and the high data rate traffic
is carried over a colocated wifi link. Its main new feature is AMP (Alternate MAC/PHY), the
addition of 802.11 as a high speed transport. Two technologies had been anticipated for AMP:
802.11 and UWB, but UWB is missing from the specification.[22]

Alternate MAC/PHY
Enables the use of alternative MAC and PHYs for transporting Bluetooth profile data.
The Bluetooth Radio is still used for device discovery, initial connection and profile
configuration, however when lots of data needs to be sent, the high speed alternate MAC
PHY (802.11, typically associated with Wi-Fi) will be used to transport the data. This
means that the proven low power connection models of Bluetooth are used when the
system is idle, and the low power per bit radios are used when lots of data needs to be
sent.
Unicast connectionless data
Permits service data to be sent without establishing an explicit L2CAP channel. It is
intended for use by applications that require low latency between user action and
reconnection/transmission of data. This is only appropriate for small amounts of data.
Read encryption key size
Introduces a standard HCI command for a Bluetooth host to query the encryption key size
on an encrypted ACL link. The encryption key size used on a link is required for the SIM
Access Profile, so generally Bluetooth controllers provided this feature in a proprietary
manner. Now the information is available over the standard HCI interface.
Enhanced Power Control
Updates the power control feature to remove the open loop power control, and also to
clarify ambiguities in power control introduced by the new modulation schemes added
for EDR. Enhanced power control removes the ambiguities by specifying the behaviour
that is expected. The feature also adds closed loop power control, meaning RSSI filtering
can start as the response is received. Additionally, a "go straight to maximum power"
request has been introduced, this is expected to deal with the headset link loss issue
typically observed when a user puts their phone into a pocket on the opposite side to the
headset.

6.7 Bluetooth V4.0 (Ble; low energy protocols)


Main article: Bluetooth low energy

On December 17, 2009, the Bluetooth SIG adopted Bluetooth low energy (Ble) as the hallmark
feature of the version 4.0 [23]. The provisional names Wibree and Bluetooth ULP (Ultra Low
Power) are abandoned.

On June 12, 2007, Nokia and Bluetooth SIG had announced that Wibree will be a part of the
Bluetooth specification, as an ultra-low power Bluetooth technology.[24] Expected use cases
include watches displaying Caller ID information, sports sensors monitoring the wearer's heart
rate during exercise, and medical devices. The Medical Devices Working Group is also creating a
medical devices profile and associated protocols to enable this market. Bluetooth low energy
technology is designed for devices to have a battery life of up to one year.

6.8 Future
Broadcast channel
Enables Bluetooth information points. This will drive the adoption of Bluetooth into
mobile phones, and enable advertising models based around users pulling information
from the information points, and not based around the object push model that is used in a
limited way today.
Topology management
Enables the automatic configuration of the piconet topologies especially in scatternet
situations that are becoming more common today. This should all be invisible to users of
the technology, while also making the technology "just work."
QoS improvements
Enable audio and video data to be transmitted at a higher quality, especially when best
effort traffic is being transmitted in the same piconet.
6.8.1 UWB for AMP
Main article: ultra-wideband

The high speed (AMP) feature of Bluetooth 3.0 is based on 802.11, but the AMP mechanism was
designed to be usable with other radios as well. It was originally intended for UWB, but the
WiMedia Alliance, the body responsible for the flavor of UWB intended for Bluetooth,
announced in March 2009 that it was disbanding.

On March 16, 2009, the WiMedia Alliance announced it was entering into technology transfer
agreements for the WiMedia Ultra-wideband (UWB) specifications. WiMedia will transfer all
current and future specifications, including work on future high speed and power optimized
implementations, to the Bluetooth Special Interest Group (SIG), Wireless USB Promoter Group
and the USB Implementers Forum. After the successful completion of the technology transfer,
marketing and related administrative items, the WiMedia Alliance will cease operations.[25]
In October 2009 the Bluetooth Special Interest Group has dropped development of UWB as part
of the alternative MAC/PHY, Bluetooth 3.0/High Speed solution. A small, but significant,
number of former WiMedia members had not and would not sign up to the necessary agreements
for the IP transfer. The Bluetooth group is now in the process of evaluating other options for its
longer term roadmap.[26]

7 Technical information

7.1 Bluetooth protocol stack


Main articles: Bluetooth stack and Bluetooth protocols

"Bluetooth is defined as a layer protocol architecture consisting of core protocols, cable


replacement protocols, telephony control protocols, and adopted protocols."[27] Mandatory
protocols for all Bluetooth stacks are: LMP, L2CAP and SDP. Additionally, these protocols are
almost universally supported: HCI and RFCOMM.

7.1.1 LMP (Link Management Protocol)

Used for control of the radio link between two devices. Implemented on the controller.

7.1.2 L2CAP (Logical Link Control & Adaptation Protocol)

Used to multiplex multiple logical connections between two devices using different higher level
protocols. Provides segmentation and reassembly of on-air packets.

In Basic mode, L2CAP provides packets with a payload configurable up to 64kB, with 672 bytes
as the default MTU, and 48 bytes as the minimum mandatory supported MTU.

In Retransmission & Flow Control modes, L2CAP can be configured for reliable or isochronous
data per channel by performing retransmissions and CRC checks.

Bluetooth Core Specification Addendum 1 adds two additional L2CAP modes to the core
specification. These modes effectively deprecate original Retransmission and Flow Control
modes:
 Enhanced Retransmission Mode (ERTM): This mode is an improved version of the
original retransmission mode. This mode provides a reliable L2CAP channel.
 Streaming Mode (SM): This is a very simple mode, with no retransmission or flow
control. This mode provides an unreliable L2CAP channel.

Reliability in any of these modes is optionally and/or additionally guaranteed by the lower layer
Bluetooth BDR/EDR air interface by configuring the number of retransmissions and flush
timeout (time after which the radio will flush packets). In-order sequencing is guaranteed by the
lower layer.

Only L2CAP channels configured in ERTM or SM may be operated over AMP logical links.

7.1.3 SDP (Service discovery protocol)

Allows a device to discover services support by other devices, and their associated parameters.
For example, when connecting a mobile phone to a Bluetooth headset, SDP will be used for
determining which Bluetooth profiles are supported by the headset (Headset Profile, Hands Free
Profile, Advanced Audio Distribution Profile (A2DP) etc.) and the protocol multiplexer settings
needed to connect to each of them. Each service is identified by a Universally Unique Identifier
(UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather
than the full 128)

7.1.4 HCI (Host/Controller Interface)

Standardised communication between the host stack (e.g., a PC or mobile phone OS) and the
controller (the Bluetooth IC). This standard allows the host stack or controller IC to be swapped
with minimal adaptation.

There are several HCI transport layer standards, each using a different hardware interface to
transfer the same command, event and data packets. The most commonly used are USB (in PCs)
and UART (in mobile phones and PDAs).
In Bluetooth devices with simple functionality (e.g., headsets) the host stack and controller can
be implemented on the same microprocessor. In this case the HCI is optional, although often
implemented as an internal software interface.

7.1.5 RFCOMM (Cable replacement protocol)

Radio frequency communications (RFCOMM) is the cable replacement protocol used to create a
virtual serial data stream. RFCOMM provides for binary data transport and emulates EIA-232
(formerly RS-232) control signals over the Bluetooth baseband layer.

RFCOMM provides a simple reliable data stream to the user, similar to TCP. It is used directly
by many telephony related profiles as a carrier for AT commands, as well as being a transport
layer for OBEX over Bluetooth.

Many Bluetooth applications use RFCOMM because of its widespread support and publicly
available API on most operating systems. Additionally, applications that used a serial port to
communicate can be quickly ported to use RFCOMM.

7.1.6 BNEP (Bluetooth Network Encapsulation Protocol)

BNEP is used for transferring another protocol stack's data via an L2CAP channel. Its main
purpose is the transmission of IP packets in the Personal Area Networking Profile. BNEP
performs a similar function to SNAP in Wireless LAN.

7.1.7 AVCTP (Audio/Visual Control Transport Protocol)

Used by the remote control profile to transfer AV/C commands over an L2CAP channel. The
music control buttons on a stereo headset use this protocol to control the music player

7.1.8 AVDTP (Audio/Visual Data Transport Protocol)

Used by the advanced audio distribution profile to stream music to stereo headsets over an
L2CAP channel. Intended to be used by video distribution profile.
7.1.9 Telephone control protocol

Telephony control protocol-binary (TCS BIN) is the bit-oriented protocol that defines the call
control signaling for the establishment of voice and data calls between Bluetooth devices.
Additionally, "TCS BIN defines mobility management procedures for handling groups of
Bluetooth TCS devices."

TCS-BIN is only used by the cordless telephony profile, which failed to attract implementers. As
such it is only of historical interest.

7.1.10 Adopted protocols

Adopted protocols are defined by other standards-making organizations and incorporated into
Bluetooth’s protocol stack, allowing Bluetooth to create protocols only when necessary. The
adopted protocols include:

Point-to-Point Protocol (PPP)


Internet standard protocol for transporting IP datagrams over a point-to-point link.
TCP/IP/UDP
Foundation Protocols for TCP/IP protocol suite
Object Exchange Protocol (OBEX)
Session-layer protocol for the exchange of objects, providing a model for object and
operation representation
Wireless Application Environment/Wireless Application Protocol (WAE/WAP)
WAE specifies an application framework for wireless devices and WAP is an open
standard to provide mobile users access to telephony and information services.[27]

7.2 Communication and connection

A master Bluetooth device can communicate with up to seven devices in a Wireless User Group.
This network group of up to eight devices is called a piconet. The devices can switch roles, by
agreement, and the slave can become the master at any time.

At any given time, data can be transferred between the master and one other device.
The master switches rapidly from one device to another in a round-robin fashion. Simultaneous
transmission from the master to multiple other devices is possible via broadcast mode, but not
used much.

The Bluetooth specification allows connecting two or more piconets together to form a
scatternet, with some devices acting as a bridge by simultaneously playing the master role in one
piconet and the slave role in another.

Many USB Bluetooth adapters are available, some of which also include an IrDA adapter. Older
(pre-2003) Bluetooth adapters, however, have limited services, offering only the Bluetooth
Enumerator and a less-powerful Bluetooth Radio incarnation. Such devices can link computers
with Bluetooth, but they do not offer much in the way of services that modern adapters do.

7.3 Baseband Error Correction

Three types of error correction are implemented in Bluetooth systems,

 1/3 rate forward error correction (FEC)


 2/3 rate FEC
 Automatic repeat-request (ARQ)

7.4 Setting up connections

Any Bluetooth device in discoverable mode will transmit the following information on demand:

 Device name
 Device class
 List of services
 Technical information (for example: device features, manufacturer, Bluetooth
specification used, clock offset)

Any device may perform an inquiry to find other devices to connect to, and any device can be
configured to respond to such inquiries. However, if the device trying to connect knows the
address of the device, it always responds to direct connection requests and transmits the
information shown in the list above if requested. Use of a device's services may require pairing
or acceptance by its owner, but the connection itself can be initiated by any device and held until
it goes out of range. Some devices can be connected to only one device at a time, and connecting
to them prevents them from connecting to other devices and appearing in inquiries until they
disconnect from the other device.

Every device has a unique 48-bit address. However, these addresses are generally not shown in
inquiries. Instead, friendly Bluetooth names are used, which can be set by the user. This name
appears when another user scans for devices and in lists of paired devices.

Most phones have the Bluetooth name set to the manufacturer and model of the phone by
default. Most phones and laptops show only the Bluetooth names and special programs are
required to get additional information about remote devices. This can be confusing as, for
example, there could be several phones in range named T610 (see Bluejacking).

7.5 Pairing
7.5.1 Motivation

Many of the services offered over Bluetooth can expose private data or allow the connecting
party to control the Bluetooth device. For security reasons it is therefore necessary to control
which devices are allowed to connect to a given Bluetooth device. At the same time, it is useful
for Bluetooth devices to automatically establish a connection without user intervention as soon
as they are in range.

To resolve this conflict, Bluetooth uses a process called pairing. Two devices need to be paired
once to communicate with each other; the pairing process is typically triggered automatically the
first time a device receives a connection request from a device it is not yet paired with. Once a
pairing has been established, it is remembered by the devices, which can then connect to each
without user intervention. When desired, the pairing relationship can later be removed by the
user.
7.5.2 Implementation

During the pairing process, the two devices involved establish a relationship by creating a shared
secret known as a link key. If a link key is stored by both devices they are said to be bonded. A
device that wants to communicate only with a bonded device can cryptographically authenticate
the identity of the other device, and so be sure that it is the same device it previously paired with.
Once a link key has been generated, an authenticated ACL link between the devices may be
encrypted so that the data that they exchange over the airwaves is protected against
eavesdropping.

Link keys can be deleted at any time by either device. If done by either device this will implicitly
remove the bonding between the devices; so it is possible for one of the devices to have a link
key stored but not be aware that it is no longer bonded to the device associated with the given
link key.

Bluetooth services generally require either encryption or authentication, and as such require
pairing before they allow a remote device to use the given service. Some services, such as the
Object Push Profile, elect not to explicitly require authentication or encryption so that pairing
does not interfere with the user experience associated with the service use-cases.

7.5.3 Pairing mechanisms

Pairing mechanisms have changed significantly with the introduction of Secure Simple Pairing in
Bluetooth 2.1. The following summarizes the pairing mechanisms:

 Legacy pairing: This is the only method available before Bluetooth 2.1. Each device
must enter a PIN code; pairing is only successful if both devices enter the same PIN code.
Any 16-byte UTF-8 string may be used as a PIN code, however not all devices may be
capable of entering all possible PIN codes.
o Limited input devices: The obvious example of this class of device is a
Bluetooth Hands-free headset, which generally have few inputs. These devices
usually have a fixed PIN, for example "0000" or "1234", that are hard-coded into
the device.
o Numeric input devices: Mobile phones are classic examples of these devices.
They allow a user to enter a numeric value up to 16 digits in length.
o Alpha-numeric input devices: PCs and smartphones are examples of these
devices. They allow a user to enter full UTF-8 text as a PIN code. If pairing with a
less capable device the user needs to be aware of the input limitations on the other
device, there is no mechanism available for a capable device to determine how it
should limit the available input a user may use.
 Secure Simple Pairing (SSP): This is required by Bluetooth 2.1. A Bluetooth 2.1 device
may only use legacy pairing to interoperate with a 2.0 or earlier device. Secure Simple
Pairing uses a form of public key cryptography, and has the following modes of
operation:
o Just works: As implied by the name, this method just works. No user interaction
is required; however, a device may prompt the user to confirm the pairing process.
This method is typically used by headsets with very limited IO capabilities, and is
more secure than the fixed PIN mechanism which is typically used for legacy
pairing by this set of limited devices. This method provides no man in the middle
(MITM) protection.
o Numeric comparison: If both devices have a display and at least one can accept a
binary Yes/No user input, they may use Numeric Comparison. This method
displays a 6-digit numeric code on each device. The user should compare the
numbers to ensure they are identical. If the comparison succeeds, the user(s)
should confirm pairing on the device(s) that can accept an input. This method
provides MITM protection, assuming the user confirms on both devices and
actually performs the comparison properly.
o Passkey Entry: This method may be used between a device with a display and a
device with numeric keypad entry (such as a keyboard), or two devices with
numeric keypad entry. In the first case, the display is used to show a 6-digit
numeric code to the user, who then enters the code on the keypad. In the second
case, the user of each device enters the same 6-digit number. Both cases provide
MITM protection.
o Out of band (OOB): This method uses an external means of communication
(such as NFC) to exchange some information used in the pairing process. Pairing
is completed using the Bluetooth radio, but requires information from the OOB
mechanism. This provides only the level of MITM protection that is present in the
OOB mechanism.

SSP is considered simple for the following reasons:

 In most cases, it does not require a user to generate a passkey.


 For use-cases not requiring MITM protection, user interaction has been eliminated.
 For numeric comparison, MITM protection can be achieved with a simple equality
comparison by the user.
 Using OOB with NFC will enable pairing when devices simply get close, rather than
requiring a lengthy discovery process.
7.5.4 Security Concerns

Prior to Bluetooth 2.1, encryption is not required and can be turned off at any time. Moreover,
the encryption key is only good for approximately 23.5 hours; using a single encryption key
longer than this time allows simple XOR attacks to retrieve the encryption key.

 Turning off encryption is required for several normal operations, so it is problematic to


detect if encryption is disabled for a valid reason or for a security attack.
 Bluetooth 2.1 addresses this in the following ways:
o Encryption is required for all non SDP (Service Discovery Protocol) connections
o A new Encryption Pause and Resume feature is used for all normal operations
requiring encryption to be disabled. This enables easy identification of normal
operation from security attacks.
o The encryption key is required to be refreshed before it expires.

Link keys may be stored on the device file system, not on the Bluetooth chip itself. Many
Bluetooth chip manufacturers allow link keys to be stored on the device; however, if the device
is removable this means that the link key will move with the device.
7.6 Air interface

The protocol operates in the license-free ISM band at 2.402-2.480 GHz.[28] To avoid interfering
with other protocols that use the 2.45 GHz band, the Bluetooth protocol divides the band into
79 channels (each 1 MHz wide) and changes channels up to 1600 times per second.
Implementations with versions 1.1 and 1.2 reach speeds of 723.1 kbit/s. Version 2.0
implementations feature Bluetooth Enhanced Data Rate (EDR) and reach 2.1 Mbit/s. Technically,
version 2.0 devices have a higher power consumption, but the three times faster rate reduces the
transmission times, effectively reducing power consumption to half that of 1.x devices (assuming
equal traffic load).

8 Security

8.1 Overview

Bluetooth implements confidentiality, authentication and key derivation with custom algorithms
based on the SAFER+ block cipher. In Bluetooth, key generation is generally based on a
Bluetooth PIN, which must be entered into both devices. This procedure might be modified if
one of the devices has a fixed PIN (e.g., for headsets or similar devices with a restricted user
interface). During pairing, an initialization key or master key is generated, using the E22
algorithm.[29] The E0 stream cipher is used for encrypting packets, granting confidentiality and is
based on a shared cryptographic secret, namely a previously generated link key or master key.
Those keys, used for subsequent encryption of data sent via the air interface, rely on the
Bluetooth PIN, which has been entered into one or both devices.

An overview of Bluetooth vulnerabilities exploits has been published by Andreas Becker.[30]

In September 2008, the National Institute of Standards and Technology (NIST) published a
Guide to Bluetooth Security that will serve as reference to organization on the security
capabilities of Bluetooth and steps for securing Bluetooth technologies effectively. While
Bluetooth has its benefits, it is susceptible to denial of service attacks, eavesdropping, man-in-
the-middle attacks, message modification, and resource misappropriation. Users/organizations
must evaluate their acceptable level of risk and incorporate security into the lifecycle of
Bluetooth devices. To help mitigate risks, included in the NIST document are security checklists
with guidelines and recommendations for creating and maintaining secure Bluetooth piconets,
headsets, and smart card readers.[31]

8.2 Bluejacking

Bluejacking is the sending of either a picture or a message from one user to an unsuspecting user
through Bluetooth wireless technology. Common applications include short messages (e.g.,
"You’ve just been bluejacked!"). [32] Bluejacking does not involve the removal or alteration of
any data from the device.
6.5 RELAY DRIVER CIRCUIT

Relay:

A relay is an electrically operated switch. Current flowing through the coil of the
relay creates a magnetic field which attracts a lever and changes the switch contacts.
The coil current can be on or off so relays have two switch positions and they are
double throw (changeover) switches. Relays allow one circuit to switch a second circuit
which can be completely separate from the first. For example a low voltage battery
circuit can use a relay to switch a 230V AC mains circuit. There is no electrical
connection inside the relay between the two circuits; the link is magnetic and
mechanical.

The coil of a relay passes a relatively large current, typically 30mA for a 12V
relay, but it can be as much as 100mA for relays designed to operate from lower
voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to
amplify the small IC current to the larger value required for the relay coil. The maximum
output current for the popular 555 timer IC is 200mA so these devices can supply relay
coils directly without amplification.

Relays are usually SPDT or DPDT but they can have many more sets of switch
contacts, for example relays with 4 sets of changeover contacts are readily available.
Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay. The animated
picture shows a working relay with its coil and switch contacts. You can see a lever on
the left being attracted by magnetism when the coil is switched on. This lever moves the
switch contacts. There is one set of contacts (SPDT) in the foreground and another
behind them, making the relay DPDT.

The relay's switch connections are usually labeled COM, NC and NO:

 COM = Common, always connect to this, it is the moving part of the switch.
 NC = Normally Closed, COM is connected to this when the relay coil is off.
 NO = Normally Open, COM is connected to this when the relay coil is on.
7.PCB DESIGN

Design and Fabrication of Printed circuit boards

7.1 INTRODUCTION:

Printed circuit boards, or PCBs, form the core of electronic equipment domestic
and industrial. Some of the areas where PCBs are intensively used are computers,
process control, telecommunications and instrumentation.

7.2 MANUFATCURING:

The manufacturing process consists of two methods; print and etch, and print,
plate and etch. The single sided PCBs are usually made using the print and etch
method. The double sided plate through – hole (PTH) boards are made by the print
plate and etch method.

The production of multi layer boards uses both the methods. The inner layers are
printed and etch while the outer layers are produced by print, plate and etch after
pressing the inner layers.

7.3 SOFTWARE:

The software used in our project to obtain the schematic layout is MICROSIM.
7.4 PANELISATION:

Here the schematic transformed in to the working positive/negative films. The circuit
is repeated conveniently to accommodate economically as many circuits as possible
in a panel, which can be operated in every sequence of subsequent steps in the
PCB process. This is called penalization. For the PTH boards, the next operation is
drilling.

7.5 DRILLING:

PCB drilling is a state of the art operation. Very small holes are drilled with high
speed CNC drilling machines, giving a wall finish with less or no smear or epoxy,
required for void free through hole plating.

7.6 PLATING:

The heart of the PCB manufacturing process. The holes drilled in the board are
treated both mechanically and chemically before depositing the copper by the electro
less copper platting process.

7.7 ETCHING:
Once a multiplayer board is drilled and electro less copper deposited, the image
available in the form of a film is transferred on to the out side by photo printing using a
dry film printing process. The boards are then electrolytic plated on to the circuit pattern
with copper and tin. The tin-plated deposit serves an etch resist when copper in the
unwanted area is removed by the conveyor’s spray etching machines with chemical
etch ants. The etching machines are attached to an automatic dosing equipment, which
analyses and controls etch ants concentrations
7.8 SOLDERMASK:

Since a PCB design may call for very close spacing between conductors, a
solder mask has to be applied on the both sides of the circuitry to avoid the bridging of
conductors. The solder mask ink is applied by screening. The ink is dried, exposed to
UV, developed in a mild alkaline solution and finally cured by both UV and thermal
energy.

7.9 HOT AIR LEVELLING:

After applying the solder mask, the circuit pads are soldered using the hot air
leveling process. The bare bodies fluxed and dipped in to a molten solder bath. While
removing the board from the solder bath, hot air is blown on both sides of the board
through air knives in the machines, leaving the board soldered and leveled. This is one
of the common finishes given to the boards. Thus the double sided plated through
whole printed circuit board is manufactured and is now ready for the components to be
soldered.
8 SOFTWARE TOOLS

8.1 KEIL C COMPILER:

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

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

 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.

 Numerous example programs are included to help you get started with the most
popular embedded 8051 devices.

 The Keil µVision Debugger accurately simulates on-chip peripherals (I²C, CAN,
UART, SPI, Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules)
of your 8051 device.
 Simulation helps you understand hardware configurations and avoids time
wasted on setup problems. Additionally, with simulation, you can write and test
applications before target hardware is available.
 When you are ready to begin testing your software application with target
hardware, use the MON51, MON390, MONADI, or FlashMON51 Target Monitors,
the ISD51 In-System Debugger, or the ULINK USB-JTAG Adapter to download and
test program code on your target system.

It's been suggested that there are now as many embedded systems in everyday use as
there are people on planet Earth. Domestic appliances from washing machines to TVs,
video recorders and mobile phones, now include at least one embedded processor.
They are also vital components in a huge variety of automotive, medical, aerospace and
military systems. As a result, there is strong demand for programmers with 'embedded'
skills, and many desktop developers are moving into this area.

Embedded C is designed for programmers with desktop experience in C, C++ or Java


who want to learn the skills required for the unique challenges of embedded systems.

The book and CD-ROM include the following key features:

8.2 Simulator:

The Keil hardware simulator for the popular 8051 microcontroller is on the CD-ROM so
that readers can try out examples from the book - and create new ones - without
requiring additional hardware.

All code is written in C, so no assembly language is required. Industry-standard C


compiler from Keil software is included on the CD-ROM, along with copies of code
examples from the book to get you up and running very quickly.

Key techniques required in all embedded systems are covered in detail, including the
control of port pins and the reading of switches.
A complete embedded operating system is presented, with full source code on the CD-
ROM.

Achieve outstanding application performance on Intel processors using Intel® C


Compiler for Windows*, including support for the latest Intel multi-core processors. For
out-of-the-box productivity, Intel C Compiler plugs into the Microsoft Visual Studio*
development environment for IA-32 and features a preview plug-in to the Microsoft
Visual Studio .NET environment

This chapter provides information about the C compiler, including operating


environments, standards conformance, organization of the compiler, and C-related
programming tools.

There are a number of tools available to aid in developing, maintaining, and improving
your C programs. The two most closely tied to C, c scope and lint, are described in this
book. In addition, a man page exists for each of these tools. Refer to the preface of this
book for a list of all the associated man pages.
9. ADVANTAGES

 Low cast.
 Low power consumption.
 Safe for industrial equipements.
 Compatible size.
 Reliability.
 Its very safe because of wilreless communication.

10. APPLICATIONS

 Used in industrial applications and Home applications.

 We can use it in any type of undustries.

 We can control the decices from any where with in 5 meters.


11. CONCLUSION

The progress in science & technology is a non-stop process. New things and

new technology are being invented. As the technology grows day by day, we can

imagine about the future in which thing we may occupy every place.

The proposed system based on Atmel microcontroller is found to be more

compact, user friendly and less complex, which can readily be used in order to perform.

Several tedious and repetitive tasks. Though it is designed keeping in mind about the

need for industry, it can extended for other purposes such as commercial & research

applications. Due to the probability of high technology (Atmel microcontroller) used this

“BLUETOOTH BASED HOME AUTOMATION” system is fully software controlled with

less hardware circuit. The feature makes this system is the base for future systems.
12. REFERENCES

MILL MAN J and HAWKIES C.C. “INTEGRATED


ELECTRONICS” MCGRAW HILL, 1972

ROY CHOUDHURY D, SHAIL JAIN, “ LINEAR INTEGRATED


CIRCUIT”, New Age International Publishers, New Delhi,2000

“THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM”


by Mohammad Ali Mazidi.

WEBSITES:

http://www.atmel.com/

http://www.microchip.com/

www.8052.com

http://www.beyondlogic.org

http://www.ctv.es/pckits/home.html

http://www.aimglobal.org/

Das könnte Ihnen auch gefallen