Buletin Ilmiah Sarjana Teknik Elektro ISSN: 2685-9572
Body Posture Position Alarm Prototype Based on NodeMCU ESP8266
Candra Dwi Setyawan, Arief Wisaksono
Electrical Engineering Study Program, Universitas Muhammadiyah Sidoarjo
ARTICLE INFORMATION | ABSTRACT | |
Article History: Submitted 11 November 2023 Revised 15 December 2023 Accepted 19 January 2024 | Lack of physical activity has a negative impact, namely reduced motor coordination abilities and changes in posture or shape of the spine. Sitting positions that are more static and less ergonomic, such as sitting in a hunched position, can trigger significant muscle activation. Therefore, in an effort to prevent bone abnormalities, research was carried out regarding a prototype body posture alarm based on the NodeMCU ESP8266. This prototype uses a flexible sensor to read spinal curvature integrated into the NodeMCU ESP8266 and a buzzer as the output. This prototype will be attached to the back support shoulder, so this prototype design can also help repair bones that have been damaged due to bad sitting habits. In general, this prototype reminds users to always be in a normal body position by making a sound when the body position is not normal. From the test results, the prototype works well. NodeMCu's speed in capturing WiFi signals is fast enough so that the prototype works quickly, flexible sensor readings are accurate without using an amplifier. The back support shoulder design is very efficient in helping users to maintain a normal body position. | |
Keywords: Alarm; Back Support Shoulder; ESP8266; Flexible Sensor; NodeMCU | ||
Corresponding Author: Arief Wicaksono, Unversitas Muhammadiyah Sidoarjo, Sidoarjo, East Java, Indonesia Email: ariefwisaksono@umsida.ac.id | ||
This work is licensed under a Creative Commons Attribution-Share Alike 4.0 | ||
Document Citation: C. D. Setyawan and A. Wisaksono, “Body Posture Position Alarm Prototype Based on NodeMCU ESP8266,” Buletin Ilmiah Sarjana Teknik Elektro, vol. 5, no. 4, pp. 614-622, 2023, DOI: 10.12928/biste.v5i4.9543. | ||
Body posture is a very important thing for every human being to have, body posture itself is often associated with the risk of falling. This shows the importance of balance that a person has [1]. Posture is a person's position that can hold the body well when standing or sitting. Changes in body posture occur due to several factors, namely birth defects, injuries, degenerative processes (osteoporosis), muscle disorders, and bad habits such as sitting incorrectly. Signs of this disorder include body aches both during work and after work and discomfort in the muscles. One of the causes of musculoskeletal disorders due to work carried out statically is the worker's incorrect body position and posture [2].
In the modern era, activity patterns tend to be static. Lack of physical activity has a negative impact, namely decreasing motor coordination abilities and resulting in impaired posture or shape of the spine [3]. Sitting position affects the risk of Low Back Pain (LBP) or lower back pain. Static sitting positions that are less ergonomic, such as sitting in a bent position, can trigger strong and prolonged muscle work without sufficient recovery so that blood flow to the muscles is hampered [4].
Other factors that influence LBP include individual factors such as smoking habits. In the official report of the World Health Organization (WHO), the number of deaths due to smoking each year is 4.9 million people per year. There is a significant relationship between smoking habits and back muscle complaints, especially for jobs that require muscle exertion, because the nicotine in cigarettes can cause reduced blood flow to the tissues. Apart from that, smoking can also reduce the mineral content in the bones, causing pain due to cracks or damage to the bones [5].
So, in an effort to prevent bone disorders, research was made on a body posture position alarm device based on the NodeMCU ESP8266. In previous research regarding efforts to prevent bone disorders, research was carried out, including:
Shafa Salsabila's research with the title "Design And Building Of A Posture Correction And Length Of Sitting Time Using Flex Sensor Based On Arduino Uno". The data reading flow of this tool is that when the user uses the tool and starts an activity, the flex sensor will identify the curvature in the upper abdomen and the ultrasonic sensor which is placed in front of the user, calculates the distance between the sensor and the user. When the user changes position, the flex sensor will send a signal and buzzer as output to detect the length of time sitting. The LCD shows the output in the form of a timer to calculate the user's sitting time. When the user has been sitting for 30 minutes, the buzzer will sound and the LCD will show a reminder for the user to stand up and move [6].
Anggraini, MitaWildian, Wildian's research entitled "Design and Development of a Warning System for Body Position, Visibility and Work Duration in Front of a Computer". This body position correction tool uses the MPU6050 sensor and VL53L0X sensor to detect viewing distance to the computer screen. For output, researchers used speakers connected to the DF Mini Player [7].
In the current research, we are developing a prototype from previous research, namely creating a prototype body posture alarm based on the NodeMCU ESP8266. NodeMCU ESP8266 was chosen as the microcontroller because it has the advantage of being more efficient in dimensions, and can be connected to a WiFi network. The research update from previous research lies in designing a more efficient prototype to help obtain an ergonomic spine.
The research carried out by researchers is a type of development research or Research and Development (R&D). Research & Development is understood as research activities that start with research and continue with development. Research activities are carried out to obtain information about user needs (needs assessment) while development activities are carried out to produce learning tools [8]. This research method was chosen because it is more effective in improving previous research.
In the diagram Figure 1 there are three parts of system design, namely input, process and output. In the input section there is a sensor for data collection. In the process section there is a NodeMCU ESP8266 which functions to process input data from sensors. Node Mcu is an Open-source firmware and development kit that helps to create IoT (Internet of Things) product prototypes in a few lines of Lua script Node Mcu is an open source IoT (Internet Of Things) platform. The MCU node uses Lua as a scripting language [9].
Figure 1. Schematic of the prototype body posture alarm based on the nodeMCU ESP 8266
Flow charts need to be created because they have the function of Designing New Projects, Managing Work Flows, Modeling Business Processes, Documenting Each Process, Representing Algorithms, Auditing Processes [10] shown in Figure 2.
Figure 2. Flow chart looping system
Can be seen in the start section, the program will run and the prototype input section will get the reading data. Then the data obtained will be processed on the microcontroller. After data processing in the microcontroller is complete, a decision will be made, if the value meets then the output will be active and if the value does not meet then the output will not be active. The series of tools can be seen in Figure 3.
Figure 3. Tool circuit NodeMCU based posture correction
NodeMCU ESP8266 pins in the circuit used can be understood from the explanation in the Table 1. Pin explanation. The Vin pin on the NodeMCU is connected to all positive terminals of the component. The Vin pin has a voltage of 5 Volts. The Gnd pin on the NodeMCU is connected to all component negative terminals. Pin D1 is a digital pin on the NodeMCU connected to the SCL pin on the LCD. Pin D2 is a digital pin on the NodeMCU connected to the SDA pin on the LCD. Pin D5 is a digital pin on the NodeMCU connected to the positive buzzer pin. Pin A0 is an analog pin on the NodeMCU and will be connected to one of the flexible sensor legs.
Table 1. NodeMCU pins used
No. | PIN Name | Information |
1 | Vin | VCC 5 Volt DC |
2 | Gnd | Ground |
3 | D1 | Connect to SCL LCD |
4 | D2 | Connect to SDA LCD |
5 | D5 | Connect to positive pin Buzzer |
6 | A0 | Connect to one of the flexible sensor pin |
The design that has been made in this prototype research is a NodeMCU ESP8266 based body posture alarm prototype which is installed on the back support shoulder, making it easier to achieve an ergonomic body posture.
Figure 4. Realization of back support shoulder design
The mechanism of this tool is very simple, just connect to WiFi and the tool can operate. Create a program in the Arduino IDE as in Figure 5, Figure 6, and Figure 7 then upload the program to the NodeMCU board. Arduino IDE is a simplified C language-based programming application, this application will be used to write programs and is embedded on the Arduino Uno board [11]. Every programming Arduino has two functions that must be present, namely void setup (){} all existing code inside curly braces will be executed only once when the Arduino program is run for the first time, the void loop (){} function will be executed after the setup (void setup) is complete. After executing once this function will be executed again until the power supply is removed [12].
Figure 5. Input library
In the input library section you must enter the library and also the pins used as input or output. As mentioned in Figure 5, pin A0 on the NodeMCU is a flexible sensor pin for sending sensor reading data. And pin 14 on the NodeMCU is a pin that is integrated with the Buzzer. Pin 14 will be defined as the output pin in the void setup section. Setting the SSID and wifi password is intended as a prototype on and off switch. The SSID and password are set so that no other party can interfere with the use of the tool.
Figure 6. Void setup
In the void setup section, the determination of the pin to be input or output is set in this section. From Figure 6, it can be seen that the reading results in the form of written characters will be displayed on the LCD with the lcd.init( ) program and the Buzzer as sound output. Every 0.5 seconds NodeMCU will update the wifi connection status. This setup function is executed only once when the program starts running or when the Arduino is reset [13].
Figure 7. Void loop
The void loop() function is to execute commands repeatedly [14]. In the void loop section, it is explained that pin A0 is the input pin which conveys flexible sensor reading data to the NodeMCU. And it can be understood that when the WiFi status is connected, the flexible sensor reading has started and the LCD screen lights up displaying the written characters of the sensor reading results. The program has included a limit value for when the buzzer will turn on, namely a value of less than 725. This value is taken from a simple calibration of the flexible sensor. Calibration is carried out by placing the sensor on a flat plane and the reading results that appear on the LCD are used as the limit value when the buzzer is on. The buzzer will turn off when the minimum value reaches 725. When the WiFi status is no longer connected, a command to reconnect will appear on the LCD screen for 1.2 seconds and then the LCD screen will turn off.
NodeMCU ESP8266 which is an electronic board based on the ESP8266 chip with the ability to functions as a microcontroller which is equipped with an internet connection (WiFi), apart from that It also includes the ability to run a Web Server [15]. The test was carried out 5 times in a room with a distance between the NodeMCU board and the hotspot source of 1 meter and will be shown in Table 2. However, the maximum distance for capturing a WiFi connection through a connectivity test proves that the NodeMCU ESP8266 can connected to the internet network with a maximum distance of 30 meters from the access point [16].
Table 2. NodeMCU testing against WiFi
No. | Condition | Time (sec.) |
1. | Connect | 5.31 |
2. | Connect | 5.06 |
3. | Connect | 3.94 |
4. | Connect | 3.66 |
5. | Connect | 2.96 |
The average time it takes for a NodeMCu to connect to WiFi is to get the average value, the formula used is as follows.
(1) |
Where (x) is the data obtained and (n) is the number of data.
(2) | ||
(3) |
So the average wifi capture speed is 4.184 seconds, which is a fast time so that the operation of the prototype is also faster and safer.
Flexible sensor testing uses the LM358 amplifier Op-amp where the Op-amp is an IC that functions to amplify electrical signals or voltage [17]. Tests were carried out on five men by looking at the differences in sensor readings when the curve angle was changed shown in the Table 3.
Table 3. Prototype testing results using the LM358 amplifier
No. | Name | Initial value | Value change | Time (minutes) |
1 | Ahmad | 852 | 852 | 4.17 |
2 | Bahtiar | 852 | 850 | 5.23 |
3 | Didik | 852 | 851 | 4.11 |
4 | Lingga | 852 | 852 | 5.31 |
5 | Zaki | 852 | 847 | 5.34 |
Flexible sensors operate as a resistance grid with effectively variable resistance between each row and column of the device [18]. It can be said that a flexible sensor is a variable resistor. So when the current increased by the amplifier passes through the resistor, the output of the resistor will still have a large current value so that when the flexible sensor is changed the bending angle the resulting value will remain constant. With a fixed value for every change in curvature of the angle, the body posture position alarm cannot work properly.
Flexible sensor testing without using an LM358 amplifier was carried out on five men by looking at the differences in sensor readings when the curved angle changed. In the test results without the 358 amplifier, there is a change in the sensor value reading when the flexible sensor changes its curved angle. By changing the value, the body posture position alarm prototype can work according to its function. Because the program has been set when the value is below 725, the buzzer will sound to remind the user to correct their body posture. The data in Table 3 also shows differences in the length of time each person can maintain an ergonomic body posture shown in the Table 4.
Table 4. Test results of the prototype without the LM358 amplifier
No. | Name | Initial value | Value change | Time (minutes) |
1. | Ahmad | 737 | 680 | 4.23 |
2. | Bahtiar | 737 | 695 | 5.50 |
3. | Didik | 737 | 685 | 5.27 |
4. | Lingga | 737 | 682 | 4.12 |
5. | Zaki | 737 | 691 | 5.09 |
Testing the age factor on the timing of changes in spinal curvature. Testing was carried out on 5 men of different ages shown in the Table 5.
Table 5. Effect of age on the length of time in an ergonomic sitting position
No. | Name | Age | Curvature change time (minute) |
1. | Ahmad | 27 | 4.23 |
2. | Bahtiar | 22 | 5.50 |
3. | Didik | 25 | 5.27 |
4. | Lingga | 28 | 4.12 |
5. | Zaki | 28 | 5.09 |
From the data that has been obtained, age also influences how long a person can stay in a normal body posture. The older a person is, the higher the risk of that person experiencing a decrease in bone elasticity which triggers LBP symptoms [19]. Testing the factor of body weight on the time of changes in spinal curvature shown in the Table 6.
Table 6. Effect of body weight on the length of time sitting upright
No. | Name | Weight (Kg) | Curvature change time (minutes) |
1. | Ahmad | 53 | 5.17 |
2. | Bahtiar | 67 | 4.31 |
3. | Didik | 43 | 5.19 |
4. | Lingga | 72 | 4.47 |
5. | Zaki | 59 | 5.04 |
Excess weight increases the weight on the spine and pressure on it discs, spinal structures, and herniation of the lumbar discs are prone to occur. There is a significant relationship between sitting time and LBP. Other risks of LBP are also known to increase with age and obesity [20]. This is in accordance with the results in the table testing the influence of body weight on the length of time maintaining an ergonomic body position.
The conclusion from the research results of the NodeMCU ESP8266-based body posture alarm prototype is that the flexible sensor reading results cannot be accurate when combined with the LM358 amplifier. That's because the flexible sensor works like a variable resistor. So when a resistor is supplied with a greater current than the source, the output of the resistor still has a large current value. So the sensor readings do not change when the curve angle changes. So if there is no change in value, the prototype will not work well.
ACKNOWLEDGEMENT
Thanks are expressed to Mrs. Setyawati who has helped and facilitated this research.
REFERENCES
AUTHOR BIOGRAPHY
Body Posture Position Alarm Prototype Based on NodeMCU ESP8266 (Candra Dwi Setyawan)