JOLT
Hannah Park
Hannah Park
Overhead view of the Jolt headband. The headband consists of two layers of elastic cloth sewn together in the front to prevent contact with hardware, as well as one strip of elastic cloth in the back for easy adjustment. The brown indicates the front and the switch sits on the left side of the head.
This assistive device is a headband that is designed to keep myself awake during class and lectures. By tracking its orientation, the headband can sense when my head is out of alignment, indicating that I am nodding off and drifting to sleep. Once my head is too far off a straight forward-looking position, the headband will buzz and emit a high noise to wake me up, providing the jolt I need to pay attention in class or focus on my work.
3/4 view of the headband on the user. The headband sits comfortably without slipping down, as it was sewn for my head.
Side profile of the headband on the user.
Top view of headband showcasing the on/off switch.
Closeup of the stitching on the headband. The headband consists of two layers of two headbands stitched together in order to provide comfort to the user.
All of the components are soldered on in order to ensure parts won't be impacted by rough movement from the user. Showcased are 3 axis accelerometer, the voltage regulator used to regulate power from the battery, and the wiring of the battery.
In this video, I demonstrate the intended usage of the Jolt headband in a classroom environment. The device does not work due to hardware malfunctions and improper wiring, and so narration is accompanied to indicate what is supposed to occur. In this video, the headband is turned off.
Transcript:
In a resting position detailed as the headband facing straight forward, the headband remains silent. When rotational motion is detected, the headband will first buzz, then beep loudly, jolting the user awake.
In this similar video, the same motion is replicated but with the headband turned on. While the buzzing and beeping is intended to only occur when the head is detected to be out of alignment, faulty wiring makes it so that the waking up mechanism is constantly on and not sensitive to the rotation of the head.
In the early stage of wiring I used an Arduino Uno to test code and the wiring of components on breadboards rather than soldered parts. Initially, the buzzer would not work properly. After further examination, I learned this was because I was using an incorrect library and code to activate it.
I tested out the Ardunio Micro Pro in order to make the headband smaller and lighter. Also featured is the 3 axis accelerometer and the buzzer. At this point I felt that everything was very straightforward as it simply required the wiring of a few parts. At this point the device was functioning as needed: changes to the accelerometer's rotational position resulted in the motors and buzzers activating appropriately.
After testing multiple power sources such as a single cell battery, 9V battery, and four 1.5V battery holder, I decided to use the double cell 6V battery due to it's light weight and simple wiring. Unfortunately, using a 6V power supply led to the majority of the issues I experienced during the project.
I experienced trouble with the device not being activated despite power going through it. I initially thought it was due to the many outputs demanding power, such as the buzzers and the motors, and used a transistor in order to provide more power to the components.
After talking with Zach, I realized the issue was the opposite: the 6V was providing too much power to the accelerometer, messing up the readings of the rotational position and causing constant noise. As a result I switched to using a voltage regulator to bring down the 6V to 5V. However, after this did not work I elected to simply use my computer as the main power source for the headband.
In order to create the headband, I stitched two headbands together in order to create a double layer. The inside layer had several holes to make room for the switch and so that the motors were at my temples. This ensured that my forehead was protected from the exposed wires of the hardware while allowing me to feel the force of the motors.
The small size of the pancake vibration motor wires meant that the wires kept breaking, which occurred a total of four times between three different motors.
While finishing the rest of the project the Arduino Micro port to the computer broke off, meaning I had to utilize the battery in the headband for the demonstration.
I first wired the device using breadboards and the Arduino Uno, all parts I was most comfortable with, eventually moving to the Ardunio Micro Pro. I initially believed the greatest struggle of the project would be getting the parts to fit within a headband and having it's weight supported by the headband. However, I found I greatly overestimated this issue and it was not a problem.
The confined nature of the headband meant that any issues with the wiring once the headband was sewn would have to be fixed by taking apart the entire headband. There were multiple instances of parts breaking or the headband ceasing to work, at which I had to cut open the headband, fix the issue, and resew, which also took a lot of time.
While the actual development, building, and coding of this project was relatively simple, much of my time was spent troubleshooting the issues that came up, which was mostly a result of the battery. Initially I incorrectly diagnosed the issue leading to some wasted time and resources on a solution, the transistor, that was not solving the problem of the mismatch between the 6V battery and the 5V accelerometer. I also experimented with two different voltage regulators in order to reduce the power. This was the biggest issue with my project that I ultimately could not fix.
Ultimately, I am unsatisfied with how the project came out as it was not functional, despite having a simple project. I am proud of a few aspects: the fact that I tried many solutions to many problems, I improved technical skills such as sewing and soldering, and my process in developing a device improved significantly from the last project. Instead of going straight to the final wiring, I took my time with understanding how each component worked by using more easily editable components such as the breadboards, which is something that I struggled with last project. However, the battery issue was one that I could not overcome. It was during this time I truly felt the limitations of my understanding of circuits and wiring, as although I relied on sources from the internet, I did not completely understand why I was doing what I was doing to fix the problem. One problem that exacerbated the battery issue was that I had no way of reading the inputs from the accelerometer when it was not connected to my computer. In order to fix this for future development, I would wire an LCD screen in order to read these inputs and better be able to diagnose the issue.
Although I could not get a fully completed project for critique, I received a lot of great feedback that could help me improve the functionality for this device. One such feedback was the addition of a time delay so that if I needed to bend down and get something from my backpack, I could have some time to do so without the headband beeping. Another piece of feedback was making the values read from the headband relative rather than absolute, as in the accelerometer would first read 0 and every rotational change would be detected rather than its' absolute position. This would account for different ways I would wear the headband in different styles, whether I do so with my hair tied, resulting in a natural angle, or simply straight across my head. Both of these suggestions are great quality of life features I would implement in the future. In order to accomplish this, I would use the millis variable to count time once the head is out of position, and once ten+ seconds have passed, then the wake up mechanism will activate. I believe the relative positional change would use a variable that is the difference of the reading of the values from the accelerometer and it's initial value. One piece of feedback that I received that I disagree with was the inclusion of direction sensitive buzzers, or that the pancake motors would vibrate depending on which side I was leaning towards. I believe it is much more effective to have the whole headband shake at the temples in jolting me awake rather than having one buzzer, and there is not much added functionality in knowing what side I am leaning towards.
/*
Jolt
by Hannah Park
Rotational position is recorded using a 3 axis accelerometer.
Initially when the head rotates out of a certain range, two pancake vibration motors will turn on.
If the head continues to tilt further, a buzzer will activate.
All outputs will continue until the head is returned to a straight, forward facing position.
pin mapping
pin | role | details
------------------------------
A0 input X value for 3 axis accelerometer
A1 input Y value for 3 axis accelerometer
A2 input Z value for 3 axis accelerometer
7 output pancake motor
8 output active buzzer
*/
//actualizing variables
const int XPIN = A0;
const int YPIN = A1;
const int ZPIN = A2;
const int BUZZPINS = 8;
const int SCREAMPIN = 7;
int XVALUE;
int YVALUE;
int ZVALUE;
void setup() {
pinMode(XPIN, INPUT);
pinMode(YPIN, INPUT);
pinMode(ZPIN, INPUT);
pinMode(BUZZPINS, OUTPUT);
pinMode(SCREAMPIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
//reading the rotational position of headband and assigning it to a variable
XVALUE = analogRead(XPIN);
YVALUE = analogRead(YPIN);
ZVALUE = analogRead(ZPIN);
//printing out the values for testing purposes
Serial.print(XVALUE);
Serial.print(" ");
Serial.print(YVALUE);
Serial.print(" ");
Serial.println(ZVALUE);
//detecting if the head is slightly out of alignment to activate the motors: roughly a 20 degree angle away from a straight forward facing head.
if (XVALUE < 390 || YVALUE > 380 || ZVALUE <300){
digitalWrite(BUZZPINS, HIGH);
Serial.print("buzz buzz");
}
else{
digitalWrite(BUZZPINS, LOW);
}
//detecting if the head is very out of alignment to activate the buzzer: roughly a 45 degree angle away from a straight forward facing head.
if (XVALUE < 370 || YVALUE >390 || ZVALUE <280){
digitalWrite(SCREAMPIN, HIGH);
delay(100);
digitalWrite(SCREAMPIN, LOW);
Serial.print("buzz buzz");
}
else{
digitalWrite(SCREAMPIN, LOW);
}
}