Inspiration
Sleep deprivation or unhealthy sleep habits, such as staying up late, is a problem that affects many college students. Inspired by the challenge that college students often face of developing a healthy sleep schedule, we set out to create a device that would help people and their friends hold each other accountable for meeting sleep goals while having fun. Our device is a smart alarm clock – with a twist. If you’re able to meet your goals, you’ll be able to send a fun wakeup alarm message to your friend, which is a pretty sweet reward! Our hope is that this is able to help people build stronger bonds with their friends while helping them improve their sleep schedules.
What it does
Our alarm clock allows you to record a message to your friend and let them hear it when they wake up. First, you and your friend will set your sleep goals and sleep schedules on a web portal. Then, you will be able to use the alarm clock to record messages to each other. Finally, if you are able to go to sleep by the pre-set time, noted by the lights turning off in the room, the message will play on your friend’s device as their wake up alarm ringtone.
How we built it
We used an ESP32 microcontroller. We added a microphone to record sound, a speaker to playback sounds, as well as an amplifier to amplify the output from the microphone to be loud enough to play on a larger speaker. We also added a photoresistor to detect changes in light, which we used as a mechanism to activate the alarm clock. We also have a few indicator lights to show when the device is activated and buttons to start/stop the recording.
Challenges we encountered
The most challenging part of the project was interfacing the microphone and speaker, both of which are fairly complex I/O devices. One of our initial problems was how to take the data we received from the microphone and send it to our web server, which would have to store the data. At first, we considered writing the data all to internal memory, then sending the file all at once. However, that would be slow and take a lot of time, so instead we decided to stream the data over a web socket connection. We also faced some challenges with processing the data into a useable form, as the microphone seemed to have a limited output range, but we were able to solve that problem with normalization.
Accomplishments we’re proud of
Most of the people on our team had never worked with an ESP32 prior to the event, so we’re really proud of what we were able to accomplish in such a short amount of time. In addition, no one on our team had ever worked with the language Rust before, so building a backend with Rust was also really cool to make happen.
Lessons learned
Through this project, we learned a lot about how to read data from a microphone, how to play sound over the speaker, how to send data across web sockets, as well as how to process, format, and batch data efficiently for transmission.
What now?
In the future, we hope to flesh out the prototype more, including adding a second device to fully test the sending and receiving functionality. Due to the short length of the hackathon, we were unable to implement some of our original ideas, such as a streaks tracker or an added phone lock box mechanism. However, these are all ideas we could implement in the future.
Log in or sign up for Devpost to join the conversation.