Home

Chapter 1 - Mapúa Institute of Technology

image

Contents

1. RA3 AN3 VREF NC 5 RA2 AN2 VREF Alass RA1 AN1 3L 4 RAO ANO 6 1 41 40 2 MCLR VPP NC 44 4 RB7 PGD 43 RB6 PGC RB4 42L 4 RB5 e Uem o PIC16F877 35 PIC16F874 33 A nen en ii OO 0 1 2 3 4 5 6 Tooo run El Cl Gi LL i it II N HELL B o 9 Nr OruNocoOXO x A o9 g5 lg kt EE SE Eooaeanoor SE ooonaeaanonoaoooo 0 eO cg QFP ctrrccrcritttiz E 9 2 o LL T A 5 L1 DLET E EL ET D E L1 LI LILILI LI LI LI LI OU uu fifi fit 39 93989590 RC7 RX DT lt gt 9 NC RD4 PSP4 lt gt 32HD lt RCO TIOSO TICKI RD5 PSP5 81H13 gt OSC2 CLKOUT RD6 PSP6 30 4 OSC1 CLKIN RD7 PSP7 PIC16F877 2003 vss Vss TT DD ERE Voo PIC16F874 RE2 AN7 CS RBO INT REI AN6WR D I 250 lt REO ANS RD RB2 lt 24075 RAS AN4 SS RB3 PGM sooneoguN RA4 TOCKI HHHHHHHHH UBJOUUBUBLEUL ll OO oOO Oct SE enuzoz22 aoadt lt a9 a a a qe ET RB3 PGM RB2 RB1 RBO INT VDD Vss RD7 PSP7 RD6 PSP6 RD5 PSP5 RD4 PSP4 RC7 RX DT 65 PIC16F87X Key Features PICmicro Mid Range Reference Manual PIC16F873 PIC16F874 PIC16F876 PIC16F877 DS33023 Operating Frequency DC 20 MHz DC 20 MHz DC 20 MHz DC 20 MHz RESETS and Delays POR BOR POR BOR POR BOR POR BOR PWRT OST PWRT OST P
2. u Remove Speaker Dependent custom programmed commands or Password command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS SUCCESS CMD_RECOG_SD gd Activate Speaker Dependent custom command or Password recognition 1 Group index 0 trigger 1 15 generic 16 password Expected replies STS SUCCESS STS RESULT STS SIMILAR STS TIMEOUT STS ERROR CMD ERASE SD e Remove Speaker Dependent custom command or Password recognition 1 Command position 0 31 Expected replies STS SUCCESS CMD NAME SD n Give a label for a Speaker Dependent custom programmed commands or Password command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 3 Length of label 0 31 4 n Text for label ASCII characters from A to Expected replies STS SUCCESS CMD COUNT SD x Request count of Speaker Dependent custom programmed commands or Password commands in a specified group 1 Group index 0 trigger 1 15 generic 16 password Expected replies STS_COUNT CMD_DUMP_SD un Read Speaker Dependent custom programmed commands or Password command label p label and training 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS DATA CMD_MASK_SD m Request a bit ma
3. Front and Disabled Working Working Disabled Right 7 Front and Disabled Disabled Working Working Back 8 Back and Working Disabled Working Disabled Right 23 9 Back and Left Working Disabled Disabled Working 10 Left and Working Working Disabled Disabled Right 11 All direction Disabled Disabled Disabled Disabled As shown Table 3 5 shows that the design is successful in disabling the movement of the wheelchair upon encountering an obstacle All of the wheelchair s movement commands tested show independent behavior in response to the obstacle detected As shown in the table the obstacle detected at the front will not affect the functionality of the other movements like move back move left and move right Test on the effectiveness of the bottom proximity sensors After performing the first test the next test will be performed This test focuses in measuring the effectiveness of the bottom sensors The purpose of this test is to determine if the proximity sensors is effective in detecting continuous surface which will help in avoiding accidents like falling from stairs and etc Similar to the first test the four movement command will be tested upon discontinuous surface stairs gutter etc at varying locations Upon encountering no floor surface the wheelchair will disable the movement command used with respect to the location of the discontinuous surface 24 The set of proce
4. Set Signal6 Start Return If Sensor1 Detects an Obstacle Set Signall Else Clear Signall If Sensor2 Detects an Obstacle Set Signal2 Else Clear Signal2 If Sensor3 Detects an Obstacle Set Signal3 Else Clear Signal3 If Sensor4 Detects an Obstacle Set Signal4 Else Clear Signal4 If Sensor5 Detects an Obstacle Set Signal5 Else Clear Signal5 If Sensor6 Detects an Obstacle Set Signal6 Else Clear Signa6 Fig 3 5 B Obstacle Detection Algorithm 21 First there will be a speech command input from the user Then after receiving an input voice command from the user there will be continuous checking of obstacles in that specific direction in relation to the inputted voice commands If there is an obstacle there will be no operation but if there is no obstacle detected then the command will be executed The next step is to integrate the hardware with the software components The algorithm for the speech recognition module the elevation mechanism algorithm and the obstacle detection algorithm will be programmed to the microcontroller in interfacing the hardware to the software Testing and Interpretation of Results In order to further support the study testing will be performed after the process of integrating the software and hardware is done There will be four types of test that will be performed in measuring the performance of the design Test on the effectiveness of the front and back proximity se
5. more uart specific initializat4ion rcsta ReCeive STAtus and control register bsf RCSTA SPEN 7 spen 1 rx tx set for serial uart mode M very important to set spen 1 bcf RCSTA RX9 6 rc8 9 0 8 bit mode bcf RCSTA SREN 5 sren 0 don t care in uart mode bsf RCSTA CREN 4 cren 1 enable constant reception Il and low clears errors 3 not used 0 don t care bcf RCSTA FERR 2 ferr input framing error bit 1 error 1 oerr input overrun error bit 1 error lt is only cleared when you pulse cren low bcf RCSTA RX9D O rx9d input 9th data bit ignore movf RCREG W j clear uart receiver movf RCREG W including fifo movf RCREG W Which is three deep movlw 0 any character will do movwf TXREG send out dummy character to get transmit flag valid return E KC OK OK K K KK K K K K K K K K opp K K K K K K K KKK K K b K K K OK KC K K KK K K KK ob K K KK K K KK OK K K K K K K K K D KKK K K K OK K K K 63 RS 232 SERIAL IN SERIAL OUT ROUTINES ooo KK K K KK K K K KK K K KKK K K KC K K KK K K K KK K K K KK K K KK OK K K K KK K K KK OK K K K K K K K K KKK K K Kk k kX exit with received serial data in W and in variable rx data ser in clrf is data Reset Flag btfsc RCSTA OERR goto overerror if overflow error btfsc RCSTA FERR d goto frameerror if framing error clrw uart ready btfss PIR1 RCIF goto ser inX movf RCREG W recover uart data movwf rx_data save for later bsf is data 0 se
6. Case Move Input Second Speech Command If Speech Command is Valid Switch Second Speech Command Case Forward Call Obstacle Detection System If Obstacle is considerable else Perform Forward Function Break Case Backward Call Obstacle Detection System 17 If Obstacle is considerable else Perform Backward Function Break Case Left Call Obstacle Detection System If Obstacle is considerable else Perform Left Function Break Case Right Call Obstacle Detection System If Obstacle is considerable else Perform Forward Function Break Default Call Elevation System Function Get Stop Input Command Perform Stop Command End Fig 3 3 B Speech Recognition Algorithm First the speech recognition will accept a first degree command of move or stop When the command is Stop it will perform the stop function that instantly stops the current function of the wheelchair While when the command is Move it will wait for a second degree command such as forward backward left right up and down Forward Backward Left and Right commands will trigger the obstacle detection system while Up and Down commands will affect the elevation system Other commands that are not included in the given sets of command are voided After designing the algorithm for the speech recognition module the implementation of the elevation system is next This includes integrating the 18 other 2 DC motors to the wheelchair One motor will be
7. Name Bit7 Bit6 Bit5 Bit4 Bit3 Bit 2 Bit 1 Bit 0 POR other BOR RESETS 05h PORTA RAS RA4 RA3 RA2 RA1 RAO 0x 0000 0u 0000 85h TRISA PORTA Data Direction Register 11 1111 11 1111 9Fh ADCON1 ADFM PCFG3 PCFG2 PCFG1 PCFGO 0 0000 0 0000 Legend x unknown u unchanged unimplemented locations read as O Shaded cells are not used by PORTA Note When using the SSP module in SPI Slave mode and SS enabled the A D converter must be set to one of the following modes where PCFG3 PCFG0 20100 0101 011x 1101 1110 1111 70 PIC16F87X 3 2 PORTB and the TRISB Register PORTB is an 8 bit wide bi directional port The corre sponding data direction register is TRISB Setting a TRISB bit 2 1 will make the corresponding PORTB pin an input i e put the corresponding output driver in a Hi Impedance mode Clearing a TRISB bit 2 0 will make the corresponding PORTB pin an output i e put the contents of the output latch on the selected pin Three pins of PORTB are multiplexed with the Low Voltage Programming function RB3 PGM RB6 PGC and RB7 PGD The alternate functions of these pins are described in the Special Features Section Each of the PORTB pins has a weak internal pull up A single control bit can turn on all the pull ups This is per formed by clearing bit RBPU OPTION REG 7 The weak p
8. Vss at top Vdd at bottom RX to PO TX to P2 and LED to P4 2 Open the sample code labeled Saylt Demo BS2 in the BASIC Stamp Editor 85 751516 3 Install any batteries as needed plug in the battery pack and move the Board of Education power switch to position 1 4 Download the program to the BASIC Stamp 2 module by clicking Run from the menu and click Run from the dropdown ctrl r 5 Move the power switch to position 0 and unplug the communication cable then move the power switch to position 2 6 Using the command list above Figure 3 Say the trigger word robot and select then select a word from Wordset 1 2 and then 3 if needed You can verify the word has been correctly recognized by the red LED indicator on the Say It module When you say robot the red LED will turn on for a short moment once the LED is on you can say the next word Once the Say It module has received the last Wordset command it will execute the proper routine associated with that command Here are some samples that could be used and the descriptions of the actions Try saying the following examples This will move the robot forward Module will say hello on the debug screen if one is open Module will display 3 on debug screen if one is open This will turn the robot right This will move the robot backwards stops all movement Robot gt Move Forward Robot gt Hello Robot gt Action gt Three Robot gt Turn
9. gt Right Robot gt Run gt Backwards Robot gt Stop gt small pause After disconnecting from the Say It GUI you can still verify that the Say It Module is detecting the right word by using the Debug Terminal By leaving the Board of Education connected to the computer each recognized verbal command will be printed to the Debug Terminal Note that not all commands will use a word from all 3 Wordsets to be a valid command For example Hello uses a Trigger word Robot and Hello from Wordset 1 which will end the command to then execute that debugs Hello on the BASIC Stamp Debug Terminal Troubleshooting From time to time there may be some snags that can cause what would seem like malfunctions in the module If you experience any of the symptoms listed below here are some quick fixes to try Q1 Keep getting a time out error A1 Make sure the power has not been cycled since the last time the GUI was connected Q2 Can t connect to my Say It Module A2 1 Be sure to close all terminal windows including the debug screen before connecting the GUI software A2 2 Check power and make sure it has ample voltage and current to turn on modules Q3 Will not power up A3 Check to make sure that all the connections are correct if using an AppMod header be sure the orientation is correct 86 751516 Q4 am running Windows Vista and the Say It GUI will not install properly A4 Right Click on i
10. reset all the commands set the language used or disconnect from the GUI First let s cover testing the pre existing commands Testing Commands Let s begin by testing the words that are already programmed in the Say It module These are grouped under Trigger and three Wordsets Figure 4 Built in Speaker Independent Commands Figure 4 l Select a Trigger or Wordset to test by highlighting the option in the left window pane Figure 5 and then click Test Group from the tool bar This example chose Trigger to test 78 751516 amp Saylt GUI v1 0 File Edit Tools Help A JJ coms R GK x amp S Wr Group List Triager Command List Index Description Commands Index Label Trained Conflict G3 T Robot N OK e D Trigger Group Group Group Group Group Group Group Group 3 Group 10 Group 11 Group 12 Group 13 Group ES 14 Group 15 Group ES 16 Password 53 1 Wordset ESI 2 Wordset 5 3 Wordset Test Group co o OC P O PO sch OD CO CO OO OO OO OO OO OO OO OO OH Figure 5 2 When the red LED indicator light on the module and the software window prompt you to speak speak clearly and directly at the microphone on the module If the module understands you will see the command highlighted in green You can continue this with all the words that need to be tested If the module does not understand the word or there is nothing said an information window wil
11. 0 CREATE LABEL HERE Group Group Group Group Group Group Group Group Group Group Group Group Group Group Group Password Wordset Wordset Wordset Train Command 0 1 2 3 4 5 6 7 8 sch OD CD CH OO OO OO OO OO o cco OH OH CH Figure 8 4 Once you have selected Train Command you will be prompted to say the phrase twice figure 8 to complete the training of a specific word keep the words simplistic for optimal recognition If you are unhappy with the training select erase training and start the training process over from step 3 until satisfied Command Training Command 0 of Group 1 ei CREATE LABEL HERE Phase 1 2 Press the Phase 1 button and say the word corresponding to the command CREATE LABEL HERE within 5 seconds Cancel 82 751516 5 Command Training Command 0 of Group 1 Ke CREATE LABEL HERE Phase 2 2 Press the Phase 2 button and say the word corresponding to the command CREATE LABEL HERE within 5 seconds Figure 9 Once you have successfully created a phrase you can test to confirm that it will recognize it it is suggested that you test each group after you are finished to ensure successful training Once finished you will see a number next to the group you trained indicating how many words belong to that group Figure 9 Saylt GUI v1 0 PEE File Edit Tools Help my V cows Soco zem a Group List Group 1 Command List
12. D 8 D 9 D 10 egu egu egu egu egu egu egu egu egu egu egu egu egu D 254 D 255 Voice Recognition Variable 45 VCountLo equ Voice Var D 0 VCountHi equ Voice Var D I VRA equ Voice Var D 2 VRA1 equ Voice Var D 3 VRLED equ Voice Var D 4 WS equ Voice Var D 5 RXC equ Voice Var D 6 RXC PREV equ Voice Var D 7 VR RecgWait egu Voice Var D 8 Init VR clrf VCountLo clrf VCountHi clrf RXC clrf RXC PREV call VR Wakeup Wake Up Voice Module call VR SetLanguage call VR SetTimeout movlw D U movwf WS i return VR Wakeup moviw CMD BREAK movwf tx data call Send tx l clrf VCountHi clrf VCountLo call Get_rx movlw STS SUCCESS IF VRA STS SUCCESS THEN GOTO VR Wakeup subwf VRA W i btfss STATUS Z goto VR Wakeup call Delay return VR SetLanguage 46 movlw CMD LANGUAGE movwf tx data i call Send tx movlw D O english language addlw ARG ZERO movwf tx_data call Send tx movlw D 100 i movwf VCountHi VR_LangLoop clrf VCountLo call Get_rx movlw STS SUCCESS IF VRA STS SUCCESS subwf VRA W btfss STATUS Z i goto VR o Cage gop call Delay return VR SetTimeout moviw CMD TIMEOUT movwf tx data call Send tx movlw D 3 3 second addlw ARG ZERO movwf tx_data call Send tx movlw D 100 movwf VCountHi n VR SetTLoop clrf VCountLo call Get rx m
13. Framework of the study Fig 3 2 Methodology Block Fig 3 3 A Speech Recognition Module Flowchart Fig 3 3 B Speech Recognition Algorithm Fig 3 4 A Elevation System Flowchart Fig 3 4 B Elevation System Algorithm Fig 3 5 A Obstacle Detection Flowchart Fig 3 5 B Obstacle Detection Algorithm Abstract Nowadays most handicapped people who suffer mobility problem primarily depend on using wheelchairs and most of these wheelchairs are already automated The designs are made in response to the condition of the target user Considering the users who already lost the ability to use their hands the researchers of this paper believe that implementing a speech control mechanism and incorporating sensors to the wheelchair will give solution to this problem It is also believed that to improve its functionality a lifting mechanism should be considered to allow the user to move up by himself into elevated platforms As a result an obstacle detection for a speech controlled dc operated wheelchair with elevation system is considered in this paper The wheelchair will use voice module that will process the user input speech command and a microcontroller to control the movement of the wheelchair in response to the user input command Proximity sensors will also be used to create a system wherein obstacle detection mechanism is present Lastly for the elevation system the wheelchair will be incorporated by an electric car jack that will allow itself to lift in
14. Index Description Commands Index Label Trained Conflict 757576 0 Trigger 0 SY 0 CREATE LABEL HERE 2 OK Group Group Group Group Group Group Group Group Group Group Group Group Group Group Password Wordset Wordset Wordset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 6 1 Figure 10 83 If you want to remove a command you can use the remove command from the tool bar or menu and it will remove the selected command once this is done it can not be undone so be sure you want to remove a command prior to clicking this action Each of the Group Password and Trigger words are created and edited in the same manner that these steps cover Note The Passwords group 16 are much more sensitive to background environment noises and distance from the microphone but sure to train the password in conditions similar to where it will be used Generating Code Once you have created and trained all your desired commands you can generate the PBASIC code to then edit and assign actions to each of the words created You can do that be completing the following l Select the Generate Code icon on the toolbar or from the menu Figure 11 9 Saylt GUI v1 0 File Edit Tools Help coms K l LS Ate a us w Group List Trigger Command List Index Description Command Index Label j Trained Contict GC 0 BOE 2 OK Group Q T Robot N OK Group Group Group Group Group Group Group Generate Group
15. Measurement of distance in obstacle detection The next test to be performed is to measure the distance at which the wheelchair can detect obstacles The purpose of this test is to determine at how far the wheelchair will disable its movement upon encountering an obstacle The data obtain would help in determining if the wheelchair is disabling the commands accurately in the distance specified by the designers The procedures to be performed for this test are described below Procedure 1 The four movement command namely move forward move backward move left and move right will be put to test with an obstacle placed at varying distance from the wheelchair 2 Upon stopping of the wheelchair in doing the movement command the distance of the wheelchair will be measured from the obstacle 3 Results will be obtained and recorded at the given table 26 Table 3 7 Measurement of distance in obstacle detection Distance Distance at Distance at Distance at Distance at of which which which Tum which Turn obstacle Forward Backward Left Command Right Command is Command is is disabled Command is disabled disabled disabled 1 0 2m 0 2m 0 2m 0 2m 0 2m 2 0 4m 0 4m 0 4m 0 4m 0 4m 3 0 6m 0 6m 0 6m 0 6m 0 6m 4 0 8m 0 8m 0 8m 0 8m 0 8m 5 10m 0 8m 0 8m 0 8m 0 8m 6 12m 0 8m 0 8m 0 8m 0 8m 7 1 4m 0 8m 0 8m 0 8m 0 8m Table 3 7 shows the results in testing the obstacle detection of
16. School of EECE ii TABLE OF CONTENTS TITLE PAGE APPROVAL SHEET TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES ABSTRACT CHAPTER 1 INTRODUCTION CHAPTER 2 REVIEW OF RELATED LITERATURES AND RELATED STUDIES Speech Recognition Infrared Proximity Sensor Direct Current DC Motors Battery Assisted Wheel Chair Voice Controlled Automation System A Survey and Experimental Evaluation of Proximity Sensors for Space Robotics Switchgear control apparatus and relays for alternating current circuits Obstacle Avoidance Fuzzy System for Mobile Robot with IR Sensors CHAPTER 3 OBSTACLE DETECTION FOR A SPEECH CONTROLLED DC MOTOR OPERATED WHEELCHAIR WITH ELEVATION SYSTEM Abstract Introduction Methodology CHAPTER 4 CONCLUSION CHAPTER 5 RECOMMENDATION BI BLIOGRAPHY APPENDICES Appendix A User s Manual Appendix B Pictures of Prototype Appendix C Program Listing Appendix D Data Sheets iii 12 12 12 13 31 33 34 35 35 40 LIST OF TABLES Table 3 5 Test of effectiveness of the front and back proximity sensors Table 3 6 Test of effectiveness of the bottom proximity sensors Table 3 7 Measurement of distance in obstacle detection Table 3 8 Measurement of the response time in performing the movement command Table 3 9 A Determination of the obstacles that can be detected by front and back sensors Table 3 9 B Determination of the obstacles that can be detected by bottom Sensors iv LIST OF FI GURES Fig 3 1 Conceptual
17. at the back of the wheelchair 2 Obstacle detection does not work accurately at extremely bright environment 33 Chapter 5 RECOMMENDATI ON Some modifications can be made to improve the design prototype in order to please the user and receive a positive feedback The recommendations are as follows 1 Addition of possible obstacles it can detect by installing additional sensors at the blind spot of the wheelchair specifically at the middle front and middle back 2 Provide an LCD display that would inform the user how high the system has elevated and at the same time show the battery level 3 Improve the speech recognition system by using noise filters 4 Installation of backrest and seat cushion for the users comfort 5 Improve the maximum weight limit by installing supports at the bottom of the wheelchair 6 Improve the maximum height limit the wheelchair can elevate 7 Change the location of the bottom proximity sensors that will enable the wheelchair to stop at long distance from the discontinuous surface 8 Add a feature that will enable the wheelchair to be moved manually in instance that the wheelchair can no longer move 34 Bibliography R Rahulanker V Ramanarayanan 2006 Battery Assisted Wheel Chair 2006 IEEE Region 167 171 Haleem M S 2008 Voice Controlled Automation System 2008 IEEE Region 508 512 Volpe R Ivlev R 1994 A Survey and Experimental Evaluation of Proximity S
18. command will be disabled until such time that there is no obstacle detected The same goes to the bottom sensors The movement of the wheelchair will continue until such time that the 32 sensors do not detect the floor Upon encountering discontinuous path that specific movement commands with will be disabled Another objective of the study is to determine the possible objects that the wheelchair can detect Based on the results the wheelchair is able to detect wide and large obstacles Thin objects are sometimes not detected due to the position of the sensors which are located at the arm of the wheelchair Reflective objects also show lower detection especially in bright environments In terms of the obstacle colour the capability of infrared proximity sensors in obstacle detection are not much affected In terms of the bottom sensors detection the wheelchair is able to detect steep surfaces To summarize it all the obstacle detection of the wheelchair helps improve the safety of the user The wheelchair is able to automatically stop upon encountering an obstacle which will help in preventing collisions It is also able to detect discontinuous surfaces which will help the user to prevent accidents like falling into the stairs and etc There is also an emergency stop button installed to stop the wheelchair movement in case of emergency Some of the limitations of the wheelchair design are 1 Wheelchair cannot detect discontinuous surface
19. e Command arguments or status details again on the TX and RX lines spanning the range of capital letters Each command sent on the TX line with zero or more additional argument bytes receives an answer on the RX line in the form of a status byte followed by zero or more arguments There is a minimum delay before each byte sent out from the Say It module to the RX line that is initially set to 20 ms and can be selected later in the ranges 0 9 ms 10 90 ms 100 ms 1s The communication is host driven and each byte of the reply to a command has to be acknowledged by the host to receive additional status data using the space character The reply is aborted if any other character is received and so there is no need to read all the bytes of a reply Invalid combinations of commands or arguments are signaled by a specific status byte that the host should be prepared to receive if the communication fails Also a reasonable timeout should be used to recover from unexpected failures 88 751516 The module automatically goes to lowest power sleep mode after power on To initiate communication send any character to wake up the module Command Details CMD BREAK b Abort recognition in progress if any or do nothing Expected replies STS SUCCESS STS INTERR CMD SLEEP S Go to the specified power down mode 1 Sleep mode 0 8 Expected replies STS SUCCESS CMD KNOB k Set Speaker Indepe
20. either capable or not capable of detecting that specific obstacle Obstacles with a percentage of success lower than 8096 will be considered to be an object Table 3 9 A Determination of the obstacles that can be detected by front and back sensors Obstacles Front and Back Proximity Sensors Trial Trial Trial Trial Trial Percentage of 1 2 3 4 5 Success Solid Objects 1 Gate Success Success Success Success Success 100 2 Wall Success Success Success Success Success 100 3 Human Success Success Success Success Success 100 4 Lamp Post Failed Success Failed Failed Success 4096 5 School Table Success Success Success Success Success 10096 6 School Chair Success Success Success Failed Success 8096 Translucent Glass Light passing Objects 1 Mirror Success Failed Failed Success Success 6096 2 Sliding Glass Success Success Failed Success Success 80 Door 3 Curtains Success Success Success Success Success 100 4 Stainless Roof Success Success Success Success Success 10096 Colored Obstacles Wall 1 Red colored Success Success Success Success Success 10096 obstacle 2 Yellow colored Success Success Success Success Success 10096 obstacle 3 White colored Success Success Success Success Success 10096 obstacle 4 Brown colored Succes
21. l subwf W btfsc STATUS Z 49 call Turn Left H VR Recg2 moviw D 2 subwf W btfsc STATUS Z call Turn Right VR Recg3 movlw D 3 subwf W btfsc STATUS Z call Move_UP VR Recg4 movlw D 4 subwf W btfsc STATUS Z call Move Down VR Recg5 movlw D 5 subwf W btfsc STATUS Z call Move FWD VR Recg6 movlw D 6 f subwf W btfsc STATUS Z call Move BAK goto VR RecgDone VR_RecgErr moviw D l movwf WS VR_RecgDone call Short Delay return Send tx bsf STATUS RPO btfss TXSTA TRMT 1 if Transmit is Done goto 1 bcf STATUS RPO btfss PIR1 TXIF i goto 1 wait for transmitter interrupt flag movf tx data W 50 movwf TXREG load data to be sent call Short Delay return Get_rx clrf VRA call Short Delay i incf VCountLo F movlw D 250 subwf VCountLo W btfss STATUS C goto Get rxl j clrf VCountLo decf VCountHi F movf VCountHi W btfsc STATUS Z goto Get rxDone Get rx1 call ser in get UART input into W and rx data btfss is data 0 goto Get_rx Check until movf rx_data W movwf VRA Get_rxDone return Do LEDI movf LED1 Tmr W btfsc STATUS Z goto Do LEDIOFF bsf PORTC 4 decf LED1 Tmr F goto Do LED1Done j Do LED1OFF movlw D A subwf WS W btfss STATUS Z bcf PORTC 4 movlw D 2 subwf WS W btfsc STATUS Z bsf PORTC 4 Do LED1Done return Do LED2 movf LED
22. nop Sel ADC1 moviw D 1 subwf ADC_Sel W btfss STATUS Z goto Sel ADC1X movlw B 10001001 movwf ADCONO Sel ADC1X nop Sel ADC2 movlw D 2 subwf ADC_Sel W btfss STATUS Z goto Sel ADC2X movlw B 10010001 movwf ADCONO Sel ADC2X nop Sel ADC3 movlw D 3 subwf ADC_Sel W btfss STATUS Z goto Sel ADC3X movlw B 10011001 movwf ADCONO Sel ADC3X nop Sel ADC4 moviw D A subwf ADC_Sel W btfss STATUS Z goto Sel ADC4X movlw B 10100001 movwf ADCONO Sel ADC4X nop Sel ADC5 movlw D 5 subwf ADC Sel W btfss STATUS Z goto Sel ADC5X movlw B 10101001 movwf ADCONO Sel ADC5X nop Sel ADC6 moviw D 6 subwf ADC_Sel W btfss STATUS Z f goto Sel ADC6X movlw B 10110001 movwf ADCONO i Sel ADC6X nop Sel ADC7 movlw D 7 subwf ADC_Sel W btfss STATUS Z H goto Sel ADC7X movlw B 10111001 movwf ADCONO j Sel ADC7X nop Read ADCX return Read SW movf PORTA W i movwf SWA New i Chk SWA4 btfsc SWA New 4 S goto Chk SWA4Done call Move Stop j Chk SWA4Done nop Chk_SWA0 btfsc SWA_New 0 i goto Chk_SWAODone call Move Stop Chk_SWA0Done nop Chk SWA1 btfsc SWA New l goto Chk SWAlDone btfss SWA_Prev 1 goto Chk SWAlDone call Move FWD i Chk_SWA1Done nop f Chk SWA2 btfsc SWA_New 2 goto Chk SWA2Done btfss SWA Prev 2 goto Chk SWA2Done 57 call Turn Right Chk SWA2Done nop S SWA3 btfsc SWA_ New 3 goto Chk_ SWA3Do
23. output RC3 SCK SCL bit3 ST RC3 can also be the synchronous serial clock for both SPI and I C modes RC4 SDI SDA bit4 ST RC4 can also be the SPI Data In SPI mode or data I O IC mode RC5 SDO bit5 ST Input output port pin or Synchronous Serial Port data output RC6 TX CK bit6 ST Input output port pin or USART Asynchronous Transmit or Synchronous Clock RC7 RX DT bit7 ST Input output port pin or USART Asynchronous Receive or Synchronous Data Legend ST Schmitt Trigger input TABLE 3 6 SUMMARY OF REGISTERS ASSOCIATED WITH PORTC Value on Value on all Address Name Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 BitO POR other BOR RESETS 07h PORTC RC7 RC6 RC5 RC4 RC3 RC2 RC1 RCO xxxx xxxx uuuu uuuu 87h TRISC PORTC Data Direction Register 1111 1111 1111 1111 Legend x unknown u unchanged 74 Web Site www parallax com Office 916 624 8333 PAA NZ Z Forums forums parallax com Fax 916 624 8003 L N r1 Sales sales parallax com Sales 888 512 1024 Technical support parallax com Tech Support 888 997 8267 Parallax Say It Module 30080 The Parallax Say It Modules provides voice recognition functions for built in Speaker Independent SI pre programmed commands and up to 32 user defined Speaker Dependent SD keywords triggers commands or passwords When you speak into this module it will match the spoken word to a set of keyw
24. review of related literatures about the study Through this the researchers will be able to determine the needed materials as well as the necessary steps in designing the device After the review of related literatures the researcher will develop the hardware components This includes the integration of the basic hardware parts such as the DC motors electric car jack relays microcontroller battery and speech recognition module Then the next step is to develop the speech recognition module algorithm Figure 3 3 shows the speech recognition module flowchart and algorithm It describes the flow of program to be designed for the speech recognition module 15 Input First Speech Command Yes No Valid Speech Command If Speech Command Perform Stop Stop Function Input Second Speech Command If Speech Command Move No Valid Speech Command Perform Forward Function If Speech Command Forward Obstacle Detected Perform Backward Function Obstacle If h d Speech Comman Detected Backward Obstacle Detection System Obstacle o Perform Ri ght If Speech Command Function na Detected dE i Right Yes If Speech Command Left 16 Elevation System Fig 3 3 A Speech Recognition Module Flowchart Start get First Speech Command If Speech Command is Valid Switch First Speech Command Case Stop Perform Stop Function Break
25. the wheelchair at varying distances Results show that at a range of less than or equal to 0 8 meters distance lt 0 8m the wheelchair would disable the movement command When the distance of the obstacle is greater than 0 8m the wheelchair will continue its forward or backward movement until it reaches 0 8 meters from the obstacle The same goes in performing the move left and right command The wheelchair will continue to rotate when the distance of the obstacle is not on the range of detection of the wheelchair Measurement of the response time in performing the movement command The next test focuses in determining the response time of the wheelchair The purpose of this is to identify the time interval at which the wheelchair will perform the movement command specified by the user 27 The set of procedures to be performed for this test is described below Procedure 1 All of the wheelchair s speech commands will be tested by the researcher 2 The researcher will measure the time interval upon the glowing of the orange LED button up to the time the wheelchair started to perform the command 3 Results will be obtained and recorded at the given table Table 3 8 Measurement of the response time in performing the movement command Speech Command Response Time 1 Move Forward 0 593 sec 2 Move Left 0 597 sec 3 Move Right 0 6 sec 4 Move Up 0 593 sec 5 Move Down
26. 0 595 sec 6 Move Backward 0 6 sec 7 Stop 0 595 sec 28 Table 3 8 shows the results of the test in measuring the response time in performing the speech command Based form the results the time interval in performing the speech commands is approximately 0 6 sec Determination of the obstacles that can be detected The last part of the test focuses in determining the possible obstacle that the wheelchair can detect This test covers all the proximity sensors including those installed at the bottom of the wheelchair The purpose of this test is to determine the limitations as well as the capabilities of the wheelchair in obstacle detection In this test those obstacles specified at Table 3 8 that can be detected will be marked as success while those cannot be detected will be mark as failed The set of procedures to be performed for this test is described below Procedure 1 The wheelchair s obstacle detection will be tested for 5 consecutive trials for each obstacles specified in Table 3 7 2 Results will be obtained and recorded at the given table 3 Upon obtaining the results in each trial of the given types of elevated platforms the percentage of success will be computed Computing for the percentage of success is described by the formula below Total number of succes trial X 100 Total number of trials performed The percentage of success for each type of obstacle will determine if the wheelchair is
27. 1 ARG_MAX Tu Maximum argument value 1 ARG ZERO A Zero argument value 751516 92
28. 111 1111 1111 1111 81h 181h OPTION REG RBPU INTEDG TOCS TOSE PSA PS2 PS1 PSO 1111 1111 1111 1111 Legend x unknown u unchanged Shaded cells are not used by PORTB 72 3 3 PORTC and the TRISC Register PORTO is an 8 bit wide bi directional port The corre sponding data direction register is TRISC Setting a TRISC bit 1 will make the corresponding PORTC pin an input i e put the corresponding output driver in a Hi Impedance mode Clearing a TRISC bit 0 will make the corresponding PORTC pin an output i e put the contents of the output latch on the selected pin PORTO is multiplexed with several peripheral functions Table 3 5 PORTC pins have Schmitt Trigger input buffers When the DC module is enabled the PORTC lt 4 3 gt pins can be configured with normal I C levels or with SMBus levels by using the CKE bit SSPSTAT lt 6 gt When enabling peripheral functions care should be taken in defining TRIS bits for each PORTC pin Some peripherals override the TRIS bit to make a pin an out put while other peripherals override the TRIS bit to make a pin an input Since the TRIS bit override is in effect while the peripheral is enabled read modify write instructions BSF BCF XORWF with TRISC as destination should be avoided The user should refer to the corresponding peripheral section for the correct TRIS bit settings FIGURE 3 5 PORTC BLOCK DIAGRAM PERIPHERAL OUTP
29. 2 Tmr W H 51 btfsc STATUS Z goto Do LED2OFF bsf PORTC 5 decf LED2 Tmr F goto Do LED2Done Do LED2OFF bcf PORTC 5 Do LED2Done return H Read ADC bsf ADCONO 0 bsf ADCONO 7 nop i bsf ADCONO 2 nop btfsc ADCONO 2 goto 1 Read ADCO movlw D O RAO subwf ADC_Sel W Left Front Sensor btfss STATUS Z goto Read ADCOX S movf ADRESH W movwf ADCO clrf Templ movlw D 80 75cm equivalent subwf ADCO W btfsc STATUS C d bsf Temp1 0 btfsc Temp1 0 call Move Stop btfsc Temp1 0 bsf PORTD O btfss Temp1 0 bcf PORTD O Read ADCOX nop Read ADCl moviw D I RA1 subwf ADC Sel W Right Front Sensor btfss STATUS Z goto Read ADCIX i movf ADRESH W movwf ADC1 d 52 clrf Templ movlw D 80 subwf ADC1 W btfsc STATUS C bsf Templ 0 btfsc Temp1 0 call Move Stop btfsc Temp1 0 bsf PORTD 1 btfss Temp1 0 bcf PORTD 1 Read ADC1X nop Read ADC2 movlw D 3 subwf ADC Sel W btfss STATUS Z goto Read ADC2X movf ADRESH W movwf ADC2 Read ADC2X nop Read ADC3 movlw D 3 subwf ADC Sel W btfss STATUS Z goto Read ADC3X movf ADRESH W movwf ADC3 Read ADC3X nop Read ADC4 moviw D 4 subwf ADC Sel W btfss STATUS Z goto Read ADC4X movf ADRESH W movwf ADC4 clrf Templ movlw D 80 subwf ADC4 W btfsc STATUS C bsf Templ 0 btfsc Temp1 0 75cm equivalent RA2 RA3 RA5 Left Back Sensor 75cm equivalent 53 Read ADC5X Read ADC6
30. Code Group Group Group Group Group Group Password Wordset Wordset Wordset 0 1 2 3 4 5 6 8 Figure 11 2 You will be prompted to save the file to then edit within the BASIC Stamp Editor Figure 12 84 751516 Save in B My Documents Amy Music A My Pictures My Recent BMy Skype Content Documents my videos New Folder ie Melexis Temperature10degrees bs2 File name Sample bei MyNelwok Saveastype BasicStanp2 bs2 Figure 12 3 Click Disconnect in the GUI and open the file with the BASIC Stamp Editor 4 Once the program is opened in the BASIC Stamp Editor there will be portions of the code that will indicate where you will place the commands that will be used with the trained words You will see a PAUSE 1 with write your code here comments 5 Save your program and then download to the BASIC Stamp 2 module and enjoy playing with your new voice recognition module Sample Application for the Boe Bot Robot Here is the sample applications that uses the Say It module to control a Boe Bot robot with a BASIC Stamp 2 on a Board of Education platform The sample code for this application is available for download on the Say It Module product page at www parallax com 1 Plug the Say It module into the AppMod header of the Board of Education as seen in Figure 1 on page 2 be careful to insert the module in the left row of the header and in the correct orientation
31. D call Move Stop btfsc Temp1 0 bsf PORTD 2 btfss Temp1 0 bcf Read ADCAX Read ADC5 PORTD 2 nop movlw D 5 subwf ADC_Sel W btfss STATUS Z goto Read ADC5X movf ADRESH W movwf ADC5 clrf Templ movlw D 80 subwf ADC5 W btfsc STATUS C bsf Templ 0 btfsc Temp1 0 call Move Stop btfsc Temp1 0 bsf PORTD 3 btfss Temp1 0 bcf PORTD 3 nop movlw D 6 subwf ADC_Sel W btfss STATUS Z goto Read ADC6X movf ADRESH W movwf ADC6 clrf Templ movlw D 60 movlw D 50 subwf ADC6 W btfss STATUS C bsf Temp1 0 btfsc Temp1 0 call Move Stop REO Right Back Sensor 75cm equivalent RE1 Left Floor Sensor 85cm equivalent cm equivalent 54 btfsc Temp1 0 bsf PORTD 4 btfss Temp1 0 f bcf PORTD 4 i Read ADC6X nop Read ADC7 movlw D 7 RE2 subwf ADC Sel W Right Floor Sensor btfss STATUS Z goto Read ADC7X movf ADRESH W movwf ADC7 clrf Templ movlw D 60 85cm equivalent movlw D 50 cm equivalent subwf ADC7 W btfss STATUS C bsf Temp1 0 j btfsc Temp1 0 call Move_Stop btfsc Templ 0 bsf PORTD 5 btfss Temp1 0 i bcf PORTD 5 d Read ADC7X nop movf PORTD W andlw B 00111111 j movwf Sensor incf ADC Sel F movlw D 8 subwf ADC Sel W btfsc STATUS C j clrf ADC Sel Sel ADCO movlw D O subwf ADC Sel W btfss STATUS Z i 55 goto Sel ADCOX movlw B 10000001 movwf ADCONO Sel ADCOX
32. K K K K K K K K K K K K K K K K K K K K K K K K KOK gt K OK KK OK OK OK OK OK KKK org 0x0000 Start of reset vector goto Initialize org 0x0004 start of interrupt service routine goto ISR routine KKE KEK K K K K K K K K KK K K K K KK K K KKK K K K KK K K KK K K K KK K K KK K K K K KK K K K K K K K K K K K K K K K I 2K XX XX OK OK OK OK XX KKK Initialization Routine BS SBE ISOS ORE ISO SII NN A I I SII A AAA PEER pd Initialize clrf TMRO Clear TMRO clrf INTCON Disable Interrupts and clear TOIF bcf STATUS RP1 i bsf STATUS RPO Select Bank 1 movlw B 11000011 1 movwf OPTION REG prescaler of 1 16 movlw B 00000001 Set PortA and PortE all Analog RA3 Vref movwf ADCON1 Left J ustified moviw B 11111111 0 OUT 1 IN movwf TRISA Port A 11xx xxxx TTL movlw B 00000000 0 OUT 1 IN movwf TRISB Port B xxxx xxxx TTL movlw B11001111 s 0 OUT 1 IN movwf TRISC Port C xxxx xxxx schmitt movlw B 00000000 0 OUT 1 IN movwf TRISD Port D xxxx xxxx schmitt movlw B 00000111 0 OUT 1 IN movwf TRISE Port E xxxx xxxx schmitt 42 bcf STATUS RPO Select Bank 0 call Init Var call Init UART call Init VR KK KK K K K K K K K KK K K K K K K OK K KK K K K K KK K K K K K K K K K K K K K K K KK K K K K K K K K K K K K K K K K K K K I 2K KKK K OK KK KKK Main Program Starts Here KK KK K K K K K K E KK K K K K K K OK K KK K OK K K KK K K K K K K K K K K K K K K K KK K K K K K K K K K K K OK K
33. KK OK K K K I KK KKK OK KK KKK Main call VR Recognize goto Main 1 KK KKK K KK K K K K K K K K KKK K K K K K K OK K gt K K K K K K K K K K K K K K K K K K K K K OK K K K K K KKK K KKK KK 2K gt K 2K OK KK OK K KK KKK The Interrupt Service Routine OC KK K K K KK K K K K K K K K K K K K K K K K K K K K K K K KK K K K K K K K KK K K K K K K K K K K OK K K K K OK K K OK D XX KK K KK OK KKK ISR routine nop Save Registers retfie Return from Interrupt Ek AE AR A AE IE Fol olo ke A KE AEA AE EAE EI IR AER AE ARR AE A AER A HK AE ROO KEKEE K XX KK K OK KOK K k K Init Var clrf PORTB i clrf PORTC clrf PORTD clrf tx data cirf LED1 Tmr cirf LED2 Tmr movf PORTA W movwf SWA New j movwf SWA Prev movf PORTE W movwf SWE_New movwf SWE Prev movlw B 10000001 movwf ADCONO clrf ADC Sel i clrf ADCO i clrf ADC1 clrf ADC2 f clrf ADC3 clrf ADC4 S clrf ADC5 43 clrf ADC6 clrf ADC7 clrf Sensor return NA AE AE A A HEH ACA OH AR HR HR FER ROF RR ER RE RR OFFICE AR e IFOR KEER 2K XXX XX XXX OOK OK OK KK Voice Recognition Protocol Command j CMD BREAK equ b abort recog or ping CMD SLEEP egu s go to power down CMD KNOB equ k set si knob 1 CMD LEVEL equ v Set sd level 1 CMD LANGUAGE equ I Set si language 1 CMD TIMEOUT equ o set timeout 1 CMD RECOG SI egu i do si recog from ws lt 1 gt CMD RECOG SD egu d do sd r
34. OBSTACLE DETECTI ON FOR A SPEECH CONTROLLED DC MOTOR OPERATED WHEELCHAI R WITH ELEVATION SYSTEM By Lloyd Edwinson S Arellano Darryll J ade E Arias Francis Mark Adriane G Luna Aljon C Santillan A Thesis Report Submitted to the School of Electrical Engineering Electronics Engineering and Computer Engineering in Partial Fulfillment of the Requirements for the Degree Bachelor of Science in Computer Engineering Mapua Institute of Technology March 2012 APPROVAL SHEET This is to certify that I have supervised the preparation of and read the thesis paper prepared by Lloyd Edwinson S Arellano Darryll Jade E Arias Francis Mark Adriane G Luna and Aljon C Santillan entitled OBSTACLE DETECTION FOR A SPEECH CONTROLLED DC MOTOR OPERATED WHEELCHAIR WITH ELEVATION SYSTEM and that the said paper has been submitted for final examination by the Oral Examination Committee Ayfa G M Thesis Adviser As members of the Oral Examination Committee we certify that we have examined this paper and hereby recommend that it be as fulfilment of the thesis requirement for the Degree Bachelor of Science in Computer Engineering C de L Torres Panel Member This thesis paper is hereby approved and accepted by the School of Electrical Engineering Electronics Engineering and Computer Engineering as fulfilment of the thesis requirement for the Degree Bachelor of Science in Computer Engineering do S Dr Felicito S Caluyo Dean
35. SWA New W movwf SWA Prev movf SWE New W movwf SWE Prev f return Move Stop bcf PORTB 0 59 bcf PORTB 1 bcf PORTB 2 bcf PORTB 3 bcf PORTB 4 i bcf PORTB 5 bcf PORTB 6 bcf PORTB 7 i call Relay Delay return Move FWD bcf PORTB 1 bcf PORTB 3 bcf PORTB 7 call Relay_Delay 76543210 bsf PORTB O 01 0101 bsf PORTB 2 bsf PORTB 6 return Move BAK bcf PORTB 0 bcf PORTB 2 bcf PORTB 6 call Relay Delay 76543210 bsf PORTB 1 10 1010 bsf PORTB 3 bsf PORTB 7 return Move Left bcf PORTB 1 f bcf PORTB 2 bcf PORTB 3 i bcf PORTB 6 bcf PORTB 7 call Relay_Delay 76543210 bsf PORTB 2 00 0100 return Move Right bcf PORTB 0 bcf PORTB 1 bcf PORTB 3 bcf PORTB 6 bcf PORTB 7 call Relay Delay 76543210 bsf PORTB O 60 return Turn Left bcf PORTB 1 bcf PORTB 2 bcf PORTB 6 bcf PORTB 7 call Relay Delay 76543210 bsf PORTB 1 00 0110 bsf PORTB 2 return Turn Right bcf PORTB 0 bcf PORTB 3 bcf PORTB 6 bcf PORTB 7 i call Relay Delay 76543210 bsf PORTB 0 00 1001 bsf PORTB 3 return Move_UP bcf PORTB 0 i bcf PORTB 1 bcf PORTB 2 bcf PORTB 3 bcf PORTB 6 bcf PORTB 7 bcf PORTB 4 call Relay Delay 76543210 bsf PORTB 5 5 10 return Move Down bcf PORTB 0 bcf PORTB 1 bcf PORTB 2 bcf PORTB 3 bcf PORTB 6 bcf PORTB 7 bcf PORTB 5 call Relay Delay 76543210 bsf PORTB 4 01
36. UT OVERRIDE RC lt 2 0 gt RC lt 7 5 gt Port Peripheral Select Peripheral Data Out Data Bus WR Pot GKY_Q 1 Data Latch D Q TRIS Latch RD TRIS Schmitt Trigger Peripheral OEG RD Port Peripheral Input Note 1 UO pins have diode protection to VDD and Vss 2 Port Peripheral select signal selects between port data and peripheral output 3 Peripheral OE output enable is only activated if peripheral select is active 73 FIGURE 3 6 PIC16F87X PERIPHERAL OUTPUT OVERRIDE RC lt 4 3 gt Port Peripheral Select Peripheral Data Out Data Bus WR Port D Q CK Q Data Latch D Q CERN Q TRIS Latch RD Vss TRIS Schmitt Trigger V Schmitt Trigger with RD SMBus Port levels SSPI Input Peripheral OEG SSPSTAT lt 6 gt UO pins have diode protection to VDD and Vss Port Peripheral select signal selects between port data and peripheral output Peripheral OE output enable is only activated if peripheral select is active PORTC BLOCK DIAGRAM PIC16F87X TABLE 3 5 PORTC FUNCTIONS Name Bit Buffer Type Function RCO T1OSO T1CKI bito ST Input output port pin or Timer1 oscillator output Timer1 clock input RC1 T1OSI CCP2 bit1 ST Input output port pin or Timer1 oscillator input or Capture2 input Compare2 output PWM2 output RC2 CCP1 bit2 ST Input output port pin or Capture1 input Compare1 output PWM1
37. WRT OST PWRT OST FLASH Program Memor Gc wards 1 s ats Es Bn Data Memory bytes 192 192 368 368 EEPROM Data Memory 128 128 256 256 Interrupts 13 14 13 14 I O Ports Ports A B C Ports A B C D E Ports A B C Ports A B C D E Timers 3 3 3 3 Capture Compare PWM Modules 2 2 2 2 Serial Communications MSSP USART MSSP USART MSSP USART MSSP USART Parallel Communications PSP PSP 10 bit Analog to Digital Module 5 input channels 8 input channels 5 input channels 8 input channels Instruction Set 35 instructions 35 instructions 35 instructions 35 instructions 66 PIC16F87X TABLE 1 2 PIC16F874 AND PIC16F877 PINOUT DESCRIPTION DIP PLCC GFP VO P Buffer Pin Name Pin Pin Pint Type Type Description OSC1 CLKIN 13 14 30 ST CMOS 2 Oscillator crystal input external clock source input OSC2 CLKOUT 14 15 31 O Oscillator crystal output Connects to crystal or resonator in crystal oscillator mode In RC mode OSC2 pin outputs CLKOUT which has 1 4 the frequency of OSC1 and denotes the instruction cycle rate MCLR VPP 1 2 18 I P ST Master Clear Reset input or programming voltage input This pin is an active low RESET to the device PORTA is a bi directional I O port RAO ANO 2 3 19 y o TTL RAO can also be analog inputO RA1 AN1 3 4 20 UO TTL RA1 can also be analog input1 RA2 AN2 VREF 4 5 21 UO TTL RA2 can also be analog input2 or negative ana
38. al information on I O ports may be found in the Pu PiCmicro Mid Range Reference Manual DS33023 3 1 PORTA and the TRISA Register PORTA is a 6 bit wide bi directional port The corre sponding data direction register is TRISA Setting a WR TRISA bit 2 1 will make the corresponding PORTA pin TRIS an input i e put the corresponding output driver in a Hi Impedance mode Clearing a TRISA bit 0 will make the corresponding PORTA pin an output i e put the contents of the output latch on the selected pin Reading the PORTA register reads the status of the TRIS pins whereas writing to it will write to the port latch All write operations are read modify write operations Therefore a write to a port implies that the port pins are read the value is modified and then written to the port data latch VO pin Pin RA4 is multiplexed with the TimerO module clock input to become the RA4 TOCKI pin The RA4 TOCKI RD Por pin is a Schmitt Trigger input and an open drain output All other PORTA pins have TTL input levels and full CMOS output drivers Other PORTA pins are multiplexed with analog inputs Note 1 I O pins have protection diodes to VDD and Vss and analog VREr input The operation of each pin is selected by clearing setting the control bits in the i ADCON1 register A D Control Register1 FIGURE 3 2 BLOCK DIAGRAM OF To A D Note On a Power on Reset these pins are con figu
39. 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 10 bit multi channel Analog to Digital converter e Synchronous Serial Port SSP with SPI Master mode and I C Master Slave Universal Synchronous Asynchronous Receiver Transmitter USART SCI with 9 bit address detection Parallel Slave Port PSP 8 bits wide with external RD WR and CS controls 40 44 pin only Brown out detection circuitry for Brown out Reset BOR PIC16F87X Pin Diagrams PDIP SOIC MCLR VPP 28 RB7 PGD RAO ANO lt Eug RB6 PGC RA1 AN1 e 26 RB5 RA2 AN2 VREF N 25 RB4 RA3 AN3 VREF lt gt S 24 RB3 PGM RA4 TOCKI lt N 23 RB2 RA5 ANA SS lt 22 RBI Vss o RBO INT OSC1 CLKIN o VDD OSC2 CLKOUT a Vss RCO T1OSO T1CKI RC7 RX DT RC1 T1OSI CCP2 17 RC6 TX CK RC2 CCP1 16 RC5 SDO RC3 SCK SCL 4 15L 4 RC4 SDI SD PLCC RA4 TOCKI lt RA5 AN4 SS REO RD AN5 RE1 WR AN6 RE2 CS AN7 VDD Vss OSC1 CLKIN OSC2 CLKOUT RCO T1OSO T1CK1 NC
40. dures to be performed for this test is described below Procedure 1 The four movement command namely move forward move backward move left and move right will be put to test with the position of the discontinuous path on different positions 2 The movement command that will not be done in response to the detection of an obstacle will be marked as disabled and others will be marked as working 3 Results will be obtained and recorded at the given table Table 3 6 Test of effectiveness of the bottom proximity sensors Location of Forward Backward Turn Left Turn Right discontinuous Command Command Command Command path 1 Front Disabled Working Working Working 2 Right Working Working Working Disabled 3 Left Working Working Disabled Working 4 Front and Working Working Working Disabled Right 5 Front and Left Disabled Working Disabled Working 6 Right and Left Working Working Disabled Disabled Table 3 6 shows that the wheelchair is completely successful at disabling the movement command upon encountering a discontinuous path Results shown in Table 3 6 show the same response in relation to the results shown in Table 3 5 The disablement of each command is independent to other 25 commands On the other hand some of the limitations that had been observed during the implementation of test is that the discontinuous path cannot be detected when it is located at the back
41. e to detect steep surfaces as described in the table Movement commands are still working at shallow discontinuous surfaces such as an inclined plane is not considered as an obstacle 3l Chapter 4 CONCLUSI ON In this paper a hardware design of obstacle detection of a speech control with elevation system is presented This design is intended mainly for the use of handicapped persons especially those who have lost their ability in using their arms and to insure that the user will be safe while using the hardware design The design is guided by a main objective and specific objectives The main objective is met The device is able to detect the given specific obstacles mentioned in the objectives and tests The obstacle detection system of the device consists of six infrared sensors The sensors will be controlled by the PIC 16F877A The two pair of sensors will be responsible for detecting hindrance objects while the other pair of sensors will be detecting if the wheelchair will encounter situation wherein it will fall In terms of obstacle detection the design has successfully met this objective The hardware design is able to detect obstacles using infrared proximity The pair of sensors at the front and back of the wheelchair detects at a range of distance x 0 8m form the obstacle thus preventing the wheelchair from possible collisions Upon detection of the obstacle the wheelchair will halt its movement operation That specific movement
42. e up on key depression operation and operations where PORTB is only used for the interrupt on change feature Polling of PORTB is not recommended while using the interrupt on change feature This interrupt on mismatch feature together with soft ware configureable pull ups on these four pins allow easy interface to a keypad and make it possible for wake up on key depression Refer to the Embedded Control Handbook Implementing Wake up on Key Strokes AN552 RBO INT is an external interrupt input pin and is config ured using the INTEDG bit OPTION REG 6 RBO INT is discussed in detail in Section 12 10 1 FIGURE 3 4 BLOCK DIAGRAM OF RB7 RB4 PINS VDD BnBPU RBPU p Weak Pull up Data Bus Data Latch D Q VO WR Port CK pin TRIS Latch D Q WR TRIS TTL A Input Buffer RD TRIS Latch Q D RD Port EN Set RBIF Q D From other RD Port RB7 RB4 pins EN Q3 RB7 RB6 In Serial Programming Mode Note 1 UO pins have diode protection to VDD and Vss 2 To enable weak pull ups set the appropriate TRIS bitte and clear the RBPU bit OPTION REG 7 PIC16F87X TABLE 3 3 PORTB FUNCTIONS Name Bit Buffer Function RBO INT bito TTL ST Input output pin or external interrupt input Internal software programmable weak pull up RB1 bit1 TTL Input output pin Internal software programmable weak pull up RB2 bit2 TTL Input output pin Internal software programmable weak p
43. ecog at group 1 0 trigger mixed si sd Protocol Status STS AWAKEN equ w back from power down mode STS ERROR equ e Signal error code 1 2 STS INVALID equ v invalid command or argument STS TIMEOUT equ t timeout expired STS INTERR egu i back from aborted recognition see break STS SUCCESS equ o no errors status STS RESULT equ r recognised sd command 1 training similar to sd 1 STS SIMILAR equ s recognised si 1 in mixed si sd training similar to si 1 Protocol arguments are in the range 0x40 1 TO 0x60 31 inclusive ARG MIN equ H 40 0x40 64 ascii ARG MAX equ H 60 0x60 96 ascii ARG ZERO equ H4l 0x41 65 ascii A ARG_ACK equ H 20 0x20 32 ascii TO READ more status arguments 44 wordset trigger WST equ D 0 WS1 egu D I Wordset 1 commands WS2 equ D A Wordset 2 actions WS3 equ D 3 Wordset 3 numbers Wordset Commands j WS1 Action WS1 Move WS1 Turn WS1 Run WS1 Look WS1 Attack WS1 Stop WS1 Hello WS2 Left WS2 Right WS2 Up WS2 Down WS2 Forward equ D 0 D I D 2 D 3 D 4 D 5 D 6 D 7 egu egu egu egu egu egu egu egu D O D I D 2 D 3 egu egu egu egu D 4 WS2 Backward equ D 5 WS3 Zero WS3 One WS3 Two WS3 Three WS3 Four WS3 Five WS3 Six WS3 Seven WS3 Eight WS3 Nine WS3 Ten WS Timeout WS Error D O D I D 2 D 3 D 4 D D 6 D 7
44. elchair with an obstacle detection mechanism Elevation motors Speech Wheelchair DC motors i Recognition Module Sensors Fig 3 1 Conceptual Framework of the study The design process starts by incorporating DC motors to the manually operated wheel chair This DC motors will be responsible for the movement of the wheelchair There will be 4 DC motors to be applied Each 13 wheel at the back will have its own motor to operate and another 2 motors for the elevation process These motors will be controlled by the microcontroller In this study the researchers will use a PIC16F877A microcontroller This microcontroller will control the movement of the motors depending on the input it receives The input will come from the speech recognition module Each wheelchair movement has a corresponding speech command The last process is the integration of proximity sensors on the wheelchair The proximity sensors will serve as the medium in detecting obstacle in the wheelchair s movement Figure 3 2 shows the methodology block of the study Review of Related Literature Integration of Hardware and Software components Development of hardware components Testing Development of Speech Recognition Algorithm Results and Discussion Development of the Wheelchair Elevation System Conclusion Development of Obstacle Detection System Fig 3 2 Methodology Block 14 The first step the researchers must do is to do a
45. ensors for Space Robotics 2002 IEEE Region 3466 3473 C Garrard 2010 Switchgear control apparatus and relays for alternating current circuits 2010 IEEE Region 588 611 Rusu C G Birou I T Sz ke E 2009 Fuzzy based obstacle avoidance system for autonomous mobile robot 10th International Conference on Development and Application Systems 26 29 Cook N P 2004 Electronics a complete course 2 Edition McGraw Hill USA Godse A P 2007 Microprocessor and microcontrollers Technical Publications USA 35 Appendix A User s Manual This part of the paper describes the important things on how to effectively use the speech controlled dc motor operated wheelchair with elevation system Also included in this part of the paper are the safety precautions to be followed by the user The following procedures below are the basic steps in operating the wheelchair 1 Attached the power supply clips to their respective polarity in the battery 2 Turn on the power button of the microphone and wait for it to be ready The green LED indicator will blink when the microphone is ready to accept input 3 Input a voice command either move or stop 4 Wait for the green LED indicator to glow If the green LED glows proceed to step 5 else go back to step 3 The green LED will glow if the command input is valid 5 f the first word input is move then proceed to step 6 else repeat step 3 6 Input the second
46. gnize a command for a safety stop if your project requires one take all appropriate precautions when implementing this module to maintain a safe project 757576 75 Using the Say It GUI Software With the Say It GUI software for your PC and your BASIC Stamp 2 development board you can test the Say It module and train it to recognize your custom commands During training the BASIC Stamp 2 handles the Say It module to PC communication through the provided PBASIC bridge program Once your you have defined and tested your commands the GUI software will generate a new PBASIC template program ready for you to add the actions to take when your voice commands are received Follow the steps below to connect to the Say It module via the GUI software This example assumes you are using a Board of Education with BASIC Stamp 2 and you have previously installed the BASIC Stamp Editor and tested the programming connection 1 With the power to your board turned off switch position 0 Plug the Say It module into the AppMod header of the Board of Education as seen in Figure 12 be careful to insert the module in the left row of the header and in the correct orientation Vss at top Vdd at bottom RX to PO TX to P2 and LED to P4 Figure 1 2 Download and install the Say It GUI software from the 30080 product page at www parallax com Use the default installation path For Windows Vista users install as administrator 3 Start the Say It GUI s
47. heelchair will consist of 7 commands namely move forward move backward move left move right stop move up to elevate and move down The headset will receive voice command from the user to determine the movement of the wheelchair and even allow it to be elevated upon command For instance the user says move forward the voice command will trigger the forward movement of the device Similarly there will be another voice command for the wheelchair to turn either to the right or left direction and to elevate or not The input command from the headset will be transmitted to the microcontroller through wires The microcontroller will be responsible in processing the input from the user DC motors will be applied on the wheel chair as well as relay drivers The DC motors will serve as the main machine in moving the device The power will then be supplied by batteries On the other hand the relay drivers will be used to supply enough power to the motors The microcontroller itself is not capable of providing the needed power of the motors The use of wheelchair is limited due to the source of power which is a battery The wheelchair can only perform one movement operation at a time and has a stable speed People who are mute cannot use the wheelchair The wheelchair has a limit on how high it can elevate and is mostly used only for sidewalk banks The design cannot elevate on stairs due to simultaneous elevation The obstacle mechanism can only de
48. hip error codes In replay to CMD RECOG SI CMD RECOG SD CMD TRAIN SD STS INVALID y Invalid command or argument In replay to Any invalid command or argument STS TIMEOUT E Timeout expired In replay to CMD RECOG SI CMD RECOG SD CMD TRAIN SD STS INTERR 91 751516 DH Interrupted recognition In replay to CMD_BREAK while in training or recognition STS SUCCESS 0 OK or no error status In replay to CMD BREAK CMD DELAY CMD BAUDRATE CMD TIMEOUT CMD KNOB CMD LEVEL CMD LANGUAGE CMD SLEEP CMD GROUP SD CMD UNGROUP SD CMD ERASE CMD NAME SD CMD RESETALL STS RESULT I r Recognized Speaker Dependent custom commands Password or training similar to Speaker Dependent custom commands and Password commands 1 Command position 0 31 In replay to CMD RECOG SD CMD TRAIN SD STS SIMILAR g 1 Recognized Speaker Independent pre programmed commands work or training a similar Speaker Independent pre programmed commands command Wordset indext 0 31 In replay to CMD_RECOG_SD CMD TRAIN SD CMD RECOG SI STS OUT OF MEM m Memory Full Error In replay to CMD GROUP SD STS ID x 1 Provide firmware ID Version ID 0 In replay to CMD_ID Argument Mapping ARG_MIN Minimum argument value
49. ing the following while the Say It bridge program is running l Select a group that you would like to add the word s to Figure 6 Saylt GUI v1 0 File Edit Tools Help AJ icons Ri GAS G R e pr Group List Group 1 Command List Index Description Commands Index Label Trained Conflict 0 Trigger 0 1 Group Group Group Group Group Group Group Group Group Group Group Group Group Group Group Password Wordset Wordset Wordset CH 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 6 1 1 Figure 6 80 757576 2 Click Add Command from the tool bar or menu Figure 7 and provide a label In this example the label CREATE LABEL HERE has been created however it is suggested that you use a label that you can later review and know what the word is 2 Saylt GUI v1 0 File Edit Tools Help A US cs Group List Index Description Commands Index Label Trigger N Group Group Group Group Group Group Group Group Group Group Group Group Group Group Group Password Wordset Wordset Wordset e Add Command co co C P on zb C 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 6 1 Figure 7 81 757576 3 Select the label that in the right window pane and click Train from the tool bar or menu Figure 8 9 Saylt GUI v1 0 File Edit Tools Help A cons RRA9aRn Group List Index Description Commands Trained Conflict Trigger D i
50. l pop up indicating an error of a timeout Later you will want to use the same process to test any new commands that you train it to recognize Adding or Deleting Commands When you want to create your own command you can do so by using the Say It GUI There are 4 types of commands in the GUI e Trigger Trigger words are used to start the voice recognition process all spoken command phrases will begin with a trigger word Robot is the SI trigger word and you may train one additional trigger word e Group Groups of user definable SD commands You may add up to 32 commands total 31 if you also define a trigger word e Password A special group for vocal passwords up to 5 may be defined e Wordset Built in groups of Speaker Independent SI commands Figure 3 79 751516 The user can define groups of SD commands or passwords and generate a PBASIC code template to handle them The recognition function of Say It modules works on a single group at a time so that users need to group together all the commands that they want to be able to use at the same time When Say It GUI connects to the module it reads back all the user defined commands and groups which are stored into the Say It module s non volatile memory for later review and editing When training SI commands simulate the environmental background noise in which you want to use this module for the best results for recognition Adding a SD command can be completed by do
51. led this overloading will only occur in only one phase thus make the circuit safe for more damage that it will take from breakdown Garrard 2010 Obstacle Avoidance Fuzzy System for Mobile Robot with I R Sensors The paper deals with the navigation problem of mobile robots in an unknown indoor environment with the use of infrared sensors In this paper the robot has the ability to plan motion and to navigate autonomously avoiding any type of obstacles This is a reactive strategy and is completely based on sensory information This gives the idea that infrared sensors can be used as proximity sensors for an obstacle detection mechanism It has been stated in the article that infrared detectors have built in optical filters that allow very little light which is the main idea of detecting an obstacle whether it is physically present or not 10 By using infrared sensors a program can be designed for obstacle detection and thus allow the possibility of creating a machine that would be used for collision avoidance This article proves that a collision free navigation system is possible in a machine that uses infrared sensors and is programmed in the most appropriate way they should be 11 Chapter 3 OBSTACLE DETECTI ON FOR A SPEECH CONTROLLED DC MOTOR OPERATED WHEELCHAI R WI TH ELEVATI ON SYSTEM Abstract A speech controlled dc motor operated wheel chair with proximity sensors as an Obstacle detection is proposed in this paper The u
52. log reference voltage RA3 AN3 VREF 5 6 22 y o TTL RAS can also be analog input3 or positive analog reference voltage RA4 TOCKI 6 7 23 UO ST RA4 can also be the clock input to the TimerO timer counter Output is open drain type RA5 SS AN4 7 8 24 O TTL RA5 can also be analog input4 or the slave select for the synchronous serial port PORTB is a bi directional I O port PORTB can be soft ware programmed for internal weak pull up on all inputs RBO INT 33 36 8 UO TTL ST RBO can also be the external interrupt pin RB1 34 37 9 UO TTL TTL RB2 35 38 10 UO TTL TTL RBS PGM 36 39 11 UO TTL RB3 can also be the low voltage programming input RB4 37 41 14 UO TTL ST Interrupt on change pin RB5 38 42 15 UO Interrupt on change pin 2 RB6 PGC 39 43 16 UO TTL STO Interrupt on change pin or In Circuit Debugger pin Serial programming clock RB7 PGD 40 44 17 UO Interrupt on change pin or In Circuit Debugger pin Serial programming data Legend input O output I O input output P power Not used TTL TTL input ST Schmitt Trigger input Note 1 This buffer is a Schmitt Trigger input when configured as an external interrupt 2 This buffer is a Schmitt Trigger input when used in Serial Programming mode 3 This buffer is a Schmitt Trigger input when configured as general purpose I O and a TTL input when used in the Parallel Slave Port mode for interfacing to a microprocessor bus 4 This buffer is a Schmi
53. nal Also unexpected pauses unusually fast or slow speaking styles and other changes in speed can randomly shift the position of the input relative to the template The same person can utter the same word in slightly different ways each time The person can pause speak faster speak slower or emphasize certain syllables These differences are called intra speaker differences The differences between the same words uttered by the different speakers or different words uttered by same speaker or different speakers are called inter speaker differences These differences are large as compared to intra speaker differences Haleem 2008 A Survey and Experimental Evaluation of Proximity Sensors for Space Robotics The paper provides an overview selection process for proximity sensors for manipulator collision avoidance Five categories of sensors have been considered for this use in space operations intensity of reflection triangulation time of flight capacitive and inductive From these categories the most promising commercial and mature laboratory prototype sensors have been selected and tested After reviewing the selection process and the experimental results conclusions are drawn about which sensors are best and why The report has detailed the selection of proximity sensors for manipulator collision avoidance In this paper proximity sensors were tested and their capabilities were known Optical intensity of reflection sensors are probably
54. ndent pre programmed commands knob to specific level 1 Knob level 0 4 Expected replies STS SUCCESS CMD_LEVEL V Sets Speaker Dependent custom programmed commands to specific level 1 Threshold 1 5 Expected replies STS SUCCESS CMD LANGUAGE Set Speaker Independent pre programmed commands language 1 Language 0 English 1 Italian 2 Japanese 3 German Expected replies STS SUCCESS CMD TIMEOUT O Set Speaker Independent pre programmed commands language 1 Timeout 1 default O infinite 1 30 seconds Expected replies STS SUCCESS CMD_RECOG_SI Activate Speaker Independent pre programmed commands recognition from specified j wordset 1 Wordset Index 0 3 Expected replies STS SUCCESS STS TIMEOUT STS ERROR CMD TRAIN SD n Train specified Speaker Dependent custom programmed commands or Password command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies GIG SUCCESS GIG RESULT STS SIMILAR GIG TIMEOUT GIG ERROR CMD GROUP SD g Insert new Speaker Dependent custom programmed commands or Password command 1 Group index 0 trigger 1 15 generic 16 password 2 Command position 0 31 Expected replies STS SUCCESS STS OUT OF MEM 89 751516 CMD UNGROUP SD
55. ne btfss SWA Prev 3 goto Chk SWA3Done call Turn Left S SWA3Done nop i chk SWA4 btfsc SWA New 4 j goto Chk_ SWA4Done j btfss SWA Prev 4 goto Chk SWA4Done call Move BAK S SWA4Done nop S SWA5 btfsc SWA_ New 5 goto Chk_ SWA5Done btfss SWA Prev 5 goto Chk SWA5Done call Move Down S SWA5Done nop j Chk SWEO btfsc SWE_New 0 goto Chk_ SWEODone btfss SWE_Prev 0 goto Chk_ SWEODone call Move UP i Chk SWEODone nop D Chk FWD movf PORTE andlw H OF j sublw B 00000101 btfss STATUS Z goto Chk FWDX f btfsc Sensor 0 Left Front call Move Stop btfsc Sensor 1 Right Front call Move Stop btfsc Sensor 4 Left Floor call Move Stop j btfsc Sensor 5 Right Floor 58 call Move Stop Chk FWDX nop Chk_BAK movf PORTB W andlw H OF sublw B 00001010 btfss STATUS Z i goto Chk BAKX s btfsc Sensor 2 Left Back call Move Stop btfsc Sensor 3 Right Back call Move Stop Chk BAKX nop Chk Left movf PORTB W 4 andlw H OF sublw B 00000110 f btfss STATUS Z goto Chk LeftX btfsc Sensor 0 Left Front call Move Stop btfsc Sensor 4 Left Floor call Move Stop Chk LeftX nop j Chk Right movf PORTB W andlw H OF sublw B 00001001 i btfss STATUS Z i goto Chk_RightX btfsc Sensor 1 Right Front call Move Stop btfsc Sensor 5 Right Floor call Move Stop Chk RightX nop movf
56. nsors The first test focuses in measuring the effectiveness of the front and back sensors in obstacle detection The purpose of this test is to determine if the proximity sensor is effective in detecting the obstacle to avoid collision In 22 this test four of the wheelchair s movement command will be tested upon the obstacles located at varying locations as described in Table 3 5 Upon encountering an obstacle the wheelchair will disable the movement command used with respect to the location of the obstacle The procedures to be performed for this test are described below Procedure 1 The four movement commands namely move forward move backward move left and move right will be put to test while obstacles are placed on different location as specified in Table 3 5 2 The movement command that will not be done in response to the detection of an obstacle will be marked as disabled and others will be marked as working 3 Results will be obtained and recorded at the given table Table 3 5 Test of effectiveness of the front and back proximity sensors Location of Forward Backward Turn Left Turn Right obstacle Command Command Command Command 1 Front Disabled Working Working Working 2 Back Working Disabled Working Working 3 Left Working Working Disabled Working 4 Right Working Working Working Disabled 5 Front and Disabled Working Disabled Working Left 6
57. nstaller exe and select run as administrator Device Information Specifications Symbol Quantity Minimum Typical Maximum Units Vdd Supply Voltage 3 3 5 0 5 5 V Pin Definitions Pin Label Function 1 Vss Ground 2 Rx Receive I O Pin TTL amp CMOS compatible 3 Tx Transmit I O Pin TTL A CMOS compatible 4 Led Red LED indicator 5 No Connection 6 No Connection 7 No Connection 8 No Connection 9 No Connection 10 Vdd 5 V regulated DC Connection Diagrams This is the back view of the module the connection pins are indicated on the silkscreen Indicator LED DD Transmit pin d En no connect no connect no connect no connect no connect 5 VDC Pin 10 x Receive pin gt 751516 Ground Pin 1 87 DS Parallax Say It Module www vee ar com Module Dimensions 63 22 mm 13 20 mm Communication Protocol 26 21 mm Communication with the Say It module uses a standard UART interface compatible with 3 3V to 5V TTL logical levels The initial configuration at power on is 9600 baud 8 bit data No parity 1 bit stop The baud rate can be changed later to operate in the range 9600 115200 baud The communication protocol only uses printable ASCII characters which can be divided in two main groups Command and status characters respectively on the TX and RX lines chosen among lower case letters
58. nt types of proximity sensors can be used but Infrared Proximity sensors would be the best choice because of their sensitivity Direct Current DC Motors In any electric motor operation is based on simple electromagnetism A current carrying conductor generates a magnetic field when this is placed in an external magnetic field it will experience a force proportional to the current in the conductor and to the strength of the external magnetic field The internal configuration of a DC motor is designed to harness the magnetic interaction between a current carrying conductor and an external magnetic field to generate rotational motion At a simplistic level using DC motors is pretty straightforward put power in and get rotary motion out Seale 2003 DC motors are used on the design as a source of power in elevation and movement of the wheelchair Related Studies Battery Assisted Wheel Chair This research deals with series hybrid combination of manual and battery powered wheelchair The control scheme used is simpler than other hybrid wheelchairs It includes the sensor less control of the speed Battery assisted wheelchair BAW which is operated by a DC motor and has less number of components in its hardware Effort made by rider is reduced considerably The control scheme also includes the dead man s switch feature Speed loop is provided for the smooth variation of the speed The current limit is governed by peak current mode cont
59. oftware and then connect the Board of Education to your PC and turn the power switch on position 1 4 Select the serial port that the Board of Education Say It module is connected from the toolbar Figure 1 or File from the menu then Connect See Figure 2 BASIC Stamp Editor Debug Terminal must be closed before selecting Connect in Say It GUI 70 751516 9 Saylt GUI v1 0 File Edit Tools Help m Sel x Trigger Command List Index Label Trained Conflict T Robot N A OK Serial port to use Connect Icon Password Wordset Wordset Wordset Figure 2 5 Once connected the Say It software prompts you to download the PBASIC bridge program to the controller board and switches to the programming mode Figure 3 Choose Yes when prompted Confirmation A BasicStamp2 device has been Found but the programming software is not responding or it is outdated Do you want to download the updated software to the device Figure 3 A PBASIC bridge program will automatically be downloaded to the BASIC Stamp 2 This bridge program allows the user to work with the set of SI commands the Say It module provides as well as defining new commands 77 757576 6 Verify that the bridge download has been completed by the green status bar in the top right of the GUI it should remain full Once you have successfully connected to the module you can insert add remove rename train erase test
60. ontrol or voice recognition alone and do not give more concern on the safety of the users Most of them do not have the ability to elevate the wheelchair and thus make it less reliable when the user goes to different places alone This study aims to design an obstacle detection mechanism for a speech controlled wheelchair with elevation to improve safety of users The specific objectives of this study are the following a To design an obstacle detection mechanism using proximity sensors b To specify possible obstacles that the wheelchair can detect c To determine the effectiveness of proximity sensors when used for obstacle detection With the completion of this study people who are having problems with mobility will have fewer worries when it comes to their safety in using a wheelchair They will also have the benefit of using a speech recognition wheelchair that would allow them to manipulate the direction where they would like to go and can elevate themselves to a certain level without using physical strength The obstacle detection mechanism comprises of proximity sensors that can be activated to avoid accidents like falling down from a gutter and hitting a wall Speech recognition technology is applied to the wheelchair There will be a headset to be worn by the user to serve as his medium of control for the device There are also 2 emergency buttons one for stop and another one for enabling and disabling the obstacle detection system The w
61. ords that it has been programmed to recognize Once the module has determined if there is a match it will take a defined action either listening for the next keyword in another wordset or executing the commands associated with the word that was said You can create up to 32 user definable keywords The Say It GUI software for the BASIC Stamp 2 provides an easy interface for training the module and producing template code Or the simple and robust serial protocol provided can be used to access the Say It module functions from other Parallax microcontrollers The 10 pin SIP header makes the module breadboard friendly and is designed to fit in one row of the AppMod header found on the Board of Education and Boe Bot Robot Features 7m 23 Pre programmed commands es 4 Up to 32 user definable commands e SIP for breadboard friendly projects 0 1 spacing GUI provides training and template code for BASIC Stamp 2 modules e On board LED and microphone Voice controlled Boe Bot examples Key Specifications Power requirements 3 3 to 5 5 VDC e Communication Adjustable Asynchonous Serial 9600 default 19200 38700 57600 115200 Operating temperature 32 to 158 F 0 to 70 C Dimensions 1 02 x 2 47 x 38 in 26 x 62 93 x 9 70 mm Application Ideas e Voice controlled entry systems e Automated house applications e Voice activated robotics Precaution e Do not solely rely on the Say It module to reco
62. ovlw STS_ SUCCESS IF VRA STS SUCCESS THEN subwf VRA W btfss STATUS Z goto VR EOSETEDDD call Delay H return VR_Recognize movlw D 250 i movwf LED1_Tmr d Chk WS movw Di 47 WS 1 subwf WS W btfss STATUS C goto WS 1 movlw D 3 subwf WS W n btfss STATUS C goto Chk WSDone movlw D l movwf WS Chk_WSDone nop movlw CMD RECOG SI movwf tx data call Send_tx movf WS W addlw ARG ZERO movwf tx data call Send tx movlw D 250 movwf VCountHi clrf VCountLo call Get rx f movlw STS_SIMILAR IF VRA STS SIMILAR subwf VRA W btfss STATUS Z goto VR_RecgErr movlw ARG ACK movwf tx data i call Send_tx clrf VCountHi clrf VCountLo call Get rx movlw ARG MAX subwf VRA W d btfsc STATUS C goto VR RecgErr movlw ARG_ZERO 48 subwf VRA W btfss STATUS C goto VR_RecgErr movwf incf LF Chk_WS1 movlw D 1 subwf WS W btfss STATUS Z goto VR RecgOut Chk_WS1Stop movlw D 7 subwf W btfss STATUS Z s goto Chk WS1StopX cirf goto VR RecgOut S Chk_WS1StopX nop H Chk WS1Move movlw D 2 subwf W H btfss STATUS Z goto Chk WS1MoveX movlw D A movwf WS movlw D 250 movwf LED2 Tmr Chk WS1MoveX nop goto VR_RecgDone VR RecgOut movlw D l movwf WS movlw D 250 movwf LED2 Tmr VR_Recg0 movlw D O subwf W btfsc STATUS Z i call Move_Stop j VR Recgl movlw D
63. r inX return overerror bcf RCSTA CREN pulse cren off movf RCREG W flush fifo movf RCREG W all three elements movf RCREG W bsf RCSTA CREN turn cren back on this pulsing of cren will clear the oerr flag goto ser inX try again frameerror movf RCREG W reading rcreg clears ferr flag goto ser inX try again Oeo K K KK K K K OK K K K K K K K ECCE K K K K K K K K K K K K K K K K K K K K K KK K K K K K K K K K K OK K K K K OK K K K I KKK KK K K K K K end 1 KK OK KK OK K K K K OK OK K K K K K K K K K OK K K K OK K OK K K OK gt K K K K OK oo OK K OK K K K OK OK OK OK KKK Xx KK OK KK KK KKK 64 e MICROCHIP PIC16F87X 28 40 Pin 8 Bit CMOS FLASH Microcontrollers Devices Included in this Data Sheet PIC16F873 PIC16F874 PIC16F876 PIC16F877 Microcontroller Core Features e 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 the PIC16C73B 74B 76 77 Interrupt capability up to 14 sources Eight level deep hardware stack Direct indirect and relative addressing modes Power on Reset POR Power up Timer PWRT and Oscillator Start up Timer OST Wa
64. red as analog inputs and read as 0 The TRISA register controls the direction of the RA pins even when they are being used as analog inputs The user must ensure the bits in the TRISA register are maintained set when using them as analog inputs 1 0 pin Vss E3 t INITIAL hmi BCF STATUS RPO To S BCF STATUS RP1 Bank0 Input CLRF PORTA Initialize PORTA by Buffer clearing output data latches Select Bank 1 Configure all pins BSF STATUS RPO MOVLW 0x06 MOVWF ADCON1 MOVLW OxCF as digital inputs Value used to initialize data direction Set RA 3 0 as inputs RA 5 4 as outputs TRISA lt 7 6 gt are always MRO Clock nput read as O MOVWF TRISA MU Ne Ne Ne Ne Ne Ne Ne Ne NEO Se Se a Note 1 UO pin has protection diodes to Vss only 69 PIC16F87X TABLE 3 1 PORTA FUNCTIONS Name Bit Buffer Function RAO ANO bitO TTL Input output or analog input RA1 AN1 bit1 TTL Input output or analog input RA2 AN2 bit2 TTL Input output or analog input RA3 AN3 VREF bit3 TTL Input output or analog input or VREF RA4 TOCKI bit4 ST Input output or external clock input for Timer0 Output is open drain type RA5 SS AN4 bit5 TTL Input output or slave select input for synchronous serial port or analog input Legend TTL TTL input ST Schmitt Trigger input TABLE 3 2 SUMMARY OF REGISTERS ASSOCIATED WITH PORTA Value on Value on all Address
65. responsible for lifting the wheelchair while the other one is for the forward movement of the wheelchair while being elevated Figure 3 4 below shows the algorithm for the elevation mechanism of the wheelchair First there will be an input speech command from the user The input speech command will be verified if it is for elevating the wheelchair or for moving it down If the command falls either for these commands that specific command will be executed If it is invalid the microcontroller will do nothing Perform up Perform Up Function Perform Down Function Fig 3 4 A Elevation System Flowchart 19 Start If Operation is Up Perform Up Function Else Perform Down Function Return Fig 3 4 B Elevation System Algorithm When the speech recognition module and elevation system algorithm are finished the next thing to design is the mechanism for obstacle detection of the wheelchair In this part the speech controlled wheel chair will be integrated with proximity sensors There will be proximity sensors to be attached at the front and back of the wheelchair There will also be another set of proximity sensors at the bottom of the wheelchair This is for detecting dangerous places such as stairs cliffs and etc The flowchart and algorithm for the obstacle detection are described respectively below Set Signal5 Clear Signal3 Set Signal3 Clear Signal6 Fig 3 5 A Obstacle Detection iz dE E End 20
66. return Relay Delay movlw D 250 61 movwf RDly Loop decf II movf I W btfss STATUS Z d goto RDly Loop return Short Delay movlw D 250 j movwf SDly Loop decf I F movf I W btfss STATUS Z goto SDly Loop call Do LED call Do LED2 f call Read_SW call Read_ADC return Delay movlw D 100 i movwf J Dly_Loop1 call Short Delay decf J F x movf J W btfss STATUS Z goto Dly Loopl return gt Init UART uart specific initialization txsta Transmit STAtus and control reg bsf STATUS RPO Select Bank 1 bcf STATUS RP1 bcf TXSTA CSRC T 0 don t care in asynch mode bcf TXSTA TX9 6 0 select 8 bit mode bsf TXSTA TXEN 5 1 enable transmit function MUST be 1 for transmit to work bcf TXSTA SYNC 4 0 asynchronous mode 62 MUST be 0 If NOT 0 the async mode is NOT selected 3 0 not implemented bsf TXSTA BRGH 2 1 ENABLE high baud rate generator 0 DISABLE High Baud Rate Generator 1 0 trmt is read only bcf TXSTA TX9D 0 0 tx9d data cleared to 0 baudrate d 9600 desired baudrate spbrg_value d 103 for BRGH 1 see TABLE 10 3 of 30292c pdf 16Mhz Crystal movlw spbrg_value set baud rate generator value movwf SPBRG SEKKER A RR AR IOR OH RR KEKEE KERKE IRAE EE SOR RA RH RR AO AAR AE A AE ARO AE FE EKER 8 2K KKK KK KK KKK bcf STATUS RPO sallow access to page 0 stuff again normal
67. rol Rahulanker amp Ramanarayanan 2006 Voice Controlled Automation System This paper discusses speech recognition and its application in control mechanism Speech recognition can be used to automate many tasks that usually require hands on human interaction such as recognizing simple spoken commands to perform something like turning on lights or shutting a door or driving a motor Despite these breakthroughs however current efforts are still far away from a 1000 0 recognition of natural human speech Therefore the project is considered but it involves processing of a speech signal in any form as a challenging and rewarding one In this paper a block diagram was used to show the sequence on how speech will be processed Voice Speech Input A Recognizer r1 Tranceiver Control System Microntroller Pattern matching was also discussed and was stated that the comparison of two speech signals is nothing but basically their pattern matching The speech signal can be represented as the set of numbers representing certain features of the speech that is to be described For further processing it is useful to construct a vector out of these numbers by assigning each measured value to one component of the vector It is also stated that an uttered voice can differ from a stored template due to interference noise and other magnitude distortions which corrupt the input signal and can make it sound different from the reference sig
68. s Success Success Success Success 10096 obstacle 5 Blue colored Success Success Success Success Success 10096 obstacle 30 Table 3 9 B Determination of the obstacles that can be detected by bottom sensors Obstacles Bottom Proximity Sensors Trial Trial Trial Trial Trial Percentage of 1 2 3 4 5 Success 9o 1 Stairs Success Success Success Success Success 10096 2 Gutter Success Success Success Success Success 10096 3 Man Hole Success Success Success Success Success 10096 4 Pothole Success Success Failed Success Failed 8096 5 Inclined Plane Failed Failed Failed Failed Failed 096 Table 3 8 A shows the results of the test in detecting various types of obstacles Based from the results the wheelchair is able to easily detect an object with wide and large area On the other hand a thin object like the lamp post shows lower percentage of success compared to other obstacles Also based from the results reflective objects are not easily detected by the proximity sensors And in terms of the color of the obstacles the obstacle detection of the system is not much affected by color of the obstacle The obstacle detection of that specific object even with varying color shows high percentage of success in terms of detection Table 3 8 B shows the result in detecting discontinuous paths Based from the results the wheelchair is abl
69. s of the voice and converts them to phonemes the basic elements of speech The second major component of speech recognition software is the language model which analyzes the content of the speech It compares the combinations of phonemes to the words in its digital dictionary Miastkowski 2000 The structure of a standard speech recognition system is illustrated in the figure below raw speech signal acoustic sequential analysis models constraints Y ros f speech acous tic frame time word frames analysis scores alignment sequence test LI A tram tram segmentation lt I nfrared Proximity Sensor Infrared proximity switches work by sending out beams of invisible infrared light A photodetector on the proximity switch detects any reflections of this light These reflections allow infrared proximity switches to determine whether there is an object nearby Proximity switches with just a light source and photodiode are susceptible to false readings due to background light Thus more complex switches modulate the transmitted light at a specific frequency and have receivers which only respond to that frequency Proximity sensor captures the reflected infrared signal The proximity readout is linearly proportional to the captured infrared light signal intensity and inversely proportional to the square of the distance Luo amp Schmitz 2009 Proximity Sensor OBJECT Differe
70. ser can control the wheel chair through speech command and is capable of moving forward turning either to the left or right direction and can climb up elevated surfaces I ntroduction Most automated wheelchairs nowadays implement advance technology in their designs Some designs implement different medium of control like buttons joysticks and wireless technology to make wheelchair more convenient to use But in some cases these existing designs are not enough to give solution for the mobility of people who suffer extreme case of disability Some of these people have already lost the functionality of their arm In such cases where buttons joysticks and other arm controlled medium are not anymore applicable a speech controlled wheelchair can be used Additional safety features will also be needed to ensure the safety of the user The combination of a speech controlled wheelchair and proximity sensor would allow the user to move independently without worrying about his safety 12 Methodology The study is divided into 3 major parts The first part is all about the implementation of speech control to a dc operated wheelchair The next part is designing the elevation system for the wheel chair And the last part which is the core of the study is all about the development of obstacle detection mechanism Figure 3 1 below shows the conceptual framework of the study The figure shows the process in designing the speech controlled dc operated whe
71. sk of non empty groups Expected replies STS MASK CMD RESETALL fr Reset all commands and groups R Confirmation character Expected replies STS_SUCCESS CMD_ID X Request firmware ID 751516 90 Expected replies STS ID CMD DELAY y Set Transmit delay 1 Time 0 10 0 10ms 11 19 20 100ms 28 28 200 to 1000ms Expected replies STS SUCCESS CMD BAUDRATE a 4 Set communication baud rate 1 Speed mode 1 115200 2 57600 3 38400 6 19200 12 9600 Expected replies STS SUCCESS Status Details SIS MASK k Mask of non empty groups In replay to CMD MASK SD 1 8 4 bit value that form a 32 bit mask LSB first STS COUNT c Count of commands 1 Integer 0 31 In replay to CMD COUNT SD STS AWAKEN w Wake up back from power down mode In replay to Any character after power on or sleep mode STS DATA d Provide command data 1 Training information 0 7 training count 8 SD Password conflicts 16 SI conflict 2 Conflicting command position 0 31 3 Length of label 0 31 4 n Text for label ASCII characters from A to In replay to CMD DUMP SD STS ERROR e Signal recognition error 1 2 Two 4 bit values that form 8 bit error code 80h NOTA otherwise see FluentC
72. tchdog Timer WDT with its own on chip RC oscillator for reliable operation Programmable code protection Power saving SLEEP mode Selectable oscillator options Low power high speed CMOS FLASH EEPROM technology Fully static design In Circuit Serial Programming ICSP via two pins Single 5V In Circuit Serial Programming capability In Circuit Debugging via two pins Processor read write access to program memory Wide operating voltage range 2 0V to 5 5V High Sink Source Current 25 mA Commercial Industrial and Extended temperature ranges Low power consumption lt 0 6 mA typical 3V 4 MHz 20 pA typical 3V 32 kHz 1 pA typical standby current 64 Pin Diagram PDIP MOL Biver gt RAO ANO lt RA1 AN1 lt RA2 AN2 VREF lt RA3 AN3 VREF lt RA4 TOCK lt RA5 AN4 SS lt REO RD AN5 lt gt RE1 WR AN6 lt gt RE2 CS AN7 lt VDD RB7 PGD RB6 PGC RB5 RB4 RB3 PGM RB2 RB1 RBO INT VDD Vss RD7 PSP7 RD6 PSP6 RD5 PSP5 RD4 PSP4 RC7 RX DT RC6 TX CK RC5 SDO ON Dar WD Vss OSC1 CLKIN OSC2 CLKOUT lt RCO T1OSO T1CKI lt RC1 T1OSI CCP2 RC2 CCP1 lt RC3 SCK SCL lt gt RDO PSPO lt RD1 PSP1 lt lt r N co Z N N co LL o ka o a RD3 PSP3 RD2 PSP2 FFF TH RC4 SDI SDA Peripheral Features e Timer0 8 bit timer counter with 8 bit prescaler Timer1 16
73. tect large obstacle like walls and can also detect near falling off platform When the obstacle detection system detects an obstacle it will then make the wheelchair to immediately stop automatically To enable the elevation the user must first disable the obstacle mechanism CHAPTER 2 REVI EW OF RELATED LI TERATURE For the past decades evolution of ways to improve technology that will support people with mobility problems has been given a lot of attention Because of the latest trend of technology people were able to communicate with machines through programs Speech is a natural mode of communication for people and with the use of the latest technology people have created speech recognition programs Speech Recognition Speech recognition often called automatic speech recognition is the process by which a computer recognizes what a person says Speech recognition is the ability of a machine or program to identify words and phrases in spoken language and convert them to a machine readable format However rudimentary speech recognition software has a limited vocabulary of words and phrases and may only identify them if they are spoken very clearly More sophisticated software has the ability to accept natural speech Speech recognition applications include call routing speech to text voice dialling and voice search Speech recognition software has two primary components The first piece called the acoustic model analyzes the sound
74. the most widely available in the number of manufacturers the number of models and the ranges of operation Many of these sensors have adjustable ranges which are set by turning a potentiometer on the sensor housing Therefore the ranges listed for some sensors may not be attainable by one sensor setting Volpe amp Ivlev 1994 Switchgear control apparatus and relays for alternating current circuits The paper stated that control relays are a standard practice for a correct design and it is very important to lay out such relays in the circuit With this the system depends on the proper action of relays because this will take a large part on the success of the operation of circuit Implementing relays to control a circuit requires that the circuit must be controlled by only one signal Multiple relays can be activated at the same time thus a different operation must be done with single activated relay different combinations can have different operations In the article relays are used to control the alternating currents of a switchgear control apparatus The relay here has a single moving element which moves under the action of the currents The team also stated that if the circuit is in breakdown the overload on the single overloaded phase must be much greater than before for the relay to operate This means that if the circuit has no relays the overloading will occur simultaneously on each of the operation phases but if relays are instal
75. tional UO port REO RD AN5 8 9 25 UO ST TTL REO can also be read control for the parallel slave port or analog input5 RE1 WR AN6 9 10 26 UO ST TTLO RE1 can also be write control for the parallel slave port or analog input6 RE2 CS AN7 10 11 27 UO ST TTL RE2 can also be select control for the parallel slave port or analog input7 Vss 12 31 13 34 6 29 P Ground reference for logic and I O pins VDD 11 32 12 35 7 28 P Positive supply for logic and I O pins NC 1 17 28 12 13 These pins are not internally connected These pins 40 33 34 should be left unconnected Legend input O output I O input output P power Not used TTL TTL input ST Schmitt Trigger input Note 1 This buffer is a Schmitt Trigger input when configured as an external interrupt 2 This buffer is a Schmitt Trigger input when used in Serial Programming mode 3 This buffer is a Schmitt Trigger input when configured as general purpose I O and a TTL input when used in the Parallel Slave Port mode for interfacing to a microprocessor bus 4 This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise 68 PIC16F87X 3 0 IO PORTS FIGURE 3 1 BLOCK DIAGRAM OF Some pins for these I O ports are multiplexed with an alternate function for the peripheral features on the Data device In general when a peripheral is enabled that Bus pin may not be used as a general purpose O pin Addition
76. to the elevated platform Keywords Voice module Electric car jack PIC microcontroller DC motors Proximity Sensors vi Chapter 1 I NTRODUCTI ON Wheelchairs are one of the commonly used devices for assisting human mobility It was invented as a solution to the mobility problems of paralytic people Most of these people are those who suffer serious cases and totally lost their mobility An ordinary wheelchair is a big help to them but still needs another person for assistance Nowadays there are various types of wheelchairs that already exist Some of the innovations made the manually operated wheel chair into an automated system The most common type of automated wheelchair is the one controlled through buttons and joysticks Other designs implement some advance technology such as wireless application and voice recognition to improve the existing wheelchair designs These wheelchairs are generally prescribed for those people who experience difficulty in using manual wheelchair due to arm and other disabling conditions The condition of the user indicates the type of electronic wheelchair to be used For some cases when the user lacks coordination with his finger hand controlled wheelchair would not be advisable Other means of controls must be implemented for the convenience of the patient Although there are a lot of studies regarding the improvement of a wheelchair most of these are concentrating on the application of easier manual c
77. tt Trigger input when configured in RC oscillator mode and a CMOS input otherwise 67 PIC16F87X TABLE 1 2 PIC16F874 AND PIC16F877 PINOUT DESCRIPTION CONTINUED Bin Nam DIP PLCC QFP VO P Buffer EE ame Ping Ping Ping Type Type E PORTC is a bi directional I O port RCO T1OSO T1CKI 15 16 32 UO ST RCO can also be the Timer1 oscillator output or a Timer1 clock input RC1 T1OSI CCP2 16 18 35 o ST RC1 can also be the Timer1 oscillator input or Capture input Compare2 output PWM2 output RC2 CCP1 17 19 36 o ST RC2 can also be the Capture1 input Compare1 output PWM1 output RC3 SCK SCL 18 20 37 o ST RC3 can also be the synchronous serial clock input output for both SPI and DC modes RC4 SDI SDA 23 25 42 IO ST RC4 can also be the SPI Data In SPI mode or data I O I C mode RC5 SDO 24 26 43 UO ST RC5 can also be the SPI Data Out SPI mode RC6 TX CK 25 27 44 UO ST RC6 can also be the USART Asynchronous Transmit or Synchronous Clock RC7 RX DT 26 29 1 UO ST RC7 can also be the USART Asynchronous Receive or Synchronous Data PORTD is a bi directional I O port or parallel slave port when interfacing to a microprocessor bus RDO PSPO 19 21 38 VO ST TTL RD1 PSP1 20 22 39 VO ST TTL RD2 PSP2 21 23 40 UO ST TTL RD3 PSP3 22 24 41 y o ST TTL RD4 PSP4 27 30 2 O ST TTL RD5 PSP5 28 81 3 yo STTTL RD6 PSP6 29 32 4 yo STTTLO RD7 PSP7 30 33 5 yo STTTL PORTE is a bi direc
78. ull up RB3 PGM bit3 TTL Input output pin or programming pin in LVP mode Internal software programmable weak pull up RB4 bit4 TTL Input output pin with interrupt on change Internal software programmable weak pull up RB5 bit5 TTL Input output pin with interrupt on change Internal software programmable weak pull up RB6 PGC bit6 TTL ST Input output pin with interrupt on change or In Circuit Debugger pin Internal software programmable weak pull up Serial programming clock RB7 PGD bit7 TTL ST Input output pin with interrupt on change or In Circuit Debugger pin Internal software programmable weak pull up Serial programming data Legend TTL TTL input ST Schmitt Trigger input Note 1 This buffer is a Schmitt Trigger input when configured as the external interrupt 2 This buffer is a Schmitt Trigger input when used in Serial Programming mode 3 Low Voltage ICSP Programming LVP is enabled by default which disables the RB3 I O function LVP must be disabled to enable RB3 as an I O pin and allow maximum compatibility to the other 28 pin and 40 pin mid range devices TABLE 3 4 SUMMARY OF REGISTERS ASSOCIATED WITH PORTB Value on Value on Address Name Bit 7 Bit 6 Bit 5 Bit4 Bit 3 Bit 2 Bit1 Bit 0 POR all other BOR RESETS 06h 106h PORTB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RBO xxxx xxxx uuuu uuuu 86h 186h TRISB PORTB Data Direction Register 1
79. ull up is automatically turned off when the port pin is configured as an output The pull ups are dis abled on a Power on Reset FIGURE 3 3 BLOCK DIAGRAM OF RB3 RBO PINS VDD Weak P Pull up RBPUO Data Latch D Q CK TRIS Latch D Q Data Bus UO WR Port pin WR TRIS CK RD TRIS RD Port RBO INT RB3 PGM N Schmitt Trigger Buffer RD Port Note 1 I O pins have diode protection to VDD and Vss 2 To enable weak pull ups set the appropriate TRIS bit s and clear the RBPU bit OPTION REG 7 Four of the PORTB pins RB7 RB4 have an interrupt on change feature Only pins configured as inputs can cause this interrupt to occur i e any RB7 RB4 pin configured as an output is excluded from the interrupt on change comparison The input pins of RB7 RB4 are compared with the old value latched on the last read of PORTB The mismatch outputs of RB7 RB4 are OR ed together to generate the RB Port Change Interrupt with flag bit RBIF INTCON lt 0 gt 71 This interrupt can wake the device from SLEEP The user in the Interrupt Service Routine can clear the interrupt in the following manner a Any read or write of PORTB This will end the mismatch condition b Clear flag bit RBIF A mismatch condition will continue to set flag bit RBIF Reading PORTB will end the mismatch condition and allow flag bit RBIF to be cleared The interrupt on change feature is recommended for wak
80. voice command forward backward left right n a up down An orange LED will glow once the second input word is recognize else go back to step 3 7 Wait for the wheelchair s output and proceed to step 3 In order to further understand how the wheelchair operates a summary of the wheelchair s function is described by the table below 36 Table 4 Summary of the movement operation of the speech controlled dc motor operated wheelchair with elevation system First Word Command Second Word Command Wheelchair s Response Move Forward The wheelchair will continuously move forward Move Backward The wheelchair will continuously move backward Move Left The wheelchair will continuously turn counter clockwise rotate left Move Right The wheelchair will continuously turn clockwise rotate right Move Up The wheelchair will lift its front wheels Move Down The wheelchair will land its front wheels Stop The wheelchair stops from moving Safety switch use to as an emergency stop for the wheelchair s movement It is located at the front of the right arm of the wheelchair And for the safety precautions in using the design the information below will give the user the necessary precautions to be followed to prevent damaging the wheelchair as well as to prevent accidents Safety precautions 1 Always remove the power supply clip from the batter
81. y if the wheelchair is not in used 2 Always ensure that the power supply clips are correctly attached to the polarity of the battery RED Positive BLACK Negative 3 As much as possible turn off the microphone if the wheelchair is not in used 4 Remember to always have a hand to the safety switch 38 Appendix B Pictures of Prototype 39 40 Appendix C Program Listing ooo KK K K K K KK K K K KK K KK KK K K K KK K K KK K K K KKK KK KK K K KK K K K KKK K K pee OK K K K K K K K K D Xx KK filename VoiceChair04 asm processor 16F877A include lt P16F877A inc gt __config HS OSC amp WDT OFF amp PWRTE ON amp LVP OFF amp BODEN OFF amp CP ALL BOO RK Kk kk KKK K KK K K KK K Variable Declaration Voice Var egu H 20 SWA New equ H 30 i SWA Prev equ H3l SWE New equ H 32 SWE Prev equ H 33 LED1 Tmr egu H 40 LED2 Tmr equ H 4l Sensor equ H 42 ADCO egu H 50 d ADC1 egu H 51 ADC2 equ H 52 ADC3 equ H 53 ADCA equ H 54 H ADC5 equ H 55 ADC6 equ H 56 ADC7 equ H 57 i ADC Sel equ H 5A is_data egu H 60 rx_data equ H 6l j tx data equ H 62 f equ H 0 F J equ H 71 Templ equ H 78 H 41 Temp2 equ H 79 Temp3 equ H 7A Temp4 equ H 7B W_TEMP equ H C STAT TEMP egu H D BOBBIE ISSO OBIE IS III II ISI A A I SII A TI IAA AAR E Reset Vector Starts at Address 0x0000 KKK KK K K K K K K K K K K K K K K K K K K K K K K OK K K K K K K K K K K

Download Pdf Manuals

image

Related Search

Related Contents

Enhanced Support Facility 2.6 ユーザーズガイド - ソフトウェア  Excess emissions planning tool (EXEMPT) user guide - UK-Air  Owners Manual - Buy Two Way Radios  00090710 / MP3 Player "DMP620 OLED Sports"  Manuel d`utilisateur / Gebruikershandleiding  Samsung 226UX  Baumatic BDW13 User's Manual  Modelo PH 450G EXAxt Transmisor de pH o de ORP  Sony VGN-Z720D/B User's Guide  

Copyright © All rights reserved.
Failed to retrieve file