col.diesis using zigbee

94
ZIGBEE BASED SYNAESTHESIA ARADHANAYOGANAND HARINI VENKATACHALAM PURVA PAWAR SHWETHA JAGDISH

Upload: ace-khan

Post on 31-Oct-2014

112 views

Category:

Documents


2 download

DESCRIPTION

This system tries to identify the possibility of converting colour in accordance with sound. It is an effort to deal with the psychological challenges of blind people & their emotions. This system tries to explore different colours the blind person could not see or they have lost the possibility of seeing it. The system is based on synesthesia which means “stimulation of one sensory pathway leads to automatic experience in second pathway.

TRANSCRIPT

Page 1: Col.diesis using Zigbee

ZIGBEE BASED

SYNAESTHESIAARADHANAYOGANAND

HARINI VENKATACHALAM

PURVA PAWAR

SHWETHA JAGDISH

Page 2: Col.diesis using Zigbee

INDEX

SRNO TITLE PAGE NO

1 Abstract

2 Introduction

2.1 Concept of synaesthesia2.2 Application of synaesthesia2.3 Color blindness2.4 Vision of the color blind3 Different types of wireless connections

used

3.1 Comparison of WIFI, Bluetooth and Zigbee4 Basic components

4.1 Diodes4.2 Led’s4.3 Resistors4.4 Variable resistors4.5 Capacitors5 Power supply

5.1 5V Regulated power supply5.2 Circuit description5.3 Power supply design5.4 Design of step down transformer6 PIC 16f877A Microcontroller

6.1 Introduction6.2 High performance RISC CPU6.3 Peripheral features6.4 Analog features6.5 Special microcontroller features6.6 CMOS Technology6.7 PIC 16f877A Pin diagram 7 Serial communication

7.1 Max 2327.2 Pin diagram 7.3 Internal pin diagram8 Color sensors

8.1 Features of TCS23008.2 Description8.3 Functional block diagram8.4 Recognition color principle of sensor9 Zigbee

9.1 Zigbee network formation

Page 3: Col.diesis using Zigbee

9.2 Zigbee module 10 Voice processor

10.1 General description10.2 Block diagram of APR960010.3 Features10.4 Message management11 LCD

11.1 Features11.2 Pin diagram12 Block diagram

12.1 Synaesthesia12.2 Transmitter12.3 Receiver13 Circuit diagram

13.1 Transmitter13.2 Receiver14 PIC layout

14.114.2 PIC BASIC layout14.3 Voice processor layout14.4 Power supply layout15 Technical specifications

15.1 Power supply15.2 PIC 16f877A15.3 MAX RS 23215.4 Zigbee15.5 Color sensors15.6 LCD15.7 Voice processor16 Conclusion

SRNO TITLE PAGE NO

Vision of a color blind5.1 5V Regulated power supply5.2 Power supply circuit diagram5.3 Step down transformer showing magnetizing

flux in the core5.4 Full wave rectifier

Page 4: Col.diesis using Zigbee

5.5 Full wave rectifier5.6 IC 7805(Voltage regulator IC)6.1 PIC 16f877A Pin diagram7.1 Max RS 232 Pin diagram7.2 Max 232 internal pin diagram7.3 Max 232 logic diagram8.1 Color sensors8.2 Functional block diagram of TCS23008.3 Color sensors8.4 Graph8.5 Color sensor pin diagram9.1 Coordinator,Router and End device9.2 Zigbee module10.1 Block diagram of APR9600 11.1 LCD Display11.2 LCD Pin diagram12.1 Synaesthesia block diagram12.2 Power supply circuit diagram12.3 Transmitter block diagram12.4 Receiver block diagram13.1 Circuit diagram of Transmitter13.2 Circuit diagram of Receiver14.1 PIC BASIC Layout14.2 Voice processor layout14.3 Power supply layout

SRNO TITLE PAGE NO

Key charecteristics of wifi,Bluetooth and zigbee

5.1 Turns per volt values for 50 Hz6.1 PIC 16f877A Pin diagram description6.2 PIC 16f877A Pin diagram description6.3 PIC 16f877A Pin diagram description6.4 PIC 16f877A Pin diagram description7.1 RS 232 Pin diagram description8.1 TCS 2300 functional block diagram

description8.28.311.1 LCD Pin diagram description15.1 Power supply15.2 PIC 16f877A 15.3 Max RS 23215.4 Zigbee15.5 Color sensors15.6 LCD

Page 5: Col.diesis using Zigbee

15.7 Voice processor

Page 6: Col.diesis using Zigbee

1. ABSTRACT

This system tries to identify the possibility of converting colour in accordance

with sound. It is an effort to deal with the psychological challenges of blind

people & their emotions. This system tries to explore different colours the

blind person could not see or they have lost the possibility of seeing it. The

system is based on synesthesia which means “stimulation of one sensory

pathway leads to automatic experience in second pathway.

This system represents new way of understanding & self development through

music therapy for mainly blind children below 12years.

This portable system will be capable of detecting colour & transforming it into

sound. The concept of this system is a colour sensor that identifies colour &

transform this data into musical note. This system is flexible enough which

means the user can choose the best combination between colour & sound in

order to improve their communication with the environment.

Page 7: Col.diesis using Zigbee

2. INTRODUCTION:

2.1 THE CONCEPT OF SYNESTHESIA

Synesthesia is a condition in which one sense (for example, hearing) is simultaneously perceived as if by one or more additional senses such as sight. Another form of synesthesia joins objects such as letters, shapes, numbers or people's names with a sensory perception such as smell, color or flavor. The word synesthesia comes from two Greek words, syn (together) and aesthesis (perception). Therefore, synesthesia literally means "joined perception."

Estimates for the number of people with synesthesia range from 1 in 200 to 1 in 100,000. There are probably many people who have the condition but do not realize what it is.

Synesthesia can involve any of the senses. The most common form, colored letters and numbers, occurs when someone always sees a certain color in response to a certain letter of the alphabet or number. For example, a synesthete (a person with synesthesia) might see the word "plane" as mint green or the number "4" as dark brown.Synesthetic perceptions are specific to each person. Different people with synesthesia almost always disagree on their perceptions. In other words, if one synesthete thinks that the letter "q" is colored blue, another synesthete might see "q" as orange.

Synestetes tend to be

Women: in the U.S., studies show that three times as many women as men have synesthesia; in the U.K., eight times as many women have been reported to have it. The reason for this difference is not known.

Left-handed: synesthetes are more likely to be left-handed than the general population.

Neurologically normal: synesthetes are of normal (or possibly above average) intelligence, and standard neurological exams are normal.

In the same family: synesthesia appears to be inherited in some fashion; it seems to be a dominant trait and it may be on the X-chromosome.

Page 8: Col.diesis using Zigbee

2.2 APPLICATION OF THE CONCEPT

We as a group are applying the technique of synesthesia to mend the extrusions brought about to the people suffering from colour blindness. i.e. we are using the perceptional strength of sound to overcome the difficulties of sight. Hence, the user will be able to perceive two senses simultaneously, where in along with sight the person will be accompanied with the sense of sound.

Robotic and automated systems are becoming increasingly common in all

economic sectors. With rapid strides in technological advancement, more and

more applications have become possible. Colour as a means of assessing

quality is also gaining popularity amongst researchers.This paper focuses on

the use of low cost colour sensors.

This system tries to identify the possibility of converting colour in accordance

with sound. It is an effort to deal with the psychological challenges of colour

blind people & their emotions.

2.3 COLOUR BLINDNESS

Color blindness or color vision deficiency is the inability or decreased ability

to see color, or perceive color differences, under normal lighting conditions.

Color blindness affects many people in a population. "Color blind" is a term of

art; there is no actual blindness but there is a fault in the development of one

or more sets of retinal cones that perceive color in light and transmit that

information to the optic nerve. Color blindness is usually a sex-

linked condition. The genes that produce photo-pigments are carried on the X

chromosome; if some of these genes are missing or damaged, color blindness

will be expressed in males with a higher probability than in females because

males only have one X chromosome (in females, a good gene on only one of

the two X chromosomes is enough to yield the needed photo-pigments)

Most color vision problems are inherited and are present at birth.

Approximately 1 out of 12 males and 1 out of 20 women are color blind.

Page 9: Col.diesis using Zigbee

