You are on page 1of 67

MEMS ACCELEROMETER BASED HAND GESTURE RECOGNITION

A dissertation submitted in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING in ELECTRONICS AND COMMUNICATION ENGINEERING


Submitted by

MANIKANDAPRABHU.S (Reg. No. 90807133026) MOHAMMED JAVID RAHMAN.A (Reg. No. 90807133029) SIVARAMA KRISHNAN.N (Reg. No. 90807133049)

Under the Guidance of Ms. A. AKILA B.E., DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING ANNA UNIVERSITY OF TECHNOLOGY TIRUCHIRAPPALLI TIRUCHIRAPPALLI 620 024 APRIL, 2011 DECLARATION

I hereby declare that the work entitled MEMS ACCELEROMETER BASED HAND GESTURE RECOGNITION is submitted in partial fulfillment of the requirement for the award of the degree in B.E., Anna University of Technology Tiruchirappalli, is a record of the my own work carried out by me during the academic year 2010 2011 under the supervision and guidance of Ms. A. AKILA B.E., Research Supervisor, Department of ELECTRONICS AND COMMUNICATION ENGINEERING, MOUNT ZION COLLEGE OF ENGINEERING AND TECHNOLOGY. The extent and source of information are derived from the existing literature and have been indicated through the dissertation at the appropriate places. The matter embodied in this work is original and has not been submitted for the award of any other degree or diploma, either in this or any other University.

MANIKANDAPRABHU.S Reg. No. 90807133026

I certify that the declaration made above by the candidate is true.

Ms. A. AKILA B.E., Lecturer, ECE Department

DECLARATION

I hereby declare that the work entitled MEMS ACCELEROMETER BASED HAND GESTURE RECOGNITION is submitted in partial fulfillment of the requirement for the award of the degree in B.E., Anna University of Technology Tiruchirappalli, is a record of the my own work carried out by me during the academic year 2010 2011 under the supervision and guidance of Ms. A. AKILA B.E., Research Supervisor, Department of ELECTRONICS AND COMMUNICATION ENGINEERING, MOUNT ZION COLLEGE OF ENGINEERING AND TECHNOLOGY. The extent and source of information are derived from the existing literature and have been indicated through the dissertation at the appropriate places. The matter embodied in this work is original and has not been submitted for the award of any other degree or diploma, either in this or any other University.

MOHAMMED JAVID RAHMAN.A Reg. No. 90807133029

I certify that the declaration made above by the candidate is true.

Ms. A. AKILA B.E., Lecturer, ECE Department

DECLARATION

I hereby declare that the work entitled MEMS ACCELEROMETER BASED HAND GESTURE RECOGNITION is submitted in partial fulfillment of the requirement for the award of the degree in B.E., Anna University of Technology Tiruchirappalli, is a record of the my own work carried out by me during the academic year 2010 2011 under the supervision and guidance of Ms. A. AKILA B.E., Research Supervisor, Department of ELECTRONICS AND COMMUNICATION ENGINEERING, MOUNT ZION COLLEGE OF ENGINEERING AND TECHNOLOGY. The extent and source of information are derived from the existing literature and have been indicated through the dissertation at the appropriate places. The matter embodied in this work is original and has not been submitted for the award of any other degree or diploma, either in this or any other University.

SIVARAMAKRISHNAN.N Reg. No. 90807133049

I certify that the declaration made above by the candidate is true.

Ms. A. AKILA B.E., Lecturer, ECE Department

BONAFIDE CERTIFICATE

This is to certify that the dissertation entitled MEMS ACCELEROMETER BASED HAND GESTURE RECOGNITION is a bonafide work carried out by Mr. S. MANIKANDAPRABHU (Reg. No. 90807133026), Mr. A. MOHAMMED JAVID RAHMAN (Reg. No. 90807133029), Mr. N. SIVARAMA KRISHNAN (Reg. No. 90807133049), under my direct supervision is submitted in partial fulfillment of the requirements for the award of degree of Bachelor of Engineering in ELECTRONICS AND COMMUNICATION ENGINEERING to Anna University of Technology Tiruchirappalli, Tiruchirappalli 620 024. No part of the dissertation has been submitted for any degree/diploma or any other academic award anywhere before.

SIGNATURE Ms. A. AKILA B.E, SUPERVISOR Forwarded by

SIGNATURE Mr. L.JAWAHAR M.E, HEAD OF THE DEPARTMENT

Examined on:

Internal Examiner

External Examiner

ACKNOWLEDGEMENT

First and foremost we would like to express our sincere and grateful thanks to God Almighty, who has given us the great opportunity, power of knowledge and the strength to complete this project successfully. We would like to thank our chairman Mr. Jayabarathan Chelliah M.A (USA), B.Ed., for his constant support towards the students and effort to provide the students with all the facilities that are required for a pleasant atmosphere of learning. We wish to express our sincere gratitude to Mr. Jayson K. Jayabarathan M.Tech, Ph.D*., for his constant inspiration and guide to all students and also because he has played a vital role in guiding us through this project. We would also like to thank our principal Dr. B. Anandampilai M.S, Ph.D., for his Constant effort in helping us by providing useful resource material that was used in our project. We extend our heartfelt thanks to Mr. L. Jawahar M.E., Head of The department of electronics and communication engineering, for his unbounded support.With immense pleasure we would like to thank our project guide Ms. A. Akila B.E., who has been a support in helping us finishes this project with useful advice and techniques to help improve out project. Finally, we thank all our friends and our classmates who rendered all their support whenever we were in need of them. And we would like to thank our family for their continuous encouragement and moral support.

ABSTRACT Mobile and wearable devices are continuously optimized towards a small outline. At the same time the number of functions in these devices continuous to increase. While this Development is clearly beneficial for the ubiquity of mobile and wearable systems, e.g. for using the systems during daily activities, it hampers interaction. We use MEMS sensors to measure the 3D accelerations and 3D angular rates. A Micro Control Unit (MCU) performs coordinate transformations and filtering calculations. In particular, our goal was to demonstrate that accelerometers can be used to effectively translate finger and hand gestures into computer interpreted signals. To this end we developed the Acceleration Sensing Glove (ASG) that helps deaf and dumb to communicate with others through voice commands. In this project, we are measuring the actions performed on sign languages in to an equal acceleration values. The acceleration values are measured in 3 axes, using a 3-axis accelerometer. Every action generates a unique set of acceleration values in all the axes. The action and the corresponding acceleration values are placed in to a look up table along with appropriate voice commands. Once the glove is placed in the hands, whenever an action for sign language is performed, the acceleration values are obtained and are checked with the look up table. If the acceleration values match with any set of the look up table, then the corresponding action is identified and the voice channel is selected. Here we are using a 3axis accelerometer. The 3 channel analog output is fed to the micro controllers ADC channels. The Processed output is then output via the Ports available on the controller. The output is fed to the Voice chip, where the pre-recorded voices are stored. By activating the corresponding channel the voice will be played in the speaker.

