Snore Detector

by remihebbelinck in Circuits > Raspberry Pi

98 Views, 0 Favorites, 0 Comments

Snore Detector

IMG_20240615_154458.jpg

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

IMG_20240609_122848.jpg
IMG_20240609_124328.jpg
IMG_20240609_124910.jpg
IMG_20240609_125114.jpg
IMG_20240609_125233.jpg
IMG_20240609_125204.jpg

List of materials:

Electronic Circuit Online

Schermafbeelding 2024-06-12 155934.png
Schermafbeelding 2024-06-12 155827.png

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

IMG_20240609_123956.jpg
IMG_20240609_124752.jpg
IMG_20240609_124853.jpg
IMG_20240609_125104.jpg
IMG_20240609_125153.jpg
IMG_20240609_125224.jpg
IMG_20240609_125308.jpg
IMG_20240609_125316.jpg

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

Schermafbeelding 2024-06-14 101444.png

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

IMG_20240603_181912.jpg
IMG_20240603_181903.jpg
IMG_20240603_184556.jpg
IMG_20240609_125534.jpg
IMG_20240609_125537.jpg
IMG_20240609_125543.jpg
IMG_20240609_125546.jpg
IMG_20240609_125551.jpg
IMG_20240609_132428.jpg

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