Tuesday, May 10, 2016

The Finished Final Project

Over the last 5 weeks in Engineering 160, Sara and I have been working on our final engineering project. Working closely with Jim Wice from Disability Services, Sara and I were able to develop a functional, and useful, body temperature warning system.

The cool thing about this project was that we got to work with an actual client and address actual issues. While the projects in class are very realistic and teach us important skills for engineering, it is not the same as working towards a specific goal to actually help someone. In some aspects, the human interaction can make the project a little bit easier because you can get feedback on different ideas and mechanisms. However,  real world problems are very complicated. There is not a single cut-and-dry way to solve the problems, nor is there a specific limited skill set that you need. With this project we had to teach ourselves a lot of new skills and learn how to be resourceful. While we did develop quite a few skills throughout the class that were helpful, the real world project required more flexibility, creativity and ingenuity.

This blog post will outline the most important parts of our project and talk about the development of our ideas and product.

The Challenges to Address:

We first met with Jim in the middle of March to discuss potential issues that our engineering class could address. Jim told us that many people with spinal cord injuries or certain diseases, such as Multiple Sclerosis, have a hard time perceiving and self regulating their body temperature. Many times huge changes in temperature will go un-recognized until the temperature has become hazardous. This can cause issues like hypothermia or over-heating, both of which can be very damaging to the person.

After Jim's explanation of the issues he wanted us to address, we had a discussion about Jim's preferences and different ideas for how to solve the problems. Jim wanted us to develop some sort of device that would warn him of bad temperature changes or work to alleviate the large fluctuations in his temperature. We bounced some ideas off of him, asked him questions and clarified the goals of the project.

Not only did we have to meet Jim's requirements and create a product that would help him, we also had to meet the requirements of the project for the class. These requirements included using at least one mechanism, incorporating feedback, sensing and control (most likely using an Arduino), and creating a physical object with mostly raw materials, all while staying under a $50 budget and with less than 6 weeks to complete the project. Welcome to the real world!

Brainstorming and Initial Ideas:

After the meeting, Sara and I started on the brainstorming part of the project (one of the most important steps in the engineering process). We each came up with some ideas like a finger temperature sensor that would vibrate when the temperature went out of the normal range:


or a temperature sensor that would turn on LED lights when the temperature went out of range:


As you can tell by our ideas, Sara and I were pretty set on a device that would warn Jim, or any other user, of a dangerous body temperature. Whereas we focused on a warning device, the other group focused more on a device to actively adjust the body temperature. Either way, both devices could potentially be very useful for Jim.

As you can see by the pictures however, these were very general, raw ideas. No matter what we chose to do we would have to refine our ideas and really plan out all of the pieces of the project.

Refining our Idea:

After Sara and I came up with our initial ideas from our brainstorm, we worked on combining our ideas in to one product that would accomplish what we wanted and also be a feasible goal to attain in the 5 weeks we had to work. Ultimately, Sara and I decided to make a temperature sensing device that would be connected to Jim's ankle and read the temperature of his extremities. The sensor would be connected to an Arduino that would also be connected to a servo motor. The servo would would have a stick attached to it and on the user interface there would be a temperature range arc (shown below). The servo would be programmed to move the stick to the correlating temperature on the scale to warn Jim when he was getting too hot, too cold, or if he was in a healthy range.

This project would meet all of the requirements of the project (the feedback and control with the sensor and Arduino, the mechanism with the servo motor, and using raw materials), it would most likely be under the budget limit, and we were pretty confident that we could get it done in 5 weeks. Also, this project combined a lot of concepts and techniques we had learned throughout the year such as working with Arduinos, programming, using a servo motor, creating circuits, using sensing, feedback and control, and of course the engineering process. Here is what the sketch looked like for our refined idea:


We planned to have the device attached to Jim's chair in some way, but we hadn't quite figured that out yet.

