112
Voice Controlled Robot For Remote Data Access VOICE CONTROLLED ROBOT FOR REMOTE DATA ACCESS PROJECT REPORT Submitted in the partial fulfilment of the award of degree of Bachelor of Technology in Electronics and Communication Engineering of Cochin University of Science and Technology by ARAVIND SURESH KUMAR NIRUPAMA SREEDHARAN SANDEEP AJAYAN SARIKA R Under the guidance of Mr. GOPAKUMAR C Asst. Prof., Electronics and Communication Engineering College of Engineering, Chengannur May 2011 College of Engineering, Chengannur

MAIN PROJECT Report

  • Upload
    aravind

  • View
    581

  • Download
    7

Embed Size (px)

DESCRIPTION

A property of MVG_OMALLOOR

Citation preview

Page 1: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

VOICE CONTROLLED ROBOT FOR REMOTE DATA ACCESS

PROJECT REPORT

Submitted in the partial fulfilment of the award of degreeof

Bachelor of Technologyin

Electronics and Communication Engineeringof

Cochin University of Science and Technologyby

ARAVIND SURESH KUMAR

NIRUPAMA SREEDHARAN

SANDEEP AJAYAN

SARIKA R

Under the guidance of

Mr. GOPAKUMAR CAsst. Prof., Electronics and Communication Engineering

College of Engineering, Chengannur

May 2011

Department of Electronics EngineeringCollege of Engineering, Chengannur– 689121

Phone: (0479) 2454125, 2451424 Fax: (0479) 2451424

College of Engineering, Chengannur

Page 2: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

ACKNOWLEDGEMENTCollege of Engineering, Chengannur

Page 3: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

First of all we thank The Lord Almighty for His grace and mercy which has helped us

reach this far with our project.

We express our sincere gratitude to the Principal, Dr. V.P.Devassia, for providing us

with the lab facilities we require for the completion of the project.

We are greatly obliged to Prof. Jyothiraj, Asst. Professor and HOD, Electronics

Department, for the encouragement and support that he has provided.

We are immensely indebted to our very understanding project co-coordinator, Sri.

Manoj Kumar P, Lecturer in Electronics, for his constructive criticisms, guidance and

advice.

We would like to thank our project guides, Mr. C Gopakumar and Sri. Sumeth K L

from the bottom of our hearts for all the help and advice they have bestowed upon us.

We on this occasion, remember the valuable suggestions and prayers offered by our

family members, classmates and friends which were inevitable for the successful

completion of the project.

ABSTRACT

College of Engineering, Chengannur

Page 4: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The project consists of a system developed to gather data of atmospheric condition in

hazardous or remote areas where human intervention is at risk. Values of atmospheric

temperature, pressure, humidity, light intensity and also wind direction are measured. Each

of these readings has its own importance under different situations, and hence the system

to be developed here will find diverse applications such as coal mines, wind turbines,

power stations, and to some extent for rescue operations.

The system has got a transmitter (ROBOT) section and a receiver section; i.e. operator

side built around controllers. ROBOT side is fitted with necessary sensors and a wireless

module for wireless data communication is provided on both sections. RF camera is used

at ROBOT side to give guidance and video information of the situation at the sight to

receiver section. PC interface makes communication with receiver section and displays the

calibrated data received from sensors and also provide controls for controlling ROBOT.

The control may be using voice commands or by using keypad provided on display

interface. The trolley on which the ROBOT runs have a built in receiver section and hence

is not a part of the project.

The system is now developed under cost constraints and hence the operational range as far

as ambient temperature, humidity, distance from receiver etc. is very limited. However

provision is present for future alterations.

CONTENTS

College of Engineering, Chengannur

Page 5: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

ACKNOWLEDGEMENT......................................................................I

ABSTRACT............................................................................................II

1 INTRODUCTION...................................................................................1

2 PROBLEM DEVELOPMENT AND OPTIMISED SOLUTION.......4

3 BLOCK DIAGRAM...............................................................................6

3.1 TRANSMITTER SECTION..........................................................................7

3.2 RECEIVER SECTION..................................................................................8

4 BLOCK DIAGRAM DESCRIPTION...................................................9

4.1 TRANSMITTER SECTION........................................................................10

4.2 RECEIVER SECTION................................................................................10

5 POWER SUPPLY.................................................................................11

5.1 DESIGN.........................................................................................................12

5.2 CIRCUIT.......................................................................................................13

6 COMPONENTS AND DEVICES........................................................14

6.1 MICROCONTROLLER..............................................................................15

6.2 XBEE MODULE..........................................................................................19

6.3 RF CAMERA/TROLLEY...........................................................................20

6.4 RS232/MAX 232............................................................................................21

6.5 ULN2003/RELAYS.......................................................................................23

6.6 16*2 LCD.......................................................................................................24

6.7 SENSORS......................................................................................................26

6.7.1 Wind direction Sensor......................................................................26

6.7.2 Temperature Sensor.........................................................................27

6.7.3 Light Sensor......................................................................................28

6.7.4 Humidity Sensor...............................................................................29

College of Engineering, Chengannur

Page 6: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

6.7.5 Pressure Sensor.................................................................................31

7 CIRCUIT IMPLEMENTATION........................................................32

7.1 TRANSMITTER SECTION........................................................................33

7.1.1 Circuit Diagram................................................................................33

7.1.2 PCB Layout.......................................................................................34

7.2 RECEIVER SECTION..............................................................................35

7.1.1 Circuit Diagram................................................................................35

7.1.2 PCB Layout.......................................................................................36

8 SOFTWARE IMPLEMENTATION...................................................37

8.1 FLOW CHART (TRANSMITTER SECTION)........................................38

8.2 FLOW CHART (RECEIVER SECTION).................................................42

9 RESULTS AND DISCUSSIONS.........................................................46

10 FUTURESCOPES AND CONCLUSION...........................................48

11 REFERENCES......................................................................................50

12 APPENDIXES.......................................................................................52

12.1 PROGRAM CODE (TRANSMITTER SECTION)..................................53

12.2 PROGRAM CODE (RECEIVER SECTION)...........................................60

12.3 PROGRAM CODE (VB PC INTERFACE)...............................................68

12.4 BILL OF MATERIALS...............................................................................79

12.5 GANTT CHART...........................................................................................80

13 DATA SHEETS.....................................................................................81

College of Engineering, Chengannur

Page 7: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

INTRODUCTION

VOICE CONTROLLED ROBOT FOR REMOTE DATA ACCESS

College of Engineering, Chengannur

Page 8: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

This system developed to gather data of atmospheric condition in hazardous or remote areas

where human intervention is at risk is designed with microcontroller (PIC), LCD, ADC,

USART, Zigbee, sensors and visual basic 6.0. Values of atmospheric temperature, pressure,

humidity, light intensity and also wind direction are measured. Each of these readings has its

own importance under different situations, and hence the system to be developed here will

find diverse applications such as coal mines, wind turbines, power stations, and to some

extent for rescue operations.

The system has got two sections- TRANSMITTER (ROBOT) and RECEIVER (operator).

The transmitter section runs over a trolley with inbuilt RF receiver and hence is not a part of

system design. The trolley may use portions of unlicensed spectrum in the 27 MHz or 49

MHz bands (VHF) and is never expected to make any interference with other radio devices

included. An RF camera provided at ROBOT transmits video as well as audio information to

the operator side. Camera has its own transmitter operating at 0.9 GHz (UHF) and receiver

module at operator side with an A/V output which may be connected to a TV system. The

camera system is also never expected to make any interference with other RF. The sensor

data handled by the controller on ROBOT side is send to the operator side as serial data via

Xbee modules operating on both sides at 2.4 GHz in ISM band. Xbee is expected not to face

any interference from other RF modules operating in other frequency bands.

Sensors include: LM35 as temperature sensor capable of measurements within -50 to 150

°C; Wind direction sensor which has been designed on ring potentiometer with a wane on its

knob towards one side, that turns the knob under wind pressure; LDR circuitry used to

measure light intensity on linear scale; Sensor ICs are used for measuring atmospheric

pressure and humidity. On chip ADC is used to acquire sensor data in digital form with 8-

bit resolution. On chip USART module handles serial transmission and reception of data via

Xbee module within 1Km radius.

The entire system receives regulated power supply at 12V, 5V and 3.3V for each of the

modules and sensors. The supply may have a centre tap rectifier or battery as source.

The RS232 serial communication interface provides serial link between PC and transmitter

section, with MAX232 used as voltage level converter; i.e. the up conversion and down

conversion between 5V on receiver section PIC side and 12V on RS232 side. The Visual

College of Engineering, Chengannur

Page 9: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Basic 6 operator interface running on PC provide operator, the interface for viewing the

sensor data received as well as to control the motion of trolley with voice commands or

onscreen keypad. This is possible by making use of relays in place of joystick of remote

control of trolley at receiver section, and being controlled by the controller at receiver

section based on commands from PC. The system runs at its maximum speed 9600bps being

limited by MAX232

LCD displays and RS232 interface are provided on both sides to perform test and

refinements under any stage of the project development as well as to ensure regular state of

working during operation.

The system shall be encased in a protective case that can withstand the atmospheric

conditions prevailing in the area of operation.

