Alex demonstrates the Stay-Awake Hat by posing as a sleepy, behind-the-wheel driver. As the driver slowly begins to tilt his head, the Stay-Awake Hat sounds a high-pitch buzz and jolts the driver awake!
Design-Build Team: Kayla Guzovsky, Alex Jacobs, and Jay Rodman For our project in this studio we wanted to build a device that would prevent people from falling asleep during long car rides. We first wanted to make glasses that would track eye movement, but finally decided on a hat that would respond to the tilt of ones head. Our final project was an MIT hat that had an Arduino unit, an accelerometer, a LilyPad buzzer, and a nine-volt battery attached to it. The Arduino was programmed to get information from the accelerometer about the tilt of a persons head and decide if the tilt implied that a person was sleeping. If the serial monitor registers that the numbers are above a preset number, the buzzer will turn on. In order for the buzzer to turn off, the person must tilt their head back up past another preset number. For this to happen in our coding we had to use flags so that we could have the hysteresis; otherwise the buzzer would turn on and off based on one threshold. Programming the buzzer also took some work. When we first attached it to the Arduino unit, the tone was very low and not very loud. We had to change the delay to adjust the frequency of the buzzer so that it would be higher pitched and louder. This worked, but it still was not the exact sound we wanted. To make it even louder, we put the buzzer code in a 4-loop. This made the buzzer even louder and gave it a better tone. The hardest ascpect of this project was getting all of the code to work together and using the space on the hat most effectively. The code was probably the biggest part of this project. Getting all the correct numbers and getting the buzzer to work with the accelerometer was the most time-consuming aspect of the project. Also there wasnt a lot of space on the hat, but a lot of wires. Finally, we made the hat powered by a nine-volt battery instead of needing the computer to power it. In the end, our project came out really well. We were able to make it work just how we had imagined it. Future steps would be to try and design the hat with the Arduino unit for a nicer look and to improve the comfort of it.