Gym training muscle fatigue monitoring using EMG myoware and arduino with envelope and sliding window methods

Muscles are an important organ in the movement of the body's skeleton to carry out sports activities. Measurement of muscle activity during the exercise process can be done using electromyography (EMG). This research uses Myoware muscle sensor (AT-04-001) which is integrated with Arduino Uno and Xbee to monitor biceps brachii muscle fatigue wirelessly. Fatigue data processing is carried out objectively using the envelope and sliding window method and subjectively verbally from the respondents. From this study, it was found that muscle fatigue can be measured using the method objectively when there is an increase in EMG amplitude with a window size of 5 s. The indication of biceps brachii muscle fatigue for the right arm is stronger to withstand the load during exercise with the average duration of the measurement of the right arm is 41.87 s from 69.67 s; 53.53 s from 98.90 s and 76.87 s from 98.80 s with the ratio of the left arm tending to fatigue more quickly is 23.53 s from 42.13 s; 41.87 s from 51.60 s and 23.53 s from 44.73 s.


INTRODUCTION
Muscle fatigue is a condition where muscles experience a decrease in strength that occurs in response to contractile activity.Muscle fatigue can reduce the efficiency of muscles and can cause temporary, permanent damage to paralysis [1]- [3].Symptoms of muscle fatigue can be identified using a tool called electromyography (EMG), the process of recording the dielectric activity of muscles to determine whether or not they are contracting.Several studies have shown that EMG signal amplitude gradually increases with fatigue in the time domain [4]- [7].The Myoware muscle sensor (AT-04-001) is the latest electromyography or EMG sensor from advancer technologies.The company has developed a sensor that can be used directly by attaching electrodes directly to the Myoware module, which can be connected to display amplified, rectified, and integrated EMG signal data [8]- [11].
This study will aim to monitor the condition of muscles in sports activities and design a prototype of muscle condition during sports using Myoware (AT-04-001) sensor, using Arduino Uno microcontroller and Zigbee as radio frequency data communication component.The reading data from the Myoware (AT-04-001) sensor is stored through an application that has been created that allows users to retrieve envelope signals that can help individuals see the ability of the bicep brachii muscle to perform physical activities, monitoring  ISSN: 2089-4864 Int J Reconfigurable & Embedded Syst, Vol. 12, No. 3, November 2023: 345-350 346 muscle fatigue can be classified as a sports monitoring system based on the internet of things (IoT) system [12]- [15].

RESEARCH METHOD
The flowchart in the research related to the design and analysis of the speed regulation of dual motors in series connection with proportional integral derivative (PID) control is represented in Figure 1.In the tool design stage, the first thing to do is designing the working system of the tool and selecting the components to be used and the wiring diagram designed using fritzing software, then selecting materials for the container of the wiring diagram and then assembling the tool as shown in Figure 2. The design of the Gym training muscle fatigue monitoring tool based on Arduino Uno and Myoware muscle sensor (AT-04-001) is made with a size of 440 mm long, 170 mm wide using IEEE 802.15.4 serial data communication which describes ZigBee, a wireless network that has the characteristics of low power and data rate, high security level, license free and very easy operation [16], [17], so that the data received is sent to the application that has been made for further analysis of EMG signals in the time domain.Tool testing is carried out in order to find out whether the sports monitoring tool is functioning as desired, which can be explained by the flowchart about programming arduino with Myoware muscle sensor to see the EMG output signal on the reading of the pullover exercise activity holding a weight of 5 kg in the bicep brachii muscle of the left and right arms.Testing is also carried out on the programme or application to find out if the data stored is in accordance with the theory and analysis results.Measurement of electromyography signals with the Myoware module (AT-04-001) with EMG signal readings based on static motion using the sliding window method with a window width of 200 with a sampling frequency of 400-500 Hz or 2-2.5 ms [18] into the window of the sliding window protocol that is set to perform the mean calculation [19].The sliding window protocol used is to find the average or mean value of the window width that is set at 200 data to determine the accurate sensor reading, as an analysis of the reading of the tested muscle condition.Data collection was carried out for 3 repetitions for the exercise with 3 male samples regardless of the age, time and condition of the subjects and type.

RESULTS AND DISCUSSION
In general, the system will work based on commands from software as an interface and hardware reading results from the Myoware muscle sensor (AT-04-001) sensor in the form of a finished Electromyograph signal or EMG envelope signal.Then the microcontroller with the help of python processes the electromyograph signal using the time domain with the sliding window protocol which looks for the average value of the windowing that has been determined based on the reference journal [20]- [25] about sampling EMG signal data with the of the sliding windows method.So as to produce a signal output in the of voltage amplitude generated by muscle reading and obtain its average value which shows the stationary point as a material to identify muscle fatigue and as an indicator of the results of the tool to see muscle activity.
Testing the sports monitoring tool on the bicep brachii muscle in each research subject obtained data in the form of an EMG envelope signal with an root mean square (RMS) value.Then the reading data is plotted using octave online and then filtered using an finite impulse response (FIR) low-pass filter to clearly determine the increase in signal amplitude as an indication of muscle fatigue where when the muscle is experiencing fatigue it can be indicated through increasing amplitude along with a continuous contraction in forming a stationary signal which can be seen in the graph plot, then matched with the marking protocol from the program made to find out the indication of fatigue from the subject feelings which is then compared with the detection of stationary signals generated from the subject's muscles.Figure 3 shows the retrieval of the tool using the hardware that has been designed.

CONCLUSION
The conclusion obtained from this research is that the average value of the relative error of the comparison of the tool reading to the voltage impulse generated by the biceps muscle is 2.64%.Indication of bicep brachii muscle fatigue for the right arm is stronger to withstand the load during exercise with the average duration of measurement of the right arm is 41.87

Figure 3 .
Figure 3. Gym training muscle fatigue monitor dimensions

Figure 4 .Figure 5 .
Figure 4. Data processing results using the envelope method

Table 1 .
Indications of right arm bicep brachii muscle fatigue s from 69.67 s; 53.53 s from 98.90 s and 76.87 s from 98.80 s.With a comparison of the left arm which tends to fatigue faster is 23.53 s from 42.13 s; 41.87 s from 51.60 s and 23.53 s from 44.73 s.