College of Engineering, Chengannur

Page 10: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

PROBLEM DEVELOPMENT AND OPTIMISED

SOLUTION

It is difficult to collect data at hazardous or remote areas where human intervention is at risk.

For such situations in coal mines, wind turbines, power stations, and to some extent for

College of Engineering, Chengannur

Page 11: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

rescue operations, the atmospheric conditions could not be measured. So this project aims at

making a system that employs various techniques to measure values of atmospheric

temperature, pressure, humidity, light intensity and also wind direction. Each of these

readings has its own importance/applications under different situations, and hence the

system to be developed here is expected to find diverse applications.

The system is planned to be built around a trolley which will carry the transmitter (ROBOT)

section consisting of sensors to remote places for data acquisition. It also contains the

wireless module for wireless data communication. The transmitted signal is to be received at

an operator section and displayed on PC. RF camera is used at ROBOT side to give

guidance and video information of the situation to receiver section. The control of trolley

may be made using voice commands or by using keypad both provided on display user

interface (PC).

The sensors as well as other modules shall be so chosen/designed to withstand the

atmospheric conditions of temperature, pressure and humidity which the system should face

as a whole.

College of Engineering, Chengannur

Page 12: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BLOCK DIAGRAM

3.1 TRANSMITTER SECTION

College of Engineering, ChengannurPOWER SOURCE

AIR TEMPERATURESENSOR

PIC

MICROCONTROLLER

A

D

C

HUMIDITYSENSORLIGHT

SENSORWIND DIRECTION

SENSORPRESSURE

SENSOR

Page 13: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

3.2 RECEIVER SECTION

College of Engineering, Chengannur

3.3 V

5 V

8 16*2 LCD DISPLAY

XBEEMODULE

USART

CAMERA

TROLLEY

Page 14: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

5

2

12 V

5 V

3.3 V

5 V

12 V

5 V

PIC

MICROCONTROLLER

PC INTERFACEVB FRONTEND

USARTMAX232

RS232 8 16*2 LCD DISPLAY

XBEEMODULE

POWER SOURCE

ULN2003 & RELAY

TROLLEY REMOTE

BUZZER

5

Page 15: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BLOCK DIAGRAM DESCRIPTION

4.1 TRANSMITTER SECTION

College of Engineering, Chengannur

Page 16: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The block diagram shows the data acquisition system with different sections built around the Peripheral Interface Controller (PIC). The various sensors such as those used to acquire temperature, humidity, pressure, wind direction and light are connected to ADC of the PIC. The pin 25 the TX of USART is the serial data output to Xbee. An 8- bit PORT of PIC is dedicated for 16*2 LCD, in which out of 8 only upper 4 lines will carry data and lower 4 is for control functions. The camera is an independent module with its own RF transmission system.

The program running in the controller will initialize every modules, perform scan of one sensor, transmits calibrated data in ASCII format suitable for display at receiver section and then displays the data in its own LCD. In a similar way data acquisition from each sensors is performed one by one. The entire process repeats itself.The power supply has a 9V cell as its source and provides regulated 5V supply for controller, sensors, LCD and also 3.3V for Xbee module. Camera operates on its own dedicated 9V cell.

4.2 RECEIVER SECTION

The receiver section is built around PIC and handles trolley motion control and data reception from transmitter section on one side while command reception from and data out to PC interface on other side. The major blocks consist of PC interface which is possible through RS232 interface which uses a MAX232 chip to perform required voltage level conversions for signals (5V on PIC side equivalent to 12V on RS232). The system runs at its maximum speed of 9600bps being limited by MAX232, which also ensures error free data acquisition from beginning to end. The PC interface has Visual Basic 6 program running on it that provides the user interface with facilities to see the received sensor data as well as give commands as voice or by onscreen keypad. The commands from PC as well as data from Xbee are received on the same pin 26, the RX of USART. Here also a 16*2 LCD module is used to display received commands. An LED indication while command reception is ON. The activation of trolley remote with 5V supply and controlling by means of four 12V relays is based on signals commands and signals respectively from PC. A ULN2003 chip working at 12V actuates relays based on signals from PIC. Here the power supply has a 12V source consisting of a 230V-50Hz (60mA) transformer.

The program initializes every module and starts reception of data from transmitter section and during the same time checks for any signal to initiate voice command reception on the same pin. Upon reception of signal to initiate voice command reception program stops data reception from Xbee, switches ON relays with a buzzer indication and waits for command reception. Upon reception of commands the received command is displayed on LCD and necessary signals are issued to control the trolley motion to the relay circuitry. Only on reception of ‘exit’ command system returns for data reception. The entire process repeats.

College of Engineering, Chengannur

Page 17: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

POWER SUPPLY

5.1 DESIGN

Requirements:- 12 VDC/9 VDC; 5 VDC; 3.3 VDC for max. current< 600mA

College of Engineering, Chengannur

Page 18: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

LM317 (Adjustable voltage regulator)

Output voltage of LM317 set using variable resistor R9.

Required output, Vout= 5V.

Choose, R9= 1K

R10 calculated as

Vout= 1.25V(1+ R9/R10)+ Iadj*R2

R10= 1250/3.745= 333Ohm

Available std. value for R10= 330Ohm

L1117-3.3 (Low drop out fixed voltage regulator)

Output voltage of L1117 is 3.3V for Xbee module

Drop out voltage= 1.45V

Hence from input 5V we can get Vout= 3.3V

Maximum output current is 1A

Min. transformer output and filter capacitor design

Transformer 230V-50Hz (600 mA)

For LM317, required Vin = Vout +5V= 10V

Fix a value for filter capacitor ‘C1’

A load resistor for full load current, R= E/I

E- required output (atleast 10V) and I- full load current.

R= 12/0.6= 20ohm

C1= T/R; where T- charging time

T= 20ms, a one cycle period to prevent increased regulator power dissipation.

C1= 0.02/20=1000 µF.

Peak-peak ripple voltage Vpd= 1/2f(C1)= 1/2*50*1000= 1.11V

Vpd/2= 0.66V (Considered to overcome ripple minima)

Min. transformer output= Vin (E)+ rectifier diode drop+ [Vpd/2]= 12V

Require transformer output= exact 12V (Min.)

College of Engineering, Chengannur

Page 19: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Require filter capacitor voltage rating>1.4 Erms to avoid surge effects

towards peak

C1= 330 µF, 25V

C2= 1 µF (optional), preferred by IC manufacturers to improve output

impedance and rejection of transients

Special Note

A capacitor is preferred for output stability, a 10 µF is chosen.

A 0.1 µF needed before C1 and C2 (if filter capacitors at more than 6 inch)

Rl used for design phase only

A 400 mAH- 9V rechargeable cell may be an alternative for transformer

and rectifier on robot section. Note that this can provide continuous

operation for only upto 10hours where a recharge much be made. This is

because circuit draws nearly 40mAmps of current.

LED indicator current limiting resistor (R1), choose 470Ohm to keep current

within 10mA (safe current for ordinary LED at 3.3V)

5.2 CIRCUIT

College of Engineering, Chengannur

Page 20: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

COMPONENTS AND DEVICES

6.1 MICROCONTROLLER

Microchip PIC (Peripheral Interface Controller) 16LF877A-

RISC MCU-35 instructions

College of Engineering, Chengannur

Page 21: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Mid Range 14bit Program Memory (8Kx14bits). Upto 8000 instructions

368x8bytes Data RAM. Upto 190 GPRs. This memory organized as banks

PORTS:- PORTA (6 bit); [PORT B,PORTC,PORTD] (8 bit); PORTC (3 bit)

Operating speed: DC - 20 MHz clock input. Internally divided by 4

Wide operating voltage range: 2.0V to 5.5V. We use 5V

Sink/Source Current: 25 mA

Supply Current: < 0.6 mA typical @ 3V, 4 MHz

Figure 6.1- The Peripheral Interface Controller (PIC) Schematic

10 bit 8 channel ADC

It operates on PORT A to which sensors are connected. We use only the most

significant 8 bits of data, though the ADC provides 10 bit resolution. ADC control

and status registers are under:-

College of Engineering, Chengannur

Page 22: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

We set it for ‘Fosc/32’ [bit7:bit6= 10]. A requirement for operations at

20MHz

ADC is made ON with ADON= 1

Scanning may be started after channel selection [bit5:bit3] with GO/DONE=

1

The GO/DONE will be reset by hardware after conversion

For sensors all channels are configured for analog input [bit3:bit0= 0000]

Result is taken from 8- bit ADRESH register using option ADFM= 0

USART

The USART is used for asynchronous serial data transfer between and PIC and Xbee

at transmitter section and for data transmissions between PIC and Xbee, PC both

sharing the same receive pin 26 (RX) of USART, at receiver section.

It has got a dedicated 8- bit baud rate generator

The baud rate is calculated for high speed asynchronous transmission as:-

The SPBRG register is loaded with the value of ‘X’ from above formula

The control and status registers are as under:-

College of Engineering, Chengannur

Page 23: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The system is made to run on external clock using CSRC= 0

We use 8- bit transmission using option TX9= 0

Mode switched to Asynchronous with SYNC= 0

High speed mode selected with BRGH= 1

The transmission uses single stop bit and with no parity

