Smart Technology for Real-time Evaluation of Stress Levels

. Mental health issues can be adverse to an individual, especially for students who are involved in numerous activities on a daily basis. Students today frequently experience stress. 4 in 5 college students report frequent stress, according to the American Institute of Stress. There are several indications of stress, including sweating, headaches, difficulty concentrating, changes in appetite, reduced immune system, difficulty sleeping, etc. Long-term effects of stress may be chronic. Chronic stress has negative effects on health, including memory loss, hypertension, and cardiovascular disease. If it's overlooked, it may have negative psychological and physical consequences that lead to addiction, depression, suicide, etc. In order to prevent further effects, it is crucial to identify it early. The proposed system is to design a PCB for the wristband that detects whether the student is experiencing stress or not based on various physiological parameters like heart rate, temperature of the human body, mobility and skin response. Real time data is collected from Electrocardiogram (ECG), Galvanic Skin Response (GSR), Accelerometer sensors etc. An ESP32 microcontroller processes and analyzes the data gathered from various sensors to continuously detect stress.


Introduction
Stress is the experience of not being able to cope with significant amounts of mental or emotional pressure.Career anxiety, deadline pressure, peer pressure, making bad decisions, job demands, work pressure, health concerns, etc. are some of the stress-inducing factors.The most prevalent type of stress is acute stress, which is typically brought on by the constant demands and pressures that everyone has to cope with.Numerous recognizable signs include sweating, headaches, difficulty concentrating, changes in appetite, a decreased immune system, difficulties sleeping, etc. Chronic long-term impacts of stress are possible.Chronic stress contributes to health issues like hypertension, heart disease, and memory loss.Students' lives are significantly impacted by stress, particularly in the classroom.Stress is a common occurrence for students, and it has an effect on their academic success, mental health, and general well-being.Numerous variables, such as heavy workloads, competition, test anxiety, bullying, peer pressure, high expectations from teachers, and a lack of support, can cause students to become more stressed.In a survey of high school students conducted by the American Psychological Association, 45% of students reported feeling stressed by school pressures, 25% reported experiencing extreme stress during the school year, and 31% reported feeling overwhelmed by their workload [10].Teachers, parents, and guardians must be aware of these behaviors in order to create a welcoming, inclusive learning environment that promotes the health of students [6].There are currently a number of smartwatches available on the market, such the Empatica E4, Apple Watch, Fit Bit, and others, but none of them have been specifically designed to identify stress in the educational environment.The proposed approach for identifying stress in the classroom entails developing a wristband that forecasts stress using continuous, realtime data from physiological sensors.

