User:Cpecenka/p3weeklyupdates

From Wikiversity
Jump to navigation Jump to search

Week 0 Activities

[edit | edit source]

Project Preference

[edit | edit source]

BioVest, Hallway Robot, Smart Shoe

Problem Statement

[edit | edit source]

Our group is working on the BioVest and is currently in the Design phase. We are to finish the design of the shirt including all dimensions and create a prototype shirt to test at least one vital sign.

Project Plan

[edit | edit source]

The first week of this project was during spring break, so during the next three weeks we plan on deciding what vital sign to measure, what device to use to measure said vital sign, and how to incorporate it into a vest/shirt that is user friendly.

Week 1 Narrative

[edit | edit source]

SPRING BREAK

Week 2 Narrative

[edit | edit source]

Goals for week 2: make decisions on vital sign to measure, shirt to use, begin dimensioning
Since spring break was during week one of the project, week 2 was spent meeting with new group members, picking a vital sign to start out with to measure, assigning tasks and jumping into research. Emmanuel did not show up to class this week so Emmanuel and I began work on looking at past groups CDIO reports, the goals for this project on the project 3 assignment page on Canvas, and deciding what direction we thought best for the BioVest project. Our goals for this week were to decide what vital sign to measure, what type of shirt to use and to begin dimensioning the components that will be used. After looking into what options we had from the Conceive report we decided measuring heart rate was a good place to start since it is the vital sign that is most commonly taken. After spending some time researching we found a device called a Chest Strap that can measure your heart rate, how it is used is self explanatory-- it is strapped around your chest and takes your heart rate without counting the beats per minute manually with a stethoscope. Further research into the Chest Strap device showed us that there were multiple different kinds-- some were bigger, smaller, used bluetooth, apps, and were only compatible with certain types of devices like watches that measured other vital signs. Since we had a large selection to choose from, we created a design matrix using cost, appearance, user friendliness, whether or not it was water proof, and its size and/or weight as criteria for a decision. The decision matrix is below:

File:Biovest jpg.jpeg
BioVest Chest Strap Decision Matrix


The Trekmate Chest Strap was inexpensive, waterproof, simplistic, could be used with bluetooth or an app on iphones and androids, however in comparison to the other devices it was a little heavier (the difference being in ounces-- probably not noticeable but still a factor). The Chest Strap we found that was iPhone compatible was expensive, bulky, could not be used with blue tooth or android devices, but in comparison to the other devices it was lighter. The Chest Strap we found that was blue tooth compatible was inexpensive, bulky, could be used with iPhones and Androids, was waterproof, but also weighed more than the others. The second device that we found that used blue tooth was expensive, simple, could only be used with a watch that was paired with the chest strap waterproof, and was the lightest among the other choices. After putting them in a decision matrix it was decided that the Trekmate Heart Rate Monitor was the best option to move forward with. it is 28.35in x 1.97in x .51in (72cm x 5cm x 1.3cm) and costs $27.96. Split between the three group members it is relatively inexpensive and can easily be sewn into a shirt for easy removal so you can wash the shirt after a workout or any other activity. Hopefully this week we can order the device and while we are waiting for it to arrive we can begin picking a shirt/vest design to use so we can begin putting it together during week 4.

Week 3 Narrative

[edit | edit source]

Since our group has been unofficially cut down to two members it ended up increasing the cost of the chest strap we were originally looking at and Chukwu and myself did not feel like paying for it or wasting time waiting for it to be shipped here. So what we ended up doing this week was deciding on a different vital sign to measure since there were no sensors available that we could use to monitor heart rate. After consulting with professor Edelen about our problem he recommended that we use a Thermistor. A Thermistor is a type of resistor whose resistance varies significantly with temperature. With the data that the thermistor gives when hooked up to an arduino, you can convert that information into temperatures in Fahrenheit by using the Steinhart Equation. The equation is used to derive a precise temperature of a thermistor. You can put this into an arduino code so that is what we did on Friday in our outside of class meeting. After doing some searching we found a code online that would convert the resistance from the thermistor to degrees in Fahrenheit using the Steinhart Equation. We found that the analog in value of the arduino was "10" so after changing that value and the values of A,B, and C in the equation the thermistor accurately read the room temperature, and adjusted accordingly when heated up and cooled down.

File:Code and temp.jpeg
Arduino code and serial monitor information
Setup






the code is below in text for future groups:

int firstSensor = 10;    // first analog sensor

void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
}

