You are on page 1of 7

Electronic Snoring Treatment Device

Norafiza bt. Mohd Isa1, Masnani bt. Mohamed 2


Faculty of Electrical and Electronic Engineering Universiti Tun Hussein Onn Malaysia, 86400 Parit Raja, Batu Pahat, Johor fizza_gurl88@yahoo.com 1, masnani@uthm.edu.my 2
Abstract-Snoring is one of the sleep disorders that occur due to obstructed air movement during breathing while sleeping. Majority people suffering from this condition are unable to breath properly during sleep. The Electronic Treatment Device introduces a system that detects snore sound and helps the snorer in order to breathe properly during sleep. The objectives of this project are to design a circuit that can detect the snore sound and to design a treatment device that is able to correct the sleeping posture of snorer. The input of this device is a snore detector circuit which will capture the snore sound and a pillow as an actuator to interface between devices circuit and snorer. The PIC 16F877A is used as the controller and as a brain of the system. MPLAB IDE v8.00 and Proteus 7 Professional are used in designing application software and helps more in designing and troubleshooting the operations of the circuit.

a precision rectifier. The DC component will present for a few seconds to activate the delay circuit. This delay circuit used as a level shifter and compares the charge on capacitor to its reference input set by the threshold control. A comparator was added at the end of detector circuit as a voltage reference input to the microcontroller. For the software part, the MPLAB IDE version 8.43 is used in designing the source code for microcontroller. Besides that, Proteus 7 Professional is used to create and test the functional circuit. II. THEORIES APPLIED

I.

INTRODUCTION

A. Overview This project is mainly to create a snoring treatment device. This device is able to capture the snore sound and corrects the sleeping posture of snorer by using a pillow. Nasal deviation and nasal blockage were found to be strong predictors of snoring among children. This nasal blockage can contribute to poor nasal airflow into the lungs and can in turn set the soft tissues of the palate (roof of the mouth) and throat vibrating. These vibrations cause the loud fluttering noise of snoring Therefore, through this project, the pillow will be used to adjust the body posture without waking up the snorer from sleep. By sleeping on the back, this pillow will alter the angle of the neck. These positions helps to open up airway, and expand the lungs thus reduce the snore sound. B. Objectives The objectives of this project are to construct a snore detector circuit that are able to detect and capture the snore sound. Besides that, this project is aimed to design a device that could be used to treat snorer to reduce their snore. C. Project Scope This part consists of hardware and software. For the hardware part, electeret condenser microphone is used to capture the snore signal. A low pass filter and an amplifier are built to filter out some high frequency noises and amplify the signal. Then this signal is converted to direct current (DC) by

A. Snorer Generally, snoring is sleep disorder that occurs due to obstructed air movement during breathing while sleeping. During sleep, muscles and soft tissue in the throat and mouth relax making the breathing airway become smaller. Decrease in the airway space will increases the velocity of air flowing through the airway during breathing. As the velocity of required air increased in the constricted space, soft tissue like the soft palate and uvula vibrate. These vibrations of the soft tissues in the mouth and throat result the snoring sound [2]. B. Sleeping posture There are three types of common sleeping posture which are sleeping on one side, sleeping on the back and sleeping on the stomach. Through this project, the snore sound could be reduced by placing constant stress on the upper back and neck. The neck of snorer will be directly made contact with the pillow and it will be elevated at certain angle from the horizontal hence, the snore will reduced [3]. The Fig.1 below shows the common sleeping posture.

Figure 1. The common sleeping posture

D. Latex pillow Latex Support Pillow with Head to Side Roller was designed to reduce snoring. It should place on the bad and the user needs to pay attention to the neck position. Moreover, the user may inflate Head to Side Roller before the first used (pump up to 20 times by using the pump ball) [5]. III. . METHODOLOGY

