Knee Activity Monitor

My main project is a knee sleeve that measures the angle and the angular velocity of the knee during physical activity. This allows people to ensure that they are exercising correctly and safely.

Engineer

Krisha M.

Area of Interest

Biomedical Engineering

School

Saratoga High School

Grade

Incoming Sophmore

Reflection

Presentation

My time at BlueStamp has taught me so much about perseverance and determination. I learned that if you keep at something, you will find a solution. I learned this during my third milestone when I was trying to get a graph to display. I struggled for five days until I finally found the solution.
I also learned about the value of Google when it comes to troubleshooting. I learned so much about being self-sufficient and that’s what made my experience at BlueStamp unique. The instructors always made us attempt to solve our own problems before helping us. This really built my confidence because I realized I could solve my problems myself.
Additionally, I learned a lot about software. Coming into BlueStamp, I only had hardware experience. It was very exciting to learn how to code and actually program my hardware. I also learned about circuits and breadboards. I had so much fun prototyping and coding. Now that I have completed BlueStamp, I am interested in both the hardware and software aspects of engineering and this has been a fantastic learning experience.

Third Milestone

My third milestone was connecting my accelerometer to my Arduino through bluetooth and having the data display in a graph in Processing. An accelerometer is a device that measures acceleration. My accelerometer, the MPU6050, measures data in terms of Yaw, Pitch, and Roll. Yaw is rotation around the Z-axis. Pitch is rotation around the Y-axis. Roll is rotation around the X-axis. I have provided a diagram below. The accelerometer is connected to the Arduino. The Arduino is a microcontroller or a mini-computer which enables me to control all my electronics from one device. My code uses the Yaw, Pitch, and Roll values and displays them as a graph in Processing, a software platform that is made for displaying data visually. To filter the data, I used a Kalman filter, which is a filter created using linear quadratic estimation (LQE). LQE is an algorithm that monitors statistics and filters out inaccuracies or “noise”. Kalman filters use very advanced math and I struggled greatly with this aspect of my project. I found code online and tried to implement it for my purposes; however, I continuously got a blank graph. After five days of troubleshooting, I changed the way I entered the serial port and Voila! It worked! A serial port is a connector for both input and output. In this case, the input is the data from the accelerometer and the output is the graph. I then began testing and was able to see the difference between a good squat and an incorrect squat on the graph.

Yaw, Pitch, and Roll

yaw_axis_corrected

Fritzing Diagram

screen-shot-2017-07-19-at-10.40.36-am

Link to Code

Second Milestone

Fritzing Diagram

screen-shot-2017-07-19-at-10.51.40-am
My second milestone was connecting my flex sensor to the buzzer. Since I had already connected my flex sensor through bluetooth, this milestone was fairly straightforward. The flex sensor is a variable resistor which creates different values of voltage when bent to different angles using a voltage divider. The voltage divider is further explained in my first milestone. I programmed my buzzer to go off when the flex sensor bends past 40 degrees. I chose this value because that is when the knee usually begins to buckle. I sewed my flex sensor onto the inside of my knee and connected it to my portable power supply through the Arduino. The Arduino is a microcontroller, which, in essence, is a small computer that allows one to control other electronics connected to it. I then installed the buzzer using header pins and the Arduino. Header pins are pins that can be connected directly to the Arduino. They help keep everything neat and tidy. I soldered the wires from the buzzer directly to the pins, so that they would fit in the Arduino. While coding, I encountered minimal difficulties. I had to adjust the angle values to fit my needs through some trial-and-error. After I finished this, the buzzer was a good warning device for the knee buckling.

First Milestone

Voltage Divider Schematic

voltagedivider
My first milestone was connecting my flex sensor to the Arduino and reading the values through bluetooth. The flex sensor creates different values of voltage when bent to different angles. These values are created using a voltage divider, which is a circuit with two resistors that makes the output voltage substantially lower than the input. The flex sensor is already a variable resistor, so I added an additional resistor to create my voltage divider. The resistor I added was 10k Ohms. This allowed me to control the amount of current flowing through the circuit. The code then converts these voltage values into numbers which are in turn interpreted as angles based on values provided for the voltage at 0 degrees and 90 degrees. I set the value for 0 degrees at 24320 and 90 degrees at 26860. I struggled to refine the flex sensor code to make the angles exact, but I eventually perfected them enough. The bluetooth module allows me to get information from the sensor wirelessly. The code for the bluetooth module was fairly simple. I included the SoftwareSerial library in Arduino and defined the SoftwareSerial as digital pins 0 and 1 (RX and TX respectively). I had trouble connecting through bluetooth because I did not realize that I could not have the TX and RX pins plugged in when trying to upload my sketch to the Arduino. I also realized that I had to power my Arduino with something other than my computer. After I figured this out, I was able to upload my sketch and get the data wirelessly.

Fritzing Diagram

screen-shot-2017-07-19-at-11.01.36-am

Starter Project

My Starter Project is the TV-B-Gone, which is a device that can turn off any TV. The device is controlled by a microcontroller which emits IR codes to IR LEDs. There are two types of IR LEDs. The blue LEDs have a longer, but narrower range, while the white LEDs have a wider, but shorter range. Having both kinds of IR LEDs allows the device to reach almost all TVs. The button on the device resets the micro controller, causing it to emit the IR codes. The 8.0 MHz resonator keeps the microcontroller on time and precise. The transistors amplify the power of the microcontroller in order to power the IR LEDs. When doing this project, I had to desolder a few holes because I had not soldered them well enough originally. This taught me to solder more thoroughly for the rest of my project.

Leave a Comment

Start typing and press Enter to search