当前位置:网站首页>[competition experience sharing] design of intelligent guide rod

[competition experience sharing] design of intelligent guide rod

2022-06-24 03:17:00 DRL DP Wangzai

Design of intelligent blind guide stick based on MCU

Liu Tong

( Beijing University of information technology , Beijing 100083)

pick want : The number of blind people in China accounts for a large proportion of the number of blind people in the world , Blind people are greatly restricted in daily traffic and living activities , Blind people have a lot of trouble for traveling . In this paper, the principle of ultrasonic distance measurement is used to solve the problem of blind travel . This paper first introduces the development status and trends of positioning at home and abroad , Secondly, hardware selection and hardware peripheral circuit design , Each module of the hardware circuit is designed in detail , Including the minimum system of single chip microcomputer 、 Power circuit 、 Ultrasonic ranging circuit 、GPS Module circuit 、GSM Module circuit 、 Alarm circuit 、 Display circuit and voice playing circuit . Write a program according to the flow chart drawn , Then debug through the simulation circuit diagram . Experiments show that , This system can realize the real-time measurement of distance 、 Voice Announcements 、 Functions of emergency alarm . After testing, the system has simple hardware structure 、 The cost is low 、 Work reliably 、 The process is clear 、 High precision 、 Advantages of easy promotion .

key word :STC Ultrasonic ranging location voice

Design of Intelligent Guide Based on Microcontroller Unit

LIU Tong

(Beijing Information Science & Technology University,Beijing 100083)

Abstract:The number of blind people in China accounts for a large proportion of the total number of blind people in the world. The blind are greatly restricted in their daily transportation and life activities, and they have great difficulties in traveling. This paper uses the principle of ultrasonic ranging to solve the problem of blind travel. This article first introduces the status quo and development orientation of development trend, the second to the selection of hardware and peripheral hardware circuit design, the hardware circuit of each module detailed design, including single chip microcomputer minimum system, power supply circuit, ultrasonic distance measurement circuit, a GPS module circuit, GSM module circuit, alarm circuit, display circuit and voice circuit. According to the drawing of the flow diagram to write the program, and then through the simulation circuit diagram debugging. The experiment shows that the system can realize the functions of real-time distance measurement, voice broadcast and emergency alarm. Through testing, this system has the advantages of simple hardware structure, low cost, reliable work, clear flow, high precision and easy popularization.

1 The introduction

In the last century 80 A survey of visual disability was conducted in the s , Results show , Our country has nearly 1300 ten thousand , Among them, there are about blind people 550 ten thousand . The data obtained from the office of the national anti blindness technical guidance group also show , China has 500 Ten thousand blind people , Of the total number of blind people in the world 1/5[1].

1.1 Background and significance

With the continuous progress of people's living standards , Making life more and more simple has become a common life concept pursued by the people . The blind is one of our ordinary people , Another special group , They are born with physical defects , In our daily life, we will encounter more inconveniences than ordinary people , It is an important drawback that we can not find and avoid obstacles accurately and timely . Although in real life, most blind people are assisted by ordinary crutches , But this kind of crutch is just an ordinary long rod , There are too many shortcomings , For example, you can't detect the obstacles hanging above , Can't recognize obstacles that are a little farther away [2]. The guide dog is a good choice to guide the blind , However, training is not easy 、 The time-consuming and expensive use rate of guide dogs is not high . If there is one that is light , It's cheap , At the same time, intelligent crutches that can timely identify surrounding obstacles and send alarm signals in the hands of the blind will provide great convenience for the life of the blind . GPS GPS is an all-weather system based on satellite navigation and positioning technology 、 Passive radio navigation 、 location 、 Time service system [3]. At present, almost all the navigation and positioning products we use are based on GPS Products based on GPS , GPS Navigation and positioning system with its high positioning accuracy 、 Advantages such as all-weather positioning are widely used in various fields , At the same time, it also brings a bright market prospect , It has an irreplaceable position .GPS GPS has become the most widely used 、 A positioning system with broad application prospects . at present , The global 90% All the above navigation and positioning devices are moving towards GPS Position the backup cage .GSM Mobile communication system is a digital cellular mobile communication system with the most mature development and the largest market share in China , Its new business 、 New features are emerging in endlessly . Of course, driven by interests , Many new services and functions are designed to meet the mobile positioning needs of users , The number of people in China exceeds 5 Billion users , The rapid development of mobile location technology is imminent [4]. With GPS Global positioning technology and GSM The wide application and development of communication technology , Establishment of communication link 、 Obviously, the transmission of data information has become a particularly prominent problem in practical applications .GSM The rapid development of system short message service makes people see a new way to solve problems , At the same time, it makes GSM The Internet and GPS The application field of technology is broader , They are more and more closely connected .GPS and GSM Our joint positioning dates back to 2007 Europe in , Has already made great progress , With the rapid development of our country ,GPS and GSM The demand for joint positioning also shows a rapid growth trend . This topic is to use GPS Positioning and GSM Two mobile positioning technologies , Simultaneous utilization GSM Short message technology of the system to realize the information positioning of the blind guide system .