A. Project Overview The project involves both hardware and software. In the hardware part, the snore detector circuit has been designed to capture the snore signal and the pillow was used as the actuator for this device. While, the microcontroller PIC 16F877A was used as the controller and as a brain of the system. MPLAB IDE version 8.43 was used in designing the application programming of this device. The snore detector circuit consists of electrets condenser microphone, low pass filter, amplifier, and delay circuit. Besides that, the voltage comparator circuit was added at the end of the detector circuit. Overall, the snore detector circuit operates in positive 9 volts and negative 9 volts voltage supply from battery. The output circuit consists of solenoid valve to allow air to flow from the pump to the pillow. The solenoid valve was supplied by 12 volts direct current voltage source (VDC) and 1 ampere (A) operating current from an adaptor. While, the air pump needs 240 volts alternating current voltage source (VAC) and 10A operating current from the socket outlet. Moreover, the interfacing devices which are voltage comparator circuit and microcontroller PIC 16F877A required 5 VDC supplied from the voltage regulator circuit. B. Hardware development The hardware circuit can be divided into input part and output part. The input part is a detector which performs the task of detecting the snore sound whereas the output part is concentrating on activates the relay circuit to control open and close of solenoid valve. The Fig. 2 shows the block diagram of the device.
Snore sound signal (analog input) Pillow Delay-on circuit Filter out background noise (>1kHz) Amplify signal

A small electrets condenser microphone acted as an input transducer which will sense the snore sound signal. Electrets condenser microphone type, ABM-710-RC is used due to its characteristic. This microphone could capture the signal frequency from 50 Hz to 16 kHz. Due to this characteristic, it is suitable to be used to detect the snore sound with the frequency below 1 kHz. The snore signal will be filtered through the low pass filter which only passed 1103 Hertz and below signals frequency. The snore signal acquired is then passed through the amplifier with feedback which amplifies and stabilizes the signals and removed the unwanted background noises. The calculated gain in this amplifier stage is 47 times. These low pass filter and amplifier are built using the operational amplifier (op amp). The Fig. 3 shows the snore detector circuit which the input circuit to the microcontroller and Fig.4 is the electrets condenser microphone that has been used in this project. The amplified snore signal is then converted to direct current (DC) signal by a precision rectifier formed by another op-amp. The DC component is then filtered again and must be present for a few seconds to activate the delay circuit. The delay circuit uses an op-amp as a level shifter and compares the charge on capacitor to its reference input set by the threshold control. Once the threshold is reached, this amplified signal will be digitized through the Analog to Digital Conversion (ADC). The output voltage from the delay circuit will be changed when the charge on the capacitor was reached the reference input. This output voltage will pass through voltage comparator circuit before digitized by the microcontroller. The voltage comparator compares the voltage applied to one input to the voltage applied at the other input. Any difference between the voltages drives the op-amp output into either a positive or a negative supply voltage. The process of ADC will be done internally by Programmable Integrated Circuit (PIC). The microcontroller PIC 16F877A has been chosen as the systems controller which able to digitized signal and activate the actuator device. The actuator device contains a relay, solenoid valve, pillow and air pump.

Solenoid valve

PIC 16F877A (ADC conversion)

Voltage comparator

Air pump Figure 2. Block diagram of the devices system

Figure 3. Circuit of filter and amplifier stage

Figure 6. Relay circuit schematic

Figure 4. Cermet condenser microphone

The output circuit consists of a relay circuit with solenoid valve and the pillow that used to alter the snorer neck. The open/close operation of solenoid valve was controlled by the microcontroller. When the solenoid valve was supplied by 12 VDC and 1 A from the voltage source, it will be opened and allow the air from the pump to flow into the pillow. Besides, when there was no voltage source to the valve, it will be closed. The Fig. 5 shows the solenoid valve that has been chosen for this application. 12V single pole double throw (SPDT) relay was used to interface the microcontroller with solenoid valve. The Fig. 6 shows the schematic circuit for the relay. From the figure, pin1, 2, and 3 are an SPDT switch controlled by the electromagnet. The electricity is applied to pin4 and pin5, the electromagnet acts upon the SPDT switch so that the pin3 and pin1 are connected. When the electricity is disconnected, then the pin2 and pin1 are connected. Pin4 of the SPDT relay connect to 12 Vcc, pin5 connect to NPN transistor, and pin1 and pin3 connect to the output device which is the solenoid valve. Relay circuit used the transistor because the current from the microcontroller is not enough to trigger on the relay, hence the transistor act as current amplifier that will gain the current from the microcontroller.