Literature Review
In present-day society, stress may be a major issue that everyone must deal with because it has become an inevitable part of daily life for everyone.The various mental states' definitions are still up for discussion.For instance, Andrews et al. have suggested changing the nomenclature of generalized mental disturbance to generalized worry disorder.Panksepp and Russell's exploration of the categorical and dimensional models of affect.It is still being worked on how to define terms like synchronicity and participation in relation to social signal processing (SSP).This lack of definition is a serious problem since it affects how psychological states are frequently generated and evaluated.In this area, numerous studies are carried out.The department of intelligent systems' Martin Gjoreski, MitjaLustrek, and Matjaz Gams published a study in 2016 on continuous stress detection utilizing a wrist device in both lab and real-world settings.[5].The approach they suggested involved continual detection of stressful events with the help of information from a for-sale wrist gadget.Three machine learning components make up the method: a laboratory stress detector that measures short-term stress every two minutes, an activity recognizer that continuously monitors user activity and provides context information, and a context-based stress detector that uses the results of the laboratory stress detector and the user's context to reach a conclusion after 20 minutes.The method was assessed in both a lab and real-world setting.For a 2-class problem, accuracy on 55 days of real-world data was 92%.The method is now included in a smartphone application for managing mental health and wellbeing.Cristhian Manuel Duran-Acevedo, Jennifer KaterineCarrillo-Gomez and Camilo Andres Albarracin-Rojas have written an article on Electronic Devices for Stress Detection in Academic Contexts during Confinement Because of the COVID-19 Pandemic which was published by Multidisciplinary Digital Publishing Institute in the year 2021 [3].A Galvanic Skin Response (GSR), an electrocardiogram (ECG), the electrical activity generated by the upper trapezius muscle (EMG), and the development of an electronic nose system (E-nose) were used as the measuring physiological signals in a pilot study for the detection and identification of the volatile organic compound profiles emitted by the skin.The information was gathered during an online test whose objective was to ascertain the students' levels of stress and their post-test levels of relaxation.A stress detection system called Stay Active, created by Panagiotis Kostopoulos et al. (2016), combines social contacts, physical activity, and sleep habits to identify stress.It describes the use of physiological or behavioral techniques to quickly identify stress in settings that are active or dynamic, such as physical activity or daily tasks [9].The objective is to record stress responses that might emerge under ecologically realistic, realworld circumstances and to offer insights into how stress affects the body while it is in an active state.Research that is relevant to young adults and those who work for Geneva's transportation firm.The primary goal of this research is to make the process of calculating stress levels as non-intrusive as feasible for the users.Inertial sensors with a 3-axes acceleration (ACC), gyroscopes, and magnetometer are frequently employed in human activity recognition (HAR) [7].The ACC signal may offer context information on the user's physical actions in AR field studies.The six different 12 activity kinds (lying, sitting, standing, walking, running, and cycling) can be categorized using ACC data.Then, a stress detection system used these behaviors as an extra input.This exemplifies the importance of contextual knowledge without a doubt.However, rather than performing an accurate activity classification, it is important to assess the level of intensity of a given activity in order to detect stress.The level of stress a person is experiencing can be determined by electromyogram (EMG) signals.In order to evaluate the association between changes in human stress levels and muscular tensions, the current study uses electromyography in a stimulating environment that causes stress.It is possible to measure the myoelectric signals that are produced by physiological changes to the muscle fiber membrane.Therefore, the technique for measuring and assessing these impulses is electromyography.Ag-AgC1 electrodes, which convert the muscle's ionic current into an electric current, are widely used in this procedure.Three surface electrodes are used to collect the EMG signal from the left trapezius muscle of 10 female participants, who are stressed using the Stroop color word test procedure.Once the recorded signals had undergone wavelet demising, statistical features were extracted using the Wavelet Packet Transform (WPT).The four levels of EMG signals are separated using the db5 mother wavelet function.Frequency band data from the third and fourth levels are used for descriptive analysis.The optimal frequency range and feature for stress level evaluation were found by examining a total of seven statistical features.The stress levels are categorized using the straightforward non-linear classifier K Nearest Neighbor (KNN) [1].Statistical features created from the frequency range of (0-31.5 Hz) have a maximum average classification accuracy of 90.70% when separating the stress levels in minimal characteristics.

Proposed System
Proposed system is to design a PCB for the wrist band specifically for a class environment that incorporates continuous, real-world data gathered from physiological sensors to anticipate stress.The proposed approach for stress monitoring is intended to improve university students' capacity for generalizing their ability to identify stress [8].The primary purpose of this product is to identify stress levels very early so that its effects can be considerably reduced.Because multimodal data tends to be almost 10% more accurate than unimodal data when used for decision-making by recognition algorithms, many sensors are used.Wearable technology is progressively using several sensors integrated into a single device.We describe a novel wearable device in this study that integrates an ESP32 microcontroller with a number of sensors, including an ECG sensor, a GSR sensor, a temperature sensor, and an accelerometer.The system is made to continuously monitor the wearer's health and wellbeing of the student.

ECG Sensor
An electrocardiogram (ECG) sensor, often known as an ECG sensor, is a device that measures the electrical function of the heart.It operates by sensing the minute electrical impulses produced by the heartbeat.On the wearer's chest, arms, and legs are normally implanted several electrodes that make up the ECG sensor.The microcontroller receives the electrical impulses produced by the heart from the electrodes and analyzes them.

Galvanic Skin Response (GSR) Sensor
A GSR sensor tracks changes in the skin's electrical conductance.It operates by running a little current through the skin and gauging the electrical resistance that results.The amount of sweat on the skin determines the electrical resistance level, which in turn is influenced by emotional and stress reactions.The GSR sensor can be used to track different emotional reactions, including stress and anxiety levels.

Temperature Sensor
A temperature sensor determines the wearer's body temperature.Contact and non-contact temperature sensors are just two of the many varieties available.Non-contact sensors can be used to remotely assess the skin's temperature, while contact sensors are often worn in the ear, under the armpit, or on the forehead.The temperature sensor can be used to keep an eye on body temperature variations or fever.

