Isaac’s Knee Activity Monitor
Hi I am a student going to high school. Electronics and coding have always been a topic of interest for me. Arduino was something that had both coding and electronics which made this project very fun!
Name
Isaac C.
Interests
Artificial Intelligence, Electronics, Coding, Reading.
Lynbrook High School
Grade:
Rising Freshman
Knee Activity Monitor
Fritzing Hardware Connection for Knee Activity Monitor


Third Milestone:
For my third milestone, I got the flex sensor working and I got everything on the knee activity monitor. The main difficulty for the third milestone was the delicate wires and the OLED display. The OLED display ended up saying that its allocation failed. In the end, I realized that the there was too much data and commands on my Arduino program, making the Arduino overloaded and not able to send commands and connect to the OLED display. To solve this problem, I replaced integers with bytes and took out some commands that were irrelevant to reduce the program storage space. After doing this, the OLED display ran perfectly fine.
The next difficulty was the delicate wires. The wires that I soldered onto the perf board were breaking off and I had to re solder them on. However, I had already sowed the perf board onto the knee brace. In order to solder, I had to cut it off re solder it and sow it back on. However, I could not fully separate the knee brace and the perf board because the perf board was connected to all the other parts and I did not have time to re sow it. In the end, I did a type of T shape solder. I connected a Female to Female wire to the power pins since my voltage pin broke off. Then, I stripped a bit of the middle in the wire and soldered a solid core wire to 3.3 volts. This allowed me to skip the perf board.
Overall, this project was a fun project that taught me many things. I was excited to create something that could help monitor someone’s knee activity. Although there were many challenges on the way, every challenge that was overcome meant new knowledge. During my experience in creating this project, I had a lot of fun, learned many things and my passion for engineering, both hardware and software, has grown.

Second Milestone:
For my second Milestone, I was able to get the OLED display to work. The OLED display displays the gyroscope dimensions, yaw, pitch, roll. There were some difficulties that I ran into when trying to code with the OLED display. I did not include the right library. The library I used was the Adafruit GFX and the Adafruit SSD13306. When I tried to run it, it could not upload because of an error in the library. After consulting with the instructors, I realized that you needed to add another library called Adafruit Busio. This library allowed the OLED display to simplify the details of I2C, UART and SPI interfacing. This makes sure that your OLED display will not get confused with different interfacing and not print. After adding in this library, the OLED display was ready to work. The code was not a hassle and I was able to complete it smoothly. The only difficulty was trying to get the SetCursor to work because I could not set the cursor to the next line. After doing some trial and error, I realized that you need to set your cursor by increments of 8 with the font size of 1, to get it to the next line.
The next part was to figure out the knee position. The position of the knee would display “okay” or “poor”. We would determine which word would be printed by a set of criteria from the gyroscope dimensions. Since I used yaw, pitch and roll, I devised a simple code structure made of absolute value functions and if- statements to calculate the difference of the previous yaw, pitch and roll and the current yaw, pitch and roll. If the yaw or the roll differed by more than 5 or the pitch differed by more than 10, then we would assume that your knee moved in an awkward position. Some difficulties I ran into was that the data from the accelerometer was quite finicky. This concludes my second milestone. My third milestone would focus on fine tuning my accelerometer data and displaying steps and squat level on the display. The flex sensor worked, but since it broke, it is still shipping over. Once the flex sensor arrives, the whole project should be finished.