TABLE OF CONTENTS CHAPTER NO TITLE ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS 1. INTRODUCTION 1.1 Introduction 1.2 Block Diagram 2. FUNCTIONALITY 2.1 Functionality 3. MODULE DESCRIPTION 3.1 MEMS Accelerometer (ADXL330) 3.1.1 Introduction 3.1.2 Features 3.1.3 General Description 3.1.4 Theory of operation 3.1.5 Pin Configuration and Function Description 3.1.6 Applications 3.2 Signal Conditioning 3.2.1 Filter 3.2.2 Amplifier 3.3 PIC16F877A Controller 3.3.1 Introduction 3.3.2 Pin Configuration and Function Description 19 10 11 11 11 14 15 15 PAGE NO vii x xi xii 1 1 2 3 3 6 6 6 7 7 8

3.3.3 Architecture 3.3.4 Features 3.3.5 Need for PIC Microcontroller 3.4 Voice Chip(APR9600) 3.4.1 Introduction 3.4.2 Features 3.4.3 General Description 3.4.4 Pin Configuration and Function Description 3.4.5 Functional Description 3.4.6 Application 3.5 Liquid Crystal Display 3.5.1 Introduction 3.5.2 Types of LCD 3.5.3 Brief History 3.5.4 Types of Displays 3.5.5 Drawbacks 3.6 Power Supply Unit 4. 5. APPLICATIONS CONCLUSION 5.1 Conclusion 5.2 Future Scope 6. APPENDIX 6.1 Coding 7. 8. BIBLIOGRAPHY REFERENCES LIST OF TABLES

24 25 25 26 26 26 27 28 32 33 33 33 35 36 36 41 42 45 47 47 48 49 49 56 57

TABLE NO Table 3.1.5.1 Table 3.3.2.1 Table 3.3.4.1 Table 3.4.4.1

TITLE Pin Function Description of ADXL330 Pin Function Description of PIC16F877A Features of PIC16F877A Pin Function Description of APR9600

PAGE NO 10 20 25 29

LIST OF FIGURES FIG NO Fig 1.2.1 Fig 2.1.1 Fig 3.1.3.1 Fig 3.1.5.1 Fig 3.2.1.1 Fig 3.2.1.2 Fig 3.3.2.1 Fig 3.3.3.1 Fig 3.4.4.1 Fig 3.4.5.1 Fig 3.5.2.1 Fig 3.5.4.1 TITLE Block Diagram Circuit Diagram Functional Block Diagram of ADXL330 Pin Configuration of ADXL330 Ideal Filter Response Curves Low Pass Filter Circuit Pin Configuration of PIC16F877A Architecture of PIC16F877A Pin Configuration of APR9600 Architecture of APR9600 Reflective Twisted Nematic LCD Defects in LCD panel PAGE NO 2 3 7 10 12 13 19 24 28 32 35 40

LIST OF ABBREVATIONS

MEMS HMM MCU ASG ADC HGR FOV TSM IN TSMAX TL SVM HCI SAIL BSN

Micro Electro Mechanical Systems Hidden Markov Models Micro Control Unit Acceleration Sensing Glove Analog to Digital Converter Hand Gesture Recognition Field Of View Minimum Tempe rature Maximum Tempe rature Liquidous Tempe rature Support Vector Machine Human Computer Interaction Smart Assisted Living System Body Sensor Network

1. INTRODUCTION 1.1 Introduction Human gestures have long been an important way of communication, adding emphasis to voice messages or even being a complete message by itself. Such human gestures could be used to improve human machine interface. These may be used to control a wide variety of devices remotely. Vision-based framework can be developed to allow the users to interact with computers through human gestures. This study focuses in understanding such human gesture recognition, typically hand gesture. Gesture recognition is an important area for novel human computer interaction (HCI) systems and a lot of research has been focused on it. These systems differ in basic approaches depending on the area in which it is used. Basically, the field of gestures can be separated into dynamic gestures (e.g. writing letters or numbers) and static postures (e.g. sign language). The goal of gesture analysis and interpretation is to push the advanced humanmachine communication in order to bring the performance of human-machine interaction closer to human-human interaction. There are Smart Assisted Living (SAIL) System which consists of a body sensor network (BSN), a companion robot, a Smartphone (or PC), and a remote health provider. The inertial sensors on the human subject collect three-dimensional angular velocity and threedimensional acceleration of different body parts, such as the foot, hand, and chest. The data are transferred and stored on a mobile device such as a Smartphone/PDA carried by the human subject. The PDA sends the data to a PC through Wi-Fi. We currently process the data on the PC to recognize gestures that the human subject made and send corresponding commands to control the robot. With the development of ubiquitous computing, current user interaction approaches with keyboard, mouse and pen are not sufficient. Due to the limitation of these devices the useable command set is also limited. Direct use of hands can be used as an input device for providing natural interaction.

1.2 Block Diagram

Fig 1.2.1 : Block Diagram

2. FUNCTIONALITY 2.1 Functionality

Fig 2.1.1 : Circuit Diagram

The hardware consists of a wrist controller and six accelerometers, five on the fingertips and one on the back of the hand. Each accelerometer (1.3x1.4cm), an Analog Devices ADXL202, contains 2 axes of measurement and had a range of with +/-2g.Wires send signals from the accelerometers to the forearm controller. An Atmel AVR AT90LS8535 microcontroller on the forearm controller (4.4x6.6cm) converts the analog signal from the accelerometer to a 10 bit digital signal. The eWatch consists of a CPU, sensors, power control, notification mechanisms and wireless communication. The CPU is a micro-controller of the ARM7TDMI processor family without float-point unit, running with up to 80MHz. In this work a MEMS 3-axes accelerometer with a sampling rate of 20Hz was used to record acceleration of the wearers arm. For static gesture recognition the accelerometer data is calibrated and filtered. The accelerometers can measure the magnitude and direction of gravity in addition to movement induced acceleration. In order to calibrate the accelerometers, we rotate the devices sensitive axis with respect to gravity and use the resultant signal as an absolute measurement. To reduce high frequency noise from the sensors, we took a running average. The recognition procedure using the recorded acceleration data. Firstly, an informative feature was extracted from the recorded 3D-acceleration data. The dominant acceleration axis was determined as axis with the largest amplitude variation within the last five sampling points. We used this derivative as feature to characterize every sampling point. Subsequently, a sliding window of fixed size (30 samples) was shifted over the feature data with a step size of 5 samples.