2 Hardware and software design

2.1 Overall scheme design

The general design block diagram of the system is shown in the figure 2.1 Shown , The hardware part of this design mainly includes the following eight parts : Single chip microcomputer 、 Voice module 、 Ultrasonic ranging module 、 Power circuit 、 Alarm module 、 Display module 、 Clock module 、 The communication module consists of . System to STC12C5A60S2 Single chip microcomputer is the core device .

chart 2.1 The overall block diagram of the system

Ranging module : There are two common methods of ranging , One is ultrasonic ranging , One is infrared ranging , Compared with the two , The test accuracy of infrared ranging is low , Close up , Poor directivity . The ultrasonic ranging performance is stable , The test distance is accurate , High precision , The blind spot is small , It is widely used , Choose ultrasonic distance measurement . Ultrasonic ranging formula : The test distance =( High level time * The speed of sound (340m/s))/2, The ultrasonic distance measurement module is used as the distance detection sensor of the system , When any... Is detected - One distance is less than the minimum distance set by the system , The system will give an alarm to indicate that there is an obstacle in front of the staff holder .

Voice module : The system is provided with synchronous voice broadcast , In this way, the user can receive the alarm of the system , The accuracy of the guide rod is improved , At the same time, it also ensures the safety factor . The voice module is designed by STC89C52 The single chip computer sends instructions to the voice chip , Then the voice chip sends the corresponding electrical signal to the horn to make it sound after amplification .

Display module : The LCD screen adopts LCD1602, Distance measurements can be displayed .

Key module : Send SMS with one touch 、 Distance setting value plus / minus key 、 Time tells the time .

Alarm module : When the measured distance is less than the set value LED Alarm to warn pedestrians , At the same time, the guide rod vibrates , When the external environment is noisy , When encountering obstacles, the voice broadcast cannot be heard by the blind , The vibration of the guide rod can prompt the blind to avoid obstacles .

Communication module : Modules include GPS location 、GSM Text messaging , By collecting GPS Longitude and latitude information in the signal , The signal needs to be processed to collect data , Realization GSM When the SMS alarm occurs , Include the longitude and latitude information in the SMS , In case of emergency , It can also realize one key alarm .

Clock module : use DS1302 Clock chip , It can tell the time in real time .

2.2 Main program design

chart 2.2 Main program flow chart

The main program flow chart of the design is shown in Figure 2.2 Shown . The main program needs to call each subroutine in a loop , The main program itself does not carry functional tasks , In the main program, the function is realized by calling each subroutine , Itself is a circular structure . The main program is used to call the operation of each subroutine , There is an dead loop structure in the main program flowchart , Other subroutines are called to detect the distance between obstacles and blind people , An infinite loop is designed to allow the subroutine to run repeatedly , Let each subroutine cycle to measure the distance . The main subroutine is the ultrasonic ranging subroutine 、 Voice broadcast subroutine 、 Clock subroutine 、 Display subroutine 、GPS Positioning subroutine 、 SMS alarm subroutine and keyboard subroutine .

2.3 Ultrasonic ranging subroutine

The ranging function of this design adopts ultrasonic ranging module HC-SR04 Realization , The sequence diagram of its work is shown in Figure 3.2 Shown .

chart 2.3 HC-SR04 Working sequence diagram

In the process of measuring the distance, the single chip microcomputer will give TRIG The more one pin 10us High level pulse signal , Then the internal module will send out a circular 8 The frequency is 40kHz Pulse of , Then wait for the echo signal to return to the receiving end , While waiting for the echo signal to return , The output echo signal will be displayed in ECHO Pin remains high , Until the receiving end receives the echo signal RCHO The pin goes low . Start the timer when it is detected that the output echo signal becomes high 1, Then interrupt the external 0 Set as falling edge trigger . When it is detected that the output echo signal becomes low, enter the interrupt program , Read in the interrupt program TH1 and TL1 The numerical , Time can be calculated , Multiply time by the speed of the sound wave to get the distance . Based on this idea, we have programmed .