2.4 THE VISION OF A COLOUR BLIND:

A person with color-blindness has trouble seeing red, green, blue, or mixtures

of these colors. The most common type is red-green color-blindness, where

red and green are seen as the same color.

Here are some illustrations of the most common forms of color-blindness:

The colors of the rainbowThe colors of the rainbow

Normal color vision Deuteranope (simulation) i.e

Absence of green retinal receptors.

The colors of the rainbowProtanope The colours of the rainbow

simulation. i.e. absence of red Tritanope simulation. i.e.

retinal receptors Absence of blue retinal photoreceptors

Fig:2.1Vision of a color blind

Page 10: Col.diesis using Zigbee

3. DIFFERENT TYPES OF WIRELESS CONNECTIONS

USED

3.1 The COMPARISON OF WIFI, BLUETOOTH AND ZIGBEE:

In this context, I would like to introduce the comparison of Wi-Fi, Bluetooth

and ZigBee.

3.1.1. Wi-Fi

Wi-Fi is a trademark of the Wi-Fi Alliance that may be used with certified

products that belong to a class of wireless local area network (WLAN) devices

based on the IEEE 802.11 standards.

Wi-Fi allows local area networks (LANs) to be deployed without wires for

client devices, typically reducing the costs of network deployment and

expansion. Spaces where cables cannot be run, such as outdoor areas and

historical buildings, can host wireless LANs.

Wireless network adapters are now built into most laptops. The price of

chipsets for Wi-Fi continues to drop, making it an economical networking

option included in even more devices. Wi-Fi has become widespread in

corporate infrastructures.

A typical wireless router using 802.11b or 802.11g with a stock antenna might

have a range of 32 m (120 ft) indoors and 95 m (300 ft) outdoors. Due to reach

requirements for wireless LAN applications, power consumption is fairly high

compared to some other standards.

Page 11: Col.diesis using Zigbee

3.1.2. Bluetooth

Bluetooth is a standard and a communications protocol primarily designed for

low power consumption, with a short range (power-class-dependent: 100m,

10m and 1m, but ranges vary in practice) based on low-cost transceiver

microchips in each device. Bluetooth makes it possible for these devices to

communicate with each other when they are in range.

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

frequencies. Bluetooth provides a 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 through a secure, globally unlicensed

Industrial, Scientific and Medical (ISM) 2.4 GHz short-range radio frequency

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

Bluetooth exists in many products, such as telephones, 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).

Page 12: Col.diesis using Zigbee

3. 1.3. ZigBee

ZigBee is a low-cost, low-power, wireless mesh networking proprietary

standard. The low cost allows the technology to be widely deployed in

wireless control and monitoring applications, the low power-usage allows

longer life with smaller batteries, and the mesh networking provides high

reliability and larger range.

ZigBee operates in the industrial, scientific and medical (ISM) radio bands;

868 MHz in Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most

jurisdictions worldwide. The technology is intended to be simpler and less

expensive than other WPANs such as Bluetooth.

Because ZigBee can activate (go from sleep to active mode) in 15 msec or

less, the latency can be very low and devices can be very responsive —

particularly compared to Bluetooth wake-up delays, which are typically

around three seconds. Because ZigBees can sleep most of the time, average

power consumption can be very low, resulting in long battery life.

qZigBee protocols are intended for use in embedded applications requiring

low data rates and low power consumption. ZigBee’s current focus is to define

a general-purpose, inexpensive, self-organizing mesh network that can be used

for industrial control, embedded sensing, medical data collection, smoke and

intruder warning, building automation, home automation, etc. The resulting

network will use very small amounts of power – individual devices must have

a battery life of at least two years to pass ZigBee certification

Page 13: Col.diesis using Zigbee

ZigBee Wi-Fi Bluetooth

Range 10-100 meters 50-100 meters 10 – 100 meters

Networking Topology

Ad-hoc, peer to peer, star, or mesh

Point to hub Ad-hoc, very small networks

Operating Frequency

868 MHz (Europe)900-928 MHz (NA), 2.4 GHz (worldwide)

2.4 and 5 GHz 2.4 GHz

Complexity (Device and application impact)

Low High High

Power Consumption (Battery option and life)

Very low (low power is a design goal)

High Medium

Security 128 AES plus application layer security

64 and 128 bit encryption

Typical Applications

Industrial control and monitoring, sensor networks, building automation, home control and automation, toys, games

Wireless LAN connectivity, broadband Internet access

Wireless connectivity between devices such as phones, PDA, laptops, headsets

Table:3.1 The key characteristics of Zigbee, Wi-Fi and Bluetooth

Page 14: Col.diesis using Zigbee

4. BASIC COMPONENTS:

4.1. DIODES:

Diodes are components that allow current to flow in only one direction. They

have a positive side (leg) and a negative side. When the voltage on the positive

leg is higher than on the negative leg then current flows through the diode (the

resistance is very low). When the voltage is lower on the positive leg than on

the negative leg then the current does not flow (the resistance is very high).

The negative leg of a diode is the one with the line closest to it. It is called the

cathode. The postive end is called the anode.

4.2. LED

Light Emitting Diodes are great for projects because they provide visual

entertainment. LEDs use a special material which emits light when current

flows through it. Unlike light bulbs, LEDs never burn out unless their current

limit is passed. A current of 0.02 Amps (20 mA) to 0.04 Amps (40 mA) is a

good range for LEDs. They have a positive leg and a negative leg just like

regular diodes. To find the positive side of an LED, look for a line in the metal

inside the LED. It may be difficult to see the line. This line is closest to the

positive side of the LED. Another way of finding the positive side is to find a

flat spot on the edge of the LED. This flat spot is on the negative side.

When current is flowing through an LED the voltage on the positive leg is

about 1.4 volts higher than the voltage on the negative side. Remember that

there is no resistance to limit the current so a resistor must be used in series

with the LED to avoid destroying it.

4.3. RESISTORS:

Resistors are components that have a predetermined resistance. Resistance

determines how much current will flow through a component. Resistors are

used to control voltages and currents. A very high resistance allows very little

Page 15: Col.diesis using Zigbee

current to flow. Air has very high resistance. Current almost never flows

through air. (Sparks and lightning are brief displays of current flow through

air. The light is created as the current burns parts of the air.) A low resistance

allows a large amount of current to flow. Metals have very low resistance.

That is why wires are made of metal. They allow current to flow from one

point to another point without any resistance. Wires are usually covered with

rubber or plastic. This keeps the wires from coming in contact with other wires

and creating short circuits. High voltage power lines are covered with thick

layers of plastic to make them safe, but they become very dangerous when the

line breaks and the wire is exposed and is no longer separated from other

things by insulation.

Resistance is given in units of ohms. (Ohms are named after Mho Ohms who

played with electricity as a young boy in Germany.) Common resistor values

are from 100 ohms to 100,000 ohms. Each resistor is marked with colored

stripes to indicate it’s resistance. To learn how to calculate the value of a

resistor by looking at the stripes on the resistor, go to Resistor Values which

includes more information about resistors.

 

  4.4. VARIABLE RESISTOR:

Variable resistors are also common components. They have a dial or a knob

that allows you to change the resistance. This is very useful for many

situations. Volume controls are variable resistors. When you change the

volume you are changing the resistance which changes the current. Making the

resistance higher will let less current flow so the volume goes down. Making

the resistance lower will let more current flow so the volume goes up. The

value of a variable resistor is given as it’s highest resistance value. For

example, a 500 ohm variable resistor can have a resistance of anywhere

between 0 ohms and 500 ohms. A variable resistor may also be called a

potentiometer (pot for short).

Page 16: Col.diesis using Zigbee

4.5. CAPACITOR:

4.5.1 Ceramic capacitor:

A ceramic capacitor is a fixed capacitor with the ceramic material acting as the

dielectric. It is constructed of two or more alternating layers of ceramic and a

metal layer acting as the electrodes. The composition of the ceramic material

defines the electrical behavior and therefor the application of the capacitors

which are divided into two stability classes:

Class 1 ceramic capacitors with high stability and low losses for

resonant circuit application

Class 2 ceramic capacitors with high volumetric efficiency for buffer,

by-pass and coupling applications.

4.5.2 Electrolyte capacitor:

