Glasses that provide pace and mileage data for runners. Uses an OLED display and a GPS/accelerometer to display pace and mileage data. Also uses an accelerometer/ tilt sensor to check for running form and posture.
Area of Interest
Mechanical and Electrical Engineering, Computer Science
Mission San Jose High School
Third and Final Milestone
For my third milestone I got the GPS (Global Positioning System) to work, and combined it with my OLED Display. GPS uses a process called trilateration to
My second milestone was getting my OLED Display to work. I got it to print the three main variables I wanted: Pace, Mileage, and Posture. In terms of how one works, an OLED Display has a few main components. The one closest to you is the screen, which allows all the components to stay inside and protects them. Then, in order, come the cathode, emissive layer, conductive layer, anode, and substrate. When electricity is run through the OLED, the cathode becomes negatively charged (contains a surplus of electrons) and the anode becomes positively charged (lacks electrons). Now, the anode has “holes”, or spaces in the anode that are missing an electron in them, and in order to neutralize them the conductive layer sends them towards the emissive layer, where the electron-filled spaces from the cathode meet the electron-lacking spaces from the anode. As these “holes” become neutralized, energy is released in the form of photons, or packets of light, which is what is emitted from the display. You can then further control the color of the light by adding colored filters.
For this project, I used an Adafruit library to allow me to use the OLED and send information and commands to it. I started off by setting each pixel on separately to print the letters I wanted on the screen, but soon realized that there was a built in print command that I later used.
For my next milestone I hope to get my GPS working and showing data on the OLED!
My first milestone was getting my accelerometer to work. To derive data from the accelerometer, I used a library with built-in functions to refer to certain values outputted by the accelerometer and an I2C bus to provide a physical route for the data to travel from the accelerometer to the Nano, which sent the information to my computer. Then to get velocity from the acceleration, I essentially used a trapezoidal Riemann sum. I took very small intervals of time (about 5 milliseconds) and took the acceleration values at both ends of the interval. I took the average of these values and then multiplied the average by the width of the interval to get the change in velocity over that interval. Essentially, I integrated the acceleration to get the velocity.
While completing the milestone, I learned how to use libraries for accelerometers, how accelerometers work, and how to wire a Nano. I also faced three main problems: finding a library that would provide me the data with the accuracy I wanted it to, figuring out why the accelerometer wasn’t communicating properly with the Nano, and figuring out a way to remove error from the accelerometer. I achieved the first one after going through four libraries, figuring out which one gave me the most relevant data. I learned that ease of use was inversely proportional to functionality, hence I ended up using one of the more complicated libraries. There was a quick fix to solving the communication problems. Instead of using a breadboard, I soldered the components together in an effort to make sure that the current was transmitted between the two devices. To attempt to remove error in the accelerometer, I et conditional statements that would remove values if they were too small to matter in the calculations. Since I was taking a Riemann sum, these small errors could eventually add up and create much larger errors, hence it was important to perform this step. Due to this, I might switch to the GPS but for now I’ll try to get rid of that error.