The flow chart of ultrasonic ranging subroutine is shown in Figure 2.4 Shown .

chart 2.4 Flow chart of ultrasonic ranging subroutine

Call the ultrasonic ranging subroutine , After the initialization ,TRIG The terminal transmits a pulse signal ,ECHO The port goes high , Start timer ,ECHO The port goes high , Then read the time , Then calculate the distance , Finally, return to the main program .

2.4 Voice broadcast subroutine

The voice broadcast subroutine is shown in the figure 2.5 Shown .

chart 2.5 Flow chart of voice broadcasting subroutine

When the blind walk , If the front 1 There are obstacles at meters , Then the blind staff will automatically give voice prompt “ There is an obstacle one meter ahead , Please note that !”, If the front 1 There are no obstacles at the meter , Silent ; If the front 2 There are obstacles at meters , Then the blind staff will automatically give voice prompt “ There is an obstacle two meters ahead , Please note that !”, If the front 2 There are no obstacles at the meter , Silent ; If the front 3 There are obstacles at meters , Then the blind staff will automatically give voice prompt “ There is an obstacle three meters ahead , Please note that !”, If the front 3 There are no obstacles at the meter , Silent . Handle vibration warning function , It allows the blind to receive the obstacle signal in front through the vibration of the handle in a noisy environment , It makes up for the disadvantages of voice prompt in noisy environment .

2.5 Clock subroutine design

The clock subroutine flow chart is shown in Figure 2.6 Shown .

chart 2.6 Clock subroutine flow chart

Start the clock subroutine , Initialize the variables first , send DS1302 No write protection , The reset terminal generates a high level , Keep writing DS1602 Address , After an extended period of time , Write data to this address , Address to add 1, Judge whether it is finished ? Continue to write before you finish DS1302 Address , After writing data, the reset terminal generates a high level , Write DS1302 Address , After an extended period of time , Read the data of this address , Address increase , Then judge whether the data has been read ? If you haven't finished reading, go back and write DS1302 Address , After reading the data, return to the main program .

2.6 Display subroutine design

The flow chart of the displayed subroutine is shown in Figure 2.7 Shown .

chart 2.7 Display the subprogram flow chart

Call the display subroutine , First LCD1602 initialization , Set the write command 、 Set the display coordinates and set the corresponding characters , Judge whether the last character is displayed , If the character is displayed, continue to display the next character , If no characters are displayed, continue to set the write command , Return to the main program after displaying the next character .

2.7 GPS Positioning subroutine design

GPS The flow chart of positioning subroutine is shown in the figure below 2.8 Shown .

chart 2.8 GPS Locate the subprogram flow chart

Start parameter initialization , Then wait for the system to initialize , Wait for delay after initialization GPS-GET Module start , Continue to judge GPS-GET Whether the startup is completed , If GPS-GET The startup is not completed. Continue to wait for delay GPS-GET Module start ,GPS-GET After startup GPS initialization , Data to determine whether the received information is valid , If it works, start positioning , Data analysis , Finally, the parsed data is output and returned to the main program .

2.8 SMS alarm subroutine design

The flow chart of short message alarm subroutine is shown in the figure 2.9 Shown .

chart 2.9 Flow chart of short message alarm subroutine

Start the SMS alarm subroutine , Conduct GSM initialization ,AT Location English SMS mode ,AT Location use GSM character ,AT Location accept SMS number , Serial port output configuration , Determine whether the key is sent ? Send a text message , Continue without sending GSM initialization , After sending the SMS, return to the main program .

3 Simulation design

3.1 Proteus Simulation

Proteus The simulation circuit diagram is shown in 3.1 Shown .

chart 3.1 Proteus Simulation circuit diagram