At the very end of the second week of this project, Sara and I hit a major road-block. We found out about a project that MIT was doing that sounded very similar to ours. This made us question everything. We had the options of switch gears and developing a device that would actively address the temperature changes by heating or cooling Jim, sticking with our original idea, or maybe changing our idea to give it some different applications. This, we discovered, was another very common occurrence in the field of engineering. Things are always changing and new devices are being created every day. Engineering is a field that is constantly building and growing on itself with the introduction of new technology. That is just the nature of engineering; making what we have (or don't have) better and more useful.

After our little crisis and re-evaluation, we decided to go with the last option. We made some major changes to our idea to give it a different use than just measuring the temperature. While we kept many of the same features (the temperature sensor on the ankle, using an Arduino, and using a servo motor), the concepts changed quite a bit. We decided to develop a temperature warning device, instead of just a temperature gauge.

Our new idea ended up being a warning device that would do something when Jim's temperature got out of range, instead of just show him. We decided to have two "layers" of warnings. The first set of warnings would be LED lights that would come on (just like one of the original brainstorms!) when the body temperature started going out of the nominal range. There would be a blue LED for the colder range and a red LED for the hotter range. If the temperature continued to move out of range in to a dangerous zone, the servo motor would begin to move and ring a bell. This new idea was more ambitious (still doable though) and more useful, which made Sara and I more excited about our project. I also appreciated the fact that it would be more useful and likely make a larger impact on Jim's life. So from our crisis, good ideas followed.

First Prototype:

Once Sara and I finalized our plans for the project, we started constructing our first prototype. This included creating the circuit, the code and figuring out how we wanted to put it all together. Sara took on the task of developing the code, and I created the circuit. During this stage in the development process we luckily didn't run in to any major issues. We had a few minor problems with the code or connections in the circuit, but we were able to figure those out quickly and move on. This stage in the project was where all of our previously learned skills came in to play (coding, using Arduino, creating circuits). Our first prototype was functional and useful, but it definitely had lots of room for improvement. But again, it is the nature of engineering to have to do multiple iterations to perfect your product and make adjustments to make it better. The parts we used included: a thermistor to measure the temperature, 2 LED lights, a servo motor, an Arduino, a bell, some resistors, some wires, batteries, and some velcro. Here is what our first prototype ended up looking like:






Feedback from our Client:

Once we got our first prototype up and running (Week 4), we showed it to Jim to get feedback, answer questions, and take some data. Our meeting with Jim went very well. He seemed to be very excited about our project. As I mentioned in my Week 4 blog post, he compared ours to MIT's project and thought it was better than theirs that they had been working on all semester. Along with his praise, he also had some recommendations and questions. One of the biggest adjustments that he wanted to make was to increase the delay time for the bell mechanism so it wouldn't go off every 10 minutes, but rather every hour (if his temperature had not gone back to the normal range after that time period). This would allow him to have enough time to address the temperature issue and cool himself off or warm himself up. This was an easy adjustment to make in the code, which made meeting Jim's requirements easy.

After the feedback and discussion portion of the meeting we took data from Jim to determine the correct temperature range for him.




After our meeting, we also took data to determine the correct temperature range for the device. To do this, we used cups of hot water and ice water. We put the cups one at a time against Sara's ankle to heat up or cool down her skin to simulate changing body temperatures. Once Sara got uncomfortably hot or cold we attached the thermistor and measured the resistance for each of the two extreme conditions. We then shifted this resistance range to be centralized around Jim's nominal temperature, so that the code could be adjusted specifically for Jim.

Along with feedback from Jim, we also got feedback from Amy. I realized throughout this project how important feedback is. Not only can get questions answered, but both parties (the developer and the client) can be on the same page as each other. This cooperation helps to ensure the best construction and use of the product. The feedback was very helpful for us to determine what direction to take throughout the development. Anyways, Amy recommended that we work on making the product smaller and more aesthetically pleasing. Since we had accomplished all of the mechanical and electrical tasks we had set out to do, the next step was to make it more useable for our client and more appealing.

The Second Prototype:

Throughout the rest of week 4 and 5 we worked on condensing our circuit and decreasing the size of our product. Through lots of tinkering, soldering, and creativity (what engineering is all about) we were eventually able to fit all of the electronics inside of an Altoids box with the user interface (including the servo, bell, and LEDs) attached to the outside of the box (I go in to more detail regarding the condensing process of the product in my Week 5 blog). We also fixed the bell to make it more stable, better looking, and more effective.

The first step we took to condense the product was solder the circuit on to a small protoboard. All we had to was transfer the circuit to the protoboard and then solder the circuit elements to the board. Then, through a lot of different tries we figured out the best way to orient the Arduino and the circuit. One of the biggest parts of engineering, as I mentioned before, is the iterations. This comes in many different forms, including iterations of the whole project and iterations of small pieces of the project to get the specifics right. At the end of the day, here is how we oriented the electronics:


The next step was to cut out the appropriate holes for the wires, the LEDs, the servo connections, and the ports for the battery pack and the computer cord. To do this we used some of the machine shop tools that we had been introduced to earlier in the semester.

We then glued the servo and bell to the top of the box and the battery pack to the side to put the device all together. 

The final touch was to make it look as nice as possible with the setup we chose. To do this, we decided to paint the whole thing black so it would look more uniform and not be such an eyesore when attached to the wheelchair. Ultimately, our product turned out to be much more aesthetically pleasing, and smaller, than our first prototype. So, we accomplished our second set of goals for our second prototype. Yay!

Here is what the finished product looked like:



For the demonstration and videos we used a slightly adjusted version of the code that had a much smaller range of temperatures and a much shorter delay time. This was so that we could show all of the stages of warning in a short time. Here is how the product worked:



The Finished Project:



Overall, Sara and I were very pleased with our final project. Our hard work really paid off! When we presented our product to the class and to the clients for the project, Jim, and even the woman from the Child Study Center, really liked our product and mentioned that they could see many different uses and applications of our project.


If we had more time I would have liked to make our device even more aesthetically pleasing. Maybe we could have laser cut or 3D printed out a box to house the electronics with appropriate holes for the wires and with slots to attache the servo and the bell. Also, I think the bell mechanism could be improved, maybe by using a different mechanism than the servo motor, or using a different kind of bell. Also, there were a lot of stray wires that looked a little messy. Unfortunately, with our budget, the limitations of the technology and the time constraint, fixing the wire problem would not have been feasible. However, if this project were to advance further, that could be an area of improvement.

Reflection:

One of my biggest goals for this final project was to create a product that would be useful and actually could help people. This project hits pretty close to home for me. My father was diagnosed with MS when I was in middle school and has a very hard time regulating his body temperature. Because of this reason, I was really passionate about this project and really wanted to make a device that worked and was useful. I have see the effects that a problematic body temperature can have on someone, so I believe that this is a very important problem to address. Not only did this project inspire me to find ways to help Jim, my dad, and people like them, but it also gave me a deeper knowledge of the hardships that these people have. It gave me a new perspective on finding solutions and how many things we take for granted can be a big issue for someone else.

From this project, I also learned many important lessons in engineering. These included, but are not limited to: (1) things don't always go the way you plan, (2) you WILL run in to problems and roadblocks, (3) its ok to ask for advice, (4) there are more tools, resources, and products out there than you know so just do some research, and (5) engineering can be frustrating at times, but it is also so rewarding when you get your product to work.

I hope to be able to continue with engineering in the future through taking classes maybe at MIT, doing more projects, and maybe even grad school in the future. I think engineering is such an exciting  and important field to be in, and it can make huge differences in people's lives.

Tuesday, May 3, 2016

Final Project Week 5

Day 24 (4/26/16)

In this final week of project development, Sara and I had several goals. The first being to get the program running completely as desired with the right settings for Jim. Our second goal was to consolidate the circuits and dramatically decrease the size of our device. Our third goal was to make our device look nice and neat. Since we essentially finished the development and design of our code and circuit last week, we had the luxury of focusing on our product's visual appeal.

Step 1: Condensing the electronics

The first step we took in refining our product was to condense and secure the circuit. To do this we used a small protoboard that we found in the engineering lab. We transferred the circuit from our original breadboard to the protoboard and then soldered all of the circuit elements.



Step 2: Packaging the electronics

Our second step was figuring out how to package all of the elements in to one product (with the smallest possible design). We figured out that the arduino and protoboard were small enough to fit in to an Altoids box if we put the protoboard on top of the arduino (separated by electrical tape to avoid bad points of contact). We cut the wires to the optimal length to make the connections between the protoboard and the arduino and figured out what holes we would need to drill in the Altoids box. We needed two holes for the leds, a hole for the servo wires, a hole for the battery connection and a hole for the computer connection. Ideally, once we have the protoboard and arduino connected and put in the box with the wires strung through the specific slots we will not have open the box again. After this point all of the adjustments we would just be related to the code itself that could be changed easily. This not only helps us to decrease the size of the product, but also the simplicity for the user.


Step 3: Packaging the whole device

Our third step was to figure out how to include all of the external pieces of our device. These include the servo motor, the bell (we ended up deciding to use a bike bell), the battery and battery pack, and the power switch. Luckily, since our design uses a closed Altoids box there is a lot of real estate up for grabs on the outer surfaces of the box. 

We ended up hot glueing most of the elements to surface and tried to maximize space and optimize the design. We set up the servo motor in the right spot to ring the bell, but so that it did not hide the leds from the user. Both the servo motor and the bell were hot glued to the top of the box on the other side from the leds. As for the battery and battery pack, there was just enough room on one of the sides of the box. We hot glued the battery pack to the side and made sure that it would not stick out past the wheelchair width or get in the way of Jim's daily functions. The switch just hangs closely to the box, but we can make adjustments to the attachment of the switch as Jim needs it. For the final pice of the packaging puzzle, we added a velcro strap to the bottom of the Altoids box so that the device can be strapped around the arm of a wheelchair. 

Step 4: The aesthetics

Our final step was making the product look nice and neat. Since all of the parts were glued to the box, we didn't have to worry about that. However, we did have to deal with the external wires. We ended up just using black electrical tape to secure and cover the wires on the side of the Altoids box. In the end, we decided to paint the whole box black to give it a consistent color and make it look neater.




All in all, our product ended up looking and working pretty well. Our adjustments made a huge difference to the look and function of the device that we think Jim, or any user, will appreciate. Here is a video of our refined product in action:


Next week we will be presenting our product to the class, to our clients, and other interested people. We created a poster that introduces our product and describes our project goals. The poster also details how to use the product. These posters will be up for viewing in the science center.

Monday, May 2, 2016

Final Project Week 4

Day 23 (4/22/16)

Today we met with Jim Wice at disability services. We brought our first working prototype to show him, get some feedback, and collect some data. Here is a picture of what we brought to show him:



As you can see, we attached a temporary bell to the end of the servo. Unfortunately, the bell does not work as well as we had hoped, so we will figure out how to fix this problem and work on developing a new bell system for our next prototype.

After we demonstrated our product to Jim he gave us feedback and suggestions. Jim really liked our product. He made a comment that our project was even better than MIT's who had been working on theirs all semester. He had a few questions about the timing of the different warning mechanisms as well as shutting the device off. He wanted us to increase the delay time for the bell mechanism so it wouldn't go off every 10 minutes, but rather every hour (if his temperature had not gone back to the normal range after that time period). We also figured out that he may want to attach the device to the arm of his wheelchair using velcro.

After our demonstration and feedback session, the other group presented their product and got feedback. Once both groups had presented and gotten feedback, we took some data from Jim using our devices. Since Sara's and my project uses a thermistor (a resistor who's resistance varies with temperature), the measurements come as resistances. We determined the corresponding resistances for Jim's ankle at a fairly normal temperature. We did this to get a sense of where we wanted the nominal temperature range to lie on the resistance scale. We attached the thermistor to Jim's ankle and then used the serial port in the arduino program on the laptop to see the varying resistances. We waited until the resistance equilibrated and then recorded the value so that we could personalize the device for Jim's needs.





















