SUGISAKAMASANORI

Journal of Advances in Artificial Life Robotics
Vol. 4(2); September (2023), pp. 73– 79
ON LINE ISSN 2435-8061; ISSN-L 2435-8061
https://alife-robotics.org/jallr.html

Research Article

An Intelligent Guide Hat Based on The Internet of Things
Suqing Duan, Yizhun Peng

College of Electronic Information and Automation, Tianjin University of Science and Technology, China

ARTICLE INFO
Article History
Received 20 December 2022
Accepted 01 October 2023
Keywords
Microcontroller
Intelligent guideInternet of things
Voice control
Target detection

ABSTRACTThe new guide cap utilizes an STM32 microcontroller as its control core, enabling a range ofadvanced features such as obstacle avoidance, intelligent recognition, voice interaction, and GPS
positioning. The system incorporates the OpenMV4 Cam H7 Plus intelligent camera to provide
continuous real-time monitoring and accurate feedback on important road information such as
traffic lights and zebra crossings. Additionally, an ultrasonic sensor is employed to convert
electrical signals into ultrasonic output, allowing for effective measurement of obstacle distances.
to enhance safety, the system utilizes a Wi-Fi module and GPS positioning to transmit the user's
location information in real time to nearby vehicles and pedestrians. This real-timecommunication ensures the maximum level of user safety.

© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

intelligent recognition, voice interaction, and GPS
positioning. The OpenMV4 Cam H7 Plus intelligent
camera continuously monitors the environment, while
the ultrasonic sensor measures obstacle distances.
Real-time transmission of location information
through Wi-Fi and GPS enhances user safetysignificantly [1].

1. Introduction
The new guide cap is powered by an STM32
microcontroller, serving as its control core andenabling a wide range of advanced functionalities.
These include obstacle avoidance, intelligent
recognition, voice interaction, and GPS positioning.
To achieve these capabilities, the system incorporates
the OpenMV4 Cam H7 Plus intelligent camera. Thiscamera continuously monitors the surrounding
environment in real-time, providing valuable
feedback on important road information such as traffic
lights and zebra crossings. For precise obstacle
detection, the guide cap utilizes an ultrasonic sensor.
This sensor converts electrical signals into ultrasonic
output, allowing for accurate measurement of obstacle
distances. Simultaneously, the system employs a WiFi module and GPS positioning to transmit the user's
location information in real time to nearby vehicles
and pedestrians. This seamless communication
ensures the highest level of user safety. The guide cap
leverages the STM32 microcontroller as its control
core, integrating features like obstacle avoidance,

2. Intelligent Guide Cap Structure Design
2.1. Overall system design
The new guide cap incorporates an STM32
microcontroller as its control core, providing acomprehensive range of features such as distance andobstacle avoidance, intelligent recognition, voiceinteraction, and GPS positioning. Real-timemonitoring of the system is achieved through the
integration of the OpenMV4 Cam H7 Plus intelligent
camera. This camera continuously captures andanalyzes the surrounding environment, offeringvaluable feedback on critical road information,
including traffic lights and crosswalks. To enhance
obstacle detection accuracy, the guide cap is equipped

Corresponding author’s E-mail: pengyizhun@tust.edu.cn URL: www.tust.edu.cn

73

algorithms. OpenMV-H7 is well equipped for shaperecognition, line recognition, color recognition, andvarious other tasks. The design of the OpenMV4 Cam
H7 Plus picture is shown in Fig.3.

with ultrasonic sensors. These sensors convert
ultrasonic waves into electrical signals, which are thenprocessed by transmitters to effectively measure the a
Wi-Fi module and GPS positioning to transmit theuser's location information in real time to nearby
vehicles and pedestrians. This ensures the highest
level of user safety. The design of the 3D model of the
product is shown in Fig.1. The design of the physicalpicture of the product is shown in Fig.2.