The simulation of distance measurement is realized through the ultrasonic distance measurement module , And right LCD1602 Display of . because Proteus There is no... In the catalog HC-SR04 Model ultrasonic ranging module , Then SRF04 Model ultrasonic ranging module , The simulation circuit diagram of this design is composed by selecting the components in the component library . The first part of the simulation is SRF04 Ultrasonic module , The distance measurement is displayed in LCD1602 On . Then the simulation part is the buzzer alarm function , The hardware required here is simple , A buzzer , A triode , Two current limiting resistors constitute a simple alarm circuit . The simulation task of the alarm circuit is to realize that the buzzer can turn on and give an alarm sound when it detects that the measured distance is less than the set distance . The clock simulation part can not realize the real-time time time reporting of key voice through simulation , So only in LCD1602 The display shows even if the time .GPS Positioning and GSM SMS sending cannot be simulated , So we don't do it anymore .

chart 3.2 Program compiled successfully

In the use of proteus After the software draws the hardware simulation diagram , And put the program in Keil Create a new project in the software of , Then build .C File to write the program in , I was thwarted in creating a new project , The project created for the first time cannot be compiled , And cannot generate .hex file , The simulation diagram can't work at all , After reading the tutorial many times, you can successfully create .C The file of , Use the compile key in the upper left corner after programming , After compiling to no errors, you can generate .hex file .

The switch to proteus Simulation diagram , Click on the main control chip , The pop-up page has the second line of the file to select the file , Click open to find and select... By saving the path .hex file , Admitted to the main control chip . Click the run button in the lower left corner to start running, and you can see the simulation effect , Improve the simulation effect by modifying the programming , Use the simulation effect to simulate the real running state .

3.2 Ultrasonic ranging simulation

chart 3.3 Ultrasonic ranging simulation wiring diagram

The simulation wiring diagram of ultrasonic ranging is shown in the figure 3.3 Shown . because Proteus There are no... In the internal catalog HC-SR04 Ultrasonic module , So in Proteus Found in catalog SRF04 Instead of HC-SR04 Ultrasonic module .HC-SR04 Of Trig Port and Echo The port is connected to the I/O Mouth to mouth , First pair trig and echo initialization , Both pins are low , to trig The pin sends a high-level pulse at least 10us, stay echo Output a high level , Collect the same time when the SCM reaches the rising edge , Turn on the timer and start timing , Wait until the acquisition of single-chip computers echo When it becomes a falling edge , End count , Read the time of the timer , The counting value of the counter multiplied by the counting cycle of the single chip microcomputer is the round-trip time from the launch to the reception of the ultrasonic wave .

3.3 Clock emulation

chart 3.4 Clock circuit simulation wiring diagram

The clock circuit wiring diagram is shown in Figure 3.4 Shown . The clock circuit simulation wiring diagram is shown in Figure 4.4 Shown .DS1302 The connection with the single chip microcomputer requires three lines , namely SCLK、I/O、RST. Press the key to open the LCD1602 The display shows even if the time , At the same time, we should also use the voice chip to realize the voice broadcast time , But this function cannot be realized in simulation , Therefore, the simulation will not be carried out .

3.4 Display simulation

chart 3.5 Display the simulated wiring diagram

Display the simulation wiring diagram as shown in Figure 3.5 Shown . stay Proteus There is no... In the component library LCD1602, So use LM016L Instead of LCD1602.P0 The port is a data bus ,P2.5、P2.6、P2.7 control LCD1602 Of RS,RW,EN. Set up and read DS1302 Internal clock , And pass LCD1602 Show .DS1302 Chip interface is occupied JTAG Simulation interface , It needs to be closed when doing the experiment mega16 Of JTAG function , Otherwise, the display is abnormal .

3.5 Alarm prompt

chart 3.6 Alarm simulation wiring diagram

The alarm simulation wiring diagram is shown in the figure 3.6 Shown . In the simulation, the polarization motor can not achieve the vibration effect , So use buzzer instead of polarization motor . When the measured distance is less than the set distance , The buzzer gives an alarm .

Conclusion

This design adopts STC12C5A60S2 Single chip microcomputer , Among them, each module completes the functions of intelligent blind guide rod detection and positioning communication , Prompt and alarm the results , In the selection of single-chip microcomputer , Intend to adopt STC89C52, But it has location communication function , Resulting in insufficient external interfaces , Therefore, the current single-chip microcomputer is adopted .

This design is divided into two parts: hardware design 、 software design . The hardware design is based on device selection 、 Design chip peripheral circuit , Finally, draw a complete hardware schematic diagram . The hardware includes a single chip computer 、 Voice module 、 Ultrasonic ranging module 、 Power circuit 、 Alarm module 、 Display module 、 Clock module 、 Communication module , System to STC12C5A60S2 Single chip microcomputer is the core device , The type selection of ultrasonic ranging module is HC-SR04, The display module is LCD1602, The clock module is DS1302, The voice module adopts ISD1760 chip , The SMS module uses TC35i, Use VISIO Draw flow charts and write programs , Some modules are simulated .