An electrolytic capacitor is a type of capacitor that uses an electrolyte (an

ionic conducting liquid) as one of its plates to achieve a larger capacitance per

unit volume than other types, but with performance disadvantages. All

capacitors conduct alternating current (AC) and block direct current (DC) and

can be used, amongst other applications, to couple circuit blocks allowing AC

signals to be transferred while blocking DC power, to store energy, and to

filter signals according to their frequency. The large capacitance of electrolytic

capacitors makes them particularly suitable for passing or bypassing low-

frequency signals and storing large amounts of energy. They are widely used

in power supplies and for decoupling unwanted AC components from DC

power connections.

Page 17: Col.diesis using Zigbee

5. POWER SUPPLY

There are many types of power supply. Most are designed to convert high

voltage AC mains electricity to a suitable low voltage supply for electronic

circuits and other devices. A power supply can be broken down into a series of

blocks, each of which performs a particular function.

5.1 5V regulated supply:

Fig:5.15V Regulated power supply

Each of the blocks is described in more detail below:

Transformer - steps down high voltage AC mains to low voltage AC.

Rectifier - converts AC to DC, but the DC output is varying.

Smoothing - smoothes the DC from varying greatly to a small ripple.

Regulator - eliminates ripple by setting DC output to a fixed

voltage.

5.2. Circuit description:

This circuit is a small +5V power supply, which is useful when experimenting

with digital electronics. Small inexpensive wall transformers with variable

output voltage are available from any electronics shop and supermarket. Those

transformers are easily available, but usually their voltage regulation is very

poor, which makes then not very usable for digital circuit experimenter unless

a better regulation can be achieved in some way. The following circuit is the

answer to the problem.

This circuit can give +5V output at about 150 mA current, but it can be

increased to 1 A when good cooling is added to 7805 regulator chip. The

circuit has over overload and terminal protection.

Page 18: Col.diesis using Zigbee

5.3. POWER SUPPLY DESIGN:

Fig: 5.2 Power supply circuit diagram

Power supply is the first and the most important part of our project. For our

project we

requires +5V regulated power supply with maximum current rating 500Ma.

Following basic building blocks are required to generate regulated power

supply.

5.3.1 Step down Transformer:

Step down transformer is the first part of regulated power supply. To step

down the mains 230VA.C. we require step down transformer.

Following are the main characteristic of electronic transformer.

1) Power transformers are usually designed to operate from source of

low impedance at a single freq.

2) It is required to construct with sufficient insulation of necessary

dielectric strength.

3) Transformer ratings are expressed in volt–amp. The volt-amp of

each secondary winding or windings are added for the total

secondary VA. To this are added the load losses.

4) Temperature rise of a transformer is decided on two well-known

factors i.e. losses on transformer and heat dissipating or cooling

facility provided unit.

Page 19: Col.diesis using Zigbee

5.3.2 TRANSFORMER: it is an electrical device that transfers energy from

one circuit to another by magnetic coupling with no moving parts. A

transformer comprises two or more coupled windings, or a single tapped

winding and, in most cases, a magnetic core to concentrate magnetic flux. An

alternating current in one winding creates a time-varying magnetic flux in the

core, which induces a voltage in the other windings. Transformers are used to

convert between high and low voltages, to change impedance, and to provide

electrical isolation between circuits simple transformer consists of two

electrical conductors called the primary winding and the secondary winding.

These two windings can be considered as a pair of mutually coupled coils.

Energy is coupled between the windings by the time-varying magnetic flux

that passes through (links) both primary and secondary windings.

Elementary analysis

Fig:5.3A step-down transformer showing magnetizing flux in the core

Page 20: Col.diesis using Zigbee

5.3.3 WORKING OF A STEP DOWN TRANSFORMER:

If a time-varying voltage is applied to the primary winding of turns, a

current will flow in it producing a magneto motive force (MMF). Just as an

electromotive force (EMF) drives current around an electric circuit, so MMF

tries to drive magnetic flux through a magnetic circuit. The primary MMF

produces a varying magnetic flux in the core, and, with an open circuit

secondary winding, induces a back electromotive force (EMF) in opposition to

. In accordance with Faraday's law of induction, the voltage induced across

the primary winding is proportional to the rate of change of flux:

     and     

where

vP and vS are the voltages across the primary winding and secondary

winding,

NP and NS are the numbers of turns in the primary winding and

secondary winding,

dΦP / dt and dΦS / dt are the derivatives of the flux with respect to time

of the primary and secondary windings.

Saying that the primary and secondary windings are perfectly coupled is

equivalent to saying that . Substituting and solving for the

voltages shows that:

    

where

vp and vs are voltages across primary and secondary,

Np and Ns are the numbers of turns in the primary and secondary ,

respectively.

Page 21: Col.diesis using Zigbee

Hence in an ideal transformer, the ratio of the primary and secondary voltages

is equal to the ratio of the number of turns in their windings, or alternatively,

the voltage per turn is the same for both windings. The ratio of the currents in

the primary and secondary circuits is inversely proportional to the turns ratio.

This leads to the most common use of the transformer: to convert electrical

energy at one voltage to energy at a different voltage by means of windings

with different numbers of turns. In a practical transformer, the higher-voltage

winding will have more turns, of smaller conductor cross-section, than the

lower-voltage windings.

The EMF in the secondary winding, if connected to an electrical circuit, will

cause current to flow in the secondary circuit. The MMF produced by current

in the secondary opposes the MMF of the primary and so tends to cancel the

flux in the core. Since the reduced flux reduces the EMF induced in the

primary winding, increased current flows in the primary circuit. The resulting

increase in MMF due to the primary current offsets the effect of the opposing

secondary MMF. In this way, the electrical energy fed into the primary

winding is delivered to the secondary winding.

For example, suppose a power of 50 watts is supplied to a resistive load from a

transformer with a turns ratio of 25:2.

P = EI (power = electromotive force × current)

50 W = 2 V × 25 A in the primary circuit

Now with transformer change:

50 W = 25 V × 2 A in the secondary circuit

5.3.4 Rectifier Unit:

Rectifier unit is a circuit which converts A.C. into pulsating D.C. Generally

semi-conducting diode is used as rectifying element due to its property of

conducting current in one direction only. Rectification is a process whereby

Page 22: Col.diesis using Zigbee

alternating current (AC) is converted into direct current (DC). Almost all

rectifiers comprise a number of diodes in a specific arrangement for more

efficiently converting AC to DC than is possible with just a single diode.

Rectification is commonly performed by semiconductor diodes.

Generally there are two types of rectifier.

Half wave rectifier

Full wave rectifier

In half wave rectifier only half cycle of mains A.C. is rectified so its efficiency

is very poor. So we use full wave bridge type rectifier, in which four diodes

are used. In each half cycle, two diodes conduct at a time and we get

maximum efficiency at o/p.

Fig:5.4 Full wave rectifier

Following are the main advantages and disadvantages of a full-wave bridge

type rectifier ckt.

Advantages:

1. The need of center tapped transformer is eliminated.

2. The o/p is twice that of center tap circuit for the same secondary

voltage.

3. The PIV rating of diode is half of the center tap circuit.

Disadvantages:

1. It requires four diodes.

2. As during each half cycle of A.C. input, two diodes are conducting

therefore voltage drop in internal resistance of rectifying unit will be twice

as compared to center tap circuit.

Page 23: Col.diesis using Zigbee

5.3.5 Filter Circuit :

Generally a rectifier is required to produce pure D.C. supply for using at

various places in the electronic circuit. However, the o/p of rectifier has

pulsating character i.e. if such a D.C. is applied to electronic circuit it will

produce a hum i.e. it will contain A.C. and D.C. components. The A.C.

components are undesirable and must be kept away from the load. To do so a

filter circuit is used which removes (or filters out) the A.C. components

reaching the load. Obviously a filter circuit is installed between rectifier and

voltage regulator. In our project we use capacitor filter because of its low cost,

small size and little weight and good characteristic. Capacitors are connected

in parallel to the rectifier o/p because it passes A.C. but does not pass D.C. at

all.

Output smoothing:

For many applications, especially with single phase AC where the full-wave

bridge serves to convert an AC input into a DC output, the addition of a

capacitor may be important because the bridge alone supplies an output

voltage of fixed polarity but pulsating magnitude (see photograph above).

Fig:5.5 Full wave rectifier