Overall it was a successful visit with Jim, we got good feedback and data for the next development of our device.

When we got back to the classroom we took more data to determine about how big the range of temperatures (resistances) can be. To do this, we used cups of hot water and ice water. We put the cups one at a time against Sara's ankle to heat up or cool down her skin to simulate changing body temperatures. Once Sara got uncomfortably hot or cold we attached the thermistor and measured the resistance for each of the two extreme conditions. We then shifted this resistance range to be centralized around Jim's nominal temperature, so that the code could be adjusted specifically for Jim.





















Towards the end of class, Amy came around to check in with us. She gave us the great suggestion of shrinking down the device to the smallest size as possible and refining all of the parts. We will work next week on condensing the circuit and making the device as presentable and useable as possible.

Saturday, April 23, 2016

Final Project Week 3

Day 21 (4/12/16)

During the third week of our final project, Sara and I made some major adjustments to our design. We decided to go a different way from our original idea of the temperature scale. Instead we decided to make a warning system for Jim. We planned to have 2 elements that would serve as a warning device for Jim. The first layer of warnings are LED lights. We planned to have a blue LED for when Jim starts to get cold and a red LED for when Jim gets too hot. For the second layer of warning systems we planned to have bell. Our idea was to use a servo to either ring the bell on a stick that is attached to it or to attach a stick to the servo to hit a bell.