void loop()
{
    // read the analog input
    float a5 = analogRead(10);
    Serial.print("analogread = ");
    Serial.print(a5);
    Serial.print("\n");

    // calculate voltage
    float voltage = a5 / 1024 * 5.0;
    Serial.print("voltage = ");
    Serial.print(voltage);
    Serial.print("\n");

    // calculate resistance
    float resistance = (10000 * voltage) / (5.0 - voltage);
    Serial.print("resistance = ");
    Serial.print(resistance);
    Serial.print("\n");

    // calcuate temperature.  Use these values for A, B, and C till you
    // get everything working, and then do some measurements to calibrate
    // your thermistor in circuit.
    float logcubed = log(resistance);
    logcubed = logcubed * logcubed * logcubed;
    float kelvin = 1.0 / (-7.22e-4 + 6.1e-4 * log(resistance) - 1.69e-6 * (logcubed));

    // Convert to Fahrenheit
    float f = (kelvin - 273.15) * 9.0/5.0 + 32.0;
    Serial.print("temp = ");
    Serial.print(f);
    Serial.print("\n");

    // delay 1s to let the ADC recover:
    delay(1000);
}


the code measures the voltage and resistance the thermistor is putting out and converts that information into the temperature in Fahrenheit. When we compared that data with the thermostat in the room, it was accurate.

Week 4 Narrative

[edit | edit source]

Week 4 Goals: Calibrate thermistor to ensure accurate measurements of body temperature.
Week 4 of the BioVest project was spent hooking up the thermistor to a breadboard with wires and a 10k resistor. After running the code we created last week, we noticed that there were several problems. First of all, the code was not even reading the correct pin on the arduino. It was programmed to read pin 10 when in reality it was wired to pin 0 (see above...oops). after fixing this a significant improvement was made, now a noticeable difference could be seen in the voltage and resistance on the serial monitor whenever it made contact with different things, however the temperatures were incorrect, numbers like 48 degrees Fahrenheit were appearing when it clearly was not that cold in the room. During and after our week 3 presentation on Wednesday, professor Edelen suggested that perhaps the numbers in our code derived from the Steinhart Equation needed to be changed and to do some research into what type of thermistor we have (since there are many), and if perhaps there are some predetermined values for said thermistor. After some research on Google's shopping application I found that we have a 10KOHM EPCOS B57891M103J Thermistor NTC . After further investigative googling I found myself at a page that gave specific values for A, B, and C for the thermistor we had that calculates temperature in Fahrenheit given the resistance and said values. Per usual, this information could not be trusted. After plugging the new numbers into our code, according to the serial monitor it was 271.65 degrees in the engineering room... This obviously seemed not likely. Once again thrown out into the cold cruel world left to our own devices we had to start playing a guessing game with numbers, but how could we be sure these numbers were correct? The thermostat in the room seemed like the only option left but thankfully Professor Edelen had a device called a Thermocouple that gives the temperature of the things around it (ie; room temperature) or touching it (ie; fingertips, inside of your ears, iced coffee, you name it) in Celsius with an error of plus or minus 2.2 degrees. The Thermocouple gave us information saying the room was 26 degrees Celsius, with a simple conversion done on google we found that 26 degrees Celsius is equal to 78.8 degrees Fahrenheit. We could now take the room temperature calculated by the Thermocouple and compare it to the numbers we got on the serial monitor for the temperature in Fahrenheit of things touching or surrounding the thermistor. After a mini guessing game of numbers we finally found the correct combination and the code is now as follows:

int firstSensor = 0;    // first analog sensor
 
void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
}
 
void loop()
{
    // read the analog input
    float a5 = analogRead(0);
    Serial.print("analogread = ");
    Serial.print(a5);
    Serial.print("\n");
 
    // calculate voltage
    float voltage = a5 / 1024 * 5.0;
    Serial.print("voltage = ");
    Serial.print(voltage);
    Serial.print("\n");
 
    // calculate resistance
    float resistance = (10000 * voltage) / (5.0 - voltage);
    Serial.print("resistance = ");
    Serial.print(resistance);
    Serial.print("\n");
 
    // calcuate temperature.  Use these values for A, B, and C till you
    // get everything working, and then do some measurements to calibrate
    // your thermistor in circuit.
    float logcubed = log(resistance);
    logcubed = logcubed * logcubed * logcubed;
    float kelvin = 1.0 / (-9.745e-4 + 6.1e-4 * log(resistance) - 1.57e-6 * (logcubed));
 
    // Convert to Fahrenheit
    float f = (kelvin - 273.15) * 9.0/5.0 + 32.0;
    Serial.print("temp = ");
    Serial.print(f);
    Serial.print("\n");
 
    // delay 1s to let the ADC recover:
    delay(1000);
}