Introduction

Sleep is important, and we all know it. There are many existing products on the market that can assist in your sleep with diverse capabilities and form factors, but they all come at a compromise - smartwatch sleep tracking is bulky and uncomfortable, smart rings serve only as passive trackers, and smart mattresses are exorbitantly expensive.

This is where Silent Night comes in. Our pillow dynamically adjusts to you throughout the night and uses non-intrusive tracking technologies to silently and accurately assess the quality of your sleep.

What does it do?

The Silent Night pillow comes with three force sensors to track your sleep posture. Based on this information, it adjusts the height of different sections of the pillow with servo motors to enhance your comfort. The pillow also comes equipped with temperature, humidity, and light sensors so that it's aware of any environmental disruptions throughout the night.

Airway collapse (and therein snoring) often occurs when lying down face-up, so we built the servo interaction to suggest the user to sleep on their sides more often. With a built-in microphone, it detects when you are snoring and will change the shape of the pillow to suggest a better-supported sleeping position.

Finally, in the morning, Silent Night provides you with a summary of your sleep quality, giving you insights into your health and full control over your personal data.

How we built it

The UI was built on Figma and then with HTML, CSS, and Javascript. On the hardware side, we used an ESP32 WROOM 32 module for obtaining sensor data and sending the packaged data as a JSON to a web server. The coding was done in Arduino, taking input from a DHT11 temperature humidity sensor, an electret microphone sensor, three force sensing resistors, and a photoresistor, all wired on a breadboard.

Challenges we ran into

On the hardware side, we encountered several challenges:

  • After connecting to WiFi, we received no data, which was resolved by moving all input pins from ADC2 to ADC1 because all of ADC2 gets used by WiFi.
  • The force sensors were not reading workable data until we learned about voltage division and used that resistance information to convert it to workable data.
  • Setting up the WiFi network was problematic as we couldn't use eduroam; we ended up using a personal hotspot and configured it to connect to the ESP32.
  • We received DMT input as NaN, which was resolved by setting up a catch clause to output previous results if caught.

We also navigated the learning curve of how to code all those sensors in Arduino, send data from the ESP32 to a webserver through WiFi, and package the data in JSON.

On the UI side, converting a complex UI dashboard and integrating it with chart.js was quite difficult. Although we tried to make it work for our live demo, we had to use a backup version of our dashboard instead.

Accomplishments that we're proud of

We managed to create a fully functional prototype of our idea in 24 hrs, including a hardware and software component. By committing to our idea early on and playing to our strengths, we were able to contribute the most where it mattered, resulting in a project that we are all really proud of.

What we learned

We gained hands-on experience in integrating various sensors with an ESP32 module, coding in Arduino, and overcoming the challenges of wireless communication and data handling between hardware components and a web server.

What's next for Silent Night

We'd like to implement an AI-based system that activates the panels only when the user's snoring sound is detected. Along with this, we'd like to reduce the amount of electronics in the pillow and swap it out with inflatable air packets to increase comfort and remove worries of electromagnetic radiation near the head.

Sources

https://www.nhlbi.nih.gov/health/sleep-deprivation#:~:text=According%20to%20the%20Centers%20for,at%20least%20once%20a%20month.

Share this project:

Updates