Once we refined our idea for the device, we started putting our prototype together. While Sara worked on the code, I put together the circuit. Our first prototype ended up looking like this:


Day 22 (4/15/16)

We had a little bit of trouble with the code and the circuit doing what we wanted it to do but by playing around with the code and trying to simplify the circuit we were able to figure out our problems and fix it. By the end of the week we had all of the pieces (the LEDs and the servo) working properly. All were missing were the correct temperature ranges for Jim.

Here is the code we used for the circuit:



Here is a video of our working prototype:



The next steps for us is to attach the bell to the servo and then present our prototype to Jim to get feedback. Our meeting with Jim will be next week.


Thursday, April 14, 2016

Thermal Systems using MATLAB Part 2

Day 19 (4/5/16)

Task #1:

The first part of the Thermal Systems #2 assignment asked us to generate an experimentally measured heating curve. To do this, we ran the test_thermal code:


and we ran it on our LogoChip, which looked like:


We got a resulting heating curve that looked like:



From this heating curve we can calculate the values of the thermal resistance (Rth) and the heat capacity (C). We calculated Rth by taking the total change in temperature (21.7 K) and dividing by the power (6.5 W). We determined that Rth was 3.34. We calculated C by dividing the power by the slope of the graph (0.2736). We determined that C was approximately 23.75. Using both the values of Rth and C, we multiplied them together to get the time constant tao which was 79.6. Tao is the time it takes for the system to reach about 63% of the asymptotic value. Our graph and our tao match to this definition because at a time of 79.6 seconds, the temperature reads about 321.8 K, which is about 60% of the final asymptotic value for the temperature.