The function of this capacitor, known as a 'smoothing capacitor' is to lessen

the variation in (or 'smooth') the raw output voltage waveform from the bridge.

One explanation of 'smoothing' is that the capacitor provides a low impedance

path to the AC component of the output, reducing the AC voltage across, and

Page 24: Col.diesis using Zigbee

AC current through, the resistive load. In less technical terms, any drop in the

output voltage and current of the bridge tends to be cancelled by loss of charge

in the capacitor. This charge flows out as additional current through the load.

Thus the change of load current and voltage is reduced relative to what would

occur without the capacitor. Increases of voltage correspondingly store excess

charge in the capacitor, thus moderating the change in output voltage / current.

5.3.6 Three Terminal Voltage Regulator:

A voltage regulator is a ckt that supplies constant voltage regardless of change

in load current. IC voltage regulators are versatile and relatively cheaper. The

7800 series consists of three terminal positive voltage regulator. These ICs are

designed as fixed voltage regulator and with adequate heat sink, can deliver

o/p current in excess of 1A. These devices do not require external component.

This IC also has internal thermal overload protection and internal short circuit

and current limiting protection. For our project we use 7805 voltage regulator

IC.

"Fixed" three-terminal linear regulators are commonly available to generate

fixed voltages of plus 3 V, and plus or minus 5 V, 9 V, 12 V, or 15 V when the

load is less than about 7 amperes.The "78" series (7805, 7812, etc.) regulate

positive voltages

5.3.7 Summary of circuit features:

Brief description of operation: Gives out well regulated +5V output,

output current capability of 100 mA

Circuit protection: Built-in overheating protection shuts down output

when regulator IC gets too hot

Circuit complexity: Very simple and easy to build

Circuit performance: Very stable +5V output voltage, reliable

operation

Availability of components: Easy to get, uses only very common basic

components

Page 25: Col.diesis using Zigbee

Design testing: Based on datasheet example circuit, I have used this

circuit successfully as part of many electronics projects

Applications: Part of electronics devices, small laboratory power

supply

Power supply voltage: Unregulated DC 8-18V power supply

Power supply current: Needed output current + 5 mA

Component costs: Few for the electronics components + the input

transformer cost

5.4 Design of Step down Transformer:

The following information must be available to the designer before he

commences for the design of transformer.

1) Power Output.

2) Operating Voltage.

3) Frequency Range.

4)Efficiency and Regulation.

Size of core:

Size of core is one of the first considerations in regard of weight and

volume of transformer. This depends on type of core and winding

configuration used. Generally following formula is used to find area or size of

core.

Ai = P1

-----------

0.87

Page 26: Col.diesis using Zigbee

Ai = Area of cross - section in Sq. cm. and

P1 = Primary voltage.

In transformer P1 = P2

For our project we required +5V regulated output. So transformer

secondary rating is 12V, 500mA.

So secondary power wattage is,

P2 = 12 x 500 x 10-3

w.

= 6w.

6

0.87

So Ai = 2.62

Generally 10% of area should be added to core to accommodate all

turns for low Iron losses and compact size.

So Ai = 2.88.

Page 27: Col.diesis using Zigbee

Turns per volt :-

Turns per volt of transformer are given by relation

10,000

Turns / Volt = -----------------------

4.44 f Bm Ai

Here,

f is the frequency in Hz

Bm is flux density in Wb/m2

Ai is net area of cross section.

Following table gives the value of turns per volt for 50 Hz frequency.

Flux density Wb/m2 1.14 1.01 0.91 0.83 0.76

Turns per volt 40/Ai 45/Ai 50/Ai 55/Ai 60/Ai

Table: 5.1 TURNS PER VOLT VALUES FOR 50 Hz.

Generally lower the flux density better be quality of transformer.

For project for 50 Hz the turns per Volt for 0.91 Wb/m2 from above

table.

Page 28: Col.diesis using Zigbee

Turns per Volt = 50 / Ai

= 50

2.88

17

Thus for Primary winding = 220 x 17 = 3800.

& for Secondary winding = 12 x 17 = 204.

Wire size:-

As stated above size depends upon the current to be carried out by the

winding, which depends upon current density of 3.1 A/mm2. For less copper

losses 1.6 A/mm2 or 2.4 A/mm2 may be used. Generally even size gauge of

wire are used.

Rectifier Design:-

R.M.S. Secondary voltage at secondary of transformer is 12

So maximum voltage Vm across Secondary is

= Rms. Voltage x 2

= 12 x 2

= 16.9

Page 29: Col.diesis using Zigbee

D.C. O/p Voltage at rectifier O/p is

2 Vm

Vdc = ----------

2 x 16.97

= -----------------------

= 10.80 V

PIV rating of each diode is

PIV = 2 Vm.

= 2 x 16.97

= 34 V

& maximum forward current which flow from each diode is 500mA.

So from above parameter we select diode IN 4007 from diode selection

manual.

Page 30: Col.diesis using Zigbee

Design of Filter Capacitor

Formula for calculating filter capacitor is,

1

C = ----------------------

43 r f RL.

r = ripple present at o/p of rectifier.

(Which is maximum 0.1 for full wave rectifier.)

F = frequency of mains A.C.

RL = I/p impedance of voltage regulator IC.

1

C = ------------------------------

43 x 0.1 x 50 x 28

= 1030 f

1000 f.

And voltage rating of filter capacitor is double of Vdc i.e. rectifier o/p which is

20V. So we choose 1000 f / 25V filter capacitor.

Page 31: Col.diesis using Zigbee

IC 7805 (Voltage Regulator IC.)

1 2 3

Fig:5.6 IC 7805 (Voltage regulator IC)

Page 32: Col.diesis using Zigbee

6. PIC 16F877A MICROCONTROLLERS

6.1. INTRODUCTION:

6.2. HIGH PERFORMANCE RISC CPU:

Only 35 single-word instructions to learn

All single-cycle instructions except for program branches, which are

two-cycle

Operating speed: DC – 20 MHz clock input DC – 200 ns instruction

cycle

Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes

of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data

Memory

Pinout compatible to other 28-pin or 40/44-pin PIC16CXXX and

PIC16FXXX microcontrollers

6.3. PERIPHERAL FEATURES:

Timer0: 8-bit timer/counter with 8-bit prescaler

Timer1: 16-bit timer/counter with prescaler, can be incremented during

Sleep via external crystal/clock

Timer2: 8-bit timer/counter with 8-bit period register, prescaler and

postscaler

Two Capture, Compare, PWM modules

• Capture is 16-bit, max. resolution is 12.5 ns

• Compare is 16-bit, max. resolution is 200 ns

• PWM max. resolution is 10-bit

Synchronous Serial Port (SSP) with SPI™ (Master mode) and I2C™

(Master/Slave)

Universal Synchronous Asynchronous Receiver Transmitter

(USART/SCI) with 9-bit address detection

Parallel Slave Port (PSP) – 8 bits wide with external RD, WR and CS

controls (40/44-pin only)

Page 33: Col.diesis using Zigbee

Brown-out detection circuitry for Brown-out Reset (BOR)

6.4. ANALOG FEATURES:

10-bit, up to 8-channel Analog-to-Digital Converter (A/D)

Brown-out Reset (BOR)

Analog Comparator module with:

• Two analog comparators

• Programmable on-chip voltage reference (VREF) module

• Programmable input multiplexing from device inputs and

internal voltage reference

• Comparator outputs are externally accessible

6.5. SPECIAL MICROCONTROLLER FEATURES:

100,000 erase/write cycle Enhanced Flash program memory typical

1,000,000 erase/write cycle Data EEPROM memory typical

Data EEPROM Retention > 40 years

Self-reprogrammable under software control

In-Circuit Serial Programming™ (ICSP™) via two pins

Single-supply 5V In-Circuit Serial Programming

Watchdog Timer (WDT) with its own on-chip RC oscillator for

reliable operation

Programmable code protection

Power saving Sleep mode

Selectable oscillator options

In-Circuit Debug (ICD) via two pins

6.6. CMOS TECHNOLOGY:

Low-power, high-speed Flash/EEPROM technology

Fully static design

Wide operating voltage range (2.0V to 5.5V)

Commercial and Industrial temperature ranges

Low-power consumption

Page 34: Col.diesis using Zigbee

