User:Fnarmouq2655/ENES100/Project 3

Project Preference
1. Smart Shoe 2. Autonomous Power Wheel 3. Wind Turbine

Problem Statement
''In one or two sentences, describe the project that your group will be working on. Identify what CDIO phase (Conceive, Design, Implement, or Operate) your group will complete in this project cycle.''

Project Plan
Briefly describe your group's plan for the next 4 weeks, including major tasks that will be completed each week.

Week 1 Narrative
''Describe in detail what you did for your team during the week (and weekend). Compare your task (from CDIO discuss page) with what you actually did.''

Week 2 Narrative
For this week, I was assigned to build a new smart shoe device and make sure that the receiver receives the messages every time the transmitter sends it. So, this is the circuit Professor Edelen had designed, that I was trying to build, using Arduino Mini Pro: But, as I didn't want to mess up with the arduino Mini Pro and damage it while soldering the wires to it, since professor Edelen asked us not to do so, as he would help us with the soldering, I decided to build it using Arduino Uno's connected to the computer. So, I have built these two circuits instead:

As could be noticed from the sketches, there were two resistors (91 Ohm,180 Ohm) used in the first circuit (the one with the Mini pro). The purpose of them is to control the voltage going to the accelerometer, as the accelerometer need just 3.3 voltes, and could easily be damaged, or at least won't function if more than that voltage was provided. However, when I decided to use the Uno instead of the MiniPro, I didn't have to use these resistors; because the Uno has a 3.3Volts pin is already there. So, after actually building these circuits, I connected the two arduino's to the computers. At the beginning, I didn't have the actual 'final' codes that should actually be used (that give us the right measurements and calculations without errors). So, to achieve my task that was to build and test the communication (to make sure that the receiver receives the data from the other arduino every time it is sent), I decided to use my latest codes I came up with last week. The codes are:

And as a result, gladly, my task was accomplished. Although the numbers were funky and unrealistic (as I wasn't using the final codes), I managed to receive the calculations (the data from the transmitter) each and every time I simulated a jump. These were some of the results:

However, as I got have the final codes now, I will be able to have a complete 'but wired' smart shoe. So, for next week I have to:
 * Attach a 9V battery
 * Add a switch to the circuit
 * replace the arduino Uno with the Mini Pro
 * Soldering
 * We might also need to work on printing a case using the 3D printer

Week 3 Narrative
For this week, my task was to add a switch to the smart shoe and do the soldering needed; to be able to control the current in the circuit, to save the battery. Therefore, I started by testing the two smart shoe devices we already have (the ones we used in the Science and Engineering Festival in Washington last weekend). I figured out that one of them was still working fine, but the other one wasn't unfortunately. After I tried to make sure of the codes and everything, I found that one of the wires was broken (the wire that is connected to the VCC pin of the accelerometer, so no acceleration values were measured causing no results). So I went to the lab, and soldered that broken wire using the electric soldering tool, and made sure that all the other connection are fixed and in good shape. Then, I went back and uploaded the codes, and gladly it also started working again. After fixing that, I was ready to add a switch. However, I needed first to figure out how exactly the switch worked. It has 6 metal pins on its bottom, so I wasn't sure what the best way to connect the wires was. In order to figure that out, I didn't use the final smart shoe devices I mentioned in the beginning, instead, I used the device I actually built last week using Arduino Uno. So, I attached a 9V battery and connected it to the Arduino instead of the USB cable. Then, I put the switch 'ON', and added that to the circuit between the battery and the arduino. By experiment, I tried to connect the wires in many different ways, until I figured out how they should be connected to make the switch functional. ̇̇̽* This is a picture of me testing how to connect the wires to the switch. And as you can see, the switch is functioning, and the arduino's lights are on, which means the switch is ON. Next, I took that switch off this circuit, and brought one of the 'Final' smart shoe devices (MiniPro). I cut the red wire (+) that comes from the battery's snap, added the switch using the same pins I tested, soldered the connections and added some tapes to make sure the is no shorts anywhere.
 * This following picture is while I was cutting/un-soldering the red(+) wire to add the switch on it:
 * These are picture showing the process of adding/testing the switch:
 * Switch is ON (left image)                                           * Switch is OFF (right image)

After that, I tested the device to see if everything is fixed, in place and appropriately connected, and I got results every time I imitated a jump. Finally, I had to figure out a way to modify on the box (case) in order for it to fit the whole device with the battery then. Since not much time was left for our presentation of the smart shoe in the seminar, I wasn't able to do my best on this part. Nevertheless, I was able to make a small cut in the plastic box/case, just to enable the wires of the switch to come out of the case when it is being closed. So, my switch is currently placed out of the case on the side. I added some tapes to make sure the switch stays in its place and doesn't move violently when the device is used, so that the wires/soldering don't get damaged.
 * An image of what the 'Results' looked like:
 * Cutting the case:
 * Images of the case including the device with the switch (ready to be used):

Week 4 Narrative
For this week, I was supposed to work on making the smart shoe more reliable, since sometimes it didn't work properly. For example, it stopped working at the 2nd day of the festival. Also, when my group and I demonstrated it at the Engineering Seminar, the communication between the smart shoe and the receiver in some cases was going off, and the messages were not received/printed on the screen. Therefore, I had to do some testing, in an attempt from me to know what the problem(s) was/were. What I did to solve this issue, I cut the wire until I reached the soft/un-stiffed part of it, and re-connected the wire to the switch, soldered the joint again. These images show you what I did with regard to this wire:
 * While I was testing, I noticed that sometimes the power was going off (the light of the arduino goes off) while moving the smart shoe. So, I took a look at the wires/connections and soldered joints, I found that one of the wires of the switch was becoming loose due to the tough jumping. I also noticed that that wire specifically was stiffed, and didn't have much tolerance, so it wasn't able to handle the pressure.

The image on the left shows the result when I tried the smart shoe near to the receiver. The one on the right shows what I got when I tried it on a larger distance (about 4-5 meters away), I didn't get results:
 * In addition, while I was testing the smart shoe, I noticed that it worked just fine when I jumped near to the receiver (about 1 meter away). However, when I tried to go further away form the receiver and jump (about five meters away), I noticed that nothing was received (no results on screen). I guess that what happened with us last week, when we demonstrated it in the Seminar.

How I dealt with this issue: I changed the Antenna of the receiver. I replaced the old (shorter) antenna with a new (longer) one. After that, I did the testing again, and gladly this time, I got results.

To fix that, I had to bent the wires in a way that assures that the accelerometer sets properly in place. After that, I tested the smart shoe again, it worked fine in the beginning. But, unfortunately, while testing, and jump after jump, I noticed that sometimes, the results on screen didn't match, for instance, when I jumped about 15 inches, the result printed on the screen was 1 inch! What I noticed while testing, that although the new printed case is tighter than the old plastic case we used before, there is still a tiny space, that allows the device to move/wiggle inside the case while jumping. That little wiggling while jumping surely caused that fake results, because when you jump, the accelerometer senses your jump, and the timer goes on, then right after it wiggles insid the case (before actually landing) the accelerometer thinks that you landed, and turns off the timer. That means: numbers that does't match the reality. To solve that, I added a small rectangular-shaped sponge on the top of the device, then closed the door of the case. So that everything sat in place just fine and tight. Then, I jumped again, and gladly I got the smart shoe to work properly every time I tested it since then.
 * Finally, after printing the case using the makerbot, I put the smart shoe device inside it and tested it again. I noticed that the communication problem came back again. During the testing, I noticed that when the smart shoe device is put inside the new case, the accelerometer does not set horizontally (so it doesn't get calibrated properly).