Sleep Apnea Tester is a micro-controller project for Computer Programming 2017 with two main objectives are Sleep Apnea surveillance and report abnormal results while sleeping.
Presently, the problem in sleeping was increase and these problems can risk assessment in diseases. Sleep Apnea Tester can solve sleep problem by respiratory rate measure, snore check and others while sleeping with Sound Microphone Detection Module. The result will be saved and can be checking to signify irregularity while sleeping if the irregularity was found while sleeping, the user can consult with paramedic for protecting in long term.
** Sleep Apnea Risk Test Program and Sleep Apnea Board Meter is only predict sleep apnea disease's risk. If you found the high risk, please go to see a doctor! **
- Download and Install Arduino IDE
-
Go to https://www.arduino.cc/ and click on SOFTWARE menu and select DOWNLOADS.
-
Select computer's operating system for coding on Arduino IDE.
-
Click on JUST DOWNLOAD for download program or CONTRIBUTE & DOWNLOAD for donate developer and download program.
-
Unzip the file and run arduino.exe for installation Arduino IDE.
- Setting Arduino IDE
- Go to File >> Preference, it will show preference window.
- Pasted http://arduino.esp8266.com/stable/package_esp8266com_index.json in Additional Boards Manager URLs and click OK.
- Download and Install Driver
- Go to https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.
- Select computer's operating system for download software.
- Install the driver on the computer.
- Download and Install Library
- Go to Sleep-Apnea-Tester >> Library
- Extract all ZIP file.
- Open Arduino IDE and select Sketch >> Include Library >> Add .zip library.
- Select ZIP file and click on "open".
Sleep Apnea Board Meter
- Time Library : https://github.com/PaulStoffregen/Time
- DS1307RTC Library : https://github.com/PaulStoffregen/DS1307RTC
- SD Library
Sleep Apnea Risk Test Program
- <time.h> : time(), localtime()
- <stdlib.h> : system("cls")
Arduino UNO R3 | USB | Jumper | High Sensitive sound Microphone Detection Module |
---|---|---|---|
Data Logger Shield | Breadboard | SD card | Lithium Cell CR122 | Cmd with Gcc |
---|---|---|---|---|
If you don't have GCC compiler yet, you can install this.
MINGW gcc Compiler : https://sourceforge.net/projects/tdm-gcc/
Thanks for "Fritzing", to create the design of arduino boards.
Connection
- Connect Arduino UNO R3 with Data Logger Shield with headers.
- Connect Data Logger Shield's 5v port and GND to Board Bread's pin.
- Connect Sound Microphone Detection's GND port and VCC port to Board Bread's pin for received electric from 5v port.
- Connect Sound Microphone Detection's output port to Data Logger Shield's Digital I/O at D2 and D3 for send output to Data Logger Shield.
Part I: Sleep Apnea Risk Test Program
For check risk to be Sleep Apnea Syndrome apart from "Sleep Apnea Board Meter".
Tips: Disable Avast CyberCapture Completely
You should turn off CyberCapture in your Avast antivirus first, if Avast CyberCapture appear on the screen. You can follow these steps:
- Open Avast user interface and go to settings.
- In the 'General' tab (first item) uncheck 'Enable CyberCapture'.
- Confirm by clicking the 'OK' button.
- Go to Sleep-Apnea-Tester >> breathe.
- Open file Sleep Apnea Risk Test.c and Change Directory to folder that you want to save the result.
- Save file and open the Command Prompt (CMD Commands) and Change Directory to this file then type 'gcc Sleep Apnea Risk Test.c' for compile the code.
- Type 'a' on command for run the program or open file a.exe.
- Let's do this Sleep Apnea Risk Test!
Output on Command Prompt (CMD Commands)
Part II : Sleep Apnea Board Meter
- Go to Sleep-Apnea-Tester >> breathe >> Stop_breath_check.
- Open file Stop_breath_checkand.ino and select Tools >> Board >> 'Arduino/Genuino Uno'.
- Select Serial Port for connect USB.
- Connect USB for start using, the yellow light sensor for nose breath measure and the green light for month breath measure.
- The output will show at the real-time in Serial Monitor. If you already finish, you can immediately shutdown.
- The record will save at OUTPUT.txt on SD Card.
ID | First Name | Surname | GitHub Username | |
---|---|---|---|---|
60070016 | Chaiyapong | Nithipeerawat | @Sullvo1148 | |
60070018 | Thitikorn | Padungwatsawat | @maxlunla | |
60070034 | Thirada | Theethum | @PrintTrd |
Assist.Prof. Dr. Kitsuchart Pasupa | Assist.Prof. Dr. Panwit Tuwanut |
---|---|
Computer Programming 2017
Faculty of Information Technology
King Mongkut's Institute of Technology Ladkrabang