Snoring stressMany people snore and many don't mind. However, there are also many people that are kept awake by snoring bed partners or roommates. This project is for them.
The problem when trying to fall asleep in the same room as a snorer is that focussing on the snoring may result in stress, and stress keeps you awake. Kicking, slapping, pushing or shoving the snorer doesn't always help but will increase the stress, and make it even more difficult to fall asleep.
Enter the Snore ShieldThe device presented here produces pleasant noise for the non-snorer to listen to and relax with. The device also listens for snores. When it detects snoring it increases the volume of the relaxing sound to cover the snoring. After five minutes -- supposed to be enough for either the snoring to end or for the non-snorer to fall asleep -- the sound level decreases, completing a cycle, and snore detection starts again.
Relaxing soundThe noise of the sea and the wind through the trees are considered relaxing sounds by many people. The Snore Shield therefore produces white noise (with adjustable colouring), which is close to these sounds. Those who prefer other sounds like running water of relaxing music can connect an MP3 player module.
It started as an Android appThe snore shield is based on the Android application SleepSation (no, no typos here; available in the Google Play store). Because this app runs on a mobile phone (or tablet) it is necessary to keep a phone next to your bed. Unfortunately, a lot of people don't want a mobile phone next to their pillow, which is why the developers of the app asked us to design a smartphone-free device.
- Two snore detection modes
- Electret microphone
- Headphone output
- OLED I2C graphical display
- Two pushbuttons
- Volume potentiometer
- Noise colour potentiometer
- Compatible with Grove MP3 player module
- 9-12 VDC input voltage (or 5V USB powerbank, see below)
The Snore Shield is Arduino-shield compatible and plugs on an Arduino, preferably a Uno (to keep it small), but other types should work too.
A word about power suppliesA typical stand-alone Arduino application would be powered from a phone charger. Unfortunately these chargers are very noisy and they have a bad influence on the quality of the relaxing noise produced by the Snore Shield. It is therefore highly recommended to power the device from an old-school 9 VDC (12 VDC max) wall wart, but a USB powerbank should be fine too. Once more, do not use a phone charger (or PC USB port).
Use a high-quality loudspeakerIt is important that the relaxing sound is relaxing, so connect a proper sound system. A crappy loudspeaker will produce annoying sound, defeating the purpose of the system. Please read the paragraph about the power supply below very carefully. A volume control and noise colour control are available to adjust the sound.
Two modesThe device has two operating modes:
- continuous sound;
- snore-controlled sound.
Keeping S2 pressed for one second will toggle the noise type. (This will also toggle the operating mode.)
Keeping S2 pressed for two seconds will restore the factory default settings.
Pressing pushbuton S1 will cancel snore detection when snoring was detected and the sound level will return to its default level (off or low, depending on the operating mode). Pressing it when idle will force a snore detection, making the sound level increase to snore-covering level.
The displayA display is practical for user interaction, but at the moment it isn't very helpfull. It was added because the SoundSation app has a number of timer and recording options that were not (yet?) ported to the Snore Shield.
On the first line it shows the device's name (in case you forgot it) and firmware version; on the second is the Elektor project number.
The third line shows sound statistics (detection threshold and ambient sound level in dB) and the sound level (as a percentage). After the percentage is the mode: '0' for continuous sound or '1' for snore-controlled sound. At the end the noise type is indicated with a '0' or a '1'.
Finally, the fourth line shows snore detection status with a bunch of numbers counting up, down and around. When the last number counts up to three the system will enter snore-covering sound mode. Snore detection stops and these numbers freeze for five minutes. The volume level on line three will slowly increase to a higher percentage.
The display switches off after 30 seconds of pushbutton inactivity. Pushing S1 or S2 will switch it back on. When the display is off and S2 is pressed, the operating mode is not changed. Display on or off does not influence the way S1 functions.
Snore detectionThe Snore Shield continuously tracks the ambient sound level. Under normal sleeping conditions this level is low. Snoring will increase the average sound level, but so will other sound sources like moving in bed or a passing car. Detecting snoring therefore is a bit more complicated than simply comparing the current sound level to a running average.
The Snore Shield requires three snores in a row, where a snore is defined as a short (up to about three seconds) loud sound followed by a period of silence from five to ten seconds. Of course, false detections cannot be excluded and sounds with similar characteristics may trigger the device too, f.i. three coughs in a (slow) row.