In a second stage, the Viterbi algorithm was applied to detect begin and end samples of potential gestures. For this purpose, each gesture type was modeled by an individual leftright discrete HMM. Six states were used for scroll gestures, nine states for the Select gesture. A code-book of 13 symbols was used to represent the derivative amplitude in strong/low increase/decrease for all acceleration axes and calm, for small amplitudes. An initial analysis showed that a period without movement preceded and followed each gesture. This period occurred naturally, when the user read the next question from the screen or confirmed the completion of the current one. Thus, the first and last states of all models were designed to represent small acceleration variations.

3. MODULE DESCRIPTION

3.1 MEMS Accelerometer (ADXL330) 3.1.1 Introduction

MEMS accelerometers are one of the simplest but also most applicable microelectromechanical systems. They become indispensable in automobile industry, computer and audio-video technology.This Project designs MEMS technology on hand gesture recognition.

The basics: There are many different ways to make an accelerometer. Piezoelectric effect Capacitance But this project uses capacitance based accelerometer.

Capacitance Accelerometers: Capacitive interfaces have several attractive features. Both as sensors and actuators. Excellent sensitivity. Transduction mechanism. Neglecting the fringing effect near the edges.

An accelerometer is an electromechanical device that measures acceleration forces.These forces may be Static Dynamic

We tried to develop something smaller, that could increase applicability and started searching in the field of micro electronics. We developed MEMS accelerometers.

3.1.2 Features

3-axis sensing. Small, low-profile package. 4 mm 4 mm 1.45 mm LFCSP. Low power. 180 A at VS = 1.8 V (typical). Single-supply operation. 1.8 V to 3.6 V. 10,000 g shock survival. Excellent temperature stability. BW adjustment with a single capacitor per axis.

3.1.3 General Description

Fig 3.1.3.1 : Functional Block Diagram of ADXL330

The ADXL330 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs, all on a single monolithic IC. The product measures acceleration with a minimum full-scale range of 3 g. It can measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration.

The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the XOUT, YOUT, and ZOUT pins. Bandwidths can be selected to suit the application, with a range of 0.5 Hz to 1600 Hz for X and Y axes, and a range of 0.5 Hz to 550 Hz for the Z axis. The ADXL330 is available in a small, low profile, 4 mm 4 mm 1.45 mm, 16-lead, plastic Lead Frame Chip Scale Package (LFCSP_LQ).

3.1.4 Theory of operation

The ADXL330 is a complete 3-axis acceleration measurement system on a single monolithic IC. The ADXL330 has a measure-ment range of 3 g minimum. It contains a polysilicon surface micromachined sensor and signal conditioning circuitry to implement an open-loop acceleration measurement architecture. The output signals are analog voltages that are proportional to acceleration. The accelerometer can measure the static acceleration of gravity in tilt sensing applications as well as dynamic acceleration resulting from motion, shock, or vibration.

The sensor is a polysilicon surface micromachined structure built on top of a silicon wafer. Polysilicon springs suspend the structure over the surface of the wafer and provide a resistance against acceleration forces. Deflection of the structure is meas-ured using a differential capacitor that consists of independent fixed plates and plates attached to the moving mass. The fixed plates are driven by 180 out-of-phase square waves. Acceleration deflects the moving mass and unbalances the differential capacitor resulting in a sensor output whose amplitude is proportional to acceleration. Phase-sensitive demodulation techniques are then used to determine the magnitude and direction of the acceleration.

The demodulator output is amplified and brought off-chip through a 32 k resistor. The user then sets the signal band-width of the device by adding a capacitor. This filtering improves measurement resolution and helps prevent aliasing.

Mechanical sensor

The ADXL330 uses a single structure for sensing the X, Y, and Z axes. As a result, the three axes sense directions are highly orthogonal with little cross axis sensitivity.

Mechanical mis-alignment of the sensor due to the package is the chief source of cross axis sensitivity. Mechanical misalignment can, of course, be calibrated out at the system level.

Performance Rather than using additional temperature compensation circuitry, innovative design techniques ensure high performance is built-in to the ADXL330. As a result, there is neither quantization error nor non monotonic behavior, and temperature hysteresis is very low (typically less than 3 mg over the 25C to +70C temperature range).The zero g output performance of eight parts (X, Y, and Z-axis) soldered to a PCB over a 25C to +70C temperature range. The typical sensitivity shift over temperature for supply voltages of 3 V is typically better than 1% over the 25C to +70C temperature range.

3.1.5 Pin Configuration and Function Description

Fig 3.1.5.1 : Pin Configuration of ADXL330 Table 3.1.5.1 : Pin Function Description of ADXL330

Pin No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Mnemonic NC ST COM NC COM COM COM ZOUT NC YOUT NC XOUT NC VS VS NC

Description No Conne ct Self Test Common No Conne ct Common Common Common Z Channel Output No Conne ct Y Channel Output No Conne ct X Channel Output No Conne ct Supply Voltage (1.8 V to 3.6 V) Supply Voltage (1.8 V to 3.6 V) No Conne ct

3.1.6 Applications

Cost-sensitive, low power, motion- and tilt-sensing applications.

Mobile devices. Gaming systems. Disk drive protection. Image stabilization. Sports and health devices.

3.2 Signal Conditioning 3.2.1 Filter Basically, an electrical filter is a circuit that can be designed to modify, reshape or reject all unwanted frequencies of an electrical signal and accept or pass only those signals wanted by the circuit designer. In other words they "filter-out" unwanted signals and an ideal filter will separate and pass sinusoidal input signals based upon their frequency. In low frequency applications (up to 100kHz), passive filters are usually made from simple RC (Resistor-Capacitor) networks while higher frequency filters (above 100kHz) are usually made from RLC (Resistor-Inductor-Capacitor) components. Passive filters are made up of passive components such as resistors, capacitors and inductors and have no amplifying elements (transistors, op-amps, etc) so have no signal gain, therefore their output level is always less than the input. Filters are named according to the frequency of signals they allow to pass through them. There are Low-pass filters that allow only low frequency signals to pass, High-pass filters that allow only high frequency signals to pass through, and Bandpass filters that allow signals falling within a certain frequency range to pass through. Simple First-order passive filters (1st order) can be made by connecting together a single resistor and a single capacitor in series across an input signal, (Vin) with the output of the filter, (Vout) taken from the junction of these two components. Depending on which way around we connect the resistor and the capacitor with regards to the output signal determines the type of filter construction resulting in either a Low Pass Filter or a High Pass Filter. As the function of any filter is to allow signals of a given band of frequencies to pass unaltered while attenuating or weakening all others that are not wanted, we can define the amplitude response characteristics of an ideal filter by using an ideal frequency response curve of the four basic filter types as shown. Ideal Filter Response Curves