Data transmission to start requires data to get passed to TXREG register

TXIF flag in PIR1 register indicates (sets) end of transmission from TXREG

TXIF is resets only when new data is loaded into TXREG

We use serial 8- bit asynchronous reception [bit7:bit5= 100]

A stop bit if received low is detected as error [FERR= 1]

Data is received in double buffered register RCREG

If data reception continues with RCREG (Receive buffer) full, OERR= 1

On complete reception of data in RCREG flag bit RCIF in PIR1 sets

RCIF is cleared in hardware on complete intake of data from RCREG

If data reception continues with RCREG (Receive buffer) full, OERR= 1

Timers

College of Engineering, Chengannur

Page 24: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The system has got 3 timers: Timer 0 (8- bit), Timer 1 (16- bit), Timer 2 (8- bit).

Here we use Timer 0. The timer is used for providing delays.

The timer can provide a maximum delay of 65ms for a full run from 0 to 255;

i.e. full range of 8-bit values

The timer delay is calculated using:-

Delay= (4/Fosc)*prescalar*(255-X)

We put prescalar= 256 and Fosc= 4MHz in the above equation

The value of ‘X’ obtained from above formula is passed to TMR0 register to

start Timer 0 from that value

A ‘high’ on zero flag (Z) in status register indicates the end/overflow of timer

The timer configuration register for Timer 0 is:-

Port B pull ups are disabled [bit7= 1]

Timer works at Fosc/4; i.e. internal clock, using TOCS= 0

Timer source edge is selected low-to-high on RA4/TOCK1 pin, TOSE= 0

Prescalar assignment has to be done to Timer 0 using PSA= 0

Prescalar rate is selected to 1:256 using [bit2:bit0= 111]

6.2 XBEE MODULE

College of Engineering, Chengannur

Page 25: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Figure 6.2- The Xbee module

Significant Features:-

Frequency band : ISM 2.4000 - 2.4835 GHz

Supply Voltage : 2.8-3.4 VDC (Absolute)

Transmit Current : 45mA (at 3.3V)

Receive Current : 50mA (at 3.3V)

Power down mode : <10uA current

Interface : 3 V UART CMOS

Outdoor range : Up to 1 mile (1.6 km) RF LOS

Modulation : OQPSK (Offset Quadrature Phase Shift Keying)

Spread Spectrum : DSSS (Direct Sequence Spread Spectrum)

Error handling : Retries & acknowledgements

Temperature : -40° C to 85° C (Industrial Operation)

Power output : 10 mW (+10 dBm) International version

Microwave Antenna options:-

U.FL - 2.5dBi gain, 96mm, connector on end of 100mm cable

(dipole)

College of Engineering, Chengannur

Page 26: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

PCB chip antenna

1/4 monopole integrated whip antenna

RP SMA- 2.4GHz Duck Antenna 2.2dBi, 50 ohm impedance, 4" long

The Xbee module is used on either section of the system for providing point-to-point

data communication that helps receive sensor data from ROBOT side.

6.3 RF CAMERA/TROLLEY

Significant Features:-

CMOS 50Hz colour image sensor

Frequency : 0.9GHz

Transmit signal : Video+ Audio

Supply voltage : 9 VDC

Delivery distance : 50-100M

Sensitivity : +18dB (Transmitter, Receiver)

Supply current : 200mA (Camera); 500mA (Receiver)

Power consumption : <400mW (Camera)

Min. illumination : 3LUX

Picture : PAL- 628*582 (pixel); 5.78*4.199mm (area)

College of Engineering, Chengannur

Page 27: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Figure 6.3- The RKI137 model CMOS wireless camera

The RF Camera has its own transmitter and has dedicated receiver section that is

installed at receiver section of the system under development, where the output of receiver

of camera is given to the A/V input of a TV system for display. It draws a current of 200mA

from a 9 V cell working as its dedicated source. So for a single cycle of operation, it works

for approximately 2 hours.

A trolley platform is the base system on which the data acquisition transmitter

section runs. It has inbuilt receiver. It runs on six AA cells (1.5 V). The trolley remote is

controlled with relays from operator side.

6.4 RS232/MAX 232

RS232 is an asynchronous serial communications protocol, widely used on computers. The

PC interface is connected to PIC using standard RS232 connector and the inbuilt serial port

of PC. MAX 232 IC provides the necessary voltage level conversions for the signals from

either side.

Levels are: Logic 0= 0V in PIC= +12V in PC; Logic 1= 5V in PIC= -12V in

PC

MAX232 uses capacitor charge pumps to obtain 12V levels from 5V supply

The baud rate of the system is 9600bps; i.e 104us per bit

College of Engineering, Chengannur

Page 28: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Figure 5.3- The RS232 using MAX232

Significant Features:-

Supply voltage : -0.3V- 6V

Supply current : 10mA (Max. at 5.5V)

Output positive supply (Vs+) : Vcc-0.3V- 15V

Output negative supply (Vs-) : -0.3V- (-15V)

Input voltage range (Vi) : Driver (-0.3V- Vcc+0.3V)

: Receiver (+/-30V)

Output voltage range (Vo) : TIOUT ((Vs-−0.3V) to Vs++0.3V)

: R1OUT (−0.3V- Vcc+0.3V)

Temperature range : -65° C- 150° C

The user interface on PC built with VB6 has controls to start voice command input,

stop and exit. It has also provision for displaying detected commands and received data from

each sensors, a keypad alternative for motion control and VU meter.

College of Engineering, Chengannur

Page 29: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Figure 6.4- The PC VB user interface

6.5 ULN2003/RELAYS

Figure 6.5.1- The ULN2003 controlling trolley remote with relays

The switches of trolley remote control for the four motions: front, back, eft, right are

replaced with 12V relays, each to switch a 5V supply. A 12V relay is provided for switching

5V power supply for the trolley remote also. A ULN2003 relay driver IC operating at 12V

College of Engineering, Chengannur

Page 30: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

supply stands between PIC and relays. It operates based on outputs from PIC [RB7:RB4 and

RC2]

Figure 6.5.2- The internal diagram of ULN2003 DIP relay driver

6.6 16*2 LCD

Significant Features:-

Power Supply : -0.3-7 VDC

Supply Current : 3mA (at 5 V)

Input Voltage : 5.3 VDC (Max.)

Temperature : 0-50° C (Operation)

E Pulse Width : 230 nS (Min.)

Figure 6.6.1- The 16*2 LCD schematic

College of Engineering, Chengannur

Page 31: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The LCD is operated in 4- bit mode with 8- bit data being send twice as 4- bit data in

order to get it displayed [Pins: 11:14]. The data MSB is the busy flag of LCD [Pin: 14]. It

has to be checked before any write operation. It is checked after setting LCD in its ‘read’

mode. LCD contrast control is done by adjusting a ‘pot’ through which supply is given to

Pin3. LCD has also following control Pins:-

Pin4 : RS (Register Select= 1, data; 0, command)

Pin5 : RD/WR

Pin6 : EN (Enable Pulse)

Figure 6.6.2- Model of a 16*2 LCD

Important LCD commands:-

0X21 : 4-bt mode

0X0C : Display ON (without cursor)

0X06 : Entry mode

0X02 : Cursor to home position

0X01 : Clear display

0XC0+0XC<pos.>* : Second line cursor positions

0X80+0X8<pos.>* : DDRAM positions (Display)

College of Engineering, Chengannur

Page 32: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

6.7 SENSORS

All sensors except the wind direction sensor use readily available sensors in IC

packages. The calibration for sensors has been done in software based on field study.

6.7.1 Wind direction Sensor

The wind direction sensor has been constructed with a dynamic element that catches

air over a 10Kohm potentiometer, such that the wind turns the potentiometer due to the

presence of the dynamic element. The sensor is so designed that the wind will turn the pot to

that direction in which the dynamic element is along the direction of wind. This same

principle is used for commercial ones also. However since the trolley may move in any

direction, the directions are with reference to the forward direction of trolley.

Figure 6.7.1- The Wind direction sensor with its dynamic element attached to 10KOhm pot

The full range of output of potentiometer; i.e. the output of ADC for values of

resistance between 0 and 10Kohm that gives the full range of output of ADC between 0 and

255, is necessarily divided into 4 regions, for each of the wind directions. However, the

potentiometer we use do not have a full 360 degree range of rotation, so one of the

directions gets divided to either side of the extremities of the pot, which is one of the

greatest limitations of the system. We take this direction as ‘North’ with reference to trolley.

This gives direction ‘South’ as the direction of the sensor under normal conditions; i.e. when

the trolley is in motion. The exact south direction should stay at the 5Kohm point, i.e half

the full range of the pot. This should give a value nearly 128 (Decimal) as the ADC output.

College of Engineering, Chengannur

Page 33: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

The circuit consists of the pot that functions as sensor with its one terminal grounded

and other extreme terminal connected to 5V supply through a 10KOhm series resistor. This

limits maximum current to 0.5mA.

Significant Features:-

The sensor requires no calibrations in its output values from ADC

All calibrations are based on field study

Minimum detectable wind speed : 6m/s

Accuracy : +/- 5%

Direction ranges (ADC output) : North (0-42)&(212-255); West (42-

85)

South (85-170); East (170-212)