C. Software Implementation In this project, the Proteus 7 Professional was used to design the circuit that involved in this project. It is necessary to develop and test such designs before a physical prototype is constructed. The source code for the microcontroller has been built using the MPLAB software. This source code will be downloaded into the microcontroller. This project used PICkit 2 v2.55 software to download the hex file project into the PIC 16F877A. The Fig. 7 shows the operation of the systems flow chat and Fig. 8 is the schematic circuit of the Electronic Snoring Treatment Device. The system starts with the detection of snore sound by electrets condenser microphone. In this system, the air pump is always ON and needs the power supply from socket outlet. The output voltage from the input circuit will be digitalized by the microcontroller and then control the operation of the valve. When the microcontroller read HIGH voltage from the analog input pin, the solenoid valve will be ON and allows the air to flow into the pillow. The time delay for the valve to open was set in the programs. The valve is opened until the pillows elevate the neck of the snorer to certain degree. Then the valve is OFF. If the microcontroller read LOW voltage from the analog input pin, the solenoid valve will be OFF.
START

READ output voltage (Vout): Detect snore signal

IF Vout==0V

NO

IF Vout>0V

Figure 5. Solenoid valve.

YES

Solenoid valve=OPEN LED=ON

Solenoid valve=CLOSE LED=OFF

DELAY

Solenoid valve=CLOSE LED=OFF END

Figure 7. The system flow chart

Figure 8. The schematic circuit of Electronic Treatment Device for Children

The snore detector circuit used comparator LM324 (low power quad operational amplifiers). If the snore detector senses the snore signal and the value of voltage charged on C8 is equal to the reference input at 1C3, then the voltage output from LM324 to the PIC is about 3.7V. While, if the snore detector do not detect snore signal then the voltage from LM324 to the PIC is 0V. From the analysis there are two different voltages, 3.8V and 0V. The microcontroller was programmed based on this analysis. When the microcontroller sense 0V from the output of snore detector circuit, the microcontroller output that control relay valve will not trigger hence the solenoid valve will OFF. Besides that, when the microcontroller sense value other then 0V from the output of snore detector circuit, the microcontroller will trigger hence the solenoid valve will ON. Based on Fig.8, the snore detector circuit is connected to PORTA (RAI) as the input to the microcontroller. PORTA function as an analog digital converter that will convert analog signal to digital signal before it can be process by the microcontroller. RA3 is used as a voltage reference for analog to digital converter which is used to get full scale value for the input. While, PORTB (RB2) is connected to LED valve and RB5 is connected to relay solenoid valve. IV. A. RESULTS AND ANALYSIS

8, the amplifier and low pass filter around the op-amp circuit of IC1 are responsible to filter out high frequency noises by reducing the amplitude of frequencies higher than the frequency response limit of the system. It will only allow the signal of low frequency signal. The precisions rectifier was made by op-amp IC2 converts the amplified snore sound to DC and then this signal will be filtered again. This should go for a few seconds so the delay circuit will be activated. Operational amplifier IC3 comprises the delay circuit and functions as a level shifter by comparing the reference input set by the variable resistor VR2 to the charge on capacitor C8. The solenoid valve will be triggered upon reaching the value of reference input. The PIC 16F877A controlled the open /closed operations of solenoid valve. The snore signal was received by the electrets condenser microphone (ECM) followed by the amplification from the opamp 1C1. This amplification will reduce high frequency gain and acting as a low pass filter. The gain at low frequencies is inversely proportional as the frequency rise above 1 kHz and the level of the signal is controlled by variable resistor VR1. The Fig. 9 shows the output response from the microphone. From the observation, the signal was very low and need to be amplified. The Fig.10 was the response of this output signal after passed the amplifier stage. While, the table 1 shows the voltage of input signal before and after passed the amplification stage.