Fig 3.2.1.1 : Ideal Filter Response Curves

Filters can be divided into two distinct types: active filters and passive filters. Active filters contain amplifying devices to increase signal strength while passive do not contain amplifying devices to strengthen the signal. As there are two passive components within a passive filter design the output signal has smaller amplitude than its corresponding input signal, therefore passive RC filters attenuate the signal and have a gain of less than one (unity). A Low Pass Filter can be a combination of capacitance, inductance or resistance intended to produce high attenuation above a specified frequency and little or no attenuation below that frequency. The frequency at which the transition occurs is called the "cutoff" frequency. The simplest low pass filters consist of a resistor and capacitor but more sophisticated low pass filters have a combination of series inductors and parallel capacitors. In this tutorial we will look at the simplest type, a passive two component RC low pass filter.

The Low Pass Filter A simple passive Low Pass Filter can be easily made by connecting together in series a single Resistor with a single Capacitor as shown below. In this type of filter arrangement the input signal (Vin) is applied to the series combination (both the Resistor and Capacitor together) but the output signal (Vout) is taken across the capacitor only. This type of filter is known generally as a "first-order filter" or "one-pole filter". Because it has only "one" reactive component in the circuit, the capacitor. Low Pass Filter Circuit

Fig 3.2.1.2 : Low Pass Filter Circuit The reactance of a capacitor varies inversely with frequency, while the value of the resistor remains constant as the frequency changes. At low frequencies, the capacitive reactance (Xc) of the capacitor will be very large compared to the resistive value of the resistor, R and as a result the voltage across the capacitor, Vc will also be large while the voltage drop across the resistor, Vr will be much lower. At high frequencies the reverse is true with Vc being small and Vr being large. While the circuit above is that of an RC Low Pass Filter circuit, it can also be classed as a frequency variable potential divider circuit. We used the following equation to calculate the output voltage for two single resistors connected in series.

The process used to produce conventional filters capable of screening micron-scale objects results in an unacceptably broad statistical distribution of the size. Micromachining and MEMS technology has been used to realize filters that are precisely and uniformly machined, which greatly reduces the statistical variation in objects. 3.2.2 Amplifiers Signal amplification performs two important functions: increases the resolution of the inputed signal, and increases its signal-to-noise ratio. For example, the output of an electronic temperature sensor, which is probably in the millivolts range is probably too low for an

Analog-to-digital converter (ADC) to process directly. In this case it is necessary to bring the voltage level up to that required by the ADC. Commonly used amplifiers on signal conditioning include Sample and hold amplifiers, Peak Detectors, Log amplifiers, Antilog amplifiers, Instrumentation amplifiers or programmable gain amplifiers] Signal isolation must be used in order to pass the signal from the source to the measurement device without a physical connection: it is often used to isolate possible sources of signal perturbations. Also notable is that's it is important to isolate the potentially expensive equipment used to process the signal after conditioning from the sensor. Magnetic or optic isolation can be used. Magnetic isolation transforms the signal from voltage to a magnetic field, allowing the signal to be transmitted without a physical connection (for example, using a transformer). Optic isolation takes an electronic signal and modulates it to a signal coded by light transmission (optical encoding), which is then used for input for the next stage of process.

It is primarily utilized for data acquisition, in which sensor signals must be normalized and filtered to levels suitable for analog-to-digital conversion so they can be read by computerized devices. Other uses include preprocessing signals in order to reduce computing time, converting ranged data to boolean values, for example when knowing when a sensor has reached certain value. Types of devices that use signal conditioning include signal filters, instrument amplifiers, sample-and-hold amplifiers, isolation amplifiers, signal isolators, multiplexers, bridge conditioners, analog-to-digital converters, digital-to-analog converters, frequency converters or translators, voltage converters or inverters, frequency-to-voltage converters, voltage-to-frequency converters, current-to-voltage converters, current loop converters, and charge converters.

3.3 PIC16F877A Controller 3.3.1 Introduction 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.

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/44pin only). Brown-out detection circuitry for Brown-out Reset (BOR). 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.

Special Microcontroller Features 100,000 erase/write cycle Enhanced Flash program memory typical. 1,000,000 erase/write cycle Data EEPROM memory typical.l 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. 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.

Device overview This document contains device specific information about the following devices: PIC16F873A PIC16F874A PIC16F876A PIC16F877A PIC16F873A/876A devices are available only in 28-pin packages, while PIC16F874A/877A devices are available in 40-pin and 44-pin packages. All devices in the PIC16F87XA family share common architecture with the following differences: The PIC16F873A and PIC16F874A have one-half of the total on-chip memory of the PIC16F876A and PIC16F877A. The 28-pin devices have three I/O ports, while the 40/44-pin devices have five. The 28-pin devices have fourteen interrupts, while the 40/44-pin devices have fifteen. The 28-pin devices have five A/D input channels, while the 40/44-pin devices have eight. The Parallel Slave Port is implemented only on the 40/44-pin devices.

3.3.2 Pin Configuration and Function Description

Fig 3.3.2.1 : Pin Configuration of PIC16F877A Table 3.3.2.1 : Pin Function Description of PIC16F877A

Pin Description (continued)

Pin Description (continued)

Pin Description (continued)

3.3.3 Architecture

Fig 3.3.3.1 : Architecture of PIC16F877A

3.3.4 Features Table 3.3.4.1 : Features of PIC16F877A Key Features Operating Frequency Flash Program Memory (14-bit words) Data Memory (bytes) EEPROM Data Memory (bytes) Interrupts I/O Ports Timers Serial Communications Parallel Communications Analog Comparators 368 256 15 Ports A, B, C, D, E 3 MSSP, USART PSP 1 PIC16F877A DC 20 MHz 8K

