User:Medelen8/ENES100/Smart Shoe Design C

Problem Statement
The purpose of this project is to create a small device that can be attached to the users shoe that will measure the vertical jump height of the user to be displayed on the serial monitor.

Requirements for each element or component derived from system level goals and requirements

 * 1) The accelerometer measurements must be accurate to the thousandths place.
 * 2) Device must be small and compact since it is going to be on the users shoe.
 * 3) Case must fit all components snugly so accelerometer does not move (would cause incorrect measurements).
 * 4) Code for accelerometer must work in order to calculate height
 * 5) Code for transmitter and receiver must work in order to establish wireless communication.

Concept #1: Wired Design
Smart Shoe group A used an Arduino Duemilanove, prototyping shield, and a Sparkfun accelerometer. This concept had to be connected to the computer in order to work.

Concept #2: Wireless Design
Smart Shoe group B had the idea to make the device wireless, which they thought would allow for more freedom for the end user. Therefore, there idea was to use two arduinos instead of one. The first one to be connected to the computer, and having a receiver attached to it. And the other arduino to have an accelerometer and a transmitter, to work with the first arduino. But, unfortunately, they did not make much progress towards achieving that.

Concept #3: Wireless Design Part 2
Our group, Smart Shoe Group C, was to continue where group B left off, which was finalizing the design and establishing wireless communication. Therefore, the concept utilizes the following: The accelerometer, which measures the vertical acceleration, is going to be connected to an Arduino Micro which is supposed to use the data coming from the accelerometer to calculate the height of the jump, and will be powered by the external battery. Then, the transmitter, which will also be connected to the Arduino Micro, sends the final data to a receiver. That receiver is going to be connected to the computer through the other Arduino (Duemilanove). That way, the calculations of the jump's height will be displayed on the serial monitor.
 * 1) Arduino Duemilanove
 * 2) Arduino Micro
 * 3) RF transmitter
 * 4) RF receiver
 * 5) Accelerometer
 * 6) External 9V battery
 * 7) Switch

The initial design
The initial design of our group is described above, in 'Concept #3: Wireless Design Part 2'.

Experimental prototypes and testing conducted during design
The calculator/sender

In order to build the wireless part of the smart shoe that calculates and sends the jump height, we had to use the Arduino Micro; because it is small and light, so it can be used easily to be attached to the shoe. The RF transmitter and the accelerometer were connected to the Arduino Micro as shown in the diagrams below:

External power supply

In order to make the Arduino micro portable and wireless, we had to power it without having it attached to the computer via USB cable. Research was done to figure out what recommended voltage is needed to power an arduino micro. The recommended voltage was found to be 7-12 volts. So, we decided to use a 9V battery with a switch to control the circuit. These images show the process of building ,soldering and testing the circuit:





The receiver

This is the receiving Arduino that will receive the data being sent from the transmitter in the wireless device on the user. The receiving arduino uses an Arduino Duemilanove wired to a computer which will display the output onto the serial monitor from the Arduino Micro

Codes

After trying the code of the previous group's CDIO report, we found that we had some issues with it. We kept getting inaccurate measurements every time we tried to measure the jump height. But, we were able to solve the problem by modifying the code. We changed the value the accelerometer reads when at rest from 365 to 517. We also changed the sensitivity value of the acceleromoeter from 100 to 250; to make it more suitable for testing a user jumping.

This is the final code we are going to be using to measure the jump's height by the accelerometer attached to arduino Micro:

Testing the wireless connection

In order to test the wireless connection between the transmitter and the receiver, we used the code below. Unfortunately, we found out that the transmitter we were using is broken and not functioning.

Measurements were taken of each component that would be going in the case to make sure that when it was constructed, there was little to no wiggle room.

Appropriate optimization in the presence of constraints
We wanted to use the 3D printer to print out the case, however the week we planned on doing so the 3D printer was broken therefore disabling our plan to use it. Instead, plastic cases were purchased that we were able to modify to put each component in while still meeting the requirements. Another issue that we faced was the wires used to connect the battery to the battery snap to the switch, as well as the wires soldered onto the arduino micro, though necessary, they take up a lot of space inside the case making it difficult to fit everything inside. Cutting down the wires will probably be necessary to meet the requirements.

Iteration until convergence
The code for the accelerometer was tested multiple times before it was decided that it was accurate, after changing the resting analog value to 517 instead of 365 it worked perfectly. The issue our group had was with the transmitter. A new one is being ordered for further testing purposes.

The final design
Our final design is a wireless device inside of a clear plastic case that will house the arduino micro, the accelerometer, the battery, battery snap, the transmitter, and a switch will be on the outside of the case so you can turn the device on and off. But, were not successful to accomplish that design due to time limit, damaged transmitter and broken 3D printer. For the final design, two needed parts have been ordered, RF transmitter and receiver, for more information about them use the links below: https://www.sparkfun.com/products/10535 https://www.sparkfun.com/products/10533

Technical and scientific knowledge
Height Calculation
 * An integral part of this project is to know the mathematical physics that brings about the explicit value of the height jumped. Looking at this project, the main question is how does the arduino know how high you have jumped since there is no meter rule or tape rule attached to it from the onset. The smart shoe device is able to explicitly state the height jumped within a certain period of time with the help of an accelerometer, and the equation of motion which will be provided below.
 * $$\begin{align}