6.7. PIC16F877A PIN DAIGRAM

Fig:6.1 PIC 16F877A Pin Diagram

PIC16F877A PIN DESCRIPTION:

PIN NAME PIN NO. DESCRIPTION

OSC1/CLKIOSC1

CLKI

13 Oscillator crystal or external clock input.Oscillator crystal input or external clock source input. ST buffer when configured in RC mode; otherwise CMOS.External clock source input. Always associated with pin function OSC1

OSC2/CLKOOSC2

CLKO

14 Oscillator crystal or clock output.Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode.In RC mode, OSC2 pin outputs CLKO, which has 1/4 the frequency of OSC1 and denotes the instruction cycle rate.

MCLR/VPPMCLRVPP

1 Master Clear (input) or programming voltage (output).Master Clear (Reset) input. This pin is an active low Reset to the device.Programming voltage input.

Page 35: Col.diesis using Zigbee

PIN NAME PIN NO. DESCRIPTION

RA0/AN0RA0AN0

2Digital I/OAnalog input 0

RA1/AN1RA1AN1

3Digital I/OAnalog input 1

RA2/AN2RA2AN2

4Digital I/OAnalog input 0

RA3/AN3RA3AN3

5Digital I/OAnalog input 3

RA4 6 Digital I/O

RA5/AN4RA5AN4

7Digital I/OAnalog input 4

RE0/RD/AN5RE0RDAN5

8Digital I/O.Read control for Parallel Slave Port.Analog input 5

RE1/WR/AN6RE1WRAN6

9Digital I/O.Write control for Parallel Slave Port.Analog input 6

RE2/CS/AN7RE2CSAN7

10Digital I/O.Chip select control for Parallel Slave Port.Analog input 7

Page 36: Col.diesis using Zigbee

PIN NAME PIN NO DESCRIPTION

VDD 11,32 Ground reference for logic and I/O pins.

VSS 12,31 Positive supply for logic and I/O pins.

RC0 15 Digital I/O

RC1 16 Digital I/O

RC2 17 Digital I/O

RC3 18 Digital I/O

RD0/PSP0RD0PSP0

19Digital I/O.Parallel Slave Port data.

RD1/PSP1RD1PSP1

20Digital I/O.Parallel Slave Port data.

RD2/PSP2RD2PSP2

21Digital I/O.Parallel Slave Port data.

RD3/PSP3RD3PSP3

22Digital I/O.Parallel Slave Port data.

RC4 23 Digital I/O

RC5 24 Digital I/O

RC6 25 Digital I/O

Page 37: Col.diesis using Zigbee

PIN NAME PIN NO DESCRITION

RC7 26 Digital I/O

RD4/PSP4RD4PSP4

27Digital I/O.Parallel Slave Port data.

RD5/PSP5RD5PSP5

28Digital I/O.Parallel Slave Port data.

RD6/PSP6RD6PSP6

29Digital I/O.Parallel Slave Port data.

RD7/PSP7RD7PSP7

30Digital I/O.Parallel Slave Port data.

RB0 33 Digital I/O.

RB1 34 Digital I/O.

RB2 35 Digital I/O.

RB3 36 Digital I/O.

RB4 37 Digital I/O.

RB5 38 Digital I/O.

RB6 39 Digital I/O.

RB7 40 Digital I/O.

Page 38: Col.diesis using Zigbee

7. SERIAL COMMUNICATION

The Serial communication is used to transfer data between the mobile device

and the microcontroller. MAX RS232 is used for this purpose.

7.1. MAX 232:

The MAX232 was the first IC which in one package contains the necessary

drivers (two) and receivers (also two), to adapt the RS-232 signal voltage

levels to TTL logic. It became popular, because it just needs one voltage

(+5V) and generates the necessary RS-232 voltage levels (approx. -10V and

+10V) internally. This greatly simplified the design of circuitry. The MAX232

has a successor, the MAX232A. It should be noted that the MAX232 (A) is

just a driver/receiver. It does not generate the necessary RS-232 sequence of

marks and spaces with the right timing, it does not decode the RS-232 signal,it

does not provide a serial/parallel conversion. All it does is to convert signal

voltage levels. Generating serial data with the right timing and decoding serial

data has to be done by additional circuitry.

The original manufacturer offers a large series of similar ICs, with different

numbers of receivers and drivers, voltages, built-in or external capacitors, etc.

E.g. The MAX232 and MAX232A need external capacitors for the internal

voltage pump, while the MAX233 has these capacitors built-in.

The MAX232 is a dual driver/receiver that includes a capacitive voltage

generator to supply TIA/EIA-232-Fvoltage levels from a single 5-V supply.

Each receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS

levels.These receivers have a typical threshold of 1.3 V, a typical hysteresis of

0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input

levels into TIA/EIA-232-F levels.

Meets or Exceeds TIA/EIA-232-F and ITU

Recommendation V.28

Operates From a Single 5-V Power Supply

With 1.0-_F Charge-Pump Capacitors

Operates Up To 120 kbit/s

Page 39: Col.diesis using Zigbee

Two Drivers and Two Receivers

±30-V Input Levels

Low Supply Current 8 mA Typical

ESD Protection Exceeds JESD 222000-V Human-Body Model (A114-

A)

Upgrade With Improved ESD (15-kV HBM) and 0.1-_F Charge-Pump

Capacitors is available With the MAX202

Applications

TIA/EIA-232-F, Battery-Powered Systems,Terminals, Modems, and

Computers

7.2. PIN DIAGRAM:

Fig:7.1 MAX RS232 Pin Diagram

PIN DIAGRAM DESCRIPTION :

Page 40: Col.diesis using Zigbee

PIN NAME PIN NO DESCRIPTION

C1+ 1 Capacitor connection pins

VS+ 2

C1- 3 Capacitor connection pins

C2+ 4 Capacitor connection pins

C2- 5 Capacitor connection pins

VS- 6

T2OUT 7 Output pin; outputs the serially

transmitted data at RS232 logic

level; connected to receiver pin of

PC serial port 

R2IN 8 Input pin; receives serially

transmitted data at RS 232 logic

level; connected to transmitter pin

of PC serial port

R2OUT 9 Output pin; outputs the serially

transmitted data at TTL logic level;

connected to receiver pin of

controller.

T2IN 10 Input pins; receive the serial data at TTL logic level; connected to serial transmitter pin of controller.

T1IN 11 Input pins; receive the serial data at TTL logic level; connected to serial transmitter pin of controller.

R1OUT 12 Output pin; outputs the serially

transmitted data at TTL logic level;

connected to receiver pin of

controller.

R1IN 13 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port

T1OUT 14 Output pin; outputs the serially

transmitted data at RS232 logic

level; connected to receiver pin of

Page 41: Col.diesis using Zigbee

PC serial port

GND 15 Ground (0V)

VCC 16 Supply voltage; 5V (4.5V – 5.5V)

Table: 7.1 RS 232 PIN diagram description

7.3. PIN INTERNAL DIAGRAM:

Fig7.2. MAX 232 Pin internal Diagram

Fig:7.3.MAX 232 Logic Diagram

In telecommunications, RS-232 (Recommended Standard 232) is a standard