6.7.2 Temperature Sensor

Figure 6.7.2- The LM35 temperature sensor IC in TO-220 package

Significant Features:-

Supply Voltage : 4 to 30v

Temperature : -50-150 °C

Output proportional to Celsius Temperature (Scale factor: 0.1V/ ° C)

Accuracy +/-0.4 °C (Room Temp.); +/-0.8 °C (Range: 0 to 100° C)

College of Engineering, Chengannur

Page 34: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Self heating< 0.1 °C

Sensitivity: 10mV/ °C

Minimum temperature for rated accuracy is +2 °C

Draws 60 uAmp current under normal working conditions

Due to its high output and sensitivity, the sensor can be placed up to 10 metres away

from the control circuitry that can provide satisfactory operation.

The following formula is used for calibration purposes:-

Temperature (°C)= Vout * (100 °C/V)

6.7.3 Light Sensor

This sensor system consists of a readily available and cheap LDR (Light Detecting Resistor). The light sensor circuitry hence has a linear operation.

Significant Features:-

Dark Resistance : 1-2MOhm

Material : Selenium

The light sensor circuitry consist of a voltage divider in which LDR has one of its

terminals grounded and other leg connected to 5V supply through 10KOhm resistor. The

peak current is hence limited to 0.5mA.

Figure 6.7.3- The LDR light sensor circuit

The sensor calibration was based on field study with the use of a standard light

intensity meter (foot-candle meter) as reference. The field study considered cases where the

sensor circuitry under test as well as standard meter was introduced to light from the

College of Engineering, Chengannur

Page 35: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

following: a zero watt bulb, an ordinary room with a tube light lit and also without tubelight

but during day hours with medium level of sunlight and also direct sunlight. The values

were then compared and a correction factor was introduced, since the sensors showed linear

operation.

The following formula is used for calibration purposes:-

Vo= 5*R/(R+10)

Reworking the above equation gives equation for light intensity in unit of Lux.

Lux= (2500/Vo - 500)/10

6.7.4 Humidity Sensor

The humidity sensor used in this project is capacitive humidity sensor based on

silicon technology on glass wafer from Smartec. It consists of three layers base and top layer

are conductive and the layer in between is humidity sensitive polyimide. The sensor is

highly independent to temperature effects. The top layer has grid like structure. The sensor

converts the humidity into a capacitance. Due to the construction the response to humidity is

very fast (<15 sec) and the hysteresis very low (<2% RH). Linearity is considered as the

maximum deviation from a straight line between 0% RH and 100% RH.

Significant Features:-

The sensor measures from 0 to 100 % RH

The linearity is within a band of 2 % in the range between 20 and 95 % RH

Sensitivity : 0.6 pF/%RH

Temperature range : -40° C- 120° C

The relation between measured capacitance and Relative Humidity (RH) is as below:-

Cc= Cs + S *(Xrh – 55)

With : Cc= measured capacitance (pF); Cs= capacitance value at 55% RH (pF)

Xrh= measured Relative Humidity (%); S= sensitivity

This means the Relative Humidity can be calculated by:-

College of Engineering, Chengannur

Page 36: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Xrh= (Cc - Cs)/S + 55

Figure 6.7.4- The capacitive humidity sensor based on silicon technology on glass wafer

The calibration of humidity sensors is not so easy. One can perform a lot of

measurements in the climate chamber but there is a much cheaper and low cost way to check

humidity sensors by means of salt solutions. Special saturated salt solutions have always the

same humidity in the area above. This humidity depends only on temperature. Find below an

overview of salt-solutions that can be used:-

Salt (saturated in water) RH (%) @ 25 ºC RH (%) @ 20 ºC

Lithium Chloride (LiCl) 11.3 (± 0.3) 12

Magnesium Chloride (MgCl) 32.8 (± 0.3) 33.1 (± 0.2)

Magn. Nitrate [Mg(NO3)] 53.0 (± 0.1) 55

Sodium Chloride (NACl) 75.3 (± 0.1) 75.5 (± 0.1)

Potassium Chloride (K2SO4) 97.3 (± 0.5) 97.6 (± 0.5)

The salt solution must be put into a glass container with a sealable top. With a couple

of cm. Salt solution on bottom the humidity above is constant and only depends on

temperature. Place the sensor into the air above the solution and close the access hole

College of Engineering, Chengannur

Page 37: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

carefully. Leave the sensor stabilizing for about half an hour and read afterwards the sensors

value. Be aware that the temperature of the container needs to be constant over the period.

Therefore it is recommended to use a well-isolated glass container. In case a two point

calibration is performed in general LiCl and NaCl solutions are used. In a three point

calibration LiCl, Mg(NO3) and K2SO4 solutions are recommended.

6.7.5 Pressure Sensor

Figure 6.7.5.1- The internal schematic (left) and pressure sensor module (right)

The pressure sensor used in this project is ‘MPXHZ6115A6U’ model on-chip signal

conditioned, temperature compensated and calibrated sensor from Motorola. Note that the

sensor is internally calibrated for working at 5V supply and hence further calibrations are

never needed.

Figure 6.7.5.2- Output source current operation circuit (Datasheet)

Significant Features:-

Supply Voltage : 5 VDC

College of Engineering, Chengannur

Page 38: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Supply Current : 10mA

Pressure range : 15- 115Kpascal (Max. 400KPascal)

Temperature : -40° C- 125° C

Accuracy : +/- 1.5

Sensitivity : 45.9 mV/Kpascal

Output is calculated as:-

Vout= VS* (0.009* P - 0.095) ± (Pressure Error x Temp. Factor* 0.009* VS)

Where ‘VS’ is supply voltage (5.0± 0.25 VDC)

College of Engineering, Chengannur

Page 39: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

CIRCUIT IMPLEMENTATION

College of Engineering, Chengannur

Page 40: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

7.1 TRANSMITTER SECTION

7.1.1 Circuit Diagram

The schematic diagram of circuit of transmitter section is shown below.

College of Engineering, Chengannur

Page 41: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

7.1.2 PCB Layout

The following layout is that of the about circuit of receiver section. The layout generation was done with OrCAD 9 where the line width was choosen ‘8mm’.

College of Engineering, Chengannur

Page 42: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

7.2 RECEIVER SECTION

7.1.1 Circuit Diagram

The schematic diagram of circuit of receiver section is shown below.

College of Engineering, Chengannur

Page 43: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

7.1.2 PCB Layout

The following layout is that of the about circuit of receiver section. The layout generation was done with OrCAD 9 where the line width was choosen ‘8mm’.

College of Engineering, Chengannur

Page 44: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

SOFTWARE IMPLEMENTATION

College of Engineering, Chengannur

Page 45: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

8.1 FLOW CHART (TRANSMITTER SECTION)

College of Engineering, Chengannur

START

Allocate m/m for registers in data RAM

Initialize Program memory

Declare subroutines for data display on LCD

Set count=3

Configure USART,ADC,Timer and Ports for sensors and LCD

Initialize LCD

Count=Count-1

If Count

=0

Display “ZIGBEE BASED DATA ACQUISITION ROBOT”

A

Delays (15ms, 5ms, 50us)

No

Yes

D

Page 46: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

Display TEMPERATURE

B

Take ‘TEMPERATURE’ data

Delay (1s, 10us)

Transmit ‘LIGHT INTENSITY’ data

Caliberate

Take ‘LIGHT INTENSITY’ data

Delay 1s

Transmit ‘TEMPERATURE’ data

Convert to ASCII

Delay 1s

Display LIGHT INTENSITY

Convert to ASCII

A

Caliberate

Page 47: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

If Value>6

3

If Value>12

6

If Value>18

9

Delay 1s Delay 1sDelay 1s Delay 1s

Display “NORTH”

Display “WEST”

Display “EAST”

Display “SOUTH”

Transmit “NORTH”

Transmit“WEST”

Transmit“EAST”

Transmit “SOUTH”

Delay 1s

C

No

Yes

Yes

Yes

No

No

B

Take ‘WIND DIRECTION’ data value

Page 48: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

Take ‘HUMIDITY’ data

Convert to ASCII

Display HUMIDITY

Transmit ‘HUMIDITY’ data

D

Take ‘PRESSURE’ data

Convert to ASCII

Transmit ‘PRESSURE’ data

Display PRESSURE

Delay 1s

C

Convert to ASCII

Caliberate

Page 49: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

8.2 FLOW CHART (RECEIVER SECTION)

College of Engineering, Chengannur

START

Allocate m/m for registers in data RAM

Initialize Program memory

Declare subroutines for data display on LCD

Set count=3

Configure USART,ADC,Timer and Ports for sensors, buzzer, relays and LCD

Initialize LCD

Count=Count-1

If Count

=0

Display “voice controlled x-bee robot”

Delays (15ms, 5ms, 50us)

No

Yes

Delay 1s

A

E

Page 50: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

Receive data

A

If data= ‘*’ Transfer data to PC

No

Yes

Trolley remote ON

Buzzer ON

Delay 0.5s

Buzzer OFF

Display “waiting for voice commands”

Receive data

D

If data= ‘L’ Display “left”

Initiate trolley control 'left'

DB

No

Yes

Page 51: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

B

If data= ‘R’

Display “right”

