IMP iPhone App
Updated: Nov 4, 2019
I did it! The very FIRST iPhone app which provides fair competition between different sports supporting by a universal mathematical model!
I have this idea back to the extracurriculars in grade 9 with my friend Haruya. I am a biking fan while he is much into runnings. The debate seems to be endless about which sport is more energetic. Both of us use iPhone apps to track our own activities. Then the debate became which app is more accurate to measure the sports.
There is simply NO one universal app to compare different sports with agreeable criteria in the entire Apple App Store. One option is the calgary consumption provided by the individual app. However, it is only a rough estimation and apparently it cannot track when the speed varies, interval training or Fartlek runs.
Since then, I had the idea to design and implement a universal iPhone app measures the strength of multiple sports.
After tons of research, I found a product called dynamo, an electrical generator installed into a bicycle to provide power for lights. The product inspired me that I can use the battery charging between different sports. Plus, it is environment friendly. I can design an app for that!
There are some difficulties to be concerned.
1. The dynamo is designed for biking purpose only, which means it cannot be installed on a treadmill.
This is not that challenging for me since I have made many architecture design prototypes, Vex Robotics, and engineering products. I ordered some parts from HomeDepot and 3D printed an irregular connector, and installed the dynamo directly connected on a bearing of the running belt of the treadmill.
2. Apple is very strict with any accessories related to iPhones. To charge an iPhone, the voltage input is mandatory to be 5V.
This is really challenging! To obtain a stable 5V output, I ordered many mini electrical transformers from Amazon, installed and tested the output voltage using a multimeter one by one. Eventually, I found one transformer which takes a voltage input range of 0V to 12V and a stable 5V output within 10% tolerance, with the transformation efficiency of approximately 83%.
3. The dynamo must be MFi certified by Apple to charge an iPhone.
The app is panic for this technical difficulty for a long time. Obviously, I cannot request an MFi certification from Mr. Apple. The electrical transformer producer was reluctant to apply an Apple MFi certification as well. The problem is solved by adding an MFi certificate USB adaptor to the transformer. Thanks Amazon!
Here it is, the full package!
4. What about if an iPhone is fully charged while my friend and I are still working out? We cannot stop and change an uncharged iPhone.
I designed a mathematical model to simulate the charging efficiency of the app user. When an iPhone is charging, I calculate the derivative of the charged battery capacity (mAh) which I learned from AP Calculus course. The app will still simulate the charing procedure despite the iPhone is fully charged.
5. I learned Python and soon will learn Java in the Computer Science courses. But Apple uses Objective-C and Swift as its main programming languages, which are new to me.
I found the online course "Developing iOS 11 Apps with Swift" by Stanford University is really helpful. The course link is here.
Eventually, I finished the app in Grade 11, and submitted it to Apple for review. After back and forth with Apple a few times, the App is still under review. The review process is much longer than usual because the app is associated with a dynamo, and Apple required to test and evaluate the hardware part as well. Should I also send a treadmill to apple?
My current plan for the next stage of the app is to build an Android version, and add more features such as supporting more sports types, and interactive with Facebook, Instagram, etc.
Anyone is welcomed to work together with me to improve the app. Please feel free to contact me to obtain a copy of the source code if you want to work independently.