To summarize the values:
Rth = 3.34
C = 23.75
Tao = 79.6

Task #2:

Our second task was to modify the heatsim code with our calculated quantities and see how similar our heat curve was to the simulation. Here was the plot from our simulation:


As you can see, both plots are pretty similar. Any differences that exist may be due to fluctuating ambient temperatures in the air or inaccuracies in our calculations. Also, the real world isn't perfect, so the perfect simulation will likely not match up exactly with the real heat curve.

Task #3:

Our third task was to use bang bang control to modify the test_thermal code to change the amount of power supplied to the system based on if the temperature is above or below the target temperature. In our case, the target temperature was 340 K and here is the modified code we used:



Here is the resulting plot from bang bang control for our thermal system compared with the simulation for bang bang:



Task #4:

Our final task was to use proportional control in attempts to reach our target temperature of 340 K. For a discussion on what proportional control is or how to set it up see my previous blog postings.

For our system, we tested the code with 3 different proportional gain coefficients (Kp). The values for Kp were given to us in the assignment with units of W/K, and since we were using percentages to determine how much power to deliver to the system we had to change the units. To do this, we divided the given Kp by the total power, 6.5 W, and multiplied by 100. This gave us resulting values of:

Kp1 = 0.77%
Kp2 = 2.08%
Kp3 = 7.70%