Fig.3 OpenMV4 Cam H7 Plus picture(2) Ultrasonic Sensor
The ultrasonic distance measurement module utilizes
the HC-SR04 ultrasonic distance sensor, known for its
low power consumption, affordability, and ease ofconnectivity. The module's core consists of two
ultrasonic transducers, one serving as a transmitter.
Each pulse group emitted by the transmitter has aduration of approximately 0.5ms. The signal is thenamplified through a transistor and passed through an
impedance matching circuit, which couples a highvoltage to the transmitting transducer.
As a result, the internal piezoelectric chip within thetransducer begins to vibrate, emitting a pulse ofultrasonic waves at a frequency of 40kHz. When theseultrasonic waves encounter an obstacle, they arereflected back towards the sensor. The returningsound wave is processed by the TL074 chip, whichfilters, amplifies, and demodulates the signal. The
STC11 chip is responsible for converting theultrasonic waveform and level, and it detects the highlevel signal for a certain duration known as the ECHO.
Subsequently, the module enters a low power state,pausing its timing operations and reading the timer
value that represents the round trip time of the soundwave. Using this time measurement, the module
calculates the distance to the obstacle. The control
program then processes the measured data [3], and if
the distance is found to be less than 3 meters, the voicesystem immediately activates an alarm. The ultrasonicsensor's design can be seen in the accompanying
diagram labeled as Fig.4.

Fig.1 3D model of the productFig.2 Physical picture of the product2.2. Auxiliary sensors(1) OpenMV4 Cam H7 Plus
The product incorporates OpenMV-H7, a costeffective, scalable, and low-power machine vision
module. OpenMV-H7 is built on a 32-bit ARM
Cortex-M7 core and is powered by a MicroPythoninterpreter, making it easy to program machine visionalgorithms directly on the embedded system [2].
OpenMV-H7 offers a range of communicationinterfaces, including synchronous/asynchronoustransceiver, serial peripheral interface, and integrated
circuit bus. These interfaces enable efficient
processing and programming of complex algorithms,
empowering OpenMV with impressive performancecapabilities. It excels in tasks such as shaperecognition, line recognition, color recognition, andmore. The product leverages OpenMV-H7, a Pythondriven machine vision module with a 32-bit ARM
Cortex-M7 core. Its Micro Python interpreter
simplifies
embedded programming, while its communicationinterfaces facilitate the processing of sophisticated74circuit of the GPS module comprises GPS receiverdevices and auxiliary circuits that support its
functionality. For a visual representation of the GPS
module design, please refer to Fig.6.

Fig.4 Ultrasonic sensor(3 ) Wi- Fi communication module
The module incorporates a 32-bit Tensilica processor,
along with essential components such as a standard
digital peripheral interface, antenna switch, RF balun,
power amplifier, low-noise amplifier, filter, andpower management module. This integration
eliminates the need for numerous external peripheral
circuits and greatly reduces the required PCB space.
One notable feature of the module is its support for
low power consumption mode. In typical scenarios
where a Wi-Fi connection is maintained, the module
consumes only about 50mA of current. During periodsof deep sleep, the power consumption is further
reduced to as low as 10uA. The design of the Wi-Fi
communication module is illustrated in Fig.5,
showcasing the arrangement and connections of thecomponents
involvedinenabling
Wi-Fi
communication.

Fig.6 GPS module( 5) Voice interaction module
The voice interaction hardware consists of three main
components: the AIUI speech recognition module,
audio amplifier module, and speaker. At the heart ofthe voice module is the AIUI, which utilizes anintelligent hardware processor called R16, based on
the Cortex-A7 architecture [4]. It employs K4B4G16
as the running memory, providing a memory size of
1GB. The storage space is facilitated by the
NCEMASD9-08GEMMC flash memory [5].
For audio acquisition, the module utilizes the Cosmos
CX20819-11Z ADC chip. This high-performance HD
video ADC supports four-channel far-field voice
capture. The AIUI and ADC chip are directly
connected, enabling data interaction through a serial
port. The serial communication parameters are set toa baud rate of 115200bps. The design of the voiceinteraction module can be observed in the provided
diagram labeled as Fig.7.