3.3.5Need for PIC Microcontroller High performance. 8kb bytes of flash program memory. 368 bytes of data memory. 256 EEPROM data memory. 15 interrupts.

In-circuit programming. 3 internal hardware timers. Built in USART for serial communication. 15 digital I/O ports. Less instruction. 3.4 Voice Chip (APR9600) 3.4.1 Introduction The APR9600 device offers true single-chip voice recording, non-volatile storage, and playback capability for 40 to 60 seconds. The device is ideal for use in portable voice recorders, toys, and many other consumer and industrial applications. 3.4.2 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: 1 uA typical Automatic power-down Chip Enable pin for simple message expansion 3.4.3 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 implem ented in an advanced Flash nonvolatile 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.

3.4.4 Pin Configuration and Function Description

Fig 3.4.4.1 : Pin Configuration of APR9600

Table 3.4.4.1 : Pin Function Description of APR9600

3.4.5 Functional Description

Fig 3.4.5.1 : Architecture of APR9600 The APR9600 block diagram is included in order to give understanding of the APR9600 internal architecture.At the left hand side of the diagram are the analog inputs. 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 levels 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 the internal anti-aliasing filter. The filter automatically adjusts its response according to the sampling frequency selected so Shannons 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 a combination of the Sample and Hold circuit and the Analog Write/Read circuit. These circuits are clocked by either the Internal 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 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. 3.4.6 Applications Acts as tape recording IC for voice recording. Used as voice recorder playback system in playback voice activated recorder circuit. Acts as voice recorder IC.

3.5 Liquid Crystal Display 3.5.1 Introduction A Liquid Crystal Display (LCD) is a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. It is prized by engineers because it uses very small amounts of electric power, and is therefore suitable for use in battery-powered electronic devices. Each pixel (picture element) consists of a column of liquid crystal molecules suspended between two transparent electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to each other. Without the liquid crystals between them, light passing through one would be blocked by the other. The liquid crystal twists the polarization of light entering one filter to allow it to pass through the other. The molecules of the liquid crystal have electric charges on them. By applying small electrical charges to transparent electrodes over each pixel or sub pixel, the molecules are twisted by electrostatic forces. This changes the twist of the light passing through the molecules, and allows varying degrees of light to pass (or not to pass) through the polarizing filters.

Before applying an electrical charge, the liquid crystal molecules are in a relaxed state. Charges on the molecules cause these molecules to align themselves in a helical structure, or twist (the "crystal"). In some LCDs, the electrode may have a chemical

surface that seeds the crystal, so it crystallizes at the needed angle. Light passing through one filter is rotated as it passes through the liquid crystal, allowing it to pass through the second polarized filter. A small amount of light is absorbed by the polarizing filters, but otherwise the entire assembly is transparent. When an electrical charge is applied to the electrodes, the molecules of the liquid crystal align themselves parallel to the electric field, thus limiting the rotation of entering light. If the liquid crystals are completely untwisted, light passing through them will be polarized perpendicular to the second filter, and thus be completely blocked. The pixel will appear unlit. By controlling the twist of the liquid crystals in each pixel, light can be allowed to pass though in varying amounts, correspondingly illuminating the pixel. Many LCDs are driven to darkness by an alternating current, which disrupts the twisting effect, and become faint or transparent when no current is applied. To save cost in the electronics, LCDs are often multiplexed. In a multiplexed display, electrodes on one side of the display are grouped and wired together, and each group gets its own voltage source. On the other side, the electrodes are also grouped, with each group getting a voltage sink. The groups are designed so each pixel has a unique, unshared combination of source and sink. The electronics, or the software driving the electronics then turns on sinks in sequence, and drives sources for the pixels of each sink. Important factors to consider when evaluating an LCD monitor include resolution, viewable size, response time (sync rate), matrix type (passive or active), viewing angle, color support, brightness and contrast ratio, aspect ratio, and input ports (e.g. DVI or VGA).

3.5.2 Types of LCD

Fig 3.5.2.1 : Reflective Twisted Nematic LCD

Vertical filter film to polarize the light as it enters. Glass substrate with ITO electrodes. The shapes of these electrodes will determine the dark shapes that will appear when the LCD is turned on. Vertical ridges are etched on the surface so the liquid crystals are in line with the polarized light. Twisted Nematic liquid crystals. Glass substrate with common electrode film (ITO) with horizontal ridges to line up with the horizontal filter. Horizontal filter film to block/allow through light. Reflective surface to send light back to viewer.

3.5.3 Brief History

1911: Charles Mauguin describes the structure and properties of Liquid Crystals. 1936: The Marconi Wireless Telegraph company patents the first practical application of the technology, "The Liquid Crystal Light valve". 1962: The first major English language publication on the subject "Molecular Structure and Properties of Liquid Crystals", by Dr. George W. Gray. Pioneering work on liquid crystals was undertaken in the late 1960s by the UK's Radar Research Establishment at Malvern. The team at RRE supported ongoing work by George Gray and his team at the University of Hull who ultimately discovered the cyanobiphenyl liquid crystals (which had all of the correct stability and temperature properties for application in LCDs). The first operational LCD was based on the Dynamic Scattering Mode (DSM) and was introduced in 1968 by a group at RCA in the USA headed by George Heilmeier. Heilmeier founded Optel, which introduced a number of LCDs based on this technology. In 1969, the twisted nematic field effect in liquid crystals was discovered by James Fergason at Kent State University in the USA, and in 1971 his company ILIXCO (now LXD Incorporated) produced the first LCDs based on it, which soon superseded the poor-quality DSM types. 3.5.4 Types of Displays Transmissive and Reflective Displays LCDs can be either transmissive or reflective, depending on the location of the light source. A transmissive LCD is illuminated from the back by a backlight and viewed from the opposite side (front). This type of LCD is used in applications requiring high luminance levels such as computer displays, televisions, personal digital assistants, and mobile phones. The illumination device used to illuminate the LCD in such a product usually consumes much more power than the LCD itself. Reflective LCDs, often found in digital watches and calculators, are illuminated by external light reflected by a (sometimes) diffusing reflector behind the display. This type of LCD can produce darker 'blacks' than the transmissive type since light must pass through the liquid crystal layer twice and thus is attenuated twice, however because the

