Midterm Documentation: “Chill-Out”, Madeline Shedd, Eric Parren

Context and Significance

In my group project, our device was entirely dependent on user input and could not function without it. From the projects, like the Pulse Room, we discussed and conversation amongst my classmates, my definition of interaction relies on an input and output system that uses more logic than a simple yes or no answer. Interaction requires a step farther, and I believe our project “Chill-Out” meets that criteria. Our project does have a yes or no part of it, but it’s just a part of the system. The entire device constantly checks a variable that is provided by the user, that variable is inspected and if it meets certain parameters it then needs more user input for the “final” goal to be reached. The system of our device is dependent on the input but also takes this input and does something with it. The concept of wearable technology is already out there, both me and my partner knew this from the start. We wanted to create our own version of this idea, and it manifested in the idea of creating something for athletic purposes. There is smart athletic wear already in circulation as well, but I think our design and function would be more appealing to wider general audience and be more affordable.

Concept and Design

When brainstorming idea for our project, both me and my partner wanted to make something that didn’t have to do with a box. This focus on literally thinking outside the box I think helped us think about other ways were could use the materials available to us. Shina was the one to come up with the idea of athletic wear, and after discussion and more brainstorming we developed the headband idea. We decided this would be a good method to get the temperature sensor in the right place while people use the device all while looking “fashionable”. Since we were unable to use wireless sensors, we added the arm band to hold all the computer stuff and so that the wires wound’t be too long and get easily tangled. So we wanted to build off that stylistic choice to implement the fan, so we based it off other headbands that have long strands as well. 

Fabrication and Production

The first step we took in fabrication was making a basic circuit that we would later expand upon and use longer wires in the final design. We looked through several online tutorials and schematics to help us design the circuit. We based our design off these schematics:

https://create.arduino.cc/projecthub/Jasleen1429/temperature-sensor-to-control-servo-motor-b770f9

https://www.arduino.cc/en/Tutorial/TransistorMotorControl

The coding for button proved to be harder than I was expecting. We didn’t want the fan to turn on when the user was just pressing the button, we thought this wouldn’t be good to have to keep holding down the button when active. So we wanted to make it so that when you pressed the button once it would turn on and then when you pressed it again it would turn off. I tried several ways I thought would work before I turned to the internet for help. I ended up using the code from the toggle switch example from this website. It was extremely helpful in helping me understand how the logic behind the “toggle switch” and why my previous attempts weren’t working. Our code for this circuit ended up as:

int pushButton = 2;
// give a name to digital pin 2, which has a pushbutton attached
int motorControl = 9;
// the transistor which controls the motor will be attached to digital pin 9
int tempPin = A0;
// sets the pin for the temp sensor
int ledPin = 13;

boolean oldSwitchState = LOW;
boolean newSwitchState1 = LOW;
boolean newSwitchState2 = LOW;
boolean newSwitchState3 = LOW;

boolean LEDstatus = LOW;

void setup() {
pinMode(pushButton, INPUT);
// make the pushbutton’s pin an input
pinMode(motorControl, OUTPUT);
// make the transistor’s pin an output
pinMode(tempPin, INPUT);
//make the temp sensor an input
//pinMode(ledPin, OUTPUT);

digitalWrite(motorControl, 0);

Serial.begin(9600);

}
void loop() {
int temp = analogRead(tempPin);

newSwitchState1 = digitalRead(pushButton);
delay(1);
newSwitchState2 = digitalRead(pushButton);
delay(1);
newSwitchState3 = digitalRead(pushButton);

if(temp >= 45){
digitalWrite(ledPin, HIGH);
if (( newSwitchState1==newSwitchState2) && (newSwitchState1==newSwitchState3) )
{
if ( newSwitchState1 != oldSwitchState )
{
if ( newSwitchState1 == HIGH )
{
analogWrite(motorControl, 255);
LEDstatus = HIGH;
}
else
{
analogWrite(motorControl, 0);
LEDstatus = LOW;
}
}
}
}
oldSwitchState = newSwitchState1;
}

We also decided to 3D print a buckle for the armband to make it adjustable for all users. The buckle design we used was from this file on Thingverse. But the 3D printers were not very kind to us. We ran into issues dealing with the nozzle detection and the precision of the printing across several printers. In total, we had to print the female side of the buckle around six times before we got a print we were satisfied with. Even this print wasn’t as good as we originally wanted but we didn’t really have another option that would fit into our limited time.

Going back to the circuit, after getting it to work with the code we started on soldering together parts, such as the fan, temperature sensor, and button, with longer wires.  Once we replaced most of the jumper cables with longer wires, we then tested the circuit. Unfortunately, our good luck had ran out and our problems had just begun.

We spent a considerable amount of time trouble shooting the circuit. Checking all connects, reconnecting wires, and replacing “faulty” buttons, diodes, and transistors. We thought we were finally in the clear after we replaced one our batteries because we found it was actually low on power. Replacing this battery allowed the fan to work, but the button was still not working. Not wanting to solder another button, I wanted to make sure the button was actually at fault. Turns out there was nothing wrong with our button so it had to be something else. Getting increasingly frustrated, I asked for guidance in what we could possibly overlooking. With literally an hour till presentation time and unable to find a concrete explanation to what the problem was, we opted for taking everything out of the Arduino and breadboard and starting from scratch. The new circuit was much simpler than our original but it worked almost the same. The code was also  modified and simplified to match the new circuit. These changes finally made the device work with the new wires, and so we placed all the bulky pieces in the sleeve and put together our device presented in class.

Schematic of Final Circuit

Code:

int pushButton = 2;
// give a name to digital pin 2, which has a pushbutton attached
int motorControl = 9;
// the transistor which controls the motor will be attached to digital pin 9
int tempPin = A0;
// sets the pin for the temp sensor

void setup() {
pinMode(pushButton, INPUT);
// make the pushbutton’s pin an input
pinMode(motorControl, OUTPUT);
// make the transistor’s pin an output
pinMode(tempPin, INPUT);
//make the temp sensor an input

}
void loop() {
int temp = analogRead(tempPin);
if(temp >= 40){
digitalWrite(ledPin, HIGH);
if(digitalRead(pushButton) == HIGH) {
analogWrite(motorControl, 255);
} else {
analogWrite(motorControl, 0);
digitalWrite(ledPin, LOW);
}
}
}

Conclusion

In the end, our device interacted with its users in the way we intended but at a less complicated manner we had originally thought of. The biggest changes were in the “background” in relation to the user, so that the project would work just as well for the user. I do think the interaction of the device could be increased, maybe next time we could add another component to the device to further the need of user input in to system. Like the speed of the fan could be higher or lower depending on the users temperature. If I had more time, I would definitely play with the idea if users would truly prefer the armband or just having a hat thing. The wires can be a little annoying, even if they were shorter than they were in early iterations of the project. I’d also change the fabric used in the band and headband to something more breathable to coincide with athletic aesthetics and utilization.With the abundance of problems we ran into, I’ve learned that getting started as soon as possible and getting it done as soon as you can is key. I’ve also learned that getting as many opinions and views on the best way to do something is crucial, I’m also less intimidated by the thought of asking for help when I’m stuck now as well. Overall, I think this project serves more than just a simple fan and temperature sensor. It one shows how a simple piece of regular clothing, like a sweatband, can be expanded upon and used to further it’s functionality. But it also embodies a small, but still relevant start in the world of wearable technology. 

Leave a Reply