SleepTight: HackOn2.0 Sleep Tracker Arduino Hardware hack - By Sriram and Vijay
An innovative hardware solution to the sleeptracker. Sleep is important for your mental health; but phones are not! :')
- This hardware solution sleep tracker is your go-to as it works without constant need for interaction as with your smartphone apps
- It detects when the user is inside or outside the room via the flex sensor (placed on door so detects accordingly)
- It also detects when the room is dark (lights off) using the photovoltaic cell
- Using these sensors and some creative logic, it detects when the user is asleep based on a pre-determined sleep time and tracks your sleep
Youtube Video: https://youtu.be/_t1lnJx8M5g

The Vision
In today's day-and-age, with the current pandemic circumstances, an electronic gadget is probably more used than some inherent body parts! Why take it to sleep as well? Did you know that smartphone radiation can have serious mental effects?! We'll leave you to research on that but going on to a more proven point, excessive smartphone use ruins your sleep cycle. Each sleep stage plays a part in allowing your mind and body to wake up refreshed. Understanding the sleep cycle also helps explain how certain sleep disorders, including insomnia and obstructive sleep apnea can impact a person's sleep and health. This brings us to the need of this product and why we sought to build it.
Current smartphone sleep tracker apps are really annoying. All of them either lastly, was fun to work with! ¯_(ツ)_/¯
The Stack
This was built using Arduino Uno (C++), Python (Flask), HTML5, CSS3, Javascript (jQuery), and Excel among others. It comes with a dedicated website that shows you the current sleep state and for the more eager user, it also produces a .csv file that can be graphed on Excel to collata sensor data. The website currently is just a prototype due to time constraints but we hope to add some better UI/UX design and aesthetics in the future!
Instructions
Recreate the circuit using:
- the Arduino Uno microcontroller
- Modular Breadboard(s)
- Photovoltaic cell
- Flex sensor
- 3mm LEDs
- Buzzer
- Resistors (10kΩ for flex sensor; 330Ω for everything else)
- and jumper cable They can be connected as shown in the Google Drive link
Install all dependencies (
flask,pyserial,Arduino IDE, etc.)Connect USB from microcontroller to PC and upload Arduino code
Run the Flask application making sure to update the
.envto correctARDUINO_PORT
The Team
Sriram N. V. and Vijay Anantha Padmanabhan are glad to have been able to work on this and hope you like it! ❤
Built With
- batchfile
- c++
- css
- html
- javascript
- powershell
- python
Log in or sign up for Devpost to join the conversation.