reflected light is also attenuated twice in the translucent parts of the display image contrast is usually poorer than a transmissive display. The absence of a lamp significantly reduces power consumption, allowing for longer battery life in batterypowered devices; small reflective LCDs consume so little power that they can rely on a photovoltaic cell, as often found in pocket calculators. Transflective LCDs work as either transmissive or reflective LCDs, depending on the ambient light. They work reflectively when external light levels are high, and transmissively in darker environments via a low-power backlight. Color Displays In color LCDs each individual pixel is divided into three cells, or subpixels, which are colored red, green, and blue, respectively, by additional filters. Each subpixel can be controlled independently to yield thousands or millions of possible colors for each pixel. Older CRT monitors employ a similar method for displaying color. Color components may be arrayed in various pixel geometries, depending on the monitor's usage. Passive-matrix and Active-matrix LCDs with a small number of segments, such as those used in digital watches and pocket calculators, have a single electrical contact for each segment. An external dedicated circuit supplies an electric charge to control each segment. This display structure is unwieldy for more than a few display elements. Small monochrome displays such as those found in personal organizers, or older laptop screens have a passive-matrix structure employing Super Twist Nematic (STN) or Double-layer STN (DSTN) technology (DSTN corrects a color-shifting problem with STN). Each row or column of the display has a single electrical circuit. The pixels are addressed one at a time by row and column addresses. This type of display is called a passive matrix because the pixel must retain its state between refreshes without the benefit of a steady electrical charge. As the number of pixels (and, correspondingly, columns and rows) increases, this type of display becomes increasingly less feasible. Very slow response times and poor contrast are typical of passive-matrix LCDs. For high-resolution color displays such as modern LCD computer monitors and televisions, an active matrix structure is used. A matrix of Thin-Film Transistors (TFTs)

is added to the polarizing and color filters. Each pixel has its own dedicated transistor, which allows each column line to access one pixel. When a row line is activated, all of the column lines are connected to a row of pixels and the correct voltage is driven onto all of the column lines. The row line is then deactivated and the next row line is activated. All of the row lines are activated in sequence during a refresh operation. Active-matrix displays are much brighter and sharper than passive-matrix displays of the same size, and generally have quicker response times. Active matrix technologies Twisted Nematic (TN) Twisted Nematic display contains liquid crystal elements which twist and untwist at varying degrees to allow light to pass through. When no voltage is applied to a TN liquid crystal cell, the light is polarized to pass through the cell. In proportion to the voltage applied, the LC cells twist up to 90 degrees changing the polarization and blocking the lights path. By properly adjusting the level of the voltage most any grey level or transmission can be achieved. In-Plane Switching (IPS) In-plane switching is an LCD technology which aligns the liquid crystal cells in a horizontal direction. In this method, the electrical field is applied through each end of the crystal, but this requires the need for two transistors for each pixel instead of the one needed for a standard thin-film transistor (TFT) display. This results in blocking more transmission area requiring brighter backlights, which consume more power making this type of display undesirable for notebook computers. Vertical Alignment (VA) Vertical Alignment displays are a form of LC display in which the liquid crystal material naturally exists in a horizontal state removing the need for extra transistors (as in IPS). When no voltage is applied the liquid crystal cell, it remains perpendicular to the substrate creating a black display. When voltage is applied, the liquid crystal cells shift to a horizontal position, parallel to the substrate, allowing light to pass through and create a white display. VA liquid crystal displays provide some of the same advantages as IPS panels, particularly an improved viewing angle and improved black level.

Quality Control Some LCD panels have defective transistors, causing permanently lit or unlit pixels. Unlike integrated circuits, LCD panels with a few defective pixels are usually still usable. It is also economically prohibitive to discard a panel with just a few bad pixels because LCD panels are much larger than ICs. Manufacturers have different standards for determining a maximum acceptable number of defective pixels.

Fig 3.5.4.1 : Defects in LCD panel LCD panels are more likely to have defects than most ICs due to their larger size. In this example, a 12" SVGA LCD has 8 defects and a 6" wafer has only 3 defects. However, 134 of the 137 dies on the wafer will be acceptable, whereas rejection of the LCD panel would be a 0% yield. The standard is much higher now due to fierce competition between manufacturers and improved quality control. An SVGA LCD panel with 4 defective pixels is usually considered defective and customers can request an exchange for a new one. The location of defective pixels is also important. A display with only a few defective pixels may be unacceptable if the defective pixels are near each other. Manufacturers may also relax their replacement criteria when defective pixels are in the center of the viewing area. Zero-Power Displays The Zenithal Bistable Device (ZBD) developed by QinetiQ (formerly DERA), can retain an image without power. The crystals may exist in one of two stable orientations (Black and "White") and power is only required to change the image. ZBD Displays is a spin-off company from QinetiQ who manufacture both grayscale and colour ZBD devices.

A French company, Nemoptic, has developed another zero-power, paper-like LCD technology which has been mass-produced in Taiwan since July 2003. This technology is intended for use in low-power mobile applications such as e-books and wearable computers. Zero-power LCDs are in competition with electronic paper. 3.5.5 Drawbacks LCD technology still has a few drawbacks in comparison to some other display technologies: While CRTs are capable of displaying multiple video resolutions, each with the same quality, LCD displays usually produce the crispest images in a "native resolution". LCD displays generally have a lower contrast ratio than that on a plasma display or CRT. This is due to their "light valve" nature: some light always leaks out making black grey. LCDs have longer response time than their plasma and CRT counterparts, creating ghosting and mixing when images rapidly change; this caveat however is continually improving as the technology progresses. The viewing angle of a LCD is usually less than that of most other display technologies thus reducing the number of people who can conveniently view the same image. However, this negative has been capitalised upon by an electronics company, allowing multiple TV outputs from the same LCD screen just by changing the angle from where the TV is seen. Such a set can also show two different images to one viewer, providing 3-D. Many users of LCD monitors get migranes and other severe eyestrain problems from the flicker nature of the fluorescent backlights. LCD screens also occasionally suffer from image persistence, which is similar to screen burn on CRT displays.

3.6 Power Supply Unit

