Authors: Ved Katyayan
Certificate: View Certificate
Mental stress is a major issue in today’s competitive environment. Insomnia, memory issues, depression, and other disorders can all be caused by a lack of sleep. Frustration, irritation, and a higher risk of heart disease are all symptoms of stress. Anxiety, inability to concentrate, and car accidents etc. The majority of individuals only sleep for 3- 4 hours each day, which is insufficient. Enough. People should sleep for roughly 6-7 hours every day in reality. To alleviate this problem, many people utilize high doses of drugs. This is an issue that is extremely detrimental to the human body. There are several options available. Therapy options for insomnia is also there. Your sleep cycle is regulated by an internal “body clock” that controls when you feel weary and ready for bed or refreshed and awake which is known as cardiac rhythm. The circadian rhythm is a 24-hour cycle that this clock follows. You will grow progressively fatigued during the day after waking up from sleep. These emotions will peak in the evening, just before bedtime. Adenosine, an organic substance generated in the brain, linked to sleep drive, also known as sleep-wake homeostasis. As you get extra weary throughout the day, your adenosine levels rise, and your body subsequently breaks down this chemical while you sleep. The circadian rhythm is also influenced by light. The hypothalamus is a particular area of nerve cells in the brain, and the suprachiasmatic nucleus is a cluster of cells in the hypothalamus that processes signals when the eyes are exposed to natural or artificial light. The brain uses these signals to decide whether it is day or night. As natural light fades in the evening, the body produces melatonin, a drowsiness-inducing hormone. The hormone cortisol, which increases energy and alertness, is released when the sun rises in the morning. Most individuals require at least seven hours of sleep each night in order to operate well cognitively and behaviorally. An inadequate quantity of sleep might have catastrophic consequences. Sleep deprivation has been linked to attention lapses, impaired cognition, delayed responses, and mood swings in certain studies.
Adults between the ages of 18 and 60 are advised to get at least 7 hours of sleep each night to avoid getting sleep deprived. Sleep deprivation may have a negative influence on your overall health. Your body will benefit from sleep if you make it a priority. Your body creates proteins called cytokines while you sleep, which have immune-boosting properties and act as fuel for your white blood cells. Sleep deprivation reduces cytokine production and makes you more susceptible to germs and viruses. 
Your body can mend and rebuild itself while you sleep. The body is able to eliminate junk from the lymphatic system during this period, which improves the immune system.
Several vital processes take place when you sleep, including:
Sleep is a very effective stress reducer. It enhances focus, emotional regulation, and judgment and decision-making. Sleep deprivation affects not just our mental clarity but also our capacity to deal with stressful events.  This is partly due to the effects of chronically elevated cortisol levels. Cortisol levels rise when we receive poor quality sleep or don’t get enough sleep. In the short term, high cortisol levels are beneficial, promoting alertness and vigilance while also elevating heart rate and blood pressure, but over time, they can promote systemic inflammation and upset our hormonal balance.
Cortisol levels often drop in the evening hours as part of the body’s natural preparation for sleep. When we don’t get enough sleep, our cortisol levels stay high, interfering with the release of melatonin, a hormone that regulates our sleep- wake cycles. Sleep deprivation affects the rapid eye movement (REM) stage of sleep, which influences our emotional and memory processing. The loss of REM sleep’s restorative advantages has a direct influence on our mood, leaving us irritated and agitated. 
There is a well-established relationship between sleep and memory processing. Sleep allows the mind to analyses all of the stimuli we’ve been exposed to while awake, and it also causes changes in the brain that help us establish memories by strengthening neuronal connections. Teachers stress the significance of getting a good night’s sleep before taking a test since these memories can be recalled later through a process called recall. 
It's also worth noting that, while the relationship between sleep, learning, and memory is complicated, we’ve all felt the effects of a lack of sleep on our concentration and ability to learn effectively, so getting a good night’s sleep is critical not only to maximize our ability to acquire new information but also to recall and share that information later. 
When people are worried about job, education, health, finances, or family, it's not uncommon for them to have trouble sleeping. Stressful life events or trauma, such as a loved one's death or sickness, divorce, or a job loss, can all raise your risks of sleeplessness.  If you're having trouble sleeping, you should consider your mental and emotional wellness as well. Insomnia might be contributing to your mental health issues, and treating it could make you feel a lot better.
II. LITERATURE SURVEY
of the chin, limbs, neck & torso is paralyzed.
3. Different Stages of Non-REM Sleep
1. The transition of the brain waves from alpha (8–13) to theta (4–7 Hz) waves.
1. Sleep spindles ranging from 11 to 16 Hz (most commonly 12–14 Hz).
1. This Stage called deep or slow-wave sleep. 20% delta waves ranging from 0.5–2 Hz and having a peak-to peak amplitude >75 μV.
5. Timing of Sleep: The circadian clock, sleep-wake homeostasis, and, within certain limits, willed behavior in humans, all influence normal timing. Adenosine, a neurotransmitter that inhibits many of the biological processes linked with wakefulness, works in unison with the circadian clock, an inner timekeeping, temperature-fluctuating, enzyme- controlling system. For satisfactory sleep, the circadian element must be balanced against the homeostatic sleep propensity (the need for sleep as a function of the amount of time since the last adequate sleep episode). This, together with instructions from the circadian clock, informs the body that it is time to sleep. The primary determinant of sleep offset (awakening) is the circadian rhythm. 
2. DHT11: The DHT11 is a introductory digital temperature and moisture detector with a modest price label. It measures the ambient air with a capacitive moisture detector and a thermistor and labors a digital signal on the data leg (no analogue input legs demanded). You can acquire new data from it formerly every 2 seconds, thus detector readings can be over to 2 seconds old when using the Adafruit library.
3. L293D Motor: The L293D is a 16- leg Motor motorist IC that can operate two DC motors in any direction at the same time. At voltages ranging from4.5 V to 36 V( at leg 8!), the L293D is able of bidirectional drive currents of over to 600 mama ( per channel). can get relatively heated at times.
4. Peltier Module: A Peltier module (thermoelectric module) is a thermal control module that can both warm and cool. It is possible to adjust the surface temperature and maintain it at the target temperature by running an electric current through the module.
5. BO Motor: Lightweight BO (Battery Operated) DC geared motor with good torque and rpm at lower voltages. When powered by a single Li-Ion cell, this motor can spin at around 150 RPM.
6. Dual Channel Relay Module: The relay has two outputs: one that is generally open and the other that is normally closed (NO and NC). When the IN1 or IN2 pins are linked to ground, NO is open and NC is closed; however, when the IN1 or IN2 pins are not connected to ground, the converse is true. Toggle power to a circuit or device by connecting one of these two pins, the common pin on the relay output, and a power supply.
7. Node MCU: Node MCU is a LUA- grounded open- source firmware for the ESP8266 wi fi chip. Node MCU firmware comes with the ESP8266 Development board/ tackle, Node MCU Development board, to explore functionality with the ESP8266 chip. Because Node MCU is an open- source platform, anyone can edit, tweak, or manufacture its tackle. The ESP8266 wi fi enabled chip is used in the Node MCU Dev. tackle/ board. The ESP8266 is a low- cost Wi- Fi chip with TCP/ IP protocol designed by Express if Systems. The ESP8266 Wi Fi Module has further information about the ESP8266. Interpretation 2(V2) of the Node MCU Dev. Kit is available, videlicet Node MCU Development Board v1.0 ( Version2), which is generally black in color.
8. PIR Sensor: The PIR sensor (Passive Infrared Sensor) is a type of passive infrared sensor. It's a low-cost sensor for detecting the presence of humans or animals. As seen in the pin diagram above, the HC-SR501 PIR sensor module has three output pins: Vc, Output, and Ground. Because the output pin is 3.3V TTL logic, it can be utilized with a variety of platforms, including Arduino, Raspberry Pi, PIC, ARM, and 8051.
We are using Atmega 328 microprocessor as our main controlling unit and through which most of the components are interfaced with. We are using a 16x2 LCD display to see the parameters which we are operating on and also to see what parameters we are adjusting. LCD is our main monitoring unit to see and navigate through settings we are providing for the user. We have also connected to few regulator ICs to control the input voltage provided to the Atmega. We have interfaced four push buttons to for setting, resetting, increasing/right, and decreasing/left to the Atmega. Then we have interfaced dual channel relay module to provide switching for our Peltier module. Our temperature sensing device DHT 11 is also interfaced to Atmega 328. BO motor is interfaced via L293D motor driver. We are giving power to our second board via relay only.
On the second board we have NODE MCU which Esp8266 as system on chip. We have connected PIR Sensor input to Node mcu. PIR sensor is a passive infrared sensor which we are using as a motion detector. So, when there is no motion detected via PIR sensor output of PIR sensor will be low but when there is motion detected by the person sleeping there will be a high signal generated by the PIR sensor which will be given to the NODE MCU. And then node mcu will generate a delta wave in the form of square wave whose frequency we can adjust from 0-10Hz after generation of square wave we need to amplify this wave as it has very low amplitude. So, for that reason we have connected an amplifier to pin D4 of the node MCU which will amplify the signal and then for demonstration we have used a speaker to demonstrate these low frequency signal. Delta waves are proven to be the best for anyone who wants to sleep. Research has shown that listening to low-frequency tones can trigger a slowdown in brain activity that will aid relaxation and sleep. So, whenever a person moves in his sleep the motion will be detected by our PIR sensor and the person will be fed with delta waves which will help achieve a sound sleep. We also wanted to monitor the patient’s body temperature during the sleep so we have also connected a temperature sensor to the Node mcu in the form of potentiometer for demonstration purpose here our potentiometer is acting as voltage divider connected between 0-3volts so with potentiometer we can adjust any value between 0-3 volts and corresponding to that value of voltage a temperature value will be sent to server of think speak which updates every 15 seconds and a graph of temperature will be created on the server which we can using your smartphones and gadgets.
Up to 50 of grown-ups worldwide suffer from wakefulness and sleep diseases so the problem is veritably real and it shouldn\'t be ignored at any cost. We formerly understood what a poor sleep governance can do to our body and how it affects our overall health and performance. Utmost grown-ups need around seven to nine hours of sleep per night but the quantum of sleep demanded to serve at your stylish varies between individualities. The quality of your rest matters just as important as the volume. Tossing and turning and constantly awakening is as bad for your health as being unfit to fall asleep. Wakefulness occurs more frequently in women than in men. Gestation and hormonal shifts can disturb sleep. Other hormonal changes, similar as premenstrual pattern (PMS) or menopause, can also can affect sleep. Wakefulness becomes more common over the age of 60. Aged people may be less likely to sleep soundly because of fleshly changes related to aging and because they may have medical conditions or take specifics that disturb sleep. With the help of our design, we can help as numerous people as we can by taking care of their sleep via our automated system. With our system we will be controlling abecedarian factors affecting a normal persons sleep quality which are light surroundings and temperature not only that numerous people tend to move a lot during their sleep for this case we\'ve incorporated a detector which detects movements of mortal body and as soon as it detects movements it\'ll fuse delta swells to the persons brain on which we\'re operating for demonstration purpose we\'ve used a small speaker. Also, we\'re covering the person’s temperature and transferring it via IOT, For farther medical opinion.
 M. Sateia, \"International classification of sleep disorders-third edition: highlights and modifications\", Chest, vol. 146, no. 5, pp. 1387-1394, Nov. 2014.  Khosrow Behbehani et al., \"Automatic control of airway pressure for treatment of obstructive sleep apnea\", IEEE transactions on biomedical engineering, vol. 42, no. 10, pp. 1007-1016, 1995.  C. Senaratna et al., \"Prevalence of obstructive sleep apnea in the general population: A systematic review\", Sleep Med. Rev., vol. 34, no. 1, pp. 70-81  T. Penzel, \"Home sleep testing\" in Principles and Practice of Sleep Medicine, Amsterdam, The Netherlands:Elsevier, pp. 1610-1614, 2016.  S. Pullano et al., \"Medical devices for pediatric apnea monitoring and therapy: Past and new trends\", IEEE Rev. Biomed. Eng., vol. 10, no. 1, pp. 199-212, Sep. 2017.  N. Pombo, N. Garcia and K. Bousson, \"Classification techniques on computerized systems to predict and/or to detect Apnea: A systematic review\", Comput. Methods Programs Biomed., vol. 140, pp. 265-274, 2017.  Jin Zhang et al., \"A real-time auto-adjustable smart pillow system for sleep Apnea detection and treatment\", Information Processing in Sensor Networks (IPSN) 2013 ACM/IEEE International Conference on, 2013  Burin Camc et al., \"Sleep Apnea detection via smart phones\", Signal Processing and Communications Applications Conference (SIU) 2017 25th, 2017.  Ahnaf Rashik Hassan and Md Aynal Haque, \"Identification of Sleep Apnea from Single-Lead Electrocardiogram\", Computational Science and Engineering (CSE) and IEEE Intl Conference on Embedded and Ubiquitous Computing (EUC) and 15th Intl Symposium on Distributed Computing and Applications for Business Engineering (DCABES) 2016 IEEE Intl Conference on, 2016.  Bin Jing et al., \"The Diagnostic Model of Obstructive Sleep Apnea Hypopnea Syndrome Based on Artificial Neural Networks\", Information Technology in Medicine and Education (ITME) 2016 8th International Conference on, 2016.  Martin Kjaer Guul, Poul Jennum and Helge BD Sorensen, \"Portable prescreening system for sleep apnea\", Engineering in Medicine and Biology Society (EMBC) 2016 IEEE 38th Annual International Conference of the, 2016  D. Jung et al., \"Real-time automatic apneic event detection using nocturnal pulse oximetry\", IEEE Trans. Biomed. Eng., vol. 65, no. 3, pp. 706-712, Mar. 2018.  J. Morales et al., \"Sleep apnea hypopnea syndrome classification in SpO2 signals using wavelet decomposition and phase space reconstruction\", Proc. IEEE 14th Int. Conf. Wearable Implantable Body Sensor Netw, pp. 43-46, May 2017.  R. Pathinarupothi, J. Dhara, E. Rangan, E. Gopalakrishnan, R. Vinaykumar and P. Soman, \"Single sensor techniques for sleep apnea diagnosis using deep learning\", Proc. IEEE Int. Conf. Healthcare Informat., pp. 524-529, Aug. 2017.  Fabio Mendonca et al., \"A Review of Obstructive Sleep Apnea Detection Approaches\", IEEE Journal of Biomedical and Health Informatics,2018.
Copyright © 2022 Ved Katyayan. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.