Initiate trolley control 'right'

D

If data= ‘F’ Display “front”

Initiate trolley control 'front'

D

If data= ‘B’

Display “back”

Initiate trolley control 'back'

D

If data= ‘S’ Display “stop”

Initiate trolley control 'stop'

D

If data= ‘A’

Display “straight”

Initiate trolley control 'staright'

D

No

No

No

No

Yes

Yes

Yes

Yes

Yes

C

No

Page 52: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

College of Engineering, Chengannur

If data= ‘E’

D

No

Yes

C

Display “VOICE MODE EXIT”

Trolley remote OFF

Delay 1s

E

Page 53: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

RESULTS AND DISCUSSIONS

College of Engineering, Chengannur

Page 54: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

This project which aimed at making a system that moves over a trolley and collect data from

remote areas, where the motion of the trolley being controlled by voice commands/keypad

from operator side was completed as expected and is therefore named- ‘VOICE

CONTROLLED ROBOT FOR REMOTE DATA ACCESS’.

The sensors, controllers, ‘xbee’ for data communication and trolley form the major parts of

the system. The sensors were installed and calibrated based on field study. However the

following challenges still exist:-

The calibration of humidity sensor could not be done as expected. However

this was pointed by the manufacturer also

The wind direction sensor was not purchased, instead it was handmade by

coupling a wind catching element with a pot. The minimum detectable wind speed as

well as accuracy is therefore seriously limited when compared to sensors available in

market. However the cost could be brought down to a very low value.

The sensors were calibrated based on rough field study and this is not a

standard practice. Otherwise calibration should have been done against a standard

device (sensors).

A serious limitation is put over the working range (distance) of the entire

system by the limited range (30m) of the trolley, though the data communication is

possible up to 1Km successfully. However this could be overcome using a trolley

with a longer range of operation, but this will increase the cost.

The project failed to make an efficient braking system for the trolley on

which the system moves.

The temperature sensor is capable of measuring up to 150° C. However for

practical applications, a higher range of operation is desired. But, choice of a similar

sensor with such a good sensitivity and accuracy for higher temperature ranges is

limited by cost constraints. Similarly, considering the operating temperature of other

modules the entire system is designed to work at an ambient temperature of 150° C.

College of Engineering, Chengannur

Page 55: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

FUTURESCOPES AND CONCLUSION

College of Engineering, Chengannur

Page 56: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Sensors currently used may be replaced for higher range of operation (temperature, pressure

and humidity) while providing required mechanical support according to the requirement

and where cost doesn’t matter:-

ML 5.8GHz-1Km camera system (Cost: INR 70,000)

High temperature (Range -70 °C -500 °C) Platinum RTD-Pt100 (Cost: INR 600)

Capacitive polymer humidity sensor (Oper. temperature: -40 °C-120 °C)-HCH1000

(Cost: INR 100) (Note: All these components can work at 12 VDC)

The system can be added with ‘wind speed sensor’

The system has important role at:-

Power plants where the transmitter section may be installed with components suited

to the conditions

In test centre/lab experiments for which human intervention is at risk

With added sensors for distance measurement, the system may be used for rescue

operations

For similar cases in other industries

College of Engineering, Chengannur

Page 57: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

REFERENCES

College of Engineering, Chengannur

Page 58: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

http://en.wikipedia.org //OQPSK, voltage regulators, camera

http://www.digi.com //Xbee specifications and models

http://th-friedrichs.de/TH_Friedrichs/site/engl//Wind direction sensor specifications and

models

http://www.sciencedirect.com/ //Caliberation methods for sensors

http://calc.50x.eu //Hexadecimal-Decimal-Binary converter

http:// http://robokits.co.in //Camera vendor

http://www.8051projects.net //LCD commands

http://www.youtube.com //Visual Basic 6- Tutorial

College of Engineering, Chengannur

Page 59: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

APPENDIXES

College of Engineering, Chengannur

Page 60: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

12.1 PROGRAM CODE (TRANSMITTER SECTION)

LIST P=PIC16F877A //Listing the type of IC used

#INCLUDE "P16F877A.INC"

CBLOCK 0X20

//Allocate data memory space for GPRs

ENDC

LCMD MACRO CMD //Steps for passing LCD commands

MOVLW CMD //CMD represents the commands passed

MOVWF R1 //‘R1’ holds the command

BCF FLAG,0 //Flag bit used to distinguish CMD/CHAR,VAR

CALL SUB //Call ‘Data Out’ procedure

ENDM

LCHAR MACRO CHAR //For passing character to LCD

MOVLW CHAR

MOVWF R1

BSF FLAG,0 //Flag, 0th bit set if character is passed

CALL SUB

ENDM

LVAR MACRO VAR //For passing value

MOVF VAR,0

MOVWF R1

BSF FLAG,0 //Flag, 0th bit set for passing value also

CALL SUB

ENDM

ORG 0 //Program memory start

MOVLW 0X03 //Counter for initialization steps repetition

MOVWF C1

L3 BSF STATUS,5 //Data Memory Bank 1 selection

BCF STATUS,6

CLRF TRISD //PORT D set as full output for LCD

MOVLW 0X87 //Timer 0 configuration

MOVWF OPTION_REG

BSF TRISA,0 //PORT A set as input for sensors

BSF TRISA,1

BSF TRISA,2

BSF TRISA,3

MOVLW 0X00 //ADC result in ADRESH, all inputs analog

College of Engineering, Chengannur

Page 61: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

MOVWF ADCON1

BSF TRISC,7 //Pin 26 set for serial input from Xbee

BCF TRISC,6 //Pin 25 set for serial output to Xbee

MOVLW 0X24 //USART Trans. set for 8-bit,Async,high speed

MOVWF TXSTA

MOVLW 0X19 //USART set for 9600bps serial data transfer

MOVWF SPBRG

BCF STATUS,5 //Bank 0 selection

BCF STATUS,6

CLRF PORTD //PORT D full output set as ‘0’

MOVLW 0X85 //ADC started on channel 0

MOVWF ADCON0

MOVLW 0X90 //USART Rcvr. set for serial,8-bit,continuous

MOVWF RCSTA

MOVLW 0XC4 //A 15ms TIMER 0 delay

CALL TMRT

MOVLW 0XEB //A 5ms TIMER 0 delay

CALL TMRT

MOVLW D'50' //A 50us delay

MOVWF C2

DECFSZ C2,1

GOTO $-1

MOVLW 0X30 //LCD initialization command for 8-bit mode

MOVWF PORTD

CALL EN //Enable pulse

LCMD 0X21 //LCD command;4-bt mode

LCMD 0X0C //LCD command; Display ON (without cursor)

LCMD 0X06 //LCD command; Entry mode

LCMD 0X02 //LCD command; Cusor to home position

LCMD 0X01 //LCD command; Clear display

DECFSZ C1,1 //Count decrement by 1

GOTO L3

LCMD 0X01

LCMD 0X80 //LCD command; DDRAM home position

LCHAR 'Z' //Display ‘TITLE’

LCMD 0XC0 //LCD command;Second line first position

LCHAR 'A'

CALL DELAY //A 1s delay

College of Engineering, Chengannur

Page 62: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BEGIN NOP //A 1us delay (instruction cycle period)

MOVLW B'10000001' //ADC halted with channel 0 selected

MOVWF ADCON0

CALL SR1 //Steps for acquirng sensor data from channel 0

MOVLW ' '

CALL SR2 //Steps to transmit data in ‘W’ via Xbee

MOVL W 'T' //Character transmission ‘TEMPERATURE’

CALL SR2

//Note: Mnemonics here same as that for previous steps

MOVLW ' '

CALL SR2

CALL SR4 //Steps to transmit sensor data (ASCII) via Xbee

MOVLW ','

CALL SR2

MOVLW ' '

CALL SR2

LCMD 0X01

LCMD 0X80

LCHAR 'T' //Display ‘TEMPERATURE’

LCMD 0XC5 //LCD command;second line 5th position

LVAR R3 //Display sensor data (ASCII)

LVAR R4

LVAR R5

CALL DELAY

MOVLW B'10001001' //ADC halted with channel 1 selected

MOVWF ADCON0

CALL SR1 //Steps for acquirng sensor data from channel 1

//Character transmission ‘LIGHT’

//Note: Mnemonics here same as that for previous steps

//Display ‘LIGHT’

//Note: Mnemonics here same as that for previous steps

CALL DELAY

MOVLW B'10010001' //ADC halted with channel 2 selected

MOVWF ADCON0

MOVLW D'10' //A 10us delay

MOVWF C3

DECFSZ C3,1

GOTO $-1

College of Engineering, Chengannur

Page 63: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

NOP

NOP

BSF ADCON0,2 //ADC scanning channel 2

BTFSC ADCON0,2 //Waiting for ADC to finish

GOTO $-1

MOVF ADRESH,0 //ADC output moving to ‘M1’

MOVWF M1

// Character transmission ‘WIND DIRECTION’

//Note: Mnemonics here same as that for previous steps

//Display ‘WIND DIRECTION’

//Note: Mnemonics here same as that for previous steps

MOVLW D'63' //Move value ‘63’ to ‘W’

SUBWF M1,0 //[M1]-[W]->[W]