Accelerometer
A device that monitors acceleration is called an accelerometer.It detects alterations in motion or velocity in one or more directions.Accelerometers are devices that monitor movement, levels of activity, and fall detection.They are frequently utilized in fitness trackers and other wearable technology to track levels of physical activity.
Data from the sensors is gathered and processed in real-time by the ESP32 microcontroller.The system is intended to be wireless and low-power, enabling continuous monitoring without the necessity of regular battery replacements or physical connections.Overall, a variety of uses for this wearable technology are possible as shown in Fig: 1, including healthcare, sports training, and workplace safety.We can acquire a more thorough picture of the wearer's health and well-being by combining various sensors in a single device, enabling early identification of potential health issues and encouraging good behaviors.

Designing the PCB in ki-cad
Electronic design automation (EDA) capabilities for PCB layout design and schematic capture are included in the free and open-source software package known as KiCad.KiCad is widely used by engineers, hobbyists, and students for designing printed circuit boards (PCBs) for various applications, including sensors like ECG, GSR, temperature, and accelerometer.To design a PCB using KiCad for these sensors as shown in Fig: 2, it typically starts by creating a schematic.In the schematic, the components needed for the sensor design, including resistors, capacitors, ICs, and connectors.Through an appropriate search for the symbols and footprints for these components in the KiCad libraries, or create custom ones if needed.Once the schematic is created, it can be used for KiCad's PCB layout tool to place the components and route the traces to connect them together.In the PCB layout, you would typically position the components based on the physical constraints of the PCB and then route the traces to connect them according to the design requirements.

Results
The circuit has been designed by integrating all the sensors -ECG sensor, GSR sensor, Accelerometer, and Skin temperature sensor as shown in fig: 3 In addition to the sensors, we have connected the required power supply, display etc. for the proper functioning of the wrist band.According to the above fig.3 This depicts that the power supply is provided to the entire circuit board and a rectifier, a regulator with 5 volts is then connected to a 3.3volts regulator attached to the display of the wrist band.The regulator in the circuit is in flow with the succeeded Accelerometer sensor which provides us with the axes of the wrist band i.e., x, y and z.ECG sensor which depicts the heartbeat of the student in the classroom environment, temperature sensor that notes the current changing temperature of the student, GSR (Galvanic Skin Response) sensor which measures the skin conductance.

Fig-3 PCB Design for wristband
All the sensors mentioned above are connected to the micro-controlled which is in combination with a push button.All the values of the above sensors are stored in the cloud and provide us with stress levels of an individual in the classroom environment.

Conclusion
The aim of the stress monitoring approach is to enhance university students' ability to recognize stress by facilitating generalization.The primary purpose of this product is to identify stress levels at an early stage, thereby minimizing its negative impact.To achieve higher accuracy in decision-making by recognition algorithms, multiple sensors are employed, as research indicates that multimodal data is almost 10% more precise than unimodal data.PCB design is developed in Ki-Cad Software with ECG sensor, GSR sensor, Accelerometer, and Skin temperature sensor connected to ESP32 microcontroller.
Future work includes developing a multimodal stress detection application that continually records, and measures stress levels based on the analysis of facial expressions, breathing patterns, and physiological signals.The data can be collected for longer durations and the various stress inducing factors can be analyzed.After analyzing the factors, the stress inducing factors can be identified.Predictions made by the machine learning model , 02019 (2024) E3S Web of Conferences https://doi.org/10.1051/e3sconf/202449102019491 ICECS'24 can be analyzed using the biological factors that affect the human body during stress.If stress is detected more than 3 times, an alert will be sent to guardians.

Fig- 1
Fig-1 Circuit diagram for wristband The circuit of the wrist band consists of primarily four sensors: ECG Sensor, GSR Sensor, Accelerometer, Skin Temperature.All the sensors are connected to the ESP 32 microcontroller as shown in the Fig 1.The ESP32 module was selected because of its compact size, adaptability to various languages and wifi connectivity which is required to establish a MQTT protocol with IBM Watson cloud platform.It is integrated with RFID and attached to a wrist band so that it is feasible to monitor and detect stress experienced by students in daily classroom activities.Ki-Cad software is used for designing PCB.