- Open Access
Muscle fatigue detection and treatment system driven by internet of things
BMC Medical Informatics and Decision Making volume 19, Article number: 275 (2019)
Internet of things is fast becoming the norm in everyday life, and integrating the Internet into medical treatment, which is increasing day by day, is of high utility to both clinical doctors and patients. While there are a number of different health-related problems encountered in daily life, muscle fatigue is a common problem encountered by many.
To facilitate muscle fatigue detection, a pulse width modulation (PWM) and ESP8266-based fatigue detection and recovery system is introduced in this paper to help alleviate muscle fatigue. The ESP8266 is employed as the main controller and communicator, and PWM technology is employed to achieve adaptive muscle recovery. Muscle fatigue can be detected by surface electromyography signals and monitored in real-time via a wireless network.
With the help of the proposed system, human muscle fatigue status can be monitored in real-time, and the recovery vibration motor status can be optimized according to muscle activity state.
Environmental factors had little effect on the response time and accuracy of the system, and the response time was stable between 1 and 2 s. As indicated by the consistent change of digital value, muscle fatigue was clearly diminished using this system.
Experiments show that environmental factors have little effect on the response time and accuracy of the system. The response time is stably between 1 and 2 s, and, as indicated by the consistent change of digital value, our systems clearly diminishes muscle fatigue. Additionally, the experimental results show that the proposed system requires minimal power and is both sensitive and stable.
The Internet of Things (IoT) refers to interconnecting computing devices embedded in everyday objects and enabling them to transfer and receive data over the internet. The IoT is quickly spreading to virtually all aspects of people’s lives including the integration of the IoT into medical treatment which is highly beneficial to both doctors and patients and increasing everyday . Muscular fatigue is defined as a reduction in a muscle’s force-generating capacity due to exercise . Muscle fatigue due to repetition incurs a loss of functional ability  and, as evidenced in sports, directly relates to muscular strength . Massages can help alleviate muscle fatigue  through improving local blood circulation and nutrition and helping to accelerate lactic acid discharge.
Muscle fatigue routinely occurs in daily life and as the detection and evaluation of musclar fatigue clearly has practical significance has become a highly active area of research. In 2010, D. Tkach  examined time domain stability with surface electromyography (sEMG) pattern recognition and successfully extracted frequency domains and features from these time domain analyses which facilitated more efficient evaluation of muscle fatigue. That same year, Wang Kui  similarly utilized a combination of frequency domain, time domain, and time-frequency allowing a more comprehensive evaluation of muscle fatigue. In 2011, Wang Fenjuan  described a muscle fatigue detection system integrating an ARM microcontroller core combined with a AgCl surface electrode allowing for the effective identification of sEMG signal s through both digital and analog filters. Notably, this constituted the first time a micro-controller unit (MCU) was incorporated into a muscle fatigue detection system; that said, although the MCU provided a suitable baseline signal for research, its hardware was complex and operation cumbersome, and ultimately proving unsuitable for clinical application. Also in 2011, Wan Sha  created a multi-channel sEMG detection system utilizing LabVIEW. While an improvement over exisiting technologies since the sEMG signal could be acquired in real time and visualized on a personal computer (PC), LabView carried significant delays when switching between channels. More recently, in 2017, Zhu Anyang  generated a STM32-based sEMG acquisition system in which the sEMG signal is transmitted through a USB interface to the host computer then analyzed and processed directly. Importantly, however, while each of these [8,9,10] sEMG signal detection systems were innovative in the time, none of these have intelligent terminals, significantly hindering their usability.
Of note, in 2014, Richer  developed a real-time electromyogram (EMG) and electrocardiogram (ECG) that could calculate the real time heart rate and rhythm of cyclists on mobile Android devices. In 2016, Widasari  proposed a similar smartphone-based sEMG monitoring system capable of alerting users before muscle fatigue occurs. Most recently, in 2018, Yamaguchi  created a wearable sEMG monitoring device that recognizes bruxism via analog values obtained from the masseter sEMG signal then alerts users. Although these [11,12,13] sEMG monitoring systems have been designed with intelligent terminals that successfully integrate sEMG signal detection with user wear, their functions are singularly focused on specific, isolated tasks.
That said, this report describes a highly innovative muscle fatigue detection and treatment platform that seamlessly combines the advantages of previous systems in order to integrate sEMG signal detection and human muscle fatigue release into a comprehensive, user-friendly IoT system. In this platform, sEMG signals are acquired using a myoelectric sensor then sent to an ESP8266 where they are converted from analog to digital sEMG signals. The digital value is then used to control an adaptive vibrating motor to help relieve muscle fatigue. The application (APP) charged with monitoring and controlling unit functions can also be used to manually turn vibrations on or off, making the unit more user-friendly.
In large part, this manuscript constitutes an extension of our previously published  initial description of our system. That said, this report describes upgrades to our platform including the addition of an infra-red transducer that can determine when someone is using the system, and also describes our system software in significantly greater detail.
Overall system design
The complete system is composed of a power supply, an EMG transducer, an infra-red transducer, an ESP8266 Wi-Fi module, vibration motors, and a motor drive module. The motor drive module is used to control the vibration motors. The ESP8266 wireless Wi-Fi module is both MCU and Wi-Fi transmitter/receiver for the system and charged with using minimal power to process sensor data and relay signals.
The power supply offers 3.3 V, 5 V, and 12 V direct current (DC) positive and negative poles. The infra-red transducer detects the infra-red signal to determine whether someone is using the system. The EMG transducer determines muscle activation through potential then transmits an EMG pulse signal. An ESP8266 serves as the sole communicator and processor processing monitored data retrieved from the sensor. One of 3 gears can be employed by the vibration motor depending on the extent of muscle activation represented as a digital value. Soft access point (AP) mode is adopted when the ESP8266 Wi-Fi module communicates during which the ESP8266 serves as a wireless access point. The mobile device APP functions as a station to allow connection to the Wi-Fi module issued hotspot. Our system utilizes the TCP/IP protocol suite (TCP/IP) for transmitting data through socket matching. Overall system structure, including the representation and connection of hardware entities, is depicted in Fig. 1. The overall structure provides a basis for classifying equipment inside the 3-tier architecture of IoT.
Our adaptive system was constructed to deliver real time muscle information. IoT architecture consists of 3 parts: the perceptual bottom-level layer, the network middle-level layer, and the upper level application layer . Each of these layers is supported by corresponding systems and middleware , as illustrated in Fig. 2. In this system, the perceptual layer consists of an EMG transducer that receives the EMG signal and an infra-red transducer that detects the infra-red signal. The network layer processes and sends the data obtained by the ESP8266 to intelligent mobile terminals. At the application layer, the information obtained by the perceptual layer is processed and displayed. The intelligent terminal has control and management functions.
Design of the perceptual layer
In this system, the perceptual layer consists of an EMG transducer that receives the EMG signal.
Physiological basis of sEMG signal generation
sEMG signal is a one-dimensional time-series voltage signal superimposed on the surface of the skin by the action potential sequence generated by the motor unit when the muscle reaches the excited state under the control of the nervous system . The EMG signal formation process is shown in Fig. 3.
The transducer measures the real world degree of muscle activation through measuring electrical potential. The sEMG transducer can output both raw and pulse EMG signals. The system does not relay the original sEMG signal rather, it outputs, through the transducer, an amplified, rectified, and integrated pulse signal. Signal filtering occurs in the output pulse signal, with both low and high pass included. After signal amplification, the ESP8266 performs analog-to-digital conversion, and the digital EMG signal can then be intuitively and easily detected. A schematic diagram of the connection among the ESP8266, the EMG transducer, and the infra-red transducer is shown in Fig. 4.
Design of the network layer
In this system, the network layer processes and sends the data obtained by the ESP8266 to intelligent mobile terminals.
Selection of the ESP8266 mode
The most integrated Wi-Fi chip, ESP8266, is based on the library for WWW access in Perl (LWP) protocol, and offers three modes from which to select: AP, Station (STA), and AP + STA. In the AP mode, the Wi-Fi module is a wireless access point that functions as a router, and the chip is the creator of a wireless network. In the STA mode, it connects to the terminal as an AP and does not accept wireless access itself. AP + STA is owned by both modes and can be used as an AP or a station to connect to other hotspots. In our system, the ESP8266 is utilized in AP mode, and its operation diagram is shown in Fig. 5.
ESP8266 software development kit (SDK)
ESP8266 is typically employed in two ways. One way is to select the working parameters and modes of the chip using the attention (AT) command, typically requiring another MCU. When employed in this manner, the ESP8266 must communicate with the MCU via the serial port. In contrast, the other way for this chip to be utilized is in secondary development of an official SDK, not only implementing data transmission but also processing sensor data collection. However, the ESP8266 chip has a built-in 32-bit central processing unit (CPU) with significant storage and on-chip processing capabilities and can be alternatively utilized to control sensors and applications through general-purpose input output (GPIO). When the ESP8266 chip is the only processor in the system, it can be started directly from a flash drive using minimal memory resources.
The ESP8266 in this system is set to operate in the second way, which allows it operates independently. Since the entire system is designed to minimize the occupied printed circuit board (PCB) space, the circuit design is very simple, along with achieved low-power control.
Adaptive pulse width modulation (PWM) control
Our system has 2 operating modes: a fully automatic mode and a semi-automatic mode. Users can select a mode via the intelligent mobile terminal. When in the fully automatic mode, the system works according to a preset program. Vibration motor vibration strength changes in sync with indiviual changes of the electromyographic signal. Vibration strength of the motor is calculated by the duty of PWM , and the following Table 1 gives the corresponding relationship. In semi-automatic mode, users can control, through the intelligent mobile terminal, if the vibration motor vibrates or not. When the “Close” button is selected on the APP side, the vibration motor stops working immediately and no longer changes with the EMG signal.
Design of the application layer
The application layer has two major sets of functionality. First, the application layer is responsible for processing and displaying the information obtained from the perceptual layer. Second, the application layer, realized through the intelligent terminal, is responsible for the system’s control and management functions.
The Android terminal consists of a server and a client , and was implemented using the Java language and the development environment (IDE) of Android studio . The software design primarily focused upon network communication, data transmission, and the man-machine interface . During the process of software development, the full degree of integration between software design and hardware was comprehensively considered , and the features of reliability and modularity fully employed to enhance the intelligence of the overall system [22, 23].
A design element of the system is both the Wi-Fi module and intelligent mobile terminal communicate via TCP/IP protocol. As a result, users can utilize the intelligent mobile terminal for connection to the wireless hotspots provided by the Wi-Fi module for accessing the muscles’ rehabilitation management control via the APP.
As mentioned earlier, the software design of the system (see Fig. 6) is specifically implemented in two major components: the server and the client. First, the ESP8266 is developed into server side platform, and a multi task scheduling mechanism is assumed. The ESP8266 collects data from the perceptual layer and sends it to the client. In the process of ESP8266 SDK’s development, the server’s Internet protocol (IP) address and port are set, and the service set identifier (SSID) and password are set. Data transmission between the client and the server occur through the socket for communication between the two sides. Second, an Android-based APP is used as a client for the system to set an IP address to port the APP for receiving data implementing control and detection functions of the mobile device.
To achieve network communication, the Mina framework was incorporated. Apache Mina Server constitutes a communication framework based on the TCP/IP, UDP/IP protocol suite (UDP/IP) stacks. It not only assists developers with quickly creating high-performance, expandable network communication applications, but it also provides an event driven, asynchronous operation model. The Mina framework also solves common problems including, but not limited to, network management software input/output (I/O) transmission random bursts and numerous client connections. Additionally, developers can also use it to easily create complex tasks such as low-level I/O and thread concurrency. Hence, by using the Mina framework, we were able to implement efficient and robust data transmission between our proposed server and client.
When first contacted by a client, the server first configures AP parameters, like IP addresses and server ports, through the TCP/IP protocol. These are then written into the Wi-Fi protocol to establish a connection with the client, and client and server socket channels simultaneously generated to ensure data transmission. Following this, the server will listen to the client’s request and call the accept method to finally establish the connection. After the connection with the client is established successfully, data transmission will be performed using the transceiver function according to the requirements of the control flow.
The Android application is a mobile device system that provides operations through the user interface (UI). Following common practice, the Android application development has been divided into UI design and activity function implementation. At first, the developer performs UI design by coding the extensible markup language (XML) file and then uses the layout combined with a multi-layout manager interface to make the design more aesthetically pleasing. Finally, according to the layout of the user interface, the main function of the Android application is realized by writing the MainActivity file.
Results and discussion
Our experimental design was as follows. Ten groups of randomly aged men (10 men in each group, 100 men in total) were examined. The average physical condition of the ten groups is shown in Table 2. No participants reported any musculoskeletal or neurological diseases. The right biceps brachii was examined by placing one EMG transducer electrode on skin above the muscle center and another along the extended direction of the same biceps brachii. A reference electrode was also placed in a position without underlying muscle.
Prior to testing, identical massagers were used to relax the biceps brachii for 2 min. All testers stood in a standing position with arms naturally hanging by their sides and their right hand holding a 1.5 kg dumbbell. Testers then repeated identical wrist flexion and extension exercises 10 times. Experimental results represent the average of 10 repeated series of 10 flexions and extensions. Experimental testing was performed indoors (see Fig. 7) at 26 °C.
In order to better evaluate the anti-jamming index and anti-jamming performance of our adaptive system in a more realistic environment, we also conducted a group of identical interference tests outdoors (see Fig. 8). Outdoor experiments were performed at 6 °C with only minimal wind.
Effectiveness and stability of the system
Our experiments clearly indicate that environmental factors have little effect on the accuracy and response time of our system. Combined with Tables 3 and 4, it is apparent that response time was stable between 1 and 2 s. As indicated through the consistent change of digital value, muscle fatigue was clearly diminished when employing this system.
Muscle fatigue is a problem encountered quite frequently in our daily life. To assist with alleviating muscle fatigue, we designed an adaptive muscle fatigue detection and recovery system based on PWM and ESP8266. Note that ESP8266 is not only a Wi-Fi adapter, but also a processor that can run independently. Our system’s main function is to prevent the muscle fatigue through the adoption of adaptive technology. Experiments on system performance have indicated that our system has low power consumption and simple hardware composition. Furthermore, our system can be effectively employed to prevent muscle fatigue, has simple and stable operations, and well meets our design requirements. In short, the system introduced in this paper exhibits an innovative application of the IoT technology in modern medicine, with clear potential for an effective management of muscle fatigue.
In our future work, we will explore how to further improve the system performance by integrate additional sensors so as to determine muscle fatigue in a more comprehensive manner.
Availability of data and materials
Data sharing is not applicable to this article as no datasets were generated or analyzed during the current study.
Analog to Digital
Central Processing Unit
General-Purpose Input Output
Integrated Development Environment
Internet of Things
Library for WWW access in Perl
Printed Circuit Board
Pulse width Modulation
Software Development Kit
Service Set Identifier
Liu Z, Shu M, Kong X, Shan K, Zhao K. Design and implementation of bluetooth ecg acquisition terminal. Autom Instrum. 2008;39(08):80–3.
Chooruang K, Mangkalakeeree P. Wireless heart rate monitoring system using MQTT. Procedia Comput Sci. 2016;86:160–3.
Liu Y, Zhang L, Wang Y. Wireless control design of intelligent window. Intell Factory. 2016;11:88–90.
Qichuan D, Anbin X, Xingang Z, Jianda H. Review and application of motion intent recognition methods based on sEMG. Acta Automat Sin. 2016;42(01):13–25.
Todd G, Gandevia SC, Taylor JL. Change in manipulation with muscle fatigue. Eur J Neurosci. 2010;32(10):1686–94.
Tkach D, Huang H, Kuiken TA. Study of stability of time-domain features for electromyographic pattern recognition. J Neuroeng Rehabi. 2010;7(1):21.
Wang K. Conventional time-frequency and strategy used for dynamic muscle fatigue analysis. Chin J Sports Med. 2010;29(1):104–8.
Wang F. Research and design of SEMG detection system. Shangx: Xi’AN Technological University; 2011.
Wan S, Wensheng H, Yang D, Wu X, Zheng X. Design of LabView-based multi-channel sEMG signal detection system. Appl Electron Technol. 2012;38(3):78–81.
Zhu A, Xu X. Implementation of surface electromyography acquisition system based on STM32. Manuf Autom. 2017;39(07):119–23.
Richer R, Blank P, Schuldhaus D, Eskofier BM. Real-time ECG and EMG analysis for biking using android-based Mobile devices. In: International Conference on Wearable and Implantable Body Sensor Networks; 2014. p. 104–8.
Widasari ER, Miyauchi R, Tamura H. A wireless surface electromyogram monitoring system using smartphone and its application to maintain biceps muscle. In: IEEE International Conference on Systems, Man, and Cybernetics; 2016. p. 2378–83.
Yamaguchi T, Mikami S, Saito M, Okada K, Gotouda A. A newly developed ultraminiature wearable electromyogram system useful for analyses of masseteric activity during the whole day. J Prosthodont Res. 2017;62(1):10-15.
Ma B, Li C, Wu Z, Huang Y, van der Zijp-Tan A, Tan S, Li D, Fong A, Basetty C, Borchert GM, Huang J. A PWM-based muscle fatigue detection and recovery system. In: 2018 IEEE International Conference on Bioinformatics and Biomedicine; 2018. p. 1013–6.
Ma B, Jian X. An experimental study of optical acoustic emission sensor for online monitoring of partial discharge of transformer. Spectrosc Spectr Anal. 2017;37(07):2273–7.
Wendong X. Design of intelligent range hood control system based on wireless communication. Information Engineering Research Institute, USA. In: Proceedings of 2015 4th International Conference on Social Sciences and Society (ICSSS 2015 V70); 2015. p. 5.
Wang H, Cuilian Z, Zhijian F, Yang Z. Design and implementation of EMG virtual training system on Android platform. Comput Eng Des. 2015;36(07):1966–1970+1980.
Zhang C, Shunjie H. A PWM Pulse Modulation Method with Dead Zone Based on MCS-51 Single Chip Microcomputer. Power Supply World. 2014;03:26–28+32.
Sun T, Meng W. Research on video encryption algorithm in android platform. Int Soc Inf Eng Comput Sci Electron Technol Int Soc. 2015;4:808–21.
Zhang F-F, Liu S-T, Liu K-X. Adaptive control of accumulative error for nonlinear chaotic systems. Int J Autom Comput. 2014;11(05):527–35.
Chen X, Yang C. Comparative Experiment and Application of Android Asynchronous Technology. Comput Appl Softw. 2016;33(02):188–191+279.
Sun R, Cheng G. Design of multi-point temperature acquisition system based on MSP430 and ADT7420. Inf Commun. 2014;07:62–3.
Yifan H. Mobile Sink Path Planning Research for Underwater Heterogeneous Sensor Network. In: Proceedings of the 30th China control and decision-making conference (4); 2018. p. 6.
We would like to thank the reviewers from the Biomedical and Health Informatics Workshop in the IEEE International Conference on Bioinformatics and Biomedicine (BIBM) 2018 for their comments, which were incorporated into the present work.
We also would like to acknowledge the financial support provided by the NNSFC and NCI, described further in the Funding Section.
About this supplement
This article has been published as part of BMC Medical Informatics and Decision Making Volume 19 Supplement 7, 2019: Supplement special Issue on Biomedical and Health Informatics. The full contents of the supplement are available online at https://bmcmedinformdecismak.biomedcentral.com/articles/supplements/volume-19-supplement-7.
The publication cost of this article was funded by National Natural Science Foundation of China (Nos: 61802212, 61872203, and 61502241), as well as The National Cancer Institute (NCI) of The National Institutes of Health (NIH), under the Award Number U01CA180982. The views contained in this paper are solely the responsibility of the authors and do not represent the official views, either expressed or implied, of the NIH or the Chinese and U.S. governments.
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.
About this article
Cite this article
Ma, B., Li, C., Wu, Z. et al. Muscle fatigue detection and treatment system driven by internet of things. BMC Med Inform Decis Mak 19 (Suppl 7), 275 (2019). https://doi.org/10.1186/s12911-019-0982-x
- Muscle fatigue