BTFSS STATUS,0 //Check for carry/borrow

GOTO WEST //Pass ‘WEST’ if [M1]<[W]; i.e no borrow/a carry

MOVLW D'126' // Move value ‘126’ to ‘W’

SUBWF M1,0

BTFSS STATUS,0

GOTO SOUTH //Pass ‘SOUTH’ if [M1]<[W]

MOVLW D'189' // Move value ‘189’ to ‘W’

SUBWF M1,0

BTFSC STATUS,0

GOTO EAST //Pass ‘NORTH’ if [M1]<[W]

GOTO NORTH //Pass ‘EAST’ if [M1]>[W]

WEST //Display ‘WEST’

//Note: Mnemonics here same as that for previous steps

CALL DELAY

//Character transmission ‘WEST’

//Note: Mnemonics here same as that for previous steps

GOTO LOP //Go for scanning next sensor data

SOUTH //Note: Mnemonics here same as that for previous steps

EAST //Note: Mnemonics here same as that for previous steps

NORTH //Note: Mnemonics here same as that for previous steps

LOP MOVLW B'10011001' //ADC halted with channel 3 selected

MOVWF ADCON0

CALL SR1 //Steps for acquirng sensor data from channel 3

//Character transmission ‘PRESSURE’

//Note: Mnemonics here same as that for previous steps

College of Engineering, Chengannur

Page 64: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

//Display ‘PRESSURE’

//Note: Mnemonics here same as that for previous steps

CALL DELAY

MOVLW B'10100001' //ADC halted with channel 4 selected

MOVWF ADCON0

CALL SR1 //Steps for acquirng sensor data from channel 4

//Character transmission ‘HUMIDITY’

//Note: Mnemonics here same as that for previous steps

//Display ‘HUMIDITY’

//Note: Mnemonics here same as that for previous steps

CALL DELAY

GOTO BEGIN //SYSTEM RESTART (Program)

TMRT MOVWF TMR0 //Start TIMER 0 by passing value to TMR0

MOVF TMR0,0 //Engage ‘W’ to make use of zero flag

BTFSS STATUS,2 //Wait unit zero flad sets;i.e TIMER overflow

GOTO $-2

NOP

MOVLW 0X30

MOVWF PORTD

CALL EN

RETURN

EN BSF PORTD,3 //PORT D bit 3 connected to LCD enable is set

NOP

NOP

NOP

BCF PORTD,3 //Enable pin of LCD made low

RETURN

DELAY BCF STATUS,5 //A 1s delay subroutine

BCF STATUS,6

MOVLW D'15'

MOVWF C4 //Set count

MOVLW 0X04

MOVWF TMR0

MOVF TMR0,0

BTFSS STATUS,2

GOTO $-2

DECFSZ C4,1

GOTO $-6

College of Engineering, Chengannur

Page 65: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

NOP

RETURN

SR1 MOVLW D'10' //10us delay for ADC data acquisition

MOVWF C3

DECFSZ C3,1

GOTO $-1

NOP

NOP

BSF ADCON0,2 //ADC scan/convertion starting

BTFSC ADCON0,2

GOTO $-1

MOVF ADRESH,0 //ADC output moving to ‘R6’ and ‘R2’

MOVWF R6

MOVWF R2

MOVLW 0XFF //Move binary value ‘11111111’ to ‘R3’

MOVWF R3

MOVLW D'100' //Getting value in 100s position of result

INCF R3,1 //‘R3’ will finally contain value in 100s position

SUBWF R2,1 //Division by repeated subtraction

BTFSC STATUS,0 //Wait unit a borrow/no carry generated

GOTO $-3

ADDWF R2,1 //‘R2’ will finally contain digits other than 100s

MOVLW 0XFF

MOVWF R4

MOVLW 0X0A //Getting value in 10s position of result

INCF R4,1 //‘R4’ will finally contain value in 10s position

SUBWF R2,1

BTFSC STATUS,0

GOTO $-3

ADDWF R2,0 //‘R2’ will finally contain digit in 1s position

MOVWF R5 //Move value in 1s position to ‘R5’

MOVLW 0X30

ADDWF R3,1 //Adding ‘0X30’ to convert sensor data to ASCII

ADDWF R4,1

ADDWF R5,1

RETURN

SR2 MOVWF TXREG //Move [W]->[TXREG] to start transmission

BCF PIR1,4 //Clear TXIF flag that indicates TXREG is empty

College of Engineering, Chengannur

Page 66: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BTFSS PIR1,4

GOTO $-1 //Wait for TXREG to get emptied

BSF STATUS,5

BCF STATUS,6

MOVLW 0X87

MOVWF OPTION_REG

BCF STATUS,5

BCF STATUS,6

MOVLW D'235' //A 5ms delay

MOVWF TMR0

MOVF TMR0,0

BTFSS STATUS,2

GOTO $-2

NOP

RETURN

SR4 MOVF R3,0 //Subroutine to transmit sensor data

CALL SR2

MOVF R4,0

CALL SR2

MOVF R5,0

CALL SR2

RETURN

SUB BCF STATUS,6

BSF STATUS,5

MOVLW 0XF0 //Make upper 4 pins of PORT D as inputs

MOVWF TRISD

BCF STATUS,6

BCF STATUS,5

BSF PORTD,1 //PORT D bit 1 connected to LCD RD/WR is set

NOP

NOP

BSF PORTD,3 // PORT D bit 3 connected to LCD enable is set

NOP

NOP

BTFSC PORTD,7 //Checking pin 14 of LCD;i.e data MSB(busy flag)

GOTO $-1 //Wait until pin 14 of LCD clears

BSF STATUS,5

BCF STATUS,6

College of Engineering, Chengannur

Page 67: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

CLRF TRISD //Make all pins of PORT D as outputs

BCF STATUS,5

BCF STATUS,6

CLRF PORTD //PORT D full output set as ‘0’

MOVF R1,0 //Move [R1]->[W];i.e data for LCD

ANDLW 0XF0 //Make lower nibble of [W] zero and pass to LCD

MOVWF PORTD

BTFSC FLAG,0 //Checking 0th bit of flag register

BSF PORTD,2 //PORT D bit 2 connected to LCD RS is set

CALL EN

SWAPF R1,0 //Swap nibbles of ‘R1’ and pass to ‘W’

ANDLW 0XF0

MOVWF PORTD

BTFSC FLAG,0

BSF PORTD,2

CALL EN

BCF PORTD,2 //PORT D bit 2 connected to LCD RS is reset

RETURN

END //Program end

12.2 PROGRAM CODE (RECEIVER SECTION)

LIST P=PIC16F877A //LISTING THE TYPE OF IC USED

#INCLUDE "P16F877A.INC"

CBLOCK 0X20 //REGISTER INITIALISATION BLOCK

//Allocate data memory space for GPRs

ENDC

LCOM MACRO COM //COMMAND MACRO

MOVLW COM

MOVWF M1

BCF M2,0

CALL SUB

ENDM

LDATA MACRO DATA //DATA MACRO

MOVLW DATA

MOVWF M1

BSF M2,0

CALL SUB

College of Engineering, Chengannur

Page 68: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

ENDM

LVALUE MACRO VALUE //VALUE DATA MACRO

MOVF VALUE,0

MOVWF M1

BSF M2,0

CALL SUB

ENDM

ORG 0X00 //Program memory start

BCF STATUS,6 //Main program

BCF STATUS,5

CLRF R1

CLRF M1

CLRF M2

BSF STATUS,5 //ADC and USART initialization

BCF STATUS,6

MOVLW B'10000111'

MOVWF OPTION_REG

MOVLW 0X24

MOVWF TXSTA

MOVLW .25 //Note: The prefixes ('D'='d'='.') are all same

MOVWF SPBRG

MOVLW 0X00

MOVWF ADCON1

BCF TRISC,6

BSF TRISC,7

BCF TRISE,0 //BUZZER power control pin

BCF TRISC,2 //TROLLEY REMOTE power control pin

CLRF TRISB //Port initialization for RELAYS

BCF STATUS,5

BCF STATUS,6

MOVLW 0X90

MOVWF RCSTA

CLRF PORTA //Output on all ports initialized as zero

CLRF PORTB

CLRF PORTC

CLRF PORTD

CLRF PORTE

College of Engineering, Chengannur

Page 69: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

MOVLW 0X03 //Set count for LCD initialization repetition

MOVWF R1

FIRST BSF STATUS,5 //LCD initialisation

BCF STATUS,6

CLRF TRISD

BCF STATUS,5

BCF STATUS,6

CALL DELAY1 //15ms delay

CALL DELAY1

CALL DELAY1

CALL FNSET

CALL DELAY1 //5ms delay

CALL FNSET

MOVLW D'254'

MOVWF TMR0

MOVF TMR0,0

BTFSS STATUS,2

GOTO $-2

CALL FNSET

LCOM 0X21

LCOM 0X0C

LCOM 0X06

LCOM 0X02

LCOM 0X01

DECFSZ R1,1

GOTO FIRST

DISP LCOM 0X01

LCOM 0X80

LDATA 'v' //Display ‘voice controlled x-bee robot’

//Note: Mnemonics here same as that for previous steps

CALL DEL1S

GOTO MSG

DELAY1 MOVLW D'235' //5ms delay