Introduction As we all know any invention of latest technology cannot be activated without the source of power. So it this fast moving world we deliberately need a proper power source which will be apt for a particular requirement. All the electronic components starting from diode to Intel ICs only work with a DC supply ranging from 5v to 12v. We are utilizing for the same, the most cheapest and commonly available energy source of 230v-50Hz and stepping down, rectifying, filtering and regulating the voltage. This will be dealt briefly in the forth-coming sections. Step Down Transformer When AC is applied to the primary winding of the power transformer it can either be stepped down or up depending on the value of DC needed. In our circuit the transformer of 230v/15-0-15v is used to perform the step down operation where a 230V AC appears as 15V AC across the secondary winding. One alteration of input causes the top of the transformer to be positive and the bottom negative. The next alteration will temporarily cause the reverse. The current rating of the transformer used in our project is 2A. Apart from stepping down AC voltages, it gives isolation between the power source and power supply circuitries. Rectifier Unit In the power supply unit, rectification is normally achieved using a solid state diode. Diode has the property that will let the electron flow easily in one direction at proper biasing condition. As AC is applied to the diode, electrons only flow when the anode and cathode is negative. Reversing the polarity of voltage will not permit electron flow. A commonly used circuit for supplying large amounts of DC power is the bridge rectifier. A bridge rectifier of four diodes (4*IN4007) are used to achieve full wave rectification. Two diodes will conduct during the negative cycle and the other two will conduct during the positive half cycle. The DC voltage appearing across the output terminals of the bridge rectifier will be somewhat lass than 90% of the applied rms value. Normally one alteration of the input voltage will reverse the polarities. Opposite ends of the transformer will therefore always be 180 degree out of phase with each other.

For a positive cycle, two diodes are connected to the positive voltage at the top winding and only one diode conducts. At the same time one of the other two diodes conducts for the negative voltage that is applied from the bottom winding due to the forward bias for that diode. In this circuit due to positive half cycleD1 & D2 will conduct to give 10.8v pulsating DC. The DC output has a ripple frequency of 100Hz. Since each altercation produces a resulting output pulse, frequency = 2*50 Hz. The output obtained is not a pure DC and therefore filtration has to be done. Filtering Unit Filter circuit which is usually a capacitor acting as a surge arrester always follow the rectifier unit. This capacitor is also called as a decoupling capacitor or a bypassing capacitor, is used not only to short the ripple with frequency of 120Hz to ground but also to leave the frequency of the DC to appear at the output. A load resistor R1 is connected so that a reference to the ground is maintained. C1R1 is for bypassing ripples. C2R2 is used as a low pass filter, i.e. it passes only low frequency signals and bypasses high frequency signals. The load resistor should be 1% to 2.5% of the load.

1000f/25v : for the reduction of ripples from the pulsating. 10f/25v 0,1f : for maintaining the stability of the voltage at the load side. : for bypassing the high frequency disturbances.

Voltage Regulators The voltage regulators play an important role in any power supply unit. The primary purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC voltage to the device. Power supplies without regulators have an inherent problem of changing DC voltage values due to variations in the load or due to fluctuations in the AC

liner voltage. With a regulator connected to the DC output, the voltage can be maintained within a close tolerant region of the desired output. IC7812 and 7912 is used in this project for providing +12v and 12v DC supply.

4. APPLICATIONS Accelerometers can be used to measure vehicle acceleration. They allow for performance evaluation of both the engine/drive train .Useful numbers like 0-60 mph, 600 mph and 1/4 mile times can all be found using accelerometers. Accelerometers can be used to measure vibration on cars, machines, buildings, process control systems and safety installations. They can also be used to measure seismic activity, inclination, machine vibration, dynamic distance and speed with or without the influence of gravity. Applications for accelerometers that measure gravity, wherein an accelerometer is specifically configured for use in gravimetry are called gravimeters. Accelerometers are also increasingly used in the Biological Sciences. High frequency recordings of bi-axial or tri-axial acceleration (>10 Hz) allows the discrimination of behavioral patterns while animals are out of sight. Furthermore, recordings of acceleration allow researchers to quantify the rate at which an animal is expending energy in the wild, by

either determination of limb-stroke frequency or measures such as Overall Dynamic Body Acceleration Such approaches have mostly been adopted by marine scientists due to an inability to study animals in the wild using visual observations, however an increasing number of terrestrial biologists are adopting similar approaches. This device can be connected to an amplifier to amplify the signal. Accelerometers are also used for machinery health monitoring of rotating equipment such as pumps, fans, rollers, compressors and cooling towers, Vibration monitoring programs are proven to save money, reduce downtime, and improve safety in plants worldwide by detecting conditions such as shaft misalignment, rotor imbalance, or bearing fault which can lead to costly repairs. Accelerometer vibration data allows the user to monitor machines and detect these faults before the rotating equipment fails. Vibration monitoring programs are utilized in industries such as automotive manufacturing,machine tool production, water and wastewater, hydropower, petrochemical and steel manufacturing.

Accelerometers are used to measure the motion and vibration of a structure that is exposed to dynamic loads Dynamic loads originate from a variety of sources including: Human activities - walking, running, dancing or skipping Working machines - inside a building or in the surrounding area Construction work - driving piles, demolition, drilling and excavating Moving loads on bridges Vehicle collisions Impact loads - falling debris Concussion loads - internal and external explosions Collapse of structural elements Wind loads and wind gusts Air blast pressure Loss of support because of ground failure Earthquakes and aftershocks

5. CONCLUSION 5.1 Conclusion Micromachining and MEMS technologies are powerful tools for enabling the miniaturization of devices useful in biomedical engineering. The system permits patient support and behavioral monitoring of their wearers. We believe that this system has large benefits for monitoring cognitive or emotional state, control appliances, as well as in many further assistance applications. We presented a recognition procedure to acquire gestures. We confirmed the feasibility of a gesture-control by evaluating the recognition performance with eight actions. We optimized the recognition procedure for a high precision in order to minimize the risk of false positive detection of arbitrary movements (insertion errors). An average recall of 79% at a precision of 93% demonstrates the intended recognition robustness. This result was achieved as a tradeoff between the number of supported gesture types and the overall recognition performance. In this work we used a set of eight gestures only and must assume that additional gestures may deteriorate the overall performance due to confusions.

Nevertheless, we confirmed with our approach that even for a practical and complex application as a limited number of gestures is sufficient.

5.2 Future Scope In the future we will compare this spotting performance to other approaches such as the Feature Similarity Search proposals. A limited gesture set also helps to minimize the number of different gesture commands that the user has to learn and remember. We further examined the recognition implementation running on the wearable device. This implementation showed a delay of less than 3ms for feature computation. We consider this result as an excellent performance for a resource constraint device implementation. These results confirm that there is sufficient remaining processing capacity to include further tasks, compute more features, and spot additional gestures. Our work demonstrates that a gesture-controlled interface is feasible for controlling a wearable system.

