Sound record and snoring measurement : need help :)

Hello everyone,

I am a medical student and I work on sleep apnea and snoring, I try to record a patient's snoring during the night, but not the other sounds (ambient noise, discussions ...) , using the arduino. The device would be placed next to the bed and snoring were recorded on an SD card.

The analysis of snoring would be via csv files (snoring No. X, hours of snoring). Thus, for each night, it would be possible to draw a diagram of phases of snoring (snore/time) and compare it before and after treatment.

I searched how to record sound using the Arduino, but I'm stuck on sound analysis and processing in data: /

Do you have any ideas / tutorials / sites to offer me?

Thank you very much :)


Bonjour tout le monde,

Je suis étudiant en médecine et je travaille sur l'apnée du sommeil et le ronflement, je cherche à enregistrer le ronflement d'un patient au cours de la nuit, sans m'intéresser aux autres bruits (bruit ambiant, discussions...), à l'aide de l'arduino. L'appareil serait placé à côté du lit et les ronflements seraient enregistrés sur une carte SD.

L'analyse des ronflements se ferait via des fichiers de type csv (ronflement n°X, heure du ronflement). Ainsi, pour chaque nuit, il serait possible de tracer un schéma de ses phases de ronflement et de comparer cela avant et après traitement.

J'ai cherché comment enregistrer le son à l'aide de l'arduino, mais je bloque sur l'analyse du son et la transformation en données :/

Avez-vous des idées / des tutoriels / des sites à me proposer ?

Merci beaucoup :)

Hi: I think, you should divide your Project into different phases increasing the complexity as you go. An initial phase could be, performing a quality audio recording which excludes as much noise as possible and then manual post-analysis of the audio signal in a computer using an existing audio software by a trained person and simply visually identifying the snores from the signal graph, measuring the duration, etc and manually input the data into Excel. Performing signal processing for identification and automatic analysis is way more difficult and will require advanced knowledge of mathematics, electronics and coding for which you may consider to team up with students from the EE faculty in a subsequent phase of your Project. Some ideas… The main problem as you mentioned could be separating the snoring sound from the background noise, therefore identifying differences between them may help. One important difference is the direction from which they arrive to a microphone used for detection. The snoring only has one possible direction of incidence, as the person snores only when sleeping in bed, while noise can arrive from any direction. There could be other sounds coming from the person reaching the mic in the same direction as the snoring; but their occurrence tends to be way less frequent and their nature and "behavioral patterns" different. While random noise may have a wide range of freq components; snoring seems to be narrowed banded with emphasis in the lower frequencies and perhaps low mid ones. That needs to be found (I don’t know precisely). This could be distinguished by observing a graph of the audio signal. Another relevant difference is that sounds coming from the person other than snores are perhaps short in duration and isolated, not repetitive in nature as snoring itself. Additionally, there is precise correlation between snoring and respiration, further facilitating identification from the sound graph by a trained eye, as one can predict when in time a snoring event can be expected to have taken place and when not. There is a repetition frequency which does not change abruptly and remains within a certain range. The first step could be separating the sounds depending on their direction of incidence to try to suppress as much noise as possible right there not having to deal with it later on. For that, you can place a highly directional microphone on top of the bed. Perhaps, even better, if it is placed inside some sort of partial anechoic chamber, that is, an open enclosure (some sort of tube) with the opening facing the bed and the bottom the ceiling. This box should be covered on the inside (and outside) with sound absorbent materials to prevent reverberation inside of it and double detection by the mic from the sounds bouncing off its walls or coming from different directions. In other words, any sound entering the box not reaching the mic directly should be absorbed. This in turn increases the directionality of the detection pattern. The output of the mic is sent to an amplifier with a narrow band pass covering the expected range of freq components for an average snore, further reducing noise. The signal then is fed to Arduino for AD conversion and recording. Additional digital filtering and noise reduction can also be done by Arduino. Obviously, performing the test in a specially prepared room with the right reverberation times for the different octaves and where there is no unnecessary noise will help. You can check these subjects for reference: -Ambulatory ECG Recording Systems. (Holter) -Room reverberation times. -Anechoic Chamber. -Directional microphones. -Active band pass filters (with OpAmps) -Mic preamplifier. for later… -Digital noise reduction. -Signal pattern recognition. -FFT. -Signal power spectrum. Hope it helps. Good luck.