MOVWF TMR0

MOVF TMR0,0

BTFSS STATUS,2

GOTO $-2

RETURN

College of Engineering, Chengannur

Page 70: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

DELAY MOVLW .255 //0.25s delay

MOVWF Y2

AN MOVLW .255

MOVWF Y1

DECFSZ Y1,1

GOTO $-1

DECFSZ Y2,1

GOTO AN

RETURN

DEL1S MOVLW D'15' //1s delay

MOVWF CNT

MOVLW D'1'

MOVWF TMR0

MOVF TMR0,0

BTFSS STATUS,2

GOTO $-2

DECFSZ CNT,1

GOTO $-6

NOP //1us delay

RETURN

FNSET MOVLW 0X30 //LCD command; 8- bit mode initialization

MOVWF PORTD

BSF PORTD,3

NOP

NOP

NOP

BCF PORTD,3

RETURN

ENABLE BSF PORTD,3 //Enable pulse for LCD

NOP

NOP

NOP

BCF PORTD,3

RETURN

SUB BSF STATUS,5 //Subroutine to transfer data/command to LCD

BCF STATUS,6

MOVLW 0XF0

MOVWF TRISD

College of Engineering, Chengannur

Page 71: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BCF STATUS,5

BCF STATUS,6

BSF PORTD,1

BSF PORTD,3

BTFSC PORTD,7

GOTO $-1

BSF STATUS,5

BCF STATUS,6

CLRF TRISD

BCF STATUS,5

BCF STATUS,6

CLRF PORTD

MOVLW 0XF0

ANDWF M1,0

MOVWF PORTD

BTFSC M2,0

BSF PORTD,2

CALL ENABLE

SWAPF M1,0

ANDLW 0XF0

MOVWF PORTD

BTFSC M2,0

BSF PORTD,2

CALL ENABLE

BCF PORTD,2

RETURN

MSG CALL REC //Go for data reception

MOVF R0,0

SUBLW '*' //Check if received data is ‘*’

BTFSC STATUS,2

GOTO VOICE //Prepare for VOICE COMMAND reception

CALL TRANS //Go for data transfer

GOTO MSG //SYSTEM RESTART (Program)

VOICE CLRF PORTB

BSF PORTE,0 //BUZZER ON

BSF PORTC,2 //TROLLEY REMOTE ON

CALL DELAY //0.5s delay

CALL DELAY

College of Engineering, Chengannur

Page 72: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

BCF PORTE,0 //BUZZER OFF

//Display ‘waiting for voice commands’

//Note: Mnemonics here same as that for previous steps

LOP CALL REC //Go for data reception

MOVLW 'L'

SUBWF R0,0 //Check if received data is ‘L’

BTFSC STATUS,2

GOTO LEFT //Go for follow up of command ‘LEFT'’

MOVLW 'R'

SUBWF R0,0 //Check if received data is ‘R’

BTFSC STATUS,2

GOTO RIGHT //Go for follow up of command ‘RIGHT’

MOVLW 'F'

SUBWF R0,0 //Check if received data is ‘F’

BTFSC STATUS,2

GOTO FRONT //Go for follow up of command ‘FRONT’

MOVLW 'B'

SUBWF R0,0 //Check if received data is ‘B’

BTFSC STATUS,2

GOTO BACK //Go for follow up of command ‘BACK’ MOVLW 'E'

SUBWF R0,0 //Check if received data is ‘E’

BTFSC STATUS,2

GOTO EXIT //Go for follow up of command ‘EXIT’

MOVLW 'S'

SUBWF R0,0 //Check if received data is ‘S’

BTFSC STATUS,2

GOTO STOP //Go for follow up of command ‘STOP’

MOVLW 'A'

SUBWF R0,0 //Check if received data is ‘A’

BTFSC STATUS,2

GOTO STRA //Go for follow up of command ‘STRIGH’

GOTO LOP //Repeat loop

EXIT NOP

//Display ‘VOICE MODE EXIT’

//Note: Mnemonics here same as that for previous steps

BCF PORTC,2 //TROLLEY REMOTE OFF

CALL DEL1S

College of Engineering, Chengannur

Page 73: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

GOTO DISP

LEFT //Display ‘left’

//Note: Mnemonics here same as that for previous steps

BCF PORTB,4 //Initiate trolley control ‘left’

CALL DELAY

BSF PORTB,5

GOTO LOP

RIGHT //Display ‘right’

//Note: Mnemonics here same as that for previous steps

BCF PORTB,5 //Initiate trolley control ‘right’

CALL DELAY

BSF PORTB,4

GOTO LOP

FRONT //Display ‘front’

//Note: Mnemonics here same as that for previous steps

BCF PORTB,7 //Initiate trolley control ‘front’

CALL DELAY

BSF PORTB,6

GOTO LOP

BACK //Display ‘back’

//Note: Mnemonics here same as that for previous steps

BCF PORTB,6 //Initiate trolley control ‘back’

CALL DELAY

BSF PORTB,7

GOTO LOP

STOP //Display ‘stop’

//Note: Mnemonics here same as that for previous steps

CLRF PORTB //Initiate trolley control ‘stop’

CALL DELAY

GOTO LOP

STRA //Display ‘straight’

//Note: Mnemonics here same as that for previous steps

BCF PORTB,5 //Initiate trolley control ‘straight’

CALL DELAY

BCF PORTB,4

CALL DELAY

BSF PORTB,6

College of Engineering, Chengannur

Page 74: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

CALL DELAY

BCF PORTB,7

CALL DELAY

GOTO LOP

REC BSF RCSTA,CREN //Subroutine to receive data

BCF PIR1,RCIF

NOP

NOP

BTFSS PIR1,RCIF //Check if any data received

GOTO $-1

MOVF RCREG,0

MOVWF R0 //Move received data to ‘R0’

BCF RCSTA,CREN //Stop reception

RETURN

TRANS CLRF TXREG //Subroutine to Transmit data to PC

BTFSS PIR1,TXIF

GOTO $-1

MOVF R0,0

MOVWF TXREG //Move received data to start transmission

RETURN

END //Program end

12.3 PROGRAM CODE (VB PC INTERFACE)

Dim MIDHU As Integer

Option Explicit

Private My_menu As Long

Private Loop_1 As Long

Private TCount As Long

Dim TEMP As String

Dim PRE As String

Dim SPEED As String

Dim LIGHT As String

Dim DIR As String

College of Engineering, Chengannur

Page 75: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Dim HUM As String

Dim WIND As String

Private Sub Cmd_Exit_Click()

' Code to 'EXIT' the application

' MSComm1.PortOpen = True

MSComm1.Output = "E"

' MSComm1.PortOpen = False

Unload Me

End Sub

Private Sub Cmd_Start_Click()

' Cmd_Start.Caption = "Listen"

' Activate my list of commands. These will show in the 'What can I say' form of

' Microsoft Voice apllication

VoiceCmd.Activate My_menu

MIDHU = 1

' MSComm1.PortOpen = True--------------

MSComm1.Output = "*"

' MSComm1.PortOpen = False---------------

Frame1.Visible = True

' Frame2.Visible = False

End Sub

Private Sub Command1_Click()

' Deactivate my list of commands. These will now not show in the

' What can I say' form of Microsoft Voice apllication

VoiceCmd.Deactivate My_menu

MIDHU = 0

Label2.Caption = ""

College of Engineering, Chengannur

Page 76: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

' MSComm1.PortOpen = True

MSComm1.Output = "E"

' MSComm1.PortOpen = False

Frame1.Visible = False

' Frame2.Visible = True

End Sub

Private Sub Command2_Click()

Label2.BackColor = vbCyan

Label2.Caption = "STOP"

' MSComm1.PortOpen = True

MSComm1.Output = "S"

' MSComm1.PortOpen = False

End Sub

Private Sub Command3_Click()

Label2.Caption = "FORWARD"

Label2.BackColor = &HFF0101

' MSComm1.PortOpen = True

MSComm1.Output = "F"

' MSComm1.PortOpen = False

End Sub

Private Sub Command4_Click()

Label2.Caption = "LEFT DIRECTION"

Label2.BackColor = &H101FF

' MSComm1.PortOpen = True

MSComm1.Output = "L"

' MSComm1.PortOpen = False

End Sub

College of Engineering, Chengannur

Page 77: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Private Sub Command5_Click()

Label2.Caption = "REVERSE"

Label2.BackColor = vbMagenta

' MSComm1.PortOpen = True

MSComm1.Output = "B"

' MSComm1.PortOpen = False

End Sub

Private Sub Command6_Click()

' MSComm1.PortOpen = True

MSComm1.Output = "R"

' MSComm1.PortOpen = False

Label2.Caption = "RIGHT DIRECTION"

Label2.BackColor = &H1FF01

End Sub

Private Sub Command7_Click()

Label2.Caption = "STRAIGHT"

Label2.BackColor = vbYellow

' MSComm1.PortOpen = True

MSComm1.Output = "A"

' MSComm1.PortOpen = False

End Sub

Private Sub Command8_Click()

Text1.Text = ""

End Sub

Private Sub Form_Load()

MIDHU = 0

College of Engineering, Chengannur

Page 78: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