r & = r_0 + vt - \frac{{a}t^2}{2} \quad \\ \end{align}$$ where r0 is the particle's initial position, r, v, a are the final position (displacement), velocity and acceleration of the particle after the time interval. The function of the acceleremometer is to measure the acceleration of the device in the vertical direction and as a result, the acceleration of this device is gotten from the accelerometer attached to it.

Soldering and cutting of Materials
 * One major technical know-out that was required for the progress of this project was Soldering. Soldering was really important because one of the goals of the project was to make sure all the parts were compact and tightly connected. The wires, accelerometer, switch, and transmitter were soldered together so as to prevent motion that could cause disruption in device and consequently yield wrong values.
 * Another technical requirement was how to use the saw to accurately cut through the box compartments.

 Arduino sketches
 * The most important and required skill for this project is the adequate knowledge about arduino programming. Looking at this project critically, we will see that the link between each hardware i.e the accelerometer, transmitter, and receiver,. and the computer output is the arduino sketch. This is really essential in this project because without the sketch linking up with each hardware, then there will be nothing like a smart shoe because there will be no communication between this devices and all that will be left will be a show with some fance stuff attached to it.

Creativity, problem solving, and group decision-making
During the course of this project, as expected, we had few challenges and most of these challenges were resolved through brainstorming, prototyping and finally finally refining our result are steps we took to resolve minor challenges we encountered. We also took turns to help each other out on each individual tasks when required. The major challenge we had was the casing of the accelerometer, transmitter, arduino micro, and connecting wires. We had different ideas of what it should be and since we can't get to agree on one particular one, we created a decision matrix to choose idea hat best fits our constrains and expectations. Another major problem we had was the refusal of the transmitter to send message to the receiver. we tried our possible best as individuals and as a group to have this resolved, but at the end, we agreed that the transmitter was broken, and ordered a new RF transmitter and receiver. As mentioned previously, an example of using the decision matrix is what our group did when we threw around a few ideas on how to attach the case to the shoe. The ideas were to use clips to attach it to either the side of the shoe where you would put your foot in (by your ankle) or attach it to the front of the shoe by the laces, or to simply tie it around the shoe. We made a decision matrix, and decided that using clips to attach it to the laces would be the sturdiest and safest way to attach the device to the shoe.

Prior work in the field, standardization and reuse of designs (including reverse engineering and redesign)
Prior to our group taking over this project, two ENES 100 group has worked on it and their CDIO report can be found onf professor Edelen's page. Even though they tried as much as possible to document their result, it was pretty difficult to follow because some key explanations were missing in there report and this is most noticeable in the arduino sketch for the accelerometer. All the sketches gotten from prior group pretty much gave one form of error or the other, but with hard-work, understanding the concepts and modification of the arduino codes, we were able to get the arduino to calculate the height jumped. For the completion of this project, we pretty much used the same material as the group before us with a little bit of modification to the design. The only design from prior group that was unaltered is the receiver to the arduino uno connection apart from that, we altered everything to suite the constraint given to us. We soldered all the parts that should be connected to the arduino micro toghether with the exception of the transmitter (Because it was not working). Apart from the Enes class, in the spring of 2013, Google unveiled a more sophisticated version of the smart shoe, but no accurate information has been provided.

http://www.youtube.com/watch?v=VcaSwxbRkcE provides a video link to Googles version of the smart shoe.

Modeling and/or Simulation
To make sure things were soldered the right way, we ran a simulation with the arduino micro connected to the computer, and it displayed how high the device jumped proving that everything with regards to the accelerometer and arduino micro were soldered correctly. Furthermore, we connected the arduino to an external battery and it also worked fine. The only simulation we could not conduct with regards to this project is the wireless communication and this is due to the fact that the transmiter was not working

Performance, life cycle cost and value
The longevity of this device cannot be predetermined now, but if the device is always used the right way, it should last for about 3 to 5 years. The group before us estimated that the price should be $50 and we think for now this is the cheapest it should be bought for.

Implementation, verification, test and environmental sustainability
The implementation mode is suspended for now until we can get the device to wireless communicate with the computer. Other than that, this design has been tested, and verified, and as soon as it can communicate wirelessly, the design will move into its implement phase.

This design did not account for environmental sustainability, but this is not critical for such a design that has no consumable component parts.

Maintainability, reliability, and safety
All things been equal, the only major or obvious maintainability this project requires will be the replacement of battery from tim,e to time depending on what kind of battery that will be used, and how often it will be used. Other than this, this project needs no timed cleaning servicing.

Robustness, evolution, product improvement and retirement
As things continue continue to change and as technology keeps improving, this project will continue to evolve depending on so many factors like addition of more constraint, and availability of funds to support more ideas. As we continue to witness evolution of technology this shoe might turn out to be a shoe that could evolve from telling how high you jumped to measuring all vital signs in sport science. So as long as technology keeps improving, this project will always evolve. I don't see the retirement of this project anytime soon because it is a project in the works with lots of bright future for improvements.