for serial binary data signals connecting between a DTE (Data terminal

Page 42: Col.diesis using Zigbee

equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly

used in computer serial ports. The RS-232 standard defines the voltage levels

that correspond to logical one and logical zero levels. The standard has been

renamed several times during its history as the sponsoring organization

changed its name, and has been variously known as EIA RS 232, EIA 232,

and most recently as TIA 232. Valid signals are plus or minus 3 to 15 volts.

The range near zero volts is not a valid RS-232 level; logic one is defined as a

negative voltage, the signal condition is called marking, and has the functional

significance of OFF. Logic zero is positive, the signal condition is spacing,

and has the function ON. The standard specifies a maximum open-circuit

voltage of 25 volts. The region -3 to +3 is called as a dead band, since the

voltages are undefined in this region. For this reason to use RS232 to any

microcontroller we must first use voltage converters like MAX232 to convert

TTL logic to RS232 logic and vice versa. Such chips are commonly known as

line drivers.

A standard serial interfacing for PC, RS232C, requires negative logic, i.e.,

logic '1' is -3V to -12V and logic '0' is +3V to +12V. To convert TTL logic,

say, txd and rxd pins of the uc chips, thus need a converter chip. A MAX232

chip has long been using in many uc boards. It provides 2-channel RS232C

port and requires external 10uf capacitors. This I.C. also includes two

receivers and two transmitters in the same package. This is useful in many

cases when you only want to use the Transmit and Receive data Lines. You

don't need to use two chips, one for the receive line and one for the

transmission.

8. COLOUR SENSORS

Page 43: Col.diesis using Zigbee

Fig:8.1 Colour Sensors

8.1. FEATURES OF TCS3200:

High-Resolution Conversion of Light

Intensity to Frequency

Programmable Color and Full-Scale Output

Frequency

Communicates Directly With a Microcontroller

Single-Supply Operation (2.7 V to 5.5 V)

Power Down Feature

Nonlinearity Error Typically 0.2% at 50 kHz

Stable 200 ppm/°C Temperature Coefficient

Low-Profile Surface-Mount Package

8.2. DESCRIPTION:

TCS3200 Color Sensor is a complete color detector, including a TAOS

TCS3200 RGB sensor chip and 4 white LEDs. The TCS3200 can detect and

measure a nearly limitless range of visible colors. Applications include test

strip reading, sorting by color, ambient light sensing and calibration and color

matching, to name just a few. .

The TCS3200 has an array of photodetectors, each with either a red, green, or

blue filter, or no filter (clear). The filters of each color are distributed evenly

throughout the array to eliminate location bias among the colors. Internal to

Page 44: Col.diesis using Zigbee

the device is an oscillator which produces a square-wave output whose

frequency is proportional to the intensity of the chosen color.

8.3. FUNCTIONAL BLOCK DIAGRAM:

Fig:8.2. Functional block diagram

The TCS230 programmable color light-to-frequency converter combines

configurable silicon photodiodes and a current-to-frequency converter on

single monolithic CMOS integrated circuit. The output is a square wave (50%

duty cycle) with frequency directly proportional to light intensity (irradiance).

The full-scale output frequency can be scaled by one of three preset values via

two control input pins. Digital inputs and digital output allow direct interface

to a microcontroller or other logic circuitry. Output enable (OE) places the

output in the high-impedance state for multiple-unit sharing of a

microcontroller input line.The light-to-frequency converter reads an 8 x 8

array of photodiodes. Sixteen photodiodes have blue filters, 16 photodiodes

have green filters, 16 photodiodes have red filters, and 16 photodiodes are

clear with no filters.

The four types (colors) of photodiodes are interdigitated to minimize the effect

of non-uniformity of incident irradiance. All 16 photodiodes of the same color

are connected in parallel and which type of photodiode the device uses during

operation is pin-selectable. Photodiodes are 120 mm x 120 mm in size and are

on 144-mm centers.

Page 45: Col.diesis using Zigbee

Fig:8.3. Colour sensor

The TCS3200 Colour sensor makes use of a TAOS TCS3200 RGB light-to-

frequency chip. The TCS3200 colour sensor operates by illuminating the

object with two white LEDs, while an array of photo detectors (each with a

red, green, blue and clear filter) interpret the colour being reflected by means

of a square wave output whose frequency is proportional to the light reflected.

The TSC3200 Colour sensor has a 5.6-mm lens, which is positioned to allow

an area of 3.5 mm2 to be viewed. A USB4000 spectrometer (Ocean Optics

Inc., FL, USA) was used to find the height at which the greatest intensity

oflight occurred when the RGB sensor was placed above a sample. As the two

white LEDs are directed down at an angle, there is a point where the light

intensity is the greatest. This position was 20 mm above the surface of the

sample, as shown

Fig:8.4

Light absorbed from TCS3200 across the white LED light spectrum when the sensor is

positioned at 6 different heights.

Page 46: Col.diesis using Zigbee

Since the TCS3200 is mounted 20 mm above the sample, and therefore not in

direct contact with the sample, it was more suited for our application than the

full contact required by the ColorPAL sensor.

Fig:8.5. Colour sensor pin diagram

FUNCTIONAL BLOCK DIAGRAM:

PIN NAME PIN NO DESCRIPTION

GND 1 Power supply ground

OUT 2 Output frequency

S2 3 Photodiode type selection input

S3 4 Photodiode type selection input

VCC 5 Supply voltage: 2.7V – 5V

VCC 6 Supply voltage: 2.7V – 5V

S1 7 Output frequency scaling selection inputs

S0 8 Output frequency scaling selection inputs

LED 9 Led control 1:LED on 0:LED off

GND 10 Power supply ground

Table:8.1TCS 2300 Functional block diag description

Page 47: Col.diesis using Zigbee

8.4. RECOGNITION COLOR PRINCIPLE OF SENSOR:

To TCS3002D, when choose a color filter, it can allow only one particular

color to get through and prevent other color. For example, when choose the

red filter, Only red incident light can get through, blue and green will be

prevented. So we can get the red light intensity. Similarly ,when choose other

filters we can get blue or green light.

TCS3002D has four photodiode types. Red , blue, green and clear, reducing

the amplitude of the incident light uniformity greatly, so that to increase the

accuracy and simplify the optical. When the light project to the TCS3002D we

can choose the different type of photodiode by different combinations of S2

and S3. Look at the form as follows.

Table: 8.2

TCS3002D can output the frequency of different square wave (occupies

emptiescompared 50%),different color and light intensity correspond with

different frequency of square wave. There is a relationship between the output

and light intensity. The range of the typical output frequency is

2HZ~500KHZ. We can get different scaling factor by different combinations

of S0 and S1. Look at the form as follows.

Table:8.3

Page 48: Col.diesis using Zigbee

9. ZIGBEE

ZigBee is a low-cost, low-power, wirelessmesh networking standard. First, the low cost allows the technology to be widely deployed in wireless control and monitoring applications. Second, the low power-usage allows longer life with smaller batteries. Third, the mesh networking provides high reliability and more extensive range.

9.1. ZigBee Network Formation

Zigbee networks are called personal area networks (PAN). Each network contains a 16-bit identifier called a PAN ID. ZigBee defines three different device types – coordinator, router, and end device.

Fig:9.1 Coordinator, Router and End device

9.1.1. Coordinator – Responsible for selecting the channel and PAN ID. The coordinator starts a new PAN. Once it has started a PAN, the coordinator can allow routers and end devices to join the PAN.The coordinator can transmit and receive RF data transmissions, and it can assist in routing data through the mesh network. Coordinators are not intended to be battery-powered devices. Since the coordinator must be able to allow joins and/or route data, it should be mains powered.

9.1.2. Router – A router must join a ZigBee PAN before it can operate. After joining a PAN, the router can allow other routers and end devices to join the PAN. The router can also transmit and receiveRF data transmissions, and it can route data packets through the network. Since routers can allow joins and participate in routing data, routers cannot sleep and should be mains powered.

9.1.3. End Device – An end device must join a ZigBee PAN, similar to a router. The end device, however, cannot allow other devices to join the PAN, nor can it assist in routing data through the network. An end device can transmit or receive RF data transmissions. End devices are intended to be battery powered devices. Since the end device may sleep, the router or coordinator that allows the end device to join must collect all data packets intended for the end device, and buffer them until the end device wakes and is able to receive them. The router or coordinator thatallowed the end device to join and that manages RF data on behalf of the end device is known as the end device’s parent. The end device is considered a child of its parent.

Page 49: Col.diesis using Zigbee

9.2. ZIGBEE MODULE

Fig 9.2 ZigBee module

ZigBee 802.15.4 OEM RF module is used for embedded solutions providing wireless end-point connectivity to devices. This is an ideal module for robots to PC or robots to robots communication. This module can give range of 30 meters indoor or 100 meters outdoor. This XBee wireless device can be directly connected to the serial port (at 3.3V level) of your microcontroller. By using a logic level translator it can also be interfaced to 5V logic (TTL) devices having serial interface. This module supports data rates of up to 115kbps. It has indoor range of 30 meters and outdoor RF line-of-sight range of up to 100 meters. These modules use the IEEE 802.15.4 networking protocol for fast point-to-multipoint or peer-to-peer networking. They are designed for high-throughput applications requiring low latency and predictable communication timing.

Features

Supported Network Topologies: Point-to-point, Point-to-multipoint &Peer-to-

peer

Number of Channels: (software selectable) 16 Direct Sequence Channels

Addressing Options: PAN ID, Channel and Addresses

Addressing: 65000 network address available for each channel

Extensive command set

Page 50: Col.diesis using Zigbee

10. VOICE PROCESSOR

10.1. General Description

The APR9600 device offers true single-chip voice recording, non-volatile

storage, and playback capability for 40 to 60 seconds. The device supports

both random and sequential access of multiple messages. Sample rates are

user-selectable, allowing designers to customize their design for unique

quality and storage time needs. Integrated output amplifier, microphone

amplifier, and AGC circuits greatly simplify system design. The device is

ideal for use in portable voice recorders, toys, and many other consumer and

industrial applications.

APLUS integrated achieves these high levels of storage capability by using its

proprietary analog/multilevel storage technology implemented in an advanced

Flash non-volatile memory process, where each memory cell can store 256

voltage levels. This technology enables the APR9600 device to reproduce

voice signals in their natural form. It eliminates the need for encoding and

compression, which often introduce distortion.

Page 51: Col.diesis using Zigbee

10.2. BLOCK DIAGRAM OF APR9600

Fig:10.1 Block diagram of APR9600

A differential microphone amplifier, including integrated AGC, is included

on-chip for applications requiring its use. The amplified microphone signal is

fed into the device by connecting the Ana_Out pin to the Ana_In pin through

an external DC blocking capacitor. Recording can be fed directly into the

Ana_In pin through a DC blocking capacitor, however, the connection

between Ana_In and Ana_Out is still required for playback. The next block

encountered by the input signal is internal anti-aliasing filter. The filter

automatically adjusts its response according to the sampling frequency

selected so Shannon’s Sampling Theorem is satisfied. After anti-aliasing

filtering is accomplished the signal is ready to be clocked into the memory

array. This storage is accomplished through acombination of the Sample and

Hold circuit and the Analog Write/Read circuit. These circuits are clocked by

either theInternal Oscillator or an external clock source. When playback is

desired the previously stored recording is retrieved from memory, low pass

filtered, and amplified as shown on the right hand side of the diagram. The

Page 52: Col.diesis using Zigbee

signal can be heard by connecting a speaker to the SP+ and SP- pins. Chip-

wide management is accomplished through the device control block shown in

the upper right hand corner. Message management is controlled through the

message control block represented in the lower center of the block diagram.

10.3. Features

• Single-chip, high-quality voice recording & playback solution

- No external ICs required

- Minimum external components

• Non-volatile Flash memory technology

- No battery backup required

• User-Selectable messaging options

- Random access of multiple fixed-duration messages

- Sequential access of multiple variable-duration messages

• User-friendly, easy-to-use operation

- Programming & development systems not required

- Level-activated recording & edge-activated play back switches

• Low power consumption

- Operating current: 25 mA typical

- Standby current: 1mA typical

- Automatic power-down

• Chip Enable pin for simple message expansion

10.4 Message Management (General Description)

Playback and record operations are managed by on chip circuitry. There are

several available messaging modes depending upon desired operation. These

message modes determine message management style, message length, and

external parts count. Therefore, the designer must select the appropriate

Page 53: Col.diesis using Zigbee

operating mode before beginning the design. Operating modes do not affect

voice quality; for information on factors affecting quality refer to the

Sampling Rate & Voice Quality section.

• Random access mode with 2, 4, or 8 fixed-duration messages

• Tape mode, with multiple variable-duration messages, provides two options:

- Auto rewind

- Normal

Modes cannot be mixed. Switching of modes after the device has recorded an

initial message is not recommended. If modes are switched after an initial

recording has been made some unpredictable message fragments from the

previous mode may remain present, and be audible on playback, in the new

mode. These fragments will disappear after a record operation in the newly

selected mode. An important feature of the APR9600 message management

capabilities is the ability to audibly prompt the user to changes in the device’s

status through the use of “beeps” superimposed on the device’s output. This

feature is enabled by asserting a logic high level on the BE pin.

Page 54: Col.diesis using Zigbee

11. LCD DISPLAY

Various display device such as seven segment display. LCD display, etc can be interfaced with microcontroller to read the output directly. In our project we use a two line LCD display with 16 characters each.

Fig:11.1 LCD Display

11.1. FEATURES• 5 x 8 dots with cursor• Built-in controller (KS 0066 or Equivalent)• + 5V power supply• 1/16 duty cycle• B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED)• N.V. optional for + 3V power supply• RS232 compatible serial interface (2400 & 9600 baud

selectable)• Externally selectable serial polarities (Inverted & Non-

Inverted)• Serially controllable contrast and backlight levels• 8 user programmable custom characters• 16 Byte serial receive buffer

