Snore Detector
Hello, this is the documentation of a device (smart snore detector) that is going to detect at night when you have snored. If you start snoring loudly, an alarm will go off. The alarm consists of a vibrating motor that will go off to alert the person. It is designed for people who snore and want to know how much they actually snore and stop bothering their partner with it. Temperature and humidity are also measured. You have to report, using a badge system, when you actually go to sleep and when you are awake. This records the duration of your sleep. These factors allow the user to come to a solution to snore less, such as sleeping in a cooler room. Room temperature, humidity, duration of sleep and number of minutes/hours of snoring will appear on the responsive webapp.
Supplies
List of materials:
- Raspberry Pi + power supply
- Network cable
- T-piece + connection
- Breadboard
- Breadboard power supply
- LCD screen
- Decibel sensor (https://pcbartists.com/product/i2c-decibel-sound-level-meter-module/)
- BME280 (temperature/humidity sensor)
- 2 buttons
- Vibration motor
- RFID scanner + badge
- Potentiometer
- 44 jumper wires
Electronic Circuit Online
This is the circuit made with fritzing. Everything is connected to 3.3V except the LCD dispaly and the potentionmeter to 5v.
Electronic Circuit Physical
In this step, you start connecting everything one at a time. Use the schematic to verify that everything is connected properly. Also be sure to check that the two grounds are connected.
Create Database
To store all the data I have created a database in MySQL.
I am going to track data for each user and they have a unique RFID. Each user is linked to a night in the table 'night', keeping track of when the person goes to sleep and gets up, so that the total duration of the night can be calculated. Each night is linked to a history table. This table tracks the value of the sensors/actuators by time of day. These are all linked to a table 'device' and a table 'action'. The 'action' table tracks what the sensor/actuator will do. For example, the BME280 can measure temperature or measure humidity, so this shows what it will do. The table 'device' contains information about the sensor/actuator itself, such as name, brand, price and unit of measurement.
Coding
I wrote backend and frontend code for this project. Here is the link to my github for more info.https://github.com/howest-mct/2023-2024-projectone-mct-hebbelinckremi
Housing Create
For the housing I used an old wine box. First I made a sketch with the correct dimensions. Then you can start drilling the holes in the right places. Once the holes are drilled, you can paint the housing in a color of your choice. Once the paint is dry, you can attach the components (two buttons, an LCD and an RFID reader) with small screws so they stay in place.
User Procedure
To use the device properly, here is a procedure explanation. When the person goes to sleep, he must sign in with the badge. From then on, the temperature, humidity and decibels are measured. When the person exceeds the value of the set alarm, the alarm goes off to alert the person that he is snoring. Once the person is awake, he logs off again with the badge and the night is over. The person can now view his data from the last night on the website.
See link of sample video here: https://youtu.be/JzleuXR6SsI