Fig.5 Wi-Fi communication module(4) GPS Module
To power the GPS module, the STM32
microcontroller serves as the processor and receives
data signals from the GPS signal receiving module.
These signals are then transmitted to the serialinterface of the STM32 microcontroller. The signal
receiving module comprises several components, suchas an inverter, signal channel, memory, central
processor, and input/output interface. Communication
between the GPS module and the STM32
microcontroller is established through the RXD1 and
TXD1 pins of the UM220 module, which areconnected to the STM32 microcontroller via a serial
chip. Additionally, a reset circuit is integrated into thedesign, allowing for a low-level reset when the S11
button is pressed. This reset is triggered by a transition
from a high to low BDRST potential. The peripheral

Fig.7 Voice interaction module(6) Angle sensor module
The product incorporates the MPU6050, an integrated
six-axis angle sensor from InvenSense. This sensor
combines a three-axis MEMS gyroscope, a three-axis
MEMS accelerometer, and an expandable digitalmotion processor (DMP) within a single package. The
DMP enables the sensor to work in conjunction witha motion processing library to solve attitude-related
calculations.

75

By utilizing the built-in DMP, the MPU6050 can
output data from a nine-axis fusion algorithm throughthe IIC interface. This reduces the processing burden
on the operating system, as the sensor handles the
motion processing operations internally. The
combination of the gyroscope, accelerometer, andDMP provides accurate and efficient attitude solving
capabilities for the product. The diagram labeled as
Fig.8 illustrates the design of the angle sensor module.

Fig.9 Overall algorithm communication picture

3 . 2 . Communication protocol development( 1 ) The OpenMV platform utilizes Python as the
programming language to drive machine vision
modules. It is equipped with a MicroPythoninterpreter, which simplifies the programming ofmachine vision algorithms on embedded systems. The
use of Python provides an accessible and user-friendly
interface for developers to work with.
In addition to the programming capabilities, OpenMV
offers various communication interfaces to facilitate
the integration of complex algorithms. These
interfaces
includesynchronous/asynchronoustransceiver, serial peripheral interface (SPI), andintegrated circuit bus (I2C). These interfaces enable
seamless communication between the OpenMV
platform and other devices or sensors, allowing for theprocessing and programming of advanced algorithms.
The OpenMV platform excels in a range of functions,
including shape recognition, straight line recognition,and color recognition. It leverages its powerfulhardware and software capabilities to efficiently
perform these tasks. Developers can utilize theOpenMV platform to implement sophisticatedmachine vision applications with ease, thanks to its
Python-driven approach and versatile communicationinterfaces. The diagram labeled as Fig.10 showcases
the design of the OpenMV identification results.

Fig.8 Angle sensor module

3 . Intelligent Guide Cap Software And
Algorithm
3.1. Overall algorithm
The product utilizes the STM32 microcontroller for C
language programming, which is divided into two
main parts: real-time control and real-time monitoring
software. These software components enable various
functions such as intelligent image recognition,
ultrasonic distance measurement, and voiceinteraction.
In the main program, two interrupts are configured.
The first is the network communication interrupt,
which is responsible for receiving instructions anddata from the monitoring computer. The second is atimer interrupt with a frequency of 1 kHz. When thisinterrupt occurs, the control interrupt subroutine is
executed. This subroutine collects and processes datafrom each module, determines the current control
mode and response type, and then applies theappropriate control algorithm to generate and send
control signals. This efficient and accurate control
mechanism allows the product to effectively perform
its guiding function.
For instance, the OpenMV4 Cam H7 Plus distancemeasurement module is capable of performing precise
and reliable distance measurements. It contributes tothe overall functionality of the product by providing
accurate distance data, which can be utilized in thecontrol algorithm to ensure efficient and accurate
guiding operations. The diagram labeled as Fig.9
presents the design of the overall algorithm
communication picture.