11.2. PIN DIAGRAM:

Page 55: Col.diesis using Zigbee

Fig:11.2. LCD pin diagram

PIN DIAGRAM DESCRIPTION:

PIN NAME PIN NO DESCRIPTION

VSS 1 Gnd

VDD 2 +3V – +5V

V0 3 Contrast adjustment

RS 4 Register select signal

R/W 5 Read write signal

E 6 Enable signal

DB0 7 Data bus line

DB1 8 Data bus line

DB2 9 Data bus line

DB3 10 Data bus line

DB4 11 Data bus line

DB5 12 Data bus line

DB6 13 Data bus line

DB7 14 Data bus line

A/VEE 15 Negative voltage outputK 16 Power supply for B/L

Table 11.1 LCD pin diag description

Page 56: Col.diesis using Zigbee

12. BLOCK DIAGRAM

12.1.SYNESTHESIA:

TRANSMITTER RECIEVER

Fig:12.1 SYNESTHESIA BLOCK DIAGRAM

Power supply is the first and the most important part of our project. For our project we require +5V regulated power supply with maximum current rating 500Ma.

To step down the mains 230V A.C. step down transformer is required. Step down transformer gives out well regulated +5V output, output

current capability of 100 mA Microcontroller PIC16F877A is the heart of the circuitry. It is the

main block which takes the inputs and processes it and gives the output. All the other blocks work in accordance with the microcontroller.

MAX RS232: The Serial communication is used to transfer data between the mobile device and the microcontroller. MAX RS232 is used for this purpose

ZIGBEE TRANSNMITTER: It transmits the signal which is connected to RS 232 interface. It works on 2.4 Ghz frequency with the serial interface.

ZIGBEE RECEIVER: It receives the signalwhich is connected to RS 232 interface. It works on 2.4 Ghz frequency with the serial interface

POWER

SUPPLY

PIC89F77

A

COLOUR

SENSORS

MAX RS232 ZIG

BEEZIGBEE

MAX RS232

PIC89F77

A

VOICE PROCESS

SOR

POWER

SUPPLY

Page 57: Col.diesis using Zigbee

MAX RS232: The Serial communication is used to transfer data between the mobile device and the microcontroller. MAX RS232 is used for this purpose.

Microcontroller PIC16F877A is the heart of the circuitry. It is the main block which takes the inputs and processes it and gives the output. All the other blocks work in accordance with the microcontroller.

The APR9600 device offers true single-chip voice recording, non-volatile storage, and playback capability for 40 to 60 seconds.

12.1.1 POWER SUPPLY

Fig:12.2 POWER SUPPLY CIRCUIT DIAGRAM

230 A.C Mains supply is given to the step down transformer. The number of turns in secondary winding is 204 and in primary

winding is 3800 R.M.S. Secondary voltage at secondary of transformer is 12V D1, D2, D3, D4 diodes act as bridge rectifier. Bridge rectifier gives

low output with fewer ripples. Bridge rectifier is an arrangement of four diodes connected in a bridge circuit as shown below, that provides the same polarity of output voltage for any polarity of the input voltage.

D.C. O/p Voltage at rectifier O/p is 10.80V Capacitor acts as voltage regulator. The function of this capacitor,

known as a ‘smoothing capacitor’ is to lessen the variation in (or ‘smooth’) the raw output voltage waveform from the bridge

Fixed” three-terminal linear regulators are commonly available to generate fixed voltages of plus 3 V, and plus or minus 5 V, 9 V, 12 V, or 15 V when the load is less than about 7 amperes

The “78” series (7805, 7812, etc.) regulate positive voltages The output voltage; eg, a 7805 is a +5 V regulator

12.2.TRANSMITTER