6. APPENDIX 6.1 Coding #include <16F877A.h> #device adc=10 #fuses NOWDT,NOPROTECT,NOLVP,NOPUT #use delay(clock=4000000, oscillator) #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) #include <lcd.c> #define RELAY0 PIN_B0 #define RELAY1 PIN_B1 #define RELAY2 PIN_B2 #define RELAY3 PIN_B3 #define RELAY4 PIN_B4 #define RELAY5 PIN_B5 #define RELAY6 PIN_B6 #define RELAY7 PIN_B7 int t11,t12,t13,t14,t21,t22,t23,t24,t31,t32,t33,t34; long int temp1,temp2,value,value2,value3; const char num[ ]="0123456789";

int i,j; unsigned int flag,match; /*const long int act[9][3]={225,247,233, 200,241,233, 256,289,238 250,200,230 245,241,198 287,240,211 281,256,213 230,200,245, 261,287,230}; */ const long int act[9][3]={280,222,252, 222,275,273, 251,195,237, 226,231,284, 242,196,248, 243,219,280, 225,220,279, 278,245,255}; long int xyz[1][3]; char val; void main() { /* ADC CONFIGURATION*/ setup_adc_ports(AN0_AN1_AN3); setup_adc(ADC_CLOCK_INTERNAL); SET_TRIS_B(0x00); OUTPUT_B(0xFF); lcd_init(); lcd_send_byte(0,0x80); lcd_putc("AX AY AZ "); //enable all interrupts (else timer2 wont happen) enable_interrupts(GLOBAL);

ENABLE_INTERRUPTS(INT_RDA);

while(1) { set_adc_channel(0); delay_ms(50); value=read_adc(); xyz[0][0]=value; set_adc_channel(1); delay_ms(50); value2=read_adc(); xyz[0][1]=value2; set_adc_channel(3); delay_ms(50); value3=read_adc(); xyz[0][2]=value3; match=9; for(i=0;i<9;i++) { flag=0; for(j=0;j<3;j++) { if((xyz[0][j]<=((act[i][j])+6))&&(xyz[0][j]>=((act[i][j])-6))) flag++; if(flag==3) match=i; } } if(match==0) { output_b(0xFE); delay_ms(2000); output_b(0xFF); }

else if(match==1) { output_b(0xFD); delay_ms(2000); output_b(0xFF); } else if(match==2) { output_b(0xFB); delay_ms(2000); output_b(0xFF); } else if(match==3) { output_b(0xF7); delay_ms(2000); output_b(0xFF); } else if(match==4) { output_b(0xEF); delay_ms(2000); output_b(0xFF); } else if(match==5) { output_b(0xDF); delay_ms(2000); output_b(0xFF); } else if(match==6) {

output_b(0xBF); delay_ms(2000); output_b(0xFF); } else if(match==7) { output_b(0x7F); delay_ms(2000); output_b(0xFF); } printf("%u",match); t11=value/0x03e8; temp1=value%0x03e8; t12=temp1/0x64; temp2=temp1%0x64; t13=temp2/0x0a; t14=temp2%0x0a; t21=value2/0x3e8; temp1=value2%0x3e8; t22=temp1/0x64; temp2=temp1%0x64; t23=temp2/0x0a; t24=temp2%0x0a; t31=value3/0x3e8; temp1=value3%0x3e8; t32=temp1/0x64; temp2=temp1%0x64; t33=temp2/0x0a; t34=temp2%0x0a;

lcd_send_byte(0,0xc0); lcd_putc(num[t11]); lcd_putc(num[t12]);

lcd_putc(num[t13]); lcd_putc(num[t14]); lcd_putc(" "); lcd_putc(" "); lcd_putc(num[t21]); lcd_putc(num[t22]); lcd_putc(num[t23]); lcd_putc(num[t24]); lcd_putc(" "); lcd_putc(" "); lcd_putc(num[t31]); lcd_putc(num[t32]); lcd_putc(num[t33]); lcd_putc(num[t34]); delay_ms(900); } } //WHILE LOOP ENDS HERE //MAIN LOOP ENDS HERE

#int_RDA void isr_RDA(void) { val=getch(); if(val=='A') output_high(PIN_B1); if(val=='B') output_low(PIN_B1); if(val=='C') output_high(PIN_B2); if(val=='D') output_low(PIN_B2); }

7. REFERENCES Journal Articles S. Mohamed Mansoor Roomi, R. Jyothi Priya and H. Jayalakshmi, Hand Gesture Recognition for Human-Computer Interaction, Proc. of the IEEE journal of Computer Science 6 (9), pp. 1002 - 1007, 2010. Jrg Appenrodt, Ayoub Al-Hamadi, and Bernd Michaelis, Data Gathering for Gesture Recognition Systems Based on Single Color-, Stereo Color- and Thermal Cameras, Proc. of the IEEE International Journal of Signal Processing, Image Processing and Pattern Recognition, Vol. 3, No. 1, pp. 37 - 49, March, 2010. Chun Zhu and Weihua Sheng, Online Hand Gesture Recognition Using Neural Network Based Segmentation, Proc. of the IEEE/RSJ International Conference on Intelligent Robots and Systems, October 11 - 15, 2009. Roman Amstutz, Oliver Amft, Brian French, Asim Smailagic, Dan Siewiorek and Gerhard Trster, Performance analysis of an HMM-based gesture recognition using a wristwatch device, Proc. of the IEEE International Conference on Computational Science and Engineering, pp. 303 - 309, 2009. Prateem Chakraborty, Prashant Sarawgi, Ankit Mehrotra, Gaurav Agarwal and Ratika Pradhan, Hand Gesture Recognition: A Comparative Study, Proc. of the IEEE International MultiConference of Engineers and Computer Scientists 2008 Vol I, IMECS 2008, 19 - 21 March, 2008. Xia Liu and Kikuo Fujimura, Hand Gesture Recognition using Depth Data, Proc. of the Sixth IEEE International conference on automatic Face and Gesture Recognition, pp. 529 - 534, 2004. Sebastian Marcel, Oliver Bernier, Jean Emmanuel Viallet and Daniel Collobert, Hand Gesture Recognition using Input Output Hidden Markov Models, Proc. of the Fourth IEEE International Conference on Automatic Face and Gesture Recognition, pp. 456 - 461, 2000.

Websites www.vit.ac.in./ieee/swasti10905.pdf www.memsindustrygroup.org www.digchip.com/datasheets/parts/ datasheets/APR9600.php.html www.mmems_exchange.org/MEMS www.electroiq.com/index/mems.html www.understandingmems.com/mems.html http://www.freeadster.com/books/free-e-books.html

You might also like