To plot the heat curve with proportional control using these values we used the following code:


And here is a resulting plot for proportional control using the smallest Kp:



The system does not reach the control set point when the gain is small because the constant only allows for a maximum of 30% power. Since the biggest the error could be is only about 40K and the constant is .77, the max power will be very low. Not having a lot of power will take the system a lot of time to reach the target temperature.

Here is the comparison of our simulation and the actual thermal system:


When the proportional gain is high, the temperature of the system shoots up at the beginning and levels off quicker, much like the simulation. The optimal gain setting for our thermal system seems to be a high gain because that gets us closer to the desired temperature because it shoots up higher at the start. Regardless of our chosen Kp though the temperature does not reach the target temperature. 

Monday, April 11, 2016

Final Project Week 2

Day 19 (4/5/16)

After discussing our ideas further, and after talking to Jim, Sara and I came up with our revised and improved idea for our final project. We decided that we are going to measure the temperature of Jim's extremities by attaching a temperature sensor to his ankles. The temperature sensor will be connected to the arduino that will allow us to alert Jim of his temperature and his temperature change. We decided that we are going to use a servo motor with a rod attached at the end that will move to show Jim his temperature. When he is getting too hot the servo will move toward the hot mark and when he is getting too cold, the servo will move in the other direction. This way, Jim will know when he needs to make a change and take care of his extremities temperature.



Day 20 (4/8/16)

Today we pitched our idea to Jim. He liked our idea, but also mentioned a project that MIT is working on that sounds very similar and more advanced than our project. MIT's project doesn't, however, seemed to be focused on Jim's extremities, so I think Sara and I will just continue forward with our plan.

Final Project Week 1

Day 16 (3/18/16)

Today the class split up in to two groups. One of the groups went to the child study center and the other stayed in the classroom and was visited by Jim Wice from disability services. Each of the groups learned about the problems that needed to be solved and were able to ask questions.

I was in the group that met with Jim Wice, and it was very interesting to hear what he had to say. He said that his main challenge was his body temperature. Often it fluctuates a lot and he won't notice that his body temperature is off until it has gotten very severe.

Meeting with Jim Wice, I knew that I wanted to work on a project that could help him and others with similar challenges.

Day 18 (4/1/16)

Sara, my final project partner, and I both came up with some initial ideas for the final project. Today we had to present these initial ideas in class

Sara's idea was to use a finger temperature sensor that would be connected to an arduino. When the temperature got outside of a certain range, the sensor would vibrate to let Jim know that his temperature was off.


My idea was to have a thermometer attached to Jim, probably the back of his neck, wherever it's best to take his temperature. The thermometer would be connected to the arduino that we could program with a certain desired temperature range. When Jim's temperature got too hot, a red led light would turn on and when Jim's temperature got to cold, a blue led would come on to let Jim know that he needed to make a change and get his body temperature back to normal.