Page 58: Col.diesis using Zigbee

Fig:12.3 TRNSMITTER BLOCK DIAGRAM

COLOUR SENSORS

• TCS3200 Color Sensor is a complete color detector, including a

TAOS TCS3200 RGB sensor chip and 4 white LEDs.

• The TCS3200 can detect and measure a nearly limitless range

of visible colors.

• The TCS3200 has an array of photodetectors, each with either a

red, green, or blue filter, or no filter (clear).

• The filters of each color are distributed evenly throughout the

array to eliminate location bias among the colors.

• Internal to the device is an oscillator which produces a square-

wave output whose frequency is proportional to the intensity of

the chosen color. 

PIC16F877A

COLOUR SENSORS

PIC MICROCONTROL

LERZIGBEE

INTERFACEZIGBEE

TRANSMITTER

LCD DISPLAY

POWER SUPPLY

Page 59: Col.diesis using Zigbee

• This is the heart of the circuitry. It is the main block which takes the inputs and processes it and gives the output. All the other blocks work in accordance with the microcontroller.

• It is a 40-pin devices and has five I/O ports, fifteen interrupts, eight A/D input channels.

• The Parallel Slave Port is implemented only on the 40-pin devices

POWER SUPPLY

• Power supply gives out well regulated +5V output, output current capability of 100 Ma

ZIGBEE INTERFACE

• RS 232 interface will help the zigbee to communicate with microcontroller.

• A standard serial interfacing for PC, RS232C, requires negative logic, i.e., logic '1' is -3V to -12V and logic '0' is +3V to +12V.

• To convert a TTL logic, say, txd and rxd pins of the uc chips, thus need a converter chip.

• A MAX232 provides 2-channel RS232C port and requires external 10uf capacitors.

ZIGBEE TANSMITTER

• It transmits the signal which is connected to RS 232 interface. It works on 2.4 Ghz frequency with the serial interface.

LCD DISPLAY

12.3. RECIEVER

SWITCHES

Page 60: Col.diesis using Zigbee

Fig:12.4 RECIVER BLOCK DIAGRAM

POWER SUPPLY

• Power supply gives out well regulated +5V output, output current capability of 100 Ma

PIC 16F877A

• This is the heart of the circuitry. It is the main block which takes the inputs and processes it and gives the output. All the other blocks work in accordance with the microcontroller.

• It is a 40-pin devices and has five I/O ports, fifteen interrupts, eight A/D input channels.

• The Parallel Slave Port is implemented only on the 40-pin devices

VOICE PROCESSOR

LCD 16*2

PIC MICROCONTROL

LER

MAX 232

ZIGBEE RECIEV

ER

APR 9600 AUDIO AMPLIFI

ER

SPEAKER

POWER SUPPLY

Page 61: Col.diesis using Zigbee

• APR9600• AUDIO AMPLIFIER• SPEAKER• SWITCHES

MAX232 - RS232

• The Serial communication is used to transfer data between the mobile device and the microcontroller. MAX RS232 is used for this purpose.

ZIGBEE RECIEVER

• It receives the signal which is connected to RS 232 interface. It works on 2.4 Ghz frequency with the serial interface

LCD DISPLAY

13. CIRCUIT DIAGRAM

13.1 TRANSMITTER:

Page 62: Col.diesis using Zigbee

Fig:13.1 Circuit diagram of Transmitter

13.2 RECIEVER:

Page 63: Col.diesis using Zigbee

Fig:13.2 Circuit diagram of Reciever

14. PIC LAYOUT

Page 64: Col.diesis using Zigbee

14.1 PIC BASIC LAYOUT:

Fig:14.1 PIC Basic layout

14.2. VOICE PROCESSOR LAYOUT:

Fig:14.2 Voice processor lauout

Page 65: Col.diesis using Zigbee

14.3. POWER SUPPLY LAYOUT:

Fig:14.3 Power supply layout

15. TECHNICAL SPECIFICATIONS

Page 66: Col.diesis using Zigbee

15.1 POWER SUPPLY

Available o/p D.C. Voltage + 5V.

Line Regulation 0.03

Load Regulation 0.5

Vin maximum 35 V

Ripple Rejection 66-80 (db)

Table:15.1

15.2 PIC 16F877A

Ambient temperature under bias -55 to +125°C

Storage temperature -65°C to +150°C

Voltage on any pin with respect to VSS -0.3V to (VDD + 0.3V)

Total power dissipation 1.0W

Maximum current out of VSS pin 300 mA

Maximum current into VDD pin 250 mA

Maximum output current sunk by any I/O pin 25 mA

Maximum output current sourced by any I/O pin 25 Ma

Table:15.2

15.3 MAX RS232

Input supply voltage range, VCC −0.3 V to 6 V

Positive output supply voltage range, VS+VCC − 0.3 V to 15 V

Negative output supply voltage range, VS− −0.3 V to −15 V

Input voltage range, VI: Driver: −0.3 V to VCC +

Receive: ±30 V

Output voltage range, − 0.3 V to VS+ + 0.3 V

R1OUT, R2OUT −0.3 V to VCC + 0.3 V

Short-circuit duration: T1OUT, T2OUT Unlimited

Package thermal impedance: 73°C/W

Operating virtual junction temperature, TJ: 150°C

Page 67: Col.diesis using Zigbee

Storage temperature range, Tstg: −65°C to 150°C

Table 15.3

15.4. ZIGBEE

Model code XB24-AWI-001

Operating Frequency 2.4 GHz

Antenna type Wire antenna

Indoor/Urban Range up to 100 ft 30 m

Outdoor RF line-of-sight Range up to 300 ft. 90 m

Interface 1200-115200 bps

Supply Voltage 2.8 – 3.4 V

Transmit Current (typical) 45mA

Idle / Receive Current (typical) 50mA

Dimensions 2.438cm x 2.761cm

Operating Temperature -40 to 85º C

Table:15.4

15.5. COLOUR SENSORS

Operating voltage range 2.7~5V

Supply current 5V LED ON 25mA

Interfaces Output frequency

Operating temperature -40deg ~85deg

Dimensions 33.2mm*33.2mm*25mm

High-Resolution Conversion of Light Intensity to Frequency

Programmable Color and Full-Scale Output Frequency

Table:15.5

15.6. LCD

Minimum input voltage 5V

Maximum input voltage 5.3V

Page 68: Col.diesis using Zigbee

Typical input voltage 5V

Maximum supply current 3mA

Typical supply current 1.2Ma

Drive method 1/16 duty cycle

Display size 16 character * 2 lines

Character structure 5*8 dots.

Display data RAM 80 characters (80*8 bits)

Character generate ROM 192 characters

Character generate RAM 8 characters (64*8 bits)

Both display data and character generator RAMs can be read from MPU.

Internal automatic reset circuit at power ON.

Built-in oscillator circuit.

Table:15.6

15.7. VOICE PROCESSOR

Supply voltage -0.3V – 7V

Input voltage -1V – VCC+ 1V

Storage temperature -65 C – 150 C

Temperature under bias -65 C – 125 C

Lead temperature 0.3 C – 300 C

Table:15.7

16.CONCLUSION

Page 69: Col.diesis using Zigbee

We as a group had begun working on this project and now we come to the

completion of our project. It has been a very fulfilling experience for all of us.

We have got a thorough learning experience and we shall cherish it for long.

Despite being challenging and different from other assignments, it is a path

where we have learnt a lot about hardware, software, troubleshooting and

other aspects of engineering. It was a chance given to us that we go deep into

applying what we had learnt in earlier years of our studies and we grabbed it

with both hands.

For simplicity we divided the project work into smaller parts and alternately

took leads in performing those parts following the principle of the best man

for the job. Since we were new to this, at initial stages most of our decisions

were not apt for the required situations. At such times our professors and other

knowledgeable friends came to our help. From finding the project idea to

publishing this report, learning has been a continuous process. There have

been times where we have taken inappropriate decisions but have then learnt

how to overcome them and not to commit those errors in future tasks.

The project has helped us study the practical use of microcontroller. We have

learnt that what are the various stages one needs to follow when pursuing a

project and how efforts as a team can be put towards finding solution to

problems arising in the process. This opportunity given to us had proved very

beneficial as it providedus with an avenue to furthermore dig into analog and

digital electronics.