Preview only show first 10 pages with watermark. For full document please download

Design And Development Of Denary Wake-up And Send-to

   EMBED


Share

Transcript

The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. Design and Development of Denary Wake-up and Send-to-sleep System Lim Pei Fan, Fazrena Azlee Bte. Hamid College of Engineering, Universiti Tenaga Nasional, Malaysia. Email ([email protected], [email protected]) Abstract: This paper discusses the design and prototype development of a microcontroller-based Denary Wake-up and Send-to-sleep System, which promotes healthy sleeping lifestyle. Today, the pace of life is increasing with technological advancement which lead to many people feeling the pressure or stress. The design of the system is hoped to wake people up naturally instead of the noisy sound of normal alarm which may cause feel of depression and stress in the morning. On the other hand, the heavy sleepers have difficulty waking up when a normal alarm clock sounds. Hence, the purpose of this system is to wake people in time with more effective and natural method. This paper proposes a system to use light stimulation and pillow shaker together with the sound of alarm to wake people up. An extra function which is solving a task to turn off the alarm is implemented in this system to ensure that the sleeper will be fully awaked. Additionally, this system is enhanced with features to help people fall asleep which are night light, dimming light and starry light projection on the ceiling. The microcontroller used in this system is Arduino Mega 2560 which will read the input value from the push buttons and rotary encoder to give instruction to the output components for the system operation. The Arduino integrated development environment (IDE) is the platform used to write the program which can be uploaded to the Arduino Mega 2560 board. Keywords— Wake-up system; Effective send to sleep system, Microprocessor Alarm clock; Healthy sleeping lifestyle I. INTRODUCTION An alarm clock is a clock that is designed to make sound, or even some other indication at a particular time. The main role of the alarm clock is to wake people from their night's sleep or short naps. Sometimes, the alarm clock is used for other reminders as well. Today, majority of the alarm clocks available in the market use sound to wake people; however there are several alarm clocks that use light or vibration as the form of notification. Many people have difficulty waking up when a normal alarm clock sounds especially the heavy sleepers. Additionally, being under stress are very common because of the high pace of modern life. Therefore, the main objective of this work is to create a system that would awake people in time with more efficient and natural method, and to send people off to sleep with methods promoting relaxation. The Denary Wake-up and Send-to-sleep System is an alarm clock that uses light stimulation and pillow shaker together with the sound of alarm to wake people up, as well as to send people off to sleep. There are four alarm settings and two modes on this prototype which are wake-up mode and sleep mode. Denary means containing ten parts of function, since this device has ten functions altogether; the basic display system together with six wake-up functions and three send-tosleep functions. II. LITERATURE REVIEW A. Effect of Light Stimulation Light play an essential role as a synchronizer of daily activities in most species. A circadian rhythm is virtually any biological process that shows an endogenous which means selfsustained, entrainable oscillation of about a day. The light-dark cycle is the most effective external influence acting upon the human circadian pacemaker [1]. Bright light is the predominant stimulus for circadian entrainment for human [2]. Most of the heavy sleepers can be woken up by the uses of the alarm clock together with the light [3]. The degree of a circadian phase shift to light exposure relies on light intensity, timing, duration and earlier light exposure [2]. An hour of early morning bright light is actually advantageous in advancing circadian phase as well as enhanced sleep quality, alertness and also cognitive performance [2]. Based on the studies, the wake-up time was advanced almost an hour and sleep start times were about 40 minutes earlier during morning light exposure periods as compared to the former control periods [2]. The sleep start times did not return to a later time after the experimental period [2]. Some findings have shown that not just repeated exposure of bright light but even a single bright light exposure resets the human circadian system after one day [4]. Based on the finding, it shows that once a phase advance of the human circadian pace making system is achieved by an early morning awakening coupled with bright light exposure, it may be maintained by the fixed early awakening accompanied by a low intensity light [5]. A series of studies performed from a research group in Finland show that bright light exposure was effective in improving depressive mood and health-related quality of life in healthy subjects with or without seasonal symptoms [6]. B. Vibrating Pillow Those who are hearing impaired and people having difficulty in waking up in the morning may not be woken by a normal audible alarm clock. Thus, an alarm clock that works together with a flashing light or vibrating pillow is the alternative way to wake up [3]. They may need to use a pillow vibrator or Super Shaker bed vibrator to wake them up [7]. ISBN 978-967-5770-63-0 12 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. Pillow vibrator is a pillow with a build-in alarm clock in the pillow and it will vibrate when the user had set the time to wake up [7]. When the alarm is triggered, the pillow vibrates until the alarm clock is turned off. Whereas, Super Shaker bed vibrator is another device that is placed under the bed of the user and is attached to the alarm clock with two form of notifications, which are vibration and flashing light [7]. III. Arduino Mega 2560  To power the prototype. Push Buttons Input  To on/off night light (Push button A). To on/off dimming light (Push button B). To on/off starry light (Push button C). To display and change state of solving task function, pillow shaker, snooze function and repeat alarm function (Push button D and E). To snooze alarm (Push button E). To set current time. To set alarm time. To display and change alarm state. To turn off alarm. To solve task. To display current time. To display alarm time. To display alarm setting symbol.  Figure 1. Block Diagram of Denary Wake-up and Send-tosleep System Component Input SYSTEM DESCRIPTION The system is equipped with several main components such as Arduino Mega 2560, 8×8 RG Dot Matrix, RGB LED Strip, 3W White LED, Vibration Motor, Buzzer, DS3231 RTC Module, push buttons and rotary encoder with push button. The system is controlled by the Arduino Mega 2560 and the input components of five push buttons and one rotary encoder with push button. There are two modes on this project prototype which are wake-up mode and sleep mode. The features of the wake-up mode are the wake-up light together with sound alarm and pillow shaker is the optional mode for user. There are three features in sleep mode which are dimming light, starry light and night light. The dimming light and starry light projection are used to help to send people off to sleep while the night light is used to direct people to the bed when in the dark. Besides that, there are four alarm settings on this project prototype which enable or disable the solving task function, snooze function, pillow shaker function and repeat alarm function. Figure 1 and Table I show the block diagram and the main components used in Denary Wake-up and Send-to-sleep System respectively. TABLE I. Adapter 12V 2A    Rotary Encoder with Push Button Input    8x8 RG Dot Matrix Output      RGB LED Strip Output  Used for wake-up light, night light, dimming light and solving task function. 3W White LED (High Power) Output  For starry light effect. Vibration Motor Output  Used as pillow shaker Buzzer Output  Used as sound alarm. -  To keep time data. MAIN COMPONENTS USED IN THE SYSTEM Input/ Output - Function  Arduino Mega 2560 is the microcontroller throughout the project. DS3231 RTC module ISBN 978-967-5770-63-0 13 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. IV. SYSTEM ARCHITECTURE The hardware design of the system can be divided into five sections which are time and symbol display, light features (wake-up light, dimming light, night light and solving task function), starry light, sound alarm and pillow shaker. A. Time and Symbol Display In this project, two 8×8 RG dot matrixes are used to display the time and symbol. The dot matrix consists of red LEDs and green LEDs, therefore the dot matrix can display either red color or green color. The similar rows (cathodes) with same color of both dot matrixes are connected together so that there are 8 combined rows in total for each color, whereas the columns are driven separately, and hence there are 16 columns altogether. The combined current of all the LEDs in each row sinks through a darlington-pair transistor array inside an ULN2803 IC. The inputs of ULN2803A are active high which means the input pins must be supplied with logic high in order to bring the corresponding output pins to ground. The 16 column (anodes) are driven by the outputs of two shift registers (74HC595) in series with current limiting resistors (220 Ω). The use of shift registers in the circuit is to minimize the number of I/O pins required to drive the columns of the dot matrixes. In order to drive the 16 columns separately, 16 I/O pins of Arduino Mega 2560 are needed however this number can be minimized to 3 with the use of two shift registers. The 16 columns of the dot matrixes are driven individually by two shift registers (74HC595), whereas the eight combined rows of each color are driven by another shift registers (74HC595). There are total of four shift registers used to reduce the I/O pins required. The method of row scanning is used in this project and the method to display character on dot matrixes is called as the persistence of vision. B. Light Features The 1 meter RGB LED strip with 60 LEDs is used to change the color on the project prototype. The PWM method is used to change the color of LED strip by changing the value of three color channels (red, green and blue) from the range of 0 to 255. When all of the three channels are set to maximum value which is 255, it turns on the bright white light. When all of the three channels are set to 0, all three channels are turned off. The wake-up light gradually increases the brightness of a light which change from soft morning red through warm orange to bright white light near the bed at 30 minutes before alarm set time. The dimming light gradually decreases the brightness of a light which change from bright yellow through warm orange to red within 30 minutes and turn off after 30 minutes to help to send people off to sleep. The night light turn on the white light to direct the people to the bed when in the dark. For the solving task function, if it is enabled and the push button of the rotary encoder is pressed after the alarm triggered, the project prototype blinks a random color that need to be selected to turn off the alarm for three times. After that, it shows different random colors every 1.5 seconds. The push button of rotary encoder is needed to be pressed when the prototype shows the correct color in order to turn off the alarm. There are nine colors are defined in the program to be displayed randomly which are red, green, blue, light blue, orange, yellow, white, purple and pink. C. Starry Light The starry light projects stars to shine on the ceiling via the punched-out holes on the top surface of the project prototype. A 3W white LED is used to provide the light source for the starry light. D. Sound Alarm A buzzer is used as the sound alarm and is triggered when it reach alarm set time. E. Pillow Shaker A vibration motor is used to vibrate the pillow by placing it under pillow when reach the alarm set time. V. HARDWARE A. Power Supply A 12V adapter is the main power supply in this project. The 12V power supply is needed to drive the RGB LED strip and it is step down to 9V to power the Arduino Mega by using 9V regulator as the recommended input voltage of Arduino Mega 2560 is from 7V to 12V. The reason to power the Arduino Mega 2560 with 9V instead of 12V is to avoid the Arduino Mega 2560 burn out and it is safe to operate in long term period. The 5V pin from the Arduino Mega 2560 is used to power the DS3231 RTC Module, Shift Register 74HC595, vibration motor, buzzer and 3W white LED. B. Pin Connection to Arduino Mega 2560 The pins of the RGB LED strip is connected to the PWM pin of the Arduino Mega 2560 and DS3231 RTC Module is connected to the SDA and SCL pins. The other components are connected to the digital pins of the Arduino Mega 2560. Figure 2 and Figure 3 show the state machine and schematic diagram of the Denary Wake-up and Send-to-sleep System respectively. VI. SOFTWARE The Arduino integrated development environment (IDE) is a cross-platform written in Java, whereas the programs are written in C or C++. The whole program is written in the platform in the C language code which can be uploaded to the board by a simple upload button. Basically, the project is the integration of the software used to interface and implement the components in this project such as RGB LED strip, RG Dot Matrix together with shift register 74HC595, DS3231 RTC Module, vibration motor, buzzer, 3W white LED, push buttons and rotary encoder with push button. ISBN 978-967-5770-63-0 14 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. Figure 2. State Machine of the Denary Wake-up and Send-to-sleep System Figure 3. Schematic Diagram of Denary Wake-up and Send-to-sleep System ISBN 978-967-5770-63-0 15 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. VII. RESULT AND DISCUSSION Snooze function Wake-up Repeat alarm function Wake-up Table II discusses the results and description on the system’s prototype functions whereas Figure 4 and Figure 5 show the front view and back view of the prototype and the label of the push buttons. TABLE II. RESULTS AND DESCRIPTION OF PROTOTYPE FUNCTIONS Function Time and symbol display Mode - Wake-up light Wake-up Sound alarm Wake-up Solving task function Wake-up Pillow shaker function Wake-up Results / Description Dot matrixes display the time and symbol of alarm setting which are solving task function, pillow shaker, snooze function and repeat alarm function. The red color LEDs display the time and the symbol of alarm setting which is set to disabled while the green color LEDs display the symbol of alarm setting which is set to enabled. The wake-up light gradually increases the brightness of a light which change from soft morning red through warm orange to bright white light near the bed at 30 minutes before alarm set time. A buzzer is used as the sound alarm and is triggered when it reach alarm set time. If the solving task function is enabled and the push button of the rotary encoder is pressed after the alarm triggered, the project prototype blinks a random color that need to be selected to turn off the alarm for three times. After that, it shows different random colors every 1.5 seconds. The push button of rotary encoder is needed to be pressed when the prototype shows the correct color in order to turn off the alarm. The solving task function is disabled by default. When the pillow shaker function is enabled, the vibration motor vibrates the pillow by placing it under pillow when reach the alarm set time. The pillow shaker function is enabled by Night light Sleep Dimming light Sleep Starry light Sleep default. When the snooze function is enabled, the alarm snoozes for 5 minutes when push button E is pushed. The alarm only can snooze for two times. The snooze function is enabled by default. When the repeat alarm function is enabled, the project prototype automatically turns on the alarm after one hour of alarm triggered. The repeat alarm function is disabled by default. The night light turn on the white light when the push button A is pressed. The dimming light gradually decreases the brightness of a light which change from bright yellow through warm orange to red within 30 minutes and turn off after 30 minutes when the push button B is pressed. The starry light projects stars to shine on the ceiling via the punched-out holes on the top surface of the project prototype when the push button C is pressed. Figure 4. Front View and Back View of System’s Prototype A ISBN 978-967-5770-63-0 B C D E Rotary Encoder with Push Button Figure 5. Label of the Push Buttons 16 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. A. Time and Symbol Display Dot matrixes display the time and symbol of alarm setting which are solving task function, pillow shaker, snooze function and repeat alarm function. The red color LEDs display the symbol of alarm setting which is set to disabled while the green color LEDs display the symbol of alarm setting which is set to enabled. Figures 6 - 11 show the time and symbol display on the prototype. B. Wake-up Light The alarm time is set to 7.05am by default (see Fig.6). In this case, the alarm time is set to 2.30am. The wake-up light gradually increases the brightness of a light which change from soft morning red through warm orange to bright white light near the bed at 30 minutes before alarm set time which is 2.00am (see Fig. 12). Figure 12. Color Changing of Wake-up Light Figure 6. Time Display C. Dimming Light The dimming light gradually decreases the brightness of a light which change from bright yellow through warm orange to red within 30 minutes and turn off after 30 minutes when the push button B is pressed (see Fig. 13). Figure 7. Symbol Display of Solving Task Function Figure 13. Color Changing of Dimming Light D. Night Light The night light turn on the white light when the push button A is pressed (see Fig. 14). Figure 8. Symbol Display of Pillow Shaker Figure 14. Night Light Figure 9. Symbol Display of Snooze Function E. Starry Light The starry light projects stars to shine on the ceiling (see Fig. 15) via the punched-out holes on the top surface of the project prototype (see Fig. 16) when the push button C is pressed. Figure 10. Symbol Display of Repeat Alarm Function Figure 15. Starry Light Projection on the Ceiling Figure 11. Symbol Display of Alarm State ISBN 978-967-5770-63-0 17 The 3rd National Graduate Conference (NatGrad2015), Universiti Tenaga Nasional, Putrajaya Campus, 8-9 April 2015. Figure 16. Punched-hole on Top Surface of Prototype F. Solving Task Function If the solving task function is enabled and the push button of the rotary encoder is pressed after the alarm triggered, the project prototype blinks a random color that need to be selected to turn off the alarm for three times. For example, blue light is displayed and blinks for three times for this case (see Fig. 17). After that, it shows different random colors every 1.5 seconds (see Fig. 18). The push button of rotary encoder is needed to be pressed when the prototype shows the correct color which is blue color in this case (see Fig. 19) in order to turn off the alarm. circadian phase. A pillow shaker is implemented to vibrate the entire pillow in order to make sure the people are fully awaked. Such system may wake people who are deaf, hearing impaired and also visually impaired. In order to make sure the people are fully awaked, an extra function is implemented in the system which is solving a task to turn off the alarm which is not installed in any of the current products in the market. There are four alarm settings in this system which are enable or disable the snooze function, solving task function, pillow shaker and repeat alarm function. Besides that, the additional features which are starry light projection and the dimming light are used to help people to fall asleep in a more peaceful and relaxed manner. In short, the objectives of this project are successfully achieved and it is believed that the Denary Wakeup and Send-to-sleep System can help people to have a healthy sleeping lifestyle. IX. RECOMMENDATION There are still some room for improvement for the project to enhance the functions of the system: i) Natural Sound as Sound Alarm - Natural sound can be used to replace the buzzer beep sound. This can be done by using MP3 Sound Module and SD card to store the music files. ii) Display Day and Date - Day and date can be displayed on the dot matrixes when press a button. The information of day and date can be retrieved from the DS3231 RTC module. Figure 17. Blue Light is Displayed and Blinks for Three Times iii) Smartphone Controlled - Smartphone application can be created using MIT App Inventor to control the prototype. The application is used to set the alarm time and the alarm setting on the prototype through Bluetooth module. REFERENCES [1] Figure 18. Different Random Colors are Displayed Every 1.5s [2] [3] [4] Figure 19. Correct Color is Chosen to Turn Off Alarm VIII. CONCLUSION [5] The Denary Wake-up and Send-to-sleep System is designed to provide a more efficient method to fully awake people in time and to send people off to sleep. In this project, there are three forms of notification used to wake people up which are lights, sound and vibration instead of just using sound to wake people up. For instance, the system gradually increases the brightness of a light near the bed at 30 minutes before the alarm set time. The exposure of morning bright light have benefit on people’s health including improved sleep, alertness, and depressive mood, and advancing [6] [7] Theresa L. Shanahan and Charles A. Czeisler, "Physiological effects of light on the human circadian pacemaker," Seminars in Perinatology, vol. 24, no. 4, pp. 299-320, August 2000. R.W. Corbett, B. Middleton, and J. Arendt, "An hour of bright white light in the early morning improves performance and advances sleep and circadian phase during the Antarctic winter," Neuroscience Letters, vol. 525, no. 2, pp. 146-151, September 2012. V Wright, "Domestic and office appliances," Journal of the Royal Society of Medicine, vol. 7, pp. 137-139, February 1978. Milena Bures̆ová, Marta Dvor̆ áková, Petr Zvolsky, and Helena Illnerová, "Early morning bright light phase advances the human circadian pacemaker within one day," Neuroscience Letters, vol. 121, no. 1-2, pp. 47-50, January 1991. Ludmila Samková, Dana Vondrašová, Ivan Hájek, and Helena Illnerová, "A fixed morning awakening coupled with a low intensity light maintains a phase advance of the human circadian system," Neuroscience Letters, vol. 224, no. 1, pp. 21-24, March 1997. S. Leppamaki, T. Partonen, and J. Lonnqvist, "Bright-light exposure combined with physical exercise elevates mood," Journal of Affective Disorders, vol. 72, no. 2, pp. 139-144, November 2002. Andrew Foo Thai Hin and Elmy Johana Mohamad, "The Wireless Notification System for the Hearing Impaired," Sensors & Transducers Journal (S&T e-Digest), vol. 69, pp. 606-614, July 2006. ISBN 978-967-5770-63-0 18