This design mainly realizes the measurement of obstacles through the ultrasonic ranging module , According to the difference of measuring distance, use voice to prompt the blind , When the measured distance exceeds the set distance , Voice prompt and vibration alarm , In an emergency , Blind people can send messages to their families with one click , Know the location of the blind in time , Even time and measured distance are shown on the display .

There are still many deficiencies in this design , For example, color sensors can be used to identify the traffic lights on both sides of the zebra crossing , Give the blind the right guidance ; Light is detected with a photosensitive sensor , It turns on automatically when the light is dark LED The lamp , It is convenient for people around to identify , It is conducive to the safety of the blind at night ; Use a temperature sensor to detect the external temperature , Can make the blind understand the changes of the external environment ; The blind can be guided to their destination by speech recognition , Realize human-computer interaction . By looking up information , Have a better understanding of the development status of intelligent guide rod , Learned a lot of advanced technology .

reference

[1] Liu Guochuan , Lu Lin , Hou Ming , Wangtianxing . Development of intelligent ultrasonic crutches for the blind [J]. Medical equipment ,2007(03):1-2.

[2] Zhao Xiaodong , Sunyunqiang , Yaoaiqin . Design of blind ultrasonic waveguide rod [J]. Shanxi Electronic Technology ,2011(05):19-21.

[3] Yao Xiang . Research on double channel ultrasonic blind guiding system [D]. The First Military Medical University ,2006.

[4] Zhangjingxue , Xuzetian , Hu Bei . Design of intelligent portable blind guide rod [J]. Science and technology ,2017(26):1-2.

[5] Zhang Dongfang , Xie Ke , Qiang Qiang Chen . Multi module intelligent voice blind guide [J]. Fujian computer ,2018,34(07):48-49.

[6]I. Ulrich and J. Borenstein: Local obstacle avoidance with look-ahead verification", Proc. 2000 IEEE Int. Conf. Robotics and Automation, pp. 2505-2511.

[7] Zhang Dongfang , Xie Ke , Qiang Qiang Chen . Multi module intelligent voice blind guide [J]. Fujian computer ,2018,34(07):48-49.

[8] Wuyunqiang . Research on audio transmission system based on visible light [D]. Nanchang University ,2019.

[9] Pengyuelei , Song Dongya . Design of ultrasonic distance measuring instrument based on single chip microcomputer [J]. Electronic production ,2016(13):63+65.

[10] Wangmanli , zhang . Design of mine hoist voice alarm system based on single chip microcomputer [J]. Coal mining machinery ,2014,35(11):262-264.

[11] Yuyadong , Zhou Jia , Yesengang , Panzhangxin . be based on GPS/GSM Design of automobile anti-theft alarm system based on [J]. electronic technique ,2010,37(02):75-76+72. [12] Wang Hao Ran . LED The design and implementation of two-color screen and its control system [D]. Hangzhou University of Electronic Science and technology ,2011. [13]Nakajima, M., Haruyama, S.: New indoor navigation system for visually impaired people using visible light communication. EURASIP J. Wirel. Commun. Netw. 2013, 1 (2013).

[14] Li Jie . The design of ultrasonic ranging alarm system based on MCU [J]. Digital technology and Application ,2018,36(09):7-8.

[15]I. Ulrich and J. Borenstein: Local obstacle avoidance with look-ahead verification", Proc. 2000 IEEE Int. Conf. Robotics and Automation, pp. 2505-2511.

[16] Yichun Yang, Chizhou Ma. Algorithm study of fast and accurate time-delay estimation with fine interpolation of correlation peak[J]. Acta Acustica, 2003, 28(2): 159-166.

[17]Sanchez, J.; Oyarzun, C. Mobile Assistance Based on Audio for Blind People Using Bus Services. In New Ideas in Computer Science Education (In Spanish); Lom Ediciones: Santiago, Chile, 2007; pp. 377–396.

[18]Zhang QiangLi, Zheng Y.P.,Gain G,. Flatness Considerations on the Ultra-Wideband Low-Noise Amplifier Design[J].IEEE Trans,2005,6(4)

原网站

版权声明
本文为[DRL DP Wangzai]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/10/20211012150451901A.html