Figure 9: output response from microphone

Simulation and experimental results Generally, this circuit may be divided into five portions which using the low pass filter, precisions rectifier, delay-on circuit, microcontroller and solenoid valve. An electrets condenser microphone functions as the input transducer. Low analog signal was produced from the output of the microphone and this signal need to be amplified. The snore detector circuit used three Integrated Chip (IC) LM 741 and they are label as IC1, IC2 and IC3. Based on Fig.

Figure 10: microphone output response after amplification

TABLE 1 THE OUTPUT VOLTAGE OF INPU SIGNAL Before amplify (mVp-p) 340 After amplify (Vp-p) 2.04

low output. Fig. 15 shows that the LED2 (green LED) flashed when C8 have a voltage charge equal to the pin 3 of IC3.

Furthermore, the op-amp 1C2 converted the audio signal into DC and functions as a precision rectifier to boost the signal levels by having a gain ratio of R6/R5. The feedback loop contains the diode 1N4148 that is accountable for producing a positive rectified signal from the conversion of audio signal. The Fig.11 shows the response at this stage. The non-inverting input of op-amps IC1 and IC2 is biased by R4, R8 and C6 to half of the supply voltage. The visual indications of peak levels will be supplied by LED1 by showing a flash instead of continuous illumination. These peak signals are fed by C5 and R7 to the LED1. The flashing of LED1 by each snore is modified by VR1. Furthermore, the op-amp 1C2 will converts the audio signal into DC and functions as a precision rectifier to boost the signal levels by having a gain ratio of R6/R5. The feedback loop contains the diode 1N4148 that is accountable for producing a positive rectified signal from the conversion of audio signal. The non-inverting input of op-amps IC1 and IC2 is biased by R4, R8 and C6 to half of the supply voltage. The visual indications of peak levels will be supplied by LED1 by showing a flash instead of continuous illumination. These peak signals are fed by C5 and R7 to the LED1. The flashing of LED1 by each snore is modified by VR1. The Fig.11 shows the output response of rectification stage at IC2. The device will not be triggered with any form of background noise since there has a delay-on circuit. It will only trigger after the snoring is started. The need for an input delay is important so the device will not set off in the middle of the night with a car door opening or a car horn. Moreover, R12 and C8 provide the input delay. It will start to charge slowly when using the half wave rectified signal from IC2. C8 will not charge without any signal and it will be discharge via R11 and R12. Further rectification of input signal was provided by the combination of R9, R10 and D3 and causing 1N4148 diode D2 to conduct with a little forward bias. This will also cause C8 to pre charge even without a signal. The Fig. 12 shows the pre charged voltage at C8 without snore sound. From the observation, the output of delay stage at IC3 was dropped from high value to low value when the value of charged voltage at C8 was equal to or higher than the voltage of reference input. These output voltage have been measured by using multimeter. The Fig. 13 and Fig. 14 show the output voltage that have been measured at IC3 before and after the value of voltage charged at C8 equal or higher than the voltage of reference input. Op-amp IC3 functions as a level detector and also provides the delay while the reference input is controlled by VR2 for the capacitor C8 to have a voltage charge equal to the pin 3 of the op-amp. LED2 will indicate the triggering of the circuit for this event, which will cause the normally high IC3 to change to

Figure 11:Output response of rectification

Figure 12. Pre charged voltage at C8 without snore sound.

Figure 13. The output voltage of IC3 before trigger

