May 11, 2016 Team #15: CoachJav Final Report Kwesi Asare, David Dadzie, Ofiliojo Ichaba, Landon Potts ENGR 340 Senior Design Project 2016, Calvin College © Kwesi Asare, David Dadzie, Ofiliojo Ichaba, Landon Potts Calvin College, Calvin Engineering Dept. 2015-2016 1 1. Executive Summary Data and statistics is a common thing in most sports and events, but one sport where stats are lacking is the javelin throw in track & field. Thus Team 15, made up of four electrical engineering students, created CoachJav to attach to a javelin and capture data. The device collects information about a javelin throw using a variety of sensors, and relays the stats, including velocity of throw and angle of release, to an app on an Android device. The stats about the throw can be seen by the coach or athlete to then improve their throwing, especially their technique. These stats can also be displayed to the fans of the sport to make the event more exciting. The device as a product can fill a niche in the market for javelin coaches, athletes, researches, or fans. This makes CoachJav a feasibly marketable product for a profitable company. 2 Table of Contents 1. Executive Summary ................................................................................................................ 2 2. Introduction ............................................................................................................................. 8 3. Project Management ............................................................................................................. 10 3.1. Team #15 ........................................................................................................................ 10 3.2. Team Organization ......................................................................................................... 11 3.3. Budget ............................................................................................................................ 13 3.4. Method of Approach ...................................................................................................... 13 4. 3.4.1. Research Method .................................................................................................... 13 3.4.2. Team Communication Method ............................................................................... 14 3.4.3. Design Method ........................................................................................................ 14 Requirements ........................................................................................................................ 15 4.1. Design Schedule ............................................................................................................. 17 4.2. System Architecture ....................................................................................................... 18 4.3. Design Norms ................................................................................................................. 19 4.3.1. Trust ........................................................................................................................ 20 4.3.2. Cultural Appropriateness ........................................................................................ 20 4.3.3. Caring ...................................................................................................................... 21 4.3.4. Integrity ................................................................................................................... 21 4.4. Design Components and Alternatives ............................................................................ 21 4.4.1. Sensors .................................................................................................................... 21 4.4.2. Microcontroller ....................................................................................................... 22 4.4.3. Power Source .......................................................................................................... 24 4.4.4. Data Communication .............................................................................................. 26 4.4.5. User Interface .......................................................................................................... 27 4.5. Final Design ................................................................................................................... 29 4.5.1. Prototype Components ............................................................................................ 29 4.5.2 The CoachJav App ....................................................................................................... 32 5. Business Plan ........................................................................................................................ 35 5.1. Company Description ..................................................................................................... 35 5.1.1. Team ....................................................................................................................... 35 3 5.1.2. Board of Directors and Advisors ............................................................................ 36 5.1.3. Company Structure ................................................................................................. 36 5.2. Operations ...................................................................................................................... 37 5.3. Financial Statements ...................................................................................................... 37 5.4. SWOT Analysis.............................................................................................................. 38 5.4.1. Strengths ................................................................................................................. 38 5.4.2. Weaknesses ............................................................................................................. 38 5.4.3. Opportunities........................................................................................................... 38 5.4.4. Threats..................................................................................................................... 39 5.5. Marketing ....................................................................................................................... 39 6. 5.5.1. Target Market.......................................................................................................... 39 5.5.2. Demographic Profile ............................................................................................... 40 5.5.3. Other significant customer characteristics .............................................................. 40 5.5.4. Desired Image in Market ........................................................................................ 40 5.5.5. Market Size and Trends .......................................................................................... 40 5.5.6. Advertising and Promotion ..................................................................................... 41 5.5.7. Pricing ..................................................................................................................... 41 5.5.8. Distribution Strategy ............................................................................................... 42 Testing................................................................................................................................... 43 6.1. Apparatus ....................................................................................................................... 43 6.2. Method ........................................................................................................................... 44 6.3. Results ............................................................................................................................ 45 6.3.1. Angle of Release ..................................................................................................... 45 6.3.2. Velocity ................................................................................................................... 46 7. Future Work .......................................................................................................................... 48 8. Conclusion ............................................................................................................................ 49 9. Acknowledgements ............................................................................................................... 50 10. Appendix ............................................................................................................................ 51 10.1. Assembly Drawing of Prototype ................................................................................ 51 10.2. Obtaining Angles through Kalman Filter ................................................................... 52 10.3. Test Data ..................................................................................................................... 53 10.3.1. Testing Angle Data.............................................................................................. 53 4 10.3.2. 10.4. Testing Velocity Data.......................................................................................... 54 Financial Statements ................................................................................................... 55 10.4.1. Income Statement ................................................................................................ 55 10.4.2. Cash Flow Statement ........................................................................................... 55 10.4.3. Cost Analysis....................................................................................................... 56 5 Table of Figures Figure 1: Team #15 Photo............................................................................................................. 10 Figure 2: Organizational Structure................................................................................................ 12 Figure 3: Work Breakdown Schedule ........................................................................................... 18 Figure 4: System Flow Diagram ................................................................................................... 19 Figure 5: Block Diagram .............................................................................................................. 19 Figure 6: Arduino Size Comparison ............................................................................................. 24 Figure 7. Battery Space within CoachJav Design ......................................................................... 25 Figure 8. Component Assembly for CoachJav ............................................................................. 30 Figure 9. 3D model of Final Prototype of CoachJav .................................................................... 31 Figure 10. CoachJav Final Prototype ............................................................................................ 31 Figure 11: Concept Design Fit to Javelin ..................................................................................... 32 Figure 12: Layout of Main Activity Android App........................................................................ 33 Figure 13: Layout of Display.xml ................................................................................................. 33 Figure 14: Speed and Angle in Android App ............................................................................... 34 Figure 15: Company Structure ...................................................................................................... 37 Figure 16: Slingshot Crossbow Javelin Launching Apparatus for Testing .................................. 43 Figure 17. CoachJav after shock-resistance testing ...................................................................... 44 Figure 18: Angle of Release Testing Results ................................................................................ 46 Figure 19: Velocity Testing Results ............................................................................................. 47 Figure 20: Assembly Drawing of Prototype ................................................................................. 51 6 Table of Tables Table 1: Budget Breakdown ......................................................................................................... 13 Table 2. Decision Matrix for Arduino Microcontroller ................................................................ 24 Table 3. Decision Matrix For Battery Selection ........................................................................... 25 Table 4: Data Communication Decision Matrix ........................................................................... 27 Table 5: User Interface Decision Matrix ...................................................................................... 29 Table 6: Testing Angle Data ......................................................................................................... 53 Table 7: Testing Velocity Data ..................................................................................................... 54 Table 8: Income Statement ........................................................................................................... 55 Table 9: Cash Flow Statement ...................................................................................................... 55 7 2. Introduction Competitive athletes have a constant objective of improving their performance. In order to do this, the athletes and their coaches adopt a wide spectrum of methods to get the necessary feedback of athlete performance. For instance, Zepp Tennis is a program that monitors the speed of the serve and other important performance parameters of tennis players. Other sports such as golf, sprints, and baseball have similar feedback systems in place. One sport that does not have such a system is the javelin throw in the sport of track and field. Digging deeper into the javelin throw, the team found out that there are certain technical factors that affect the javelin throw. These include, but are not limited to, the athlete’s technique, approach speed, angle of release, velocity of release, and angle of yaw. Although these factors vary by individual, there are certain techniques that generally produce better throwing results. However, there is no viable method of determining the optimum values that provide the best results. The current method used involves the athlete and their coach determining the best technique based solely off of their observation, a method which is generally unreliable and imprecise. At a higher level, Olympic researchers have tried to establish a correlation between the factors mentioned above to determine the optimum values for these factors. Although their method is not as crude as the other method mentioned above, it requires expensive equipment such as multiple high speed cameras, specialized javelins, force sensors, and a controlled environment. Another disadvantage of this system is that, because it uses data modeling, it is not very individualized. Team #15 CoachJav, made up of four electrical engineering students, designed a device that attaches to a javelin, records data from a throw, and sends it to the athlete or coach via a mobile device application. The coach or athlete can see the velocity of the throw, the angle of release of the javelin, and the distance thrown, all in real time. The coaches or athletes can use the quantitative data to effectively assess the athlete’s performance, monitor their progress, and help the athlete see what areas the athlete is executing well and where they can improve. If the coach or athlete can get this information in fewer throws, it is extremely helpful so the athlete can have a more focused practice, and maybe throw the javelin less. Fewer throws helps the thrower especially because each throw forces the athlete to exert a lot a stress on their body and tires 8 them out, and also can help the coach with shorter practices and more focused training on the improvement areas. 9 3. Project Management 3.1. Team #15 The design team is made up of four senior electrical and computer engineering students, pictured in Figure 1 below. (left to right) - David Dadzie, Ofiliojo Ichaba, Landon Potts, Kwesi Asare Figure 1: Team #15 Photo Kwesi Asare Kwesi Asare is a senior Electrical & Computer Engineering student from Tema, Ghana. He is also a freelance photographer and digital media designer. This past summer, he worked as an electrical engineering Intern for Herman Miller, Inc., a reputable furniture making company in West Michigan. He programmed a microcontroller unit that was implemented in a sit-to-stand desk as part of a project in transforming the switch mechanism to an automated sit-to-stand mechanism. In his free time, Kwesi likes to cook exotic meals, play the piano, and edit photos. Landon Potts 10 Landon is a senior Electrical & Computer Engineering student from Caledonia, Mi. He is a fouryear member of both the Men's Varsity Cross Country Team as well as the Men's Varsity Track & Field Team here at Calvin. The summer before his senior year, he worked for www.hymnary.org developing an Android app which can be used to view hymnals. In his [limited] free time, Landon stays very active. His hobbies include running, swimming, watersports, roller skating, and ultimate Frisbee, as well as spending time with friends and family. Ofili Ichaba Ofiliojo is a senior Electrical & Computer Engineering student from Lagos, Nigeria. He is currently serving on the Calvin College Student Senate. Ofili has a strong interest in computer science, particularly in artificial intelligence and Natural Language Recognition research. His hobbies include singing, soccer, and reading. David Dadzie David is a senior Electrical & Computer Engineering student from Accra, Ghana. He is a fourth year member as well as a team captain of the Men's Varsity Track & Field Team at Calvin College. This summer, he worked on a research project, with Professor Yoon Kim, to design and construct a DC-DC constant current, constant voltage solar simulator. The results of the research project can be viewed at www.calvin.edu/academic/science/summer. David enjoys the broad range of music genres across the world and loves playing the drums. His hobbies include bowling, table tennis, and RPG games, as well as spending time with friends and family. 3.2. Team Organization The team is setup to be very collaborative, meaning tasks are distributed fairly among the team members. However, to avoid redundant work, each member of the team was assigned a section of the overall project. The breakdown of assigned tasks was as follows: Kwesi Asare – Filtering Data and Business Plan David Dadzie – Hardware PCB Design and Testing Ofiliojo Ichaba – User Interface - Android App Development 11 Landon Potts – Coding Microcontroller and Sensor Work Other important stakeholders involved in the project include: Faculty Advisor, Professor Mark Michmerhuizen – The role of the faculty advisor, among other things, was to make sure the team stayed on track to meet all the project deadlines at the appointed times. He was also the point of contact between the team and the senior design project administrator. Industrial Consultant, Mr. Eric Walstra – The Industrial Consultant met with the team once a semester. His role was to guide the team in making good design and engineering decision. Mr. Walstra was extremely helpful in determining the main risk points of the project, before the team ran into them. Client, Bret Otte – Bret Otte is the Calvin College Head Track & Field Coach, and in charge of the college's Javelin team. His role in this project was to determine the constraints of our design. The other senior design course instructors are Professor Nielson, Professor VanAntwerp, and Professor Masselink. Figure 2 above shows an organizational chart of all the stakeholders for the project. Course Instructors Faculty Advisor Industrial Advisor Team 15 Client Figure 2: Organizational Structure 12 3.3. Budget For the project, the team was allotted $500 by the Calvin Engineering Department. The team procured several Arduino boards, multiple sensors including GPS modules and Inertial Measurement Units (integrated combination of accelerometer, gyroscope, and magnetometer), batteries, and testing equipment. The accrued amount spent on these components was $307.59, leaving $192.41 still in the team budget. The budget breakdown can be seen in Table 1 below. Table 1: Budget Breakdown Component ADXL335 - triple-axis accelerometer Flora 9-DOF accelerometer/Gyroscope/Magnetometer Standard LCD 16 x 2 + extras 3V Lithium Coin Battery (225 mAh) CR2032 3V Lithium Coin Battery (137 mAh) 16mm Flora Wearable Ultimate GPS Module Arduino Pro Mini 328 - 3.3V/3MHz Sparkfun FTDI Basic Breakout - 3.3V Bluetooth SMD Module - RN-41 (v6.15) Strap Battery Econ 9V I Style 4"LD Coin Cell Holder for 16mm Cell Coin Cell Holder for CR2032 Passive GPS Antenna uFl - 15mm x 15mm 1 DBi Gain Passive GPS Antenna uFl - 9mm x 9mm -2 DBi Gain Sparkfun Bluetooth Mate Gold Total Quantity 1 2 1 2 2 2 2 2 1 2 2 2 1 1 1 Price Cost $14.95 $14.95 $19.95 $39.90 $9.95 $9.95 $1.99 $3.98 $1.95 $3.90 $39.95 $79.90 $9.95 $19.90 $14.95 $29.90 $25.95 $25.95 $0.60 $1.20 $1.39 $2.78 $0.74 $1.48 $3.95 $3.95 $4.95 $4.95 $34.95 $34.95 $307.59 3.4. Method of Approach 3.4.1. Research Method Research for the project was done by researching existing systems. As there were not many or any for the sport of javelin itself, the team looked at other sports technologies, such as Zepp Tennis, a program to measure the speed of a tennis serve, or SparTag, a device measuring the 13 power of the swing of a baseball bat. More in-depth research on components and filters was done using various online and journal sources, especially through the Hekman Library. 3.4.2. Team Communication Method The team’s main form of communication was through email, although other forms were used as well. As the team all uses Android smartphones, the texting app WhatsApp was used for group chats and quick messages. Weekly meetings and class times were also used to stay up to date, hold each member accountable to their tasks, and overcoming obstacles or other team decisions. For collaborative work, the team used both Google Drive and Microsoft One Drive in order to allow multiple people to edit the same file or document. 3.4.3. Design Method First, the team completed lots of research in the area of the project, specifically complementary and Kalman filters, Attitude and Heading Reference Systems (AHRS), and several sports technologies. This research included looking into different types of sensors and microprocessors. After considering different design alternatives, the team focused on getting all the individual parts of the system working separately. This included getting the angle of release from the sensors, getting the velocity of throw from the sensors, communicating between a phone and Bluetooth module, hardware design and casing, and portability and power requirements. Finally, the last step was to integrate the different aspects of the project into a single working prototype, as well create as a concept design for a final model given more time and resources. 14 4. Requirements For the main aspects of the design, the team set design criteria to guide the process. After conferring with Bret Otte, Head Track & Field Coach at Calvin College, a number of constraints were added to the criteria for the design of the system. These include physical requirements, functional requirements, and performance requirements. Physical requirements encapsulate the constraints of the device itself and the wear and tear it must withstand. Functional requirements encapsulate how the device operates. Performance requirements encapsulate what can be expected of the device. Physical Requirements The entire device including packaging or casing shall be no larger than 6 inches in length with a diameter not more than 0.25 inches larger than the javelin it is attached to. This is to make sure that the device does not alter the wind resistance of the javelin. The device shall weigh less than 1 lb. This is to ensure that the center of gravity remains the same so that the throw is not altered in any way by the device being attached to it. The device shall be able to withstand shocks ranging from 10,000 G to 20,000 G (vibrations). Javelins regularly experience shock within this range, and the device shall remain safely attached and accurate throughout the lifespan. The casing shall be able to withstand the elements (water resistant, mud and earth resistant, snow resistant) to protect the electronics within. Track meets are rarely cancelled and the athletes will compete in various weather conditions. The device shall be able to last no matter the conditions an athlete will throw in. The casing shall be easy to attach and detach from the javelin implements, as teams may want to use it and each thrower tends to prefer different javelins, or possibly has their own. Functional Requirements The final package shall contain the least collection of sensors necessary to obtain data and output the useful information accurately, within 5% error. 15 Accuracy shall be maintained even with a high level of noise and interference from the javelin vibrations and spiraling. The sensors employed in the device shall remain true to calibration throughout the lifespan of the device, even going through the shock of over 10,000 G. A user that has the tech savviness for basic use of a smartphone shall be able to use and understand the interface of the Android app. The user cannot waste brain power on using the app, but is focused on improving their throwing. The user interface shall use plain, non-technical language. The users will [most likely] not be engineers, and shall still be able to understand everything easily. Performance Requirements The range of the communication from the device to the mobile device shall reach up to 100 m. Upper level athletes are able to throw the javelin nearly 100 m (world record 98.84 m), so the communication shall support this range. The battery life of the device shall last at least 5 hours. This will get the athlete at least through a week of throwing practice (assuming device is off while athlete is warming up and lifting – throw for about an hour a day, 5 days a week). Power source shall have low current requirements, for safety as well as to extend battery life. Thus the current shall stay below 0.5 A or 500 mA. The device shall transmit the data to the phone within a reasonable time. The athlete will track the throw to its landing and then want to look at the data. Therefore, the information shall be transmitted within 20 seconds of the release. Deliverables for Team 15 CoachJav include: Project Proposal and Feasibility Study Final Report Team Website Prototype 16 4.1. Design Schedule The work breakdown was done according to the schedule in Figure 3 below. In addition to the Gantt Chart of Figure 3, the team utilized sticky notes with monthly end goals and tasks. These sticky notes could easily be moved around if the task was finished early or required more time to complete, and helped the team stay focused and aware of what was to come next. 17 Figure 3: Work Breakdown Schedule 4.2. System Architecture 18 The requirements above were analyzed and a system was designed to meet the requirements. This was done by breaking the system down and designing the individual aspects of the project before integrating them back together into one device. An overview of the system flow is shown in Figure 4 below. An overall block diagram is also shown in Figure 5 below. Figure 4: System Flow Diagram Figure 5: Block Diagram 4.3. Design Norms As students, the Calvin College mission statement has been ingrained in us over the past four years, “to think deeply, to act justly, and to live wholeheartedly as Christ’s agents of renewal in 19 the world.” From an engineering standpoint, the mission statement can be seen directly in the Design Norms from the Senior Design class. Thinking deeply translates to caring and cultural appropriateness; acting justly translates to transparency, integrity, justice, and trust; being an agent of renewal translates to stewardship, and being Christ-like translates to all design norms, especially humility. Of course, the team tried to follow all the Design Norms, but chose four main ones to keep in mind throughout the whole design process over the past year of the project: Trust, Cultural Appropriateness, Caring, and Integrity. 4.3.1. Trust “Design should be trustworthy, dependable, reliable, and avoid conflicts of interest” The system as designed would serve as a tool for providing feedback to the coach and the athlete. There will be no trust if the system does not provide the accurate measurement it promises to provide. Therefore, without trust as a design norm, the system would be useless to the coaches and athletes and would not sell. Furthermore, the team wants to make sure that no consumers have misconceptions about the device. It is only meant to be a tool to assist in the development of athletes, and makes no guarantee that using the product will make you an amazing javelin thrower. The sport of throwing javelin is grueling. It takes hard work and dedication, as with all sports, to reach an exceptional level, but the device may make the technical aspects of the throw easier to improve upon. 4.3.2. Cultural Appropriateness “Design fits in with the general human socioeconomic order, alleviates human burdens, but preserves what is good in the culture, and is guided by love, respect, and a value of diversity” The sport of track & field has a culture all on its own, as one can perceive if they have attended a track meet. Also, within that culture, the sport of throwing and specifically javelin throwing has its own rules, standards, regulations, and norms. The system is not designed to change or infringe on the existing culture that is the sport of track & field, but to respect the standards already in place. The device also should provide measurements in the same units as are used in the sport (metric system – meters). 20 4.3.3. Caring “Design shows genuine love and concern in the design group and in fabrication, shows due care for persons, takes into account the effects on individuals (physically, socially, and psychologically), and promotes loving caring relationships in use.” As designers of the system, the goal that was set for the development of this system was to care for the athlete. In designing a system that provides feedback of the actions of the athlete, we are not only providing information, but the team believes the given information could be useful in making the athlete better at the sport. Also, the team believes that as Christians, people should “Do the best they can on a daily basis with what God gives them on that day” – Al Hoekstra (Calvin Track Coach). The project, hopefully, helps the users to achieve their best in the javelin, as they continue to do the best they can not only in sport, but in all areas of their life. 4.3.4. Integrity “Design is complete, is harmonious of form and function, promotes human values and relationships, and is pleasing and intuitive to use.” This design norm deals a lot with the user interface, and means a lot to the user. The user can take comfort in the fact that the device was designed with them and their experience while using it in mind. As laid out in the Design Norm itself as well as in the design criteria created by the team, the system must be intuitive, pleasing, and easy to use for anyone and everyone. 4.4. Design Components and Alternatives 4.4.1. Sensors After conferring with the client Coach Bret Otte of the Calvin College Track & Field team, there are two pieces of desired information that coaches and athletes do not have easy access to already: velocity of throw and angle of release. To capture this information, the team had to 21 choose sensors that would get the data and be able to process it into the desired output information. Initially, the team considered using only an accelerometer. There are several different types of accelerometers, so the team chose based on several factors, including size, vibration, shock, and motion. The accelerometer for a javelin throw would have to withstand lots of vibration and shock while still remaining accurate without re-calibration. After initial testing the team determined the accelerometer by itself would not have been enough for obtaining reliable data. The accelerometer is designed to be sensitive to gravity and therefore could be affected by forces from multiple directions, leading to error in the results (up to 8 m/s inaccuracy). Thus, instead of just an accelerometer, an inertial measurement unit (IMU) was used capturing nine degrees of freedom. The Inertial Measurement Unit is integrated with an accelerometer, gyroscope, and magnetometer. The combination of the sensors proved more efficient, as each sensor relied on another to be able to give accurate results. As an example the accelerometer used the data from the gyroscope to determine if the force acted on it was anything other than a rotational force. The team eventually went with a combination of the gyroscope and accelerometer data, using a Kalman filter. This was useful for capturing the angle of release. However, after another round of testing, the IMU alone would not yield accurate results for the velocity of throw. To capture this information, two sensors were considered: an air flow meter or a GPS module. The air flow meter was determined to be too large for the product the team was creating, so the GPS module was employed and added to the device. The GPS module captures the velocity of the throw with accuracy, especially as the javelin throw event is conducted outside. Additionally, to cut down on the GPS fix time (searching for satellites), a backup battery for the GPS was added to the final product as well. 4.4.2. Microcontroller For the microcontroller, there are two main options that are easy for development such as senior design requires. The two most common sources of development boards are Raspberry Pi and Arduino. They come standard with several options that make developing projects easy for the 22 user, and Arduino has libraries of open source code used from other projects and from the company engineers themselves. Because the team wanted to keep the device as small as possible and the project did not require the processing power or memory of a Raspberry Pi, the team chose to go with Arduino. However, even within the Arduino brand, there are multiple choices for microprocessor development boards, such as an Arduino Mega, Arduino Uno, Arduino Nano, Arduino Pro Mini, and more. Arduino Uno The Arduino Uno is the biggest and most powerful of the three boards considered for the project. The team did purchase an Arduino Uno for initial development, but the board is bigger than was necessary for the final device. However, the board was incredibly useful to get initial setup and coding experience, as well as for easy testing with preliminary steps. Arduino Pro Mini The team also purchased an Arduino Pro Mini because of the small size and low power requirements, only needing 3V to run the ATmega 328 microprocessor and other hardware. This board was used in preliminary designs for its miniature space, but due to the necessary filtering of the data to get accurate results, the board did not have enough memory and processing space to perform the required tasks. Arduino Nano The Arduino Nano is basically the Goldilocks for the CoachJav, as shown in the Decision Matrix in Table 2 below. The size is smaller than the Arduino Uno, but has more memory space than the Arduino Pro Mini without being too much larger in actual size. This combination makes the Arduino Nano just right for CoachJav, as shown in Figure 6 below. The Nano also has multiple necessary pins already built into the board, such as i2c ports and serial ports, as well as easy voltage regulations for simple wiring with the sensors, batteries, and communication module. 23 Figure 6: Arduino Size Comparison Table 2. Decision Matrix for Arduino Microcontroller Factors Weight Memory Size Voltage Requirements Total 8 5 2 Arduino Uno 2 1 2 Arduino Nano 2 2 2 Arduino Micro 1 3 3 25 30 29 4.4.3. Power Source There are infinite options for a power source to power the device. Because the device must be portable, this leaves only batteries, but again there are multitudes of batteries including standard batteries such as AAA or AA, rechargeable batteries such as Lithium Polymer (LiPo), or coin cell batteries. The power source should give the device at least 5 hours of power (about a week of daily practice). Standard Battery (1.5v) 24 Standard batteries are the best known and cheap. However, due to their low voltage, it would take 4 of them to power the device. Also, they are not small, and as such would not work well for the design of CoachJav. LiPo Battery Rechargeable and with high milliamp hours, the LiPo battery seems like an extremely good option for CoachJav. However, the stability and necessity of plugging the device in to recharge the battery brings safety concerns, and the size of a LiPo is not quite as good as other options. Coin Cell Battery The coin cell battery is the smallest option, which makes it the best for the final design as shown in the Decision Matrix in Table 3 below, as well as the 3.3 v output. There are a few different sizes that the team tested – a 16 mm and a 20mm – just to make sure that the device lasts as long as desired. The 20mm has more milliamp hours so it will last longer than the 16mm coin cell, thus the final design contains the 20mm CR2032 battery, while still remaining small enough to keep the device compact as shown in Figure 7 belowFigure 7. Battery Space within CoachJav Design. Battery Space Figure 7. Battery Space within CoachJav Design Table 3. Decision Matrix For Battery Selection Factors Weight Voltage 10 Standard Battery (1.5V) 4 LiPo Battery 8 Coin Cell Battery 6 25 Size Current Time Total 8 6 4 4 96 5 7 162 9 6 168 4.4.4. Data Communication Ideally we would like our communication module to cover a range of 100m. The current world record for javelin throw is 98.48m. Realistically, the team would like the package to communicate data at least a third of the ideal range, which is a 30m radius. Given this radius, the package will be able to gather data and transmit the data to the connected device quickly. This range also optimizes power consumption from the data communication module. The team plans to inform the user of the range of communication for more effective use of the tool. Also considered in the choice of communication was the rate of data bit transmission and power consumption. The bit rate determines how fast the information would be transmitted between the communication module and the user interface. It also determines the frequency at which data is transmitted between the communication module and the user interface. The rate of data communication would be selected to provide results as soon as possible. In terms of power, the team would like to implement a system with as low power consumption as possible to make the device last longer without replacing the batteries. This was a significant consideration for the team's choice of a data standard. That being said, some modules come with "sleep modes" that reduce their overall power consumption. The team would like to employ the module with a high power efficiency. Several options already exist for wireless data communication, as follows: Bluetooth Communication Strengths of Bluetooth communication include versatility, and integration in most existing devices including smartphones and audio devices. However, most Bluetooth modules consume a high amounts of power in data communication. The range of data communication can go up to a 100 m, although most only reach up to a range of about 10 m. 26 ZigBee Communication Protocol The ZigBee module provides a low cost, bi-directional communication. However, it communicates data at a low bit rate (250 Kbits/s). It covers a similar range to Bluetooth, and goes even further in a mesh network. The down-side of ZigBee is that it comes in pairs, a transmitter and a router for receiving; and therefore needs a medium for data transmission, other than just a phone. Wi-Fi Communication Protocol Wi-Fi is one of the most common standards of communication. It relies heavily on routers and access points and therefore limits its communication to the range of the base network. Nevertheless, it is able to transmit a standard bit rate of 54 Mbit/s and an average of 22 Mbits/s of data. However, it is also very bulky. With the information gathered above, the team decided to use a decision matrix as shown in Table 4 below to determine what data communication standard to adopt to transmit data between the user interface and the javelin. Table 4: Data Communication Decision Matrix Size Range Power Consumption Transmission Rate Cost Convenience Weight 10 9 8 7 6 9 Totals Bluetooth 3 1 2 2 2 3 108 WiFi 1 3 1 3 1 2 90 ZigBee 2 2 3 1 3 1 96 From the decision matrix in Table 4 above, Bluetooth was determined to be the ideal standard of data communication for the project. However, most Bluetooth modules only operate up to ~10 m. Thus, the team chose to go with a higher-power Class I module, with a range of up to ~100 m, a distance over the world record throw. 4.4.5. User Interface In terms of the user interface, the team had the three options listed below: 27 Windows 10 mobile operating system Android Operating system iPhone Operating System (IOS) Windows 10 mobile Operating System Windows 10 is Microsoft's latest attempt to build an operating system that is both user and developer friendly. The advantage of Windows 10 is that it allows easy synchronization of developed applications between the mobile operating system, desktop operating system and their gaming console the Xbox One (Considering the future of Internet of Things (IoT) the gaming console might be useful in viewing and analyzing data). It also allows easy porting of application programs from Android and IOS operating systems with minimal modifications. These features of the Windows 10 operating system make it a suitable platform for application development. However, there are not many mobile devices currently running on the Windows 10 mobile operating system. Android Operating System The Android operating system provides a customizable base that is used by a large percentage of the mobile device market. Most smartphone producing companies manufacture their phones with a form of Android modification, which makes the operating system the most used operating system currently. The operating system currently boasts 82.8% market share. Apple iPhone Operating System Apple’s iPhone operating system provides a base of efficient app standards that developers are required to follow. In 2015, the programming language, Swift, was released, which promises more hands-on, easy, safe and interactivity for app developers. This step from Apple is a sign that they look out for developers and are trying to make development on the platform easier. With the information gathered above, the team used a decision matrix shown in Table 5 below to determine what user interface platform to adopt, and created an Android application. 28 Table 5: User Interface Decision Matrix Entry Cost Market Available Customization Experience 4.5. Weight 10 9 8 7 Totals Android 2 3 3 3 92 Apple IOS 1 2 1 2 50 Windows 10 3 1 2 1 62 Final Design 4.5.1. Prototype Components For our final design the following components were employed as discussed in this report. MPU6050 – This IMU (inertial measurement unit) was used as the accelerometer, gyroscope sensor, to measure the angle of release of the javelin. Adafruit’s GPS flora breakout – This GPS (global positioning system) module was used to determine the velocity of the javelin. Arduino Nano – Served as the microcontroller hosting the algorithms, power distribution and communication among all components present. Sparkfun’s Bluetooth Mate Gold – Used as the Bluetooth server for communication between the microcontroller and the app on the phone, with a range up to 100 m. CR2032 Coin Cell Batteries – small but used to power the microcontroller, GPS, Bluetooth, and IMU. 3D Printed Casing – houses the components, attaches them to the javelin rigidly, and protects them from the elements and shock. A diagram of the components used and the connections between them is shown in Figure 8 below. 29 Arduino Nano Bluetooth GPS IMU Coin Cell battery Figure 8. Component Assembly for CoachJav The CoachJav prototype was designed with a minimalist intent. It was designed with the intent to be inconspicuous while being strong enough and big enough to contain the components to be used for measuring the velocity and angle factors. The weight of our final prototype was measured at 92 g or 0.20 lbs with all the components but the battery in place. The weight of CR2032 batteries also referred to as the coin cell batteries in this report have a varying weight of 2.8 g to 3.9 g or 0.0062 lbs to 0.0086 lbs. Altogether, the prototype weighed from 94.8 g to 95.9 g (0.206 lbs to 0.209 lbs) depending on the battery weight. Figure 9 below shows the 3D model modelled with solid works and Figure 10 below shows the outcome of the model, printed with High Impact Polystyrene (HIPS) and coated with fiberglass resin for reinforcement. HIPS has a flexural strength of 4620 psi and an impact strength of 2.20 ft-lb/in [1]. However, a two-pound javelin has kinetic energy of 167 ft-lbs after traveling at a velocity of 73.5 fps [2]. The fiberglass resin added an extra 20 ft-lb/in to the model thus making an overall impact strength of 22.20 ft-lb/in. Considering the six inch length of the prototype, the impact strength of the package was 133.2 ft-lb. The package was able to impact 5 throws of the Javelin, flying at an average speed of 33 mph. 30 Figure 9. 3D model of Final Prototype of CoachJav Figure 10. CoachJav Final Prototype 31 An assembly drawing of the model has been attached in the Appendix 10.1 to show further design constraints. This assembly attaches to the javelin as shown in Figure 11 below, to keep the center of gravity nearly the same, as well as limit wind resistance of the device. Figure 11: Concept Design Fit to Javelin 4.5.2 The CoachJav App Based on the results of the decision matrix, the team decided to develop the user interface and display using the Android SDK (Android studio). The team decided that the most efficient way to tackle this design, was in two parts. The first part, was to be able to scan for, and pairing with Bluetooth devices (Specifically the Sparkfun’s Bluetooth Mate Gold connected to our prototype); the second part involved opening a Bluetooth connection between the prototype and the user’s device, transferring data across this connection and displaying this data to the user. The Android app is divided into two pages based on the two aforementioned sections of the application design, the main activity page (activity_main.xml) and the data display page (display.xml). The main activity page is the first page that the user gets to on running the app CoachJav app. This page includes buttons to disable/enable the user devices, scan for Bluetooth devices, pair/unpair with Bluetooth devices and navigate to the data display page. The two key libraries that were used for the Bluetooth scanning and Pairing were android.bluetooth.BluetoothAdapter and android.bluetooth.BluetoothDevice. Figure 12 below shows the layout of the activity_main.xml as it was designed in Android Studio. 32 Figure 12: Layout of Main Activity Android App The display page is accessed from the main activity page. On this page, a Bluetooth socket connection is opened between the user's device and the Bluetooth module on the CoachJav prototype. The values of the speed and angle are then displayed on this page. The one other feature present on this page is the clear button, which clears the most recent data and allows new data be retrieved. The key additional library used for this page's functionality is android.bluetooth.socket. Figure 13 below shows the layout of the display.xml in Android Studio. Figure 13: Layout of Display.xml The functionality of the application was written in the Java programming language. This activity was divided into three files, MainActivity.java, DeviceListAdapter.java, and 33 DisplayActivity.java. The MainActivity.java creates the activity_display.xml page and controls the functions of the buttons on this page, DeviceListAdapter.java controls the scanning and pairing functionalities, and DisplayActivity.java creates the display.xml page and controls the clear button function. This app was able to retrieve speed and angle data from the sensors on the CoachJav prototype and display them. Figure 14 below shows a sample data reading that may was received by the android application. Figure 14: Speed and Angle in Android App 34 5. Business Plan 5.1. Company Description The name of the establishment is JavTools, based on the product currently offered to clients (CoachJav). This also leaves the possibility to expand further into javelin equipment or other services related to javelin throwing. 5.1.1. Team The team working at the company currently consists of the following positions: President Head of the company and top of the decision making chain. The president is supported by a team of three executives, the VP of hardware development, the VP of software development and the Chief Financial Officer. The president is in the person of HRH. Dr. Rev. John Eric Kwamena Mugabe. VP of Hardware Development Leads a team of two other hardware engineers in developing hardware components and specifications that contribute to building the product CoachJav. The VP of hardware is Mr. David Dadzie. VP of Software Development Leads a team of two other software developing engineers to design a brain for all the connected hardware and also supports the company in providing a Graphical User Interface (GUI) for the system on a mobile phone platform. The VP of software is in the person of Mr. Landon Potts. VP of Marketing Leads the marketing and sales teams to get the product out to people and bring in revenue. All the engineering in the world will not make money without people to sell it, and without people buying it. The VP of marketing is Mr. Frank Bower. 35 Chief Financial Officer As a key part of the management team, the CFO organizes the organization’s monetary affairs and also leads the marketing team in product advertisement and sales. This person is also in charge of the ergonomics of the product and how it appeals to consumers and also leads a team of two individuals. The CFO is in the person of Mr. Ofiliojo Ichaba. 5.1.2. Board of Directors and Advisors The company has a board with four members. The chairman of the board is Mr. Jeremy Van Antwerp and his subsidiaries are Mr. Mark Michmerhuizen, Mr. Ned Nielsen, and Mr. Bob Masselink. The company also has a legal attorney in the person of Ms. Delali Zormelo and the following advisors: Accountant – Mr. Frederick Ankomah Insurance Agent – Ms. Mea Zuiderveen of Adoptive Insurance Company Banker – Mr. Sesugh Ubwa of Northwestern Bank Consultant – Eric Walstra of Gentex, Inc. Mentors and Key Advisors at JavTools include: Mr. Mark Michmerhuizen Mr. Randall Brouwer Mr. Yoon Kim 5.1.3. Company Structure The company currently operates under the structure shown in Figure 15 below. 36 President/CEO John Mugabe Hardware Software David Dadzie Landon Potts Sales and Marketing Ofiliojo Ichaba Kwesi Asare Carol Anderson Joseph Kelley Laura Clifton Harry Kane Mary Abigail "Abby" Wambach Figure 15: Company Structure 5.2. Operations The company currently operates as a partnership, as it is currently a small business composed of nine individuals. The company operates on an internal source of income and has not interacted with the market at any level. Since the company’s products have not been released to the public yet, we do not expect any lawsuits. Moving on, the company would be transformed into a Limited Liability Company (LLC), as it would be receiving loans for operation. As an LLC the company would be equipped to protect all employees present and future from any lawsuits. The company would also be able to separate individual assets from the company’s assets as an LLC. In case of foreclosure, the company would be sold as an LLC instead of a partnership. 5.3. Financial Statements To analyze the feasibility of the company, the following financial statements were analyzed, forecasted over the next three years. They are: Income Statement 37 The income statement table in Appendix 10.4.1 shows the Company’s statement of income. The statement shows cost and sales revenue for a forecast of the first three years of operation. The net income after tax is also calculated in the table. From the forecast it can be realized that the company will make a net income of about $160,000.00. This amount could be used to pay off some of the debt and structure expansion within the company. Subsequent years show an income of about $560,000.00 and $855,000, which would be used to clear the debt completely and boost marketing of the product, along with incorporating other products like CoachJav for other sports. Cash Flow Statement A table showing a statement of cash flow for the first three years is attached in Appendix 10.4.2. From the table, it is shown that the company ends with a positive cash balance. The cash flow diagram also shows the invested capital, the borrowed funds. There are no changes in assets and liabilities other than the cash, notes payable and equipment thus reemphasizing the exclusion of a balance sheet. 5.4. SWOT Analysis 5.4.1. Strengths The main strength of the company is that the product is unique and has a low cost to the consumer. There is no product on the market currently like it, nevertheless there’s a release of a similar system for baseball bats, but not for javelin. Other products that do similar data collection use expensive equipment, operate in controlled situations and mostly require video technology. The product will also be high quality and easy to use, allowing it to be recommended by the users to new clients that would not otherwise be reached. 5.4.2. Weaknesses The main weakness of the company is that it is a new startup and thus has no branding or public image yet. This will lead to the company needing aggressive marketing, which takes money and capital that the company does not have easy access to, again because it is a new startup company. 5.4.3. Opportunities 38 There are several possible opportunities for the company. First, the company name could spread at track meets and events, especially among the coaches and athletes. This gets the company name out quickly without too much marketing cost. With expansion, many teams including high school, college, or even national teams would want to buy the product and use it to improve their skills. Second, the technology could figuratively be applied to other events in the sport, especially other throws like hammer and shot put, but also long jump or high jump. Then the product could be enhanced or new products developed to incorporate these events as well. Finally, the technology could be expanded outside of the sport to other applications. This could include other launched things, such as missiles, footballs, or other projectiles. Utilizing the technology in all these areas, provides the opportunity for the team to aggressively pursue a patent. This will also help subdue competition and threats from other startups that will try to exploit the field. 5.4.4. Threats The main threat to the company is competition. If another company with an already established customer base designs a similar product, this creates competition in the market. Especially if that company is much larger and more established, the competition would set the company back and it would be hard to vie for our place in the market. The startup with the baseball bat could expand into other sports including Javelin, which could create competition for our product. However, the company could get protective patents and attempt to enforce them, although this would involve serious legal fees which the company may not have sufficient budget to follow through on. 5.5. Marketing 5.5.1. Target Market JavTools’ target market as mentioned before would be high school and college javelin throwers as well as professional throwers and coaches. 39 5.5.2. Demographic Profile JavTools’ market demographic profile includes coaches, trainers, and different levels of athletes. Coaches and athletic trainers will experience the most gain from CoachJav since they will have the ability to make real time adjustments during their sessions. Since CoachJav is able to display results of javelin throwing mechanics, athletes will have direct benefit from the system. 5.5.3. Other significant customer characteristics JavTools seeks customers who are very skilled in the art of javelin throwing and also those who display very good potential to throw long distances. The company sees these as significant customer characteristics because CoachJav will be well advertised if the company has these types of customers. 5.5.4. Desired Image in Market JavTools wants to create products and provide services that are trustworthy and reliable to create a loyal customer base that will not only maintain a relationship with JavTools but will also promote the company’s products. 5.5.5. Market Size and Trends Market Size The CoachJav product would target a niche market. Nevertheless, there is a potential for the product to be internationally recognized, thus providing a colossal customer base for the product. Rate of Growth Since the introduction of CoachJav and any similar product to markets around the world would be revolutionary, it difficult to know what the current and expected growth rate is. However, given the increasing competitive nature of sports around the globe, JavTools is confident that there would be a large rise in the number of customer within the first 3-5 years after initial introduction. 40 5.5.6. Advertising and Promotion Message JavTools wishes to deliver a strong message, which is its vision and mission. JavTools wants to be acknowledged for its innovation using cutting edge technology to revolutionize the sport of javelin throwing. We want to let our customers know that they can trust our products and that they are always reliable. Media JavTools look to incorporate social media ads and short video commercials geared towards improving performance of young athletes. These media will convey enough information to make a case to coaches and professional athletes. Budget JavTools will be on minimal amounts of cash in the first few years. In light of this the company anticipated implementing most of its advertisement through its website and well-placed sports magazines. Increase in company revenue will certainly contribute to an increase in marketing and sales incentives. Plans for generating Publicity Demonstrating the products at major sports outlets and at different high schools and college will be a major approach to increase publicity. When the company generates more revenue, using prominent sports figures to advertise our products will be an option to be considered. JavTools also plans on providing javelin training seminars for track and field programs across the USA and Europe to encourage young athletes to use CoachJav in their training. 5.5.7. Pricing *See Appendix 10.4.3 for cost of CoachJav. To cover the costs of running the business and to still be profitable, as well as the current market price following the market study above, CoachJav should sell for $849. 41 Comparison against competitors’ Prices JavTools does not have any direct competitors in terms of other companies producing the same or similar product that we have for this sport. However, since the company seek to create its product efficiently and at a low cost our products will be more favorable to customers than that of other companies within the market. Discount Policy As a small startup company, JavTools will not be offering any discounts to its customers. This decision is subject to change and will be readdressed after a few years once the company has experienced considerable growth. Gross Profit Margin Per Anticipated JavTools is anticipating a gross profit margin of 28% by the end of year three with 99% of all debts paid off. This number is reasonable given that the company currently has no credible competitors. 5.5.8. Distribution Strategy Distribution could be accomplished to the general public through all-purpose sporting goods stores such as MC Sports and Dick’s Sporting Goods in the USA. Further distribution could also be achieved through USATF (USA Track & Field) as well as international athletic goods stores worldwide, and through a company website capable of taking orders. 42 6. Testing Testing was intended to verify and point out any potential shortcomings in the design in comparison to the design specifications mentioned above. To view an explanation of the testing procedures performed, setup, results, and analysis, please see the content herein. 6.1. Apparatus In order to test our prototype we needed to develop a consistent and repeatable method with known parameters. Our testing apparatus was a slingshot. The slingshot was constructed out of wood, a PVC plastic pipe, and spear gun rubber. The device was 10 feet long and about 4.5 feet wide. The plastic pipe was used a guide for the shaft of the javelin and also a mounting slot when the slingshot was cocked. In addition, the team also built a support stand for the launching apparatus. The stand was constructed out of wood and allows the slingshot to be placed in variable positions which alters the angle at which we launch the javelin. The slingshot, support stand and the setup are illustrated below in Figure 16: Slingshot Crossbow Javelin Launching Apparatus for Testing. To perform a single test, we used a radar gun to capture the release velocity of the javelin by the slingshot. Figure 16: Slingshot Crossbow Javelin Launching Apparatus for Testing 43 6.2. Method The following parameters were tested to verify and identify the performance and potential shortcomings of CoachJav. The following parameters were tested: 1. The ability of CoachJav to withstand shock 2. The accuracy of velocity and angle readings from CoachJav. To test the ability of CoachJav to withstand test, CoachJav was assembled unto a cylindrical pole and thrown across Calvin College’s throwing field repeatedly. CoachJav was recovered structurally sound though aesthetically marred. It was then painted to restore its aesthetic qualities. Figure 17. CoachJav after shock-resistance testing shows the setup used for this test. Figure 17. CoachJav after shock-resistance testing For testing the team employed the use of the javelin launcher built by the team. This allowed the team to test the two pieces of data captured by the device, angle of release and velocity of throw. To test for accuracy in velocity measurements, the team set up a javelin launcher to help make the process repeatable. To aid in testing the accuracy of the velocity, the team used a speed gun to check the speed at which the javelin was shot out of the launcher and the speed recorded by CoachJav. 44 To test for the angle of release, the team assigned fixed angles on the side of the launcher and checked the angle calculated by CoachJav upon release, as well as checking the results by comparing to a video of the throw itself, and measuring the angle with a protractor. Following the testing of the data itself, more testing was done concerning the battery life of the device. The requirements state that the battery life shall be 5 hours to last at least a week’s worth of practice. However, when tested, the device draws a lot of power, especially when the GPS is searching for satellites. The device with two coin cell batteries only lasted ~90 min, much shorter than the desired 5 hours. As laid out in Future Work, the PCB design should also make the board last longer, but the team does not anticipate that a simple PCB with a few less components could add 3.5 more hours to the battery life. New, different, and better power sources will need to be looked into to bring the product to market, or lower powered sensors and microcontroller. 6.3. Results 6.3.1. Angle of Release After testing, it was determined that the CoachJav device works well, but not quite as well as the team initially hoped. The angle of release is more accurate than the GPS, with a standard deviation of 1.6° (standard error of 3.9%), as shown in Figure 18 below. The standard deviation for the 30° throws was 1.5° (5% error), 45° throws was 2.2° (4.9% error), and 60° throws was 1.1° (1.8% error). 45 Testing Coach Jav Angles Angles Tested at 30, 45, 60 degrees 70 60 50 40 30 20 10 0 0 5 10 15 20 25 30 Number of Tries Measured Angle CoachJav Angles Figure 18: Angle of Release Testing Results 6.3.2. Velocity The GPS is slightly worse, with a standard deviation of 1.8 m/s (standard error of 6%), as shown in Figure 19 below. The team attributes this error to the altitude change in the flight of the javelin not being detected by the GPS module, only the horizontal motion being able to be detected from the satellites far above earth. (The GPS does detect altitude, but not well, and not within the timespan of a single throw. GPS systems extend their data processing throughout a longer duration of time, usually a long drive or run for minutes at a time, as opposed to a seven-second throw to capture all the data.) 46 Testing Speed with Radar Gun and Velocity 45 40 Speed (mph) 35 30 25 20 15 10 5 0 ‐5 0 5 10 15 20 25 30 35 Number of Trials Measured Velocity GPS Speed Figure 19: Velocity Testing Results 47 7. Future Work Obviously, as everyone always thinks at the end of the Senior Design class, the team wishes they had more time and more budget. The team would attempt to use more time to make improvements on the device. This includes making a full PCB (printed circuit board) design to make the device smaller and easier to charge or replace the battery(s). Also, with more time, the team would look into better power sources to make the device last longer, or perhaps with less components (on the PCB) the device could last longer on the same power source currently used (CR2032 coin cell batteries). Another thing the team would want to improve upon is the accuracy of the velocity reading, perhaps using more or better sensors, or using trigonometry or filters to get better data. Finally, for the casing, the team would invest a little more money into better material (such as carbon fiber) to withstand more without breaking, and surrounding the PCB with silicone or rubber to withstand higher shock. 48 8. Conclusion Based on the success of the project in creating a simple first prototype, Team 15 believes that the sport of javelin could move towards the use of more statistics. Although the javelin isn't as popular of a sport, especially in the USA, every sport is advertising more stats. Football in the NFL now advertises that players wear sensors and stats can be shown live about their speed, distance, and more. As more and more sports incorporate this type of data collection, the javelin throw can also be put into the mix. Not only do the fans of the sport want to see their stats, but the coaches and athletes can use them to try to improve. The CoachJav device can fill the niche in the market as the need arises for this data, especially if the Future Work in the section above could be completed with more time, budget, and manpower. CoachJav could very conceivably be a product and could translate into a successful business, with the opportunity of expansion into the other sports that have this need. 49 9. Acknowledgements Team #15 would like to thank especially Calvin Track & Field head coach Bret Otte and engineering mentor Eric Walstra. Team 15 would also like to thank everyone else that provided support with time, knowledge, or guidance in the design of CoachJav, especially Calvin professors Mark Michmerhuizen and Yoon Kim. Your assistance and expertise was integral to the success of the project. Thank you! 50 10. Appendix 10.1. Assembly Drawing of Prototype Figure 20: Assembly Drawing of Prototype 51 10.2. Obtaining Angles through Kalman Filter Steps in finding Angles from MPU6050 Using the Kalman Filter [3] 1. Predict the current state and the error covariance matrix at time k, of the system based on the previous state and the gyro measurement. 2. Estimate the priori error covariance matrix based on the previous error covariance matrix. The error covariance is used to determine how much you can trust the data from the sensors. 3. Calculate the difference between your accelerometer measurement and the priori state. Map a priori state with the measurement from the accelerometer in an observed space. If you get a small number you can trust the data otherwise you cannot. 4. Calculate the Kalman gain. 5. Correct the estimate of the priori state (measurement between your previous state and the gyro measurement) with the accelerometer measurement. 6. Update the Posteriori error covariance matrix. 52 10.3. Test Data 10.3.1. Testing Angle Data Table 6: Testing Angle Data Trials 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Testing the Accuracy of the angles on CoachJav Measured Angle CoachJav Angle 30 31 30 28 30 28 30 28 30 29 30 30 30 31 30 31 30 30 30 32 45 45 45 44 45 44 45 43 45 44 45 47 45 39 45 45 45 46 45 46 60 60 60 60 60 60 60 61 60 63 60 62 60 61 60 60 60 60 60 60 53 10.3.2. Testing Velocity Data Table 7: Testing Velocity Data Testing Velocity Trials Measured Velocity GPS Speed 1 33 35 2 34 31 3 39 39 4 36 35 5 32 33 6 40 40 7 35 34 8 41 42 9 28 29 10 40 37 11 32 30 12 35 32 13 39 40 14 33 36 15 33 31 16 35 34 17 34 34 18 41 40 19 39 38 20 41 40 21 38 41 22 36 38 23 40 42 24 33 31 25 32 31 26 33 30 27 35 32 28 33 30 29 36 32 30 33 35 54 10.4. Financial Statements 10.4.1. Income Statement Table 8: Income Statement JavTools Pro-Forma Statement of Income Year 1 10.4.2. Year 2 Year 3 Sales revenue 4,245,000 6,367,500 8,277,750 Variable Cost of Goods Sold 2,945,591 4,418,387 5,742,500 Fixed Cost of Goods Sold 290,000 148,800 178,080 Depreciation 28,580 56,125 57,228 Gross Margin 980,829 1,744,188 2,299,942 Variable Operating Costs 39,323 58,984 76,660 Fixed Operating Costs 661,440 720,440 785,340 Operating Income 280,066 964,764 1,437,942 Interest Expense 10,000 17,500 12,250 Income Before Tax 270,066 947,264 1,425,692 Income tax (40%) 108,027 378,906 570,277 Net Income After Tax 162,040 568,359 855,415 Cash Flow Statement Table 9: Cash Flow Statement JavTools Pro-Forma Statement of Cash Flows 55 Year 1 Year 2 Year 3 Beginning Cash Balance - 290,620 815,103 Net Income After Tax 162,040 568,359 855,415 Depreciation expense 28,580 56,125 57,228 Invested Capital (Equity) 100,000 - - Increase (decrease) in borrowed funds 200,000 (50,000) (55,000) Equipment Purchases (200,000) (50,000) (70,000) Ending Cash Balance 290,620 815,103 1,602,746 10.4.3. Cost Analysis Variable Cost of Goods Sold: Raw Material = $546.49/unit Direct Labor = $8.15/hour (0.5 hours/unit) Utilities (Electricity, Water & Gas) = $21/hour (0.5 hours/unit) Total per Unit = $561.065/unit Selling Price of Javelin = $849 56