' Dim some variables used for retriving commands from 'VoiceCmd'

Dim Command As String, Description As String, Category As String, Flags As Long, Action As String

' Initialize the voice control...

VoiceCmd.Initialized = 1

' Create and return a Menu control

My_menu = VoiceCmd.MenuCreate("My Commands", "commands State", 4)

' Enable our voice control

VoiceCmd.Enabled = 1

' Suppress any voice errors that may occur

' VoiceCmd.SuppressExceptions = 1

' Load our list of commands into the menu.

VoiceCmd.AddCommand My_menu, 1, "LEFT", "LEFT DIRECTION", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "RIGHT", "RIGHT DIRECTION", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "FRONT", "FORWARD", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "BACK", "REVERSE", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "EXIT", "Exit App", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "STOP", "STOP", "listen list", 0, ""

VoiceCmd.AddCommand My_menu, 1, "STRAIGHT", "straight", "listen list", 0, ""

' VoiceCmd.AddCommand My_menu, 1, "TURN", "RIGHT", "listen list", 0, ""

' Activate the List of commands

VoiceCmd.Activate My_menu

'load the commands from the menu in to the list

TCount = VoiceCmd.CountCommands(My_menu)

For Loop_1 = 1 To TCount

VoiceCmd.GetCommand My_menu, Loop_1, Command, Description, Category, Flags, Action

Frame1.Visible = False

College of Engineering, Chengannur

Page 79: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

If MSComm1.PortOpen = False Then

MSComm1.CommPort = 1

MSComm1.Settings = "9600,n,8,1"

MSComm1.PortOpen = True

MSComm1.RThreshold = 14

End If

Next Loop_1

End Sub

Private Sub Form_Unload(Cancel As Integer)

' Remove the commands from the menu

TCount = VoiceCmd.CountCommands(My_menu)

For Loop_1 = TCount To 1 Step -1

VoiceCmd.Remove My_menu, Loop_1

Next Loop_1

' Release the usage of the command menu.

VoiceCmd.ReleaseMenu My_menu

VoiceCmd.Enabled = 0

End Sub

Private Sub MSComm1_OnComm()

Text1.Text = Text1.Text & MSComm1.Input

Text1.SelStart = 0

Text1.SelLength = 1

TEMP = Text1.SelText

Text1.SelStart = 4

Text1.SelLength = 1

LIGHT = Text1.SelText

Text1.SelStart = 8

College of Engineering, Chengannur

Page 80: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

Text1.SelLength = 1

WIND = Text1.SelText

Text1.SelStart = 10

Text1.SelLength = 1

HUM = Text1.SelText

Text1.SelStart = 14

Text1.SelLength = 1

PRE = Text1.SelText

Text1.SelStart = 18

Text1.SelLength = 1

SPEED = Text1.SelText

If (WIND = "D") Then

Text1.SelStart = 9

Text1.SelLength = 1

DIR = Text1.SelText

If DIR = "E" Then

Text2.Text = "EAST"

End If

End If

If DIR = "W" Then

Text2.Text = "WEST"

End If

If DIR = "N" Then

Text2.Text = "NORTH"

College of Engineering, Chengannur

Page 81: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

End If

If DIR = "S" Then

Text2.Text = "SOUTH"

End If

If (TEMP = "T") Then

Text1.SelStart = 1

Text1.SelLength = 3

Text5.Text = Text1.SelText

End If

If (HUM = "H") Then

Text1.SelStart = 11

Text1.SelLength = 3

Text4.Text = Text1.SelText

End If

If (LIGHT = "L") Then

Text1.SelStart = 5

Text1.SelLength = 3

Text7.Text = Text1.SelText

End If

If (PRE = "P") Then

Text1.SelStart = 15

Text1.SelLength = 3

Text3.Text = Text1.SelText

End If

College of Engineering, Chengannur

Page 82: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

If (SPEED = "S") Then

Text1.SelStart = 19

Text1.SelLength = 3

Text6.Text = Text1.SelText

End If

'Text1.Text = ""

End Sub

Private Sub Timer1_Timer()

' After a perion of silence reset the last word heard

Detect.Caption = "<Nothing>"

End Sub

' Private Sub Timer2_Timer()

' Text1.Text = ""

' End Sub

Private Sub VoiceCmd_CommandOther(ByVal CmdName As String, ByVal Command As String)

' If commands other than those listed in our menu are heard Display them

Timer1.Enabled = False

Detect.Caption = Command

Timer1.Enabled = True

Timer1.Interval = 2000

End Sub

Private Sub Voicecmd_CommandRecognize(ByVal ID As Long, ByVal CmdName As String, ByVal Flags As Long, ByVal Action As String, ByVal NumLists As Long, ByVal ListValues As String, ByVal Command As String)

' One of our listed commands has been spoken

College of Engineering, Chengannur

Page 83: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

If MIDHU = 0 Then

MsgBox "click 'LISTEN' first"

Exit Sub

Else

Timer1.Enabled = False

' Display it.

Detect.Caption = Command

' Look for it in a list and execute the relavant commands

Select Case UCase(Command)

Case "EXIT"

Cmd_Exit_Click

Case "STOP"

Label2.BackColor = vbCyan

Label2.Caption = "STOP"

' MSComm1.PortOpen = True

MSComm1.Output = "S"

' MSComm1.PortOpen = False

Case "LEFT"

Label2.Caption = "LEFT DIRECTION"

Label2.BackColor = &H101FF

' MSComm1.PortOpen = True

MSComm1.Output = "L"

' MSComm1.PortOpen = False

Case "RIGHT"

' MSComm1.PortOpen = True

MSComm1.Output = "R"

College of Engineering, Chengannur

Page 84: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

' MSComm1.PortOpen = False

Label2.Caption = "RIGHT DIRECTION"

Label2.BackColor = &H1FF01

Case "FRONT"

Label2.Caption = "FORWARD"

Label2.BackColor = &HFF0101

' MSComm1.PortOpen = True

MSComm1.Output = "F"

' MSComm1.PortOpen = False

Case "BACK"

Label2.Caption = "REVERSE"

Label2.BackColor = vbMagenta

' MSComm1.PortOpen = True

MSComm1.Output = "B"

' MSComm1.PortOpen = False

Case "STRAIGHT"

Label2.Caption = "STRAIGHT"

Label2.BackColor = vbYellow

' MSComm1.PortOpen = True

MSComm1.Output = "A"

' MSComm1.PortOpen = False

End Select

' If we not exiting then reset the timer.

If Not (UCase(Command) = "EXIT") Then

Timer1.Enabled = True

Timer1.Interval = 2000

College of Engineering, Chengannur

Page 85: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

End If

End If

End Sub

Private Sub VoiceCmd_VUMeter(ByVal Level As Long)

' This Procedure is called +- every 8 seconds.

' Set the level of out vu meter..

If VU_Meter.Max < Level Then VU_Meter.Max = Level

VU_Meter.Value = Level

End Sub

12.4 BILL OF MATERIALS

S.No Item Name Specification Quantity Net Price (Rs)

1 PIC16F877A USART with 9 bit address detection, 4 operating frequency, PORT A (6bit), PORT B, PORT C, PORT D(8 bit), PORT E(3 bit) , 10 bit ADC (8 input channel), 8K FLASH program memory (14 bit words), 368bytes data memory, 256 Bytes EEPROM data memory.

2 500

2 LM317, L1117 Adjustable and fixed output voltage regulators with low drop out voltage (1.2V). Both can give a maximum output current (1A). Regulated input up to 30V and provide output up to 37V

1 each 60

3 XBEE module Data communication up to 1 mile (1.6 km) range. Low supply voltage of +3.3V

2 4500

4 MAX 232 RS 232/(TTL/CMOS)-voltage level converter with inbuilt capacitor boost output up to 12Vfrom a single 5V supply.

1 30

5 Crystal 4 MHZ crystal 2 5

6 LED 30mA 4 2

8 Resistors 1/4 watt resistors for current. limiting and circuitry uses

26 13

College of Engineering, Chengannur

Page 86: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

9 Capacitors 1uF, 10uF, 1000uF 15 60

10 LM35 Temperature sensor based on voltage variation across a diode with inbuilt signal conditioning Range : -50-150 °C

1 35

11 LDR Light sensor based on resistance variation. Dark resistance: 1-2 MOhm

1 7

12 Power Source 230V-18V/12V transformer with o/p maximum current of 600 mA. Cell (9 V, 400mAH)

2 200

13 Relays SPDT with excitation 12V 6 300

14 LDR 2 MOhm dark resistance 1 4

15 Humidity Sensor N/A 1 490

16 Pressure Sensor N/A 1 390

17 Wind direction Sensor

Wind catching element on a spindle attached to 10KOhm pot

1 10

18 ULN2003 Drive 12 V relays from 5 V inputs. Operates at 12 VDC

1 25

19 RS232 port Serial port for PC interface 1 50

20 Camera CMOS wireless camera .Range 50 feet

1 2500

21 Trolley Supply: 9 V Range 30m 1 500

Total Estimated Cost : 9750

12.5 GANTT CHART

College of Engineering, Chengannur

Page 87: MAIN PROJECT Report

Voice Controlled Robot For Remote Data Access

DATASHEETS

College of Engineering, Chengannur