76

(3) The GPS module comprises four main
components: data loading, data pre-processing,calculation and result return. The module interfaces
with the GPS receiver to receive real-time feedback
data. The received data undergoes processing andfusion techniques to enhance the positioning accuracyof the system.
By combining single-point real-time positioning andpost-facto
precision
single-point
positioning
settlement solution, the system achieves improved
positioning accuracy. This fusion approach leverages
the advantages of both real-time and post-processing
techniques to deliver more accurate results.
To enhance system security, the data transmission
process
incorporates
RXM/RAW
decoding
technology. This technology ensures the safety andreliability of the program to the maximum extent
possible, reducing the risk of data corruption or
unauthorized access [6].
Furthermore, the ability to transmit location
information accurately and in a timely manner tosurrounding vehicles and pedestrians enhances safety.
It reduces the potential security threats for individuals
with visual impairments, providing them withvaluable information about their surroundings andreducing the risk of unexpected situations. The designof the GPS module positioning results is displayed in
Fig.12.

Fig. 10 OpenMV identification results(2) The ultrasonic module employs the DS18B20
digital temperature sensor to measure the ambient
temperature. By referring to a pre-established speed ofsound - temperature control table, the current speed ofsound is determined based on the measured
temperature.
Once the speed of sound is obtained, the module
activates the counter for timing purposes. It utilizes
the PWM (Pulse Width Modulation) module of the
STC16F40K128 microcontroller to generate theultrasonic echo. The generated echo is thentransmitted into the receiving circuit, where it
undergoes hardware processing such as shaping andamplification.
The microcontroller captures the trigger signal of theecho and records the moment of the falling edge.
Through software filtering and a peak time detection
algorithm, the peak moment corresponding to thearrival of the echo is identified. Finally, the distanceto the obstacle is calculated based on the recorded time
and the speed of sound. This process enables theultrasonic module to measure distances accurately byleveraging temperature compensation and precise
timing techniques. The design of the test results for the
Ultrasonic module is depicted in Fig.11.

Fig. 12 GPS module positioning results(4) The voice control component of the system isimplemented in C language. During development,
specific keywords are set for voice commands. The
voice chip extracts the voice features and compares
them with the predefined keywords. When a matching
keyword is recognized, the corresponding data is sentfrom the voice chip to the main control board via theserial port.
Upon receiving the data in JSON format, the main
control board analyzes it to extract the identification
code associated with the recognized command. Basedon the identification code, the board executes theFig. 11 Ultrasonic module test results

77

corresponding operation or action associated with therecognized voice command.
This process allows for voice control of the system.
By defining and recognizing specific keywords, thesystem can respond to voice commands by performing
the desired actions. The use of JSON format for datatransmission and analysis enables efficient
communication and seamless integration between thevoice recognition chip and the main control board.
The design of the initialization and operation resultsof the Voice module communication code is depicted
in Fig.13.

Fig. 14 Gyroscope MPU6050 communication code running
results(6) The WiFi module in the system utilizes the
ESP8266 as the communication interface between themain processor and the guide cap. When the ESP8266
module starts up, it will print the name of theconnected WiFi network and its own IP address. This
information allows users to identify the network andobtain the IP address for further communication.
During operation, if the ESP8266 module is notconnected to the server, it will continuously print a
message indicating that it is not connected. This
feedback helps in monitoring the status of the WiFi
connection.
By leveraging the ESP8266 module, the systemestablishes a wireless connection and enables
communication between the main processor and theguide cap. The module provides important network
information and real-time status updates for effective
monitoring and troubleshooting. The design of the
WIFI module communication results is shown in
Fig. 1 5 .