Based on the introduction of this project, the objective of this project was to build a prototype of Electronic Snoring Treatment Device that can sense and capture the snore sound hence control the operations of a solenoid valve. The prototype system used a pillow to interface with the snorer. This pillow could be used to reduce snore sound by elevating the snorers neck.

Figure 14. The output voltage of IC3 after trigger

Figure 15. LED2 indicator after trigger

B. Analysis When the reset switch was pressed, the PIC reads 5 volts and the PIC turned ON while when it is open it reads 0 volts and LED turned OFF. Initially, the reference input at IC3 has been set to 4.5 V. The micophone was placed near to the snore sound. The capacitor C8 was pre charged about 0.49V. When the microphone sensed the snore sound, LED1 was flashed due to the peak signal of snore sound. These signals slowly charged the capacitor C8. When C8 have a voltage charge equal to the voltage at pin 3 of IC3, the PIC triggered the relay valve thus the solenoid valve switched ON. Hence, the air pump was able to pump the pillow. The solenoid valve stays open until the pillow was filled with air. Fig. 16 shows the output product that has been designed.

Figure 16. Electronic Snoring Treatment Device.

V. CONCLUSION AND RECOMMENDATION A. Conclusion

The advantage of this system is the snore detector circuit was created with delay on circuit. If there was no delay circuit, then the circuit would be set off by any background noise. Thus a car horn, or a car door opening in the middle f the night could interrupt the operation of detector circuit, hence he need for an input delay. Furthermore, this device can reduce the snore sound without waked up the snorer from sleep. Moreover, this project was low cost project because the components and materials used very cheap and easy to find in the market. Therefore, this system is suitable to be used by the snorer because this device is easy to use and user friendly B. Recommendation This project can be upgraded for more efficient performance. Due to the technology, this snore treatment device should be upgraded to more function rather than before. A few recommendations for upgrading this project are adding up the vibrator or alarm to alert the snorer if the detected snore sound is too serious and to avoid the air blocked in the snorer lung. Besides, change the pillow to another device such as a bad that could change the sleeping posture of the snorer to reduce or totally stop the snore during sleep. V. ACKNOWLEDGMENT

The author would like to thank Ms.Masnani bt. Mohamed for providing as much valuable knowledge and continuous guidance towards the completion of this project. The author gratefully acknowledged the staffs in the Medical Electronic Laboratory as well as Project Laboratory, UTHM for their valuable contributions towards the success of this work. REFERENCES
[1] Haran, C (2010). What Causes Snoring in Children?. Retrived July 27, 2010, from http://preventdisease.com/news/articles/what_causes_snoring_in_childre n.shtml [2] Guiseppe, M. C., F. Francesco, & Agabiti, N. (2001). Snoring in 9-to-15 Year-Old Children: Risk Factors and Clinical Relevance. Official Journal of The American Academy of Pediatrics, 108(5), 1149-1154. Retrived July 20, 2010, from IEEE Xplore. [3] Patlak, M (2005). Your Guide TO Healty Sleep. Retrived on October 9, 2010, from http://www.nhlbi.nih.gov/health/public/sleep/healthysleepfs.pdf [4] Hon Jian Technology (2007). Smart Anti-snore Pillow. Retrived on August 2,2010, from http://www.hong-jian.com.tw/en/products.html [5] Ursula Hitzel Agentur Fur Online-Dienste Online http://www.hitzel.com/thomsen/snore.htm Accessed on 11th October 2010. [6] Suryawanshi, S. & Zende, A. (2010). Electronically Operated AntiSnoring Pillow. Second International Conference on Computer Engineering and Applications, 0(0). Retrieved July 20, 2010, from doi: 10.1109/ICCEA.2010.283 [7] Schiffert Health Center (2010). Neck Pain Retrived on October 9,2010, from IEEE Xplore [8] Chakravarthy, S. R. & Kuo, S. M. (2006). Application of Active Noise Control for Reducing Snore. Retrived July 20, 2010, from IEEE Xplore

You might also like