Fig. 13 Voice module communication code initialization and
ope ration results(5) The gyroscope module in this system utilizes the
MPU6050, which combines a 3-axis MEMS
gyroscope and a 3-axis MEMS accelerometer.
Additionally, it features an expandable digital motion
processor (DMP) that enables the integration of
additional sensors [7].
The MPU6050 is capable of connecting to a thirdparty digital sensor, such as a magnetometer, throughthe I2C interface. By expanding its capabilities, it can
output a 9-axis signal via either the I2C or SPI
interface. The integration of the gyroscope,
accelerometer, and DMP in the MPU6050 allows for
accurate attitude resolution. It provides information
about rotational movements and acceleration in three
dimensions. Furthermore, the expandability featureenables the incorporation of other sensors to enhance
the system's sensing capabilities. The design of the
Gyroscope MPU6 0 5 0 communication code running
result s is shown in Fig.14.

Fig. 15 WIFI module communication results

4. Conclusion
The intelligent guide cap is a comprehensive solutionthat integrates various sensors and external devices toaddress the needs and challenges faced by visually
impaired individuals. Through a combination of
microcontrollers, machine vision, Internet of Things(IoT), embedded systems, and voice control, this78

papers from China Medical Equipment Conference and 2021
Medical Equipment Exhibition, 202

product provides practical functionality for visually
impaired users.
One of the key features of this guide cap is its ability
to analyze the surrounding environment using
multiple sensors. By leveraging technologies such asmachine vision, the system can accurately detectobstacles and promptly alert the user to avoid them. It
also provides real-time information about the status oftraffic lights at intersections, ensuring that visually
impaired individuals can navigate safely. The guidecap further enhances safety by recognizing zebra
crossings and providing guidance for blind individuals
to cross the road in the correct direction. Voice
prompts and other forms of communication enableeasy interaction between the user and the system,
providing essential information and instructions.
Through the widespread adoption of this product,
more visually impaired individuals can gain increased
independence in their daily lives. This, in turn,contributes to reducing societal misconceptions andprejudices towards blind individuals. Overall, theintelligent guide cap serves as a valuable tool for thedevelopment and inclusivity of society.

Authors Introduction
Ms. Suqing DuanShe
iscurrently
pursuing
her
undergraduate degree at the College ofElectronic Information and Automation,
Tianjin Universityof Science andTechnology. Her research field isembedded system.

Dr. Yizhun Peng

References

1. Wu Qinqi, Zheng Wenhao, Ye Zhipeng, et al. SMT32-based
intelligent guide cane for the blind, Electronic
Fabrication,2020(13):34-36
2. Shen Zhongkun, Xu Jinjie. Smart wayfinding cart based on
OpenMV vision module and MPU6050 angle sensor,
ElectronicWorld,2022,30(03):8-30+19.

3. Huang Jinjing, He Jinying, Liu Nianghu, et al. Research on
intelligent wearable ultrasonic distance measurement andpositionable
guide
belt,
Industrial
ControlComputer,2022,35(02):100- 101+123.
4. Mi Yuanyuan, Li Guangzong, Qiao Danni. Design ofintellige nt cart with voice control and automatic obstacle
avoidance base d on LD3320, Technology andinnovation,2021(24):36-37+40.
5. Wei Jingting, Chen Liwei, Li Binki, et al. Design of voicecontrolled and automatic obstacle avoidance smart car in
STM32, Electronic Testing, 2019(15):24-25+20.
6. Ding Zulei, Jiang Tianze, Wen Xuping, et al. Research on
autonomous motion navigation system based on GPS
positioning, Automation and Instrumentation,2022,37(08):14+29.
7. Zhou Xuhu, Zhang Huawei. Research and implementation ofhuman posture detection and fall determination based on
STM32 chip and MPU6050 motion sensor, Compilation of79

He is an Associate Professor in Tianjin
University of Science &Technology.
He recevived a doctor’s degree in control
theory and control engineering from theInstitute of Automation,
ChineseAcademy of Science, in 2006.His
research field is intelligent
robot andintelligent control.