A PERFORMANCE ANALYSIS SYSTEM FOR

Size: px
Start display at page:

Download "A PERFORMANCE ANALYSIS SYSTEM FOR"

Transcription

1 The Pennsylvania State University The Graduate School Capital College A PERFORMANCE ANALYSIS SYSTEM FOR THE SPORT OF BOWLING A Master's Project and Paper in Computer Science by Donald J. Hake II Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science April Donald J. Hake II

2 ABSTRACT Current technology offers precious little to the serious bowler in search of ways to analyze and improve their 1 game. All existing methods acquire some type of "external" view of the ball (from the bowler's perspective) as it rolls down the lane. The goal of such systems is to quantify the various factors (release velocity, rotation rate, ball loft distance, etc.) that contribute to the ball's reaction and, ultimately, to the bowler's performance. However, not only are these externally-based methods time-consuming, inconvenient, and/or expensive to install and use, but they each have their own inherent limitations resulting from their external view of the ball. This paper presents the results of research and preliminary development for a system that is based on capturing an "internal" view (from the bowling ball's perspective) of the velocity, spin, and loft imparted to the ball during the bowler's delivery, and the subsequent reaction of the ball on its journey from the foul line to the pins. The system described herein is comprised of several components: a small, microprocessor-based sensor module that resides in the ball and collects and records sensor data; an external wireless communication module for uploading the raw data from the sensor module; and a PC or PDA-based software application that stores, analyzes, and presents that data in a fashion useful to the bowler. Such a personal bowling performance assessment and analysis system will help fill the void that currently exists between the limited number of techniques available for evaluating and improving the bowler's overall skill set, consistency of execution, and ability to accurately assess lane conditions. 1 In the absence of a standard set of gender-neutral pronouns, the author uses "they", "them", and "their" as the gender-neutral forms of "s/he", "him/her", and "his/her" throughout the document.

3 TABLE OF CONTENTS Section I: Introduction, Background, and Motivation Statement of the Problem Introduction to the Physics of Bowling Scope of the Paper/Project Investigative Feasibility Phase Product Development Phase Overview of the Feasibility Phase...5 Section II: Collecting the Data - The SMARTDOT Module Design Basis Ease of Use Size, Weight, and Impact on the Balance of the Ball Cost Power Consumption Convenience of Installation and Removal Sensing Requirements Sensing Rotation of the Ball (Angular Velocity) Sensing Release, Lane Impact, and Pin Impact Measuring Time and Recording Data Communications Capabilities Ambient Light Sensor Pressure/Impact Sensor Clock Hardware Implementation Hardware Configuration Hardware Operation Overview Hardware/Software Interaction Design Considerations Microprocessor Clock Frequency Sampling Rate Baud Rate Embedded Software Design and Operation Software Design Considerations Start-Up Pre-Sampling Waveform Discrimination and Validation The Ball is Rolling Sampling Modes Shutdown Communication with the COMM Wand Communication Protocol Commands...27 iii

4 2.8 Performance Detecting Release Detecting Release Detecting Impacts Waveform Discrimination and Validation Waveform Shape Communications Battery Life Future Work Microprocessor Communications Sample Memory and Multiple Waveforms Data Compression Module Training Adjustable Sampling Parameters Summary...39 Section III: Analyzing the Data - The MASTER Application Raw Data Analysis The "Ideal" Waveform The "Real" Waveform Filtering the Raw Data Finding Revolutions and Angular Velocity Linear Velocity, Distance, and Coefficient of Friction Finding the Linear Velocity of the Ball Finding the Distance from the Foul Line Finding the Coefficient of Friction Assumptions and Error Analysis Distance Time External Forces and Friction Implementation, Performance, and Accuracy Implementation and Performance Accuracy Accuracy The "Perfect" Game to Analyze Future Work Algorithms End-User MASTER Software Summary - MASTER Analysis...66 Bibliography...67 Appendix A - SMARTDOT Module Embedded Software Flowcharts... A-1 Appendix B - SMARTDOT Module Source Code...B-1 Appendix C - SMARTDOT Module Command Timing Diagrams...C-1 Appendix D - MASTER "Analysis" Calculations Source Code... D-1 Appendix E Game MASTER Screen Captures...E-1 iv

5 LIST OF FIGURES Figure 2-1 SMARTDOT Module Cut-Away View...8 Figure 2-2a Lane Layout and Overhead Lighting...13 Figure 2-2b Ambient Light Waveform...13 Figure 2-3 SMARTDOT Module Block Diagram...17 Figure 2-4 SMARTDOT Module Software Architecture...22 Figure 2-5 EEPROM Memory Map...23 Figure 2-6 MASTER "Raw Data" Screen Capture...28 Figure 2-7 Raw Data Release Region (400 ms)...29 Figure 2-8 Raw Data Impact Region (800 ms)...30 Figure 2-9 Raw Data Release Region (800 ms)...31 Figure Pin Shot, "Raw Data" Screen Capture...31 Figure 2-11 Waveform Shape, Impact Region (800 ms)...32 Figure 2-12 Data Compression Record Format...37 Figure 2-13 Data Compression Translation Table...38 Figure 3-1 MASTER "Raw Data" Screen Capture...42 Figure 3-2 Raw Data Release Region (800 ms)...43 Figure 3-3 Raw Data in Impact Region (800 ms)...43 Figure 3-4 MASTER "Spectrum" Screen Capture...44 Figure 3-5 MASTER "Waveform" Screen Capture...46 Figure 3-6 Maxima and Minima Location Interpolation...48 Figure 3-7 MASTER "Analysis" Screen Capture...49 Figure 3-8 MASTER Analysis Calculations Data Flow Diagram...58 Figure 3-9 Effects of Roll Out, "Analysis" Screen Capture...59 Figure 3-10 Pin Deck Phase Shift, Impact Region (800 ms)...60 Figure 3-11 Effects of Phase Shift, "Analysis" Screen Captures...61 Figure Game Analysis Summary...63 Figure A-1a Start-Up Task Flowchart...A-2 Figure A-1b Pre-Sampling Task Flowchart...A-2 Figure A-2 Light Sample ISR Flowchart...A-3 Figure A-3 Sampling Task Flowchart...A-4 Figure A-4 Discrimination Task Flowchart...A-5 Figure A-5 Communication Task Flowchart...A-6 Figure A-6 Wand Detection ISR Flowchart...A-7 Figure A-7 UART Receive Task Flowchart...A-8 Figure A-8 Bit Sample ISR Flowchart...A-9 Figure A-9 Receive Time Out ISR Flowchart...A-9 Figure A-10 Shutdown Task Flowchart...A-10 Figure C-1 Upload Command Timing Diagram...C-2 Figure C-2 Mode Command Timing Diagram...C-3 Figure C-3 Configuration Command Timing Diagram...C-4 Figure E Game - "Raw Data" Screen Captures...E-2 Figure E Game - "Spectrum" Screen Captures...E-4 Figure E Game - "Analysis" Screen Captures...E-6 v

6 ACKWLEDGEMENTS The idea for the SMARTDOT system evolved from a conversation I had with some fellow teammates on the way back from the Pennsylvania State Bowling Championships in Johnstown in May of I'd like to thank Mike Wolfrom and Dave Zelger for raising the issue of how to accurately measure the rotational rate of a bowling ball. It has been through seeking an answer to that seemingly simple question that this body of work has taken shape. In 1988, the technology was simply not available to implement the various solutions that came to mind. In the ensuing four years, the question stayed with me, and the technology eventually caught up. I began developing the first SMARTDOT module prototype in May of 1992, and SMARTDOT captured its first waveform on April 11, I designed and built that first prototype without prior knowledge of the nature of the waveform it was designed to capture. Since then, numerous iterations of the module's hardware and embedded software have been required to get the module to the point where it truly performs its function in a "transparent" fashion. Soon after the success of the initial prototype, I placed the project on the back burner as I became engaged, and then married, and then purchased a house, and eventually assumed other career obligations that kept me from returning to the pursuit of this research. It was with my return to Penn State in June of 1998 in my quest for this Master's Degree in Computer Science at Penn State Harrisburg that I decided to dust off SMARTDOT and get back to work on it. I must thank Dr. Thang Bui, Dr. Timothy Wahls, and Dr. Linda Null for their collective exuberance and enthusiasm in teaching. Without their obvious interest in the success and welfare of their students, I would not have been drawn to Penn State Harrisburg, nor as driven to achieve all that I have within their program. I have been a Penn State student, in one form or another, at three different campuses, for more than a quarter of a century, and their department is the finest that I have known. Thanks again to Dr. Null for not only serving as my advisor and for appreciating my sense of humor, but also for her willingness to step outside of her normal areas of expertise and into "my" world of 8-bit embedded software. Thanks also to Dr. Seth Wolpert and Dr. Pavel Naumov for reviewing this manuscript and serving on the thesis committee. I must thank my friends and family for their collective support, understanding, and tolerance throughout the years that I have been immersed in this Master's program and obsessed with this project. I promise to them, in the near future, that I will emerge from my office and be able to focus on issues other than SMARTDOT and the current status of my Master's degree. Lastly, special praise must go to my wife Sandy, who has tolerated not only my obsession with this project over the decade of its existence, but has also been consistently supportive of my efforts towards its development. She has been there through every major milestone. In addition, over the past four years, her support of my pursuit of this degree has been steadfast and unwavering, even while I was taking six and nine credits a semester, and especially as I've spent untold hours at my computer composing this paper. She has brought me breakfast, lunch, and dinner at my desk so that I could continue working, and has never complained about the time she has lost to this passion of mine. Without her support and her encouragement, this project, this paper, and this degree would not have been possible. vi

7 SECTION I: INTRODUCTION, BACKGROUND, AND MOTIVATION 1.1 STATEMENT OF THE PROBLEM Bowling is often considered a game of accuracy, but it is actually a game of errors. The goal of any experienced bowler is to find the optimal combination of style, equipment, and lane adjustments that creates the widest margin of error while still allowing the bowler to consistently deliver the ball to the pocket with sufficient force, angle, and "action" to generate strikes. Success with this strategy requires a combination of factors: the bowler's natural talent and ability, refined by a generous amount of coaching and practice; experience with "reading" lane conditions and making adjustments to the inevitable changes in those conditions; and the selection and use of the proper ball(s). Bowling balls are available in a variety of weights, balances, hardnesses, and surfaces. Those four variables combine to determine when and how much the ball hooks, and how hard it hits the pins. The bowler selects a bowling ball based on his or her bowling style and the current lane "condition", which is created by the distribution of oil on the lanes. There is a great deal of friction generated between the ball and the lane surface as the ball rolls down the lane, at a velocity that can approach 20 mph, with a rotational rate that regularly exceeds 300 rpms. To protect the finish of the lane, special lane-dressing oil is regularly applied to the first 30 to 40 feet of the lane. The oil can also be applied with a varying density across and down the lane to affect the "playability" of the lane, making it easier or more difficult for the ball to reach the strike pocket. The repeated action of bowling balls rolling down the lane redistributes the oil over time, changing the oil pattern as a bowling match progresses. The effects of that change can be quite noticeable, sudden, and dramatic [13]. Of primary concern to all bowlers is quickly and correctly adjusting to the inevitable changes in the oil pattern over the course of a bowling match. The bowling ball is the bowler's "oil sensor" for determining where the lane oil is (and isn't), as well as where the oil is "going". Based solely on observing the ball's reaction to the lane, the bowler adjusts to the ever-changing lane condition by drawing upon past experience with the results of various adjustments made under similar circumstances. These adjustments usually involve lateral changes in the starting location on the approach and/or the target on the lane, an increase or decrease in the speed of the ball, and/or a switch to a ball that hooks more, or less, or sooner, or later, etc. The bowler may also opt to change the amount of turn, lift, and/or spin they apply to the ball during release, with the intention of changing the amount the ball hooks or curves as it rolls down the lane. If the bowler does not release the ball with consistent amounts of speed, loft, lift, and turn (the variables that directly affect the ball's reaction with the lane), it is particularly difficult for them to accurately assess the condition of the lanes, let alone how that condition is changing. It has always been difficult to accurately quantify a bowler's relative level of consistency. It has been equally difficult to quantify and compare the relative performance of different types of bowling balls. 1

8 Historically, the only technique readily available has been for the bowler to videotape their delivery and the subsequent reaction and path of the ball, followed by a slow and tedious frame-by-frame analysis to determine the release, hook, and roll characteristics of the ball. However, videotape does not allow for the direct and accurate measurement of ball speed, ball loft, rotation rate, and revolutions. Videotape also does not lend itself to side-by-side, frame-by-frame comparison of multiple shots. The ABC (American Bowling Congress) has recently deployed CATS (Computer Aided Tracking System). CATS relies heavily on instrumenting the lane with numerous position and velocity sensors in conjunction with high-speed video analysis. However, this system is only available on a handful of lanes around the country (ABC headquarters in Milwaukee and the National Bowling Stadium in Reno), along with several portable installations [12]. Brunswick Corporation developed a patented system called BowlerVision, which is capable of providing some of the same analyses as CATS, combining a system of built-in sensors with high-speed video capture. However, BowlerVision is only available on a limited basis around the country, is expensive to use, and is not portable [2,3]. There are several recent patents that describe various generic methods for detecting the speed, spin, and/or curve of a projectile, missile, or ball. All of those patents, however, involve one or more shortcomings in realizing truly practical and cost-effective implementations as commercially viable products with regard to bowling. US Patent 5,526,326 (June 11, 1996) details a "Speed Indicating Ball", which measures the time of flight of a ball using a contact switch for release (throw) and a piezoelectric switch for impact (catch). The device is designed for use in a baseball, and requires the thrower to hold down a button until the ball is released. The device calculates release velocity through time-of flight calculations over a predetermined distance (pitcher's mound to home plate), and presents the results on a built-in display [4]. Due to the method of release detection, the thrower must alter their normal grip when throwing the ball. The weight of the device with respect to the ball affects the balance of the ball, thus impacting the nature in which it curves. Also, due to the fragile nature of the built-in display, the device cannot be used in actual competition (a baseball game). US Patent 5,761,096 (June 2, 1998) describes a "Speed-sensing projectile" that uses an interior mechanical inertial switch to detect release (requiring no external button), and the same inertial switch to detect the cessation of movement. This device also has a built-in display that presents the speed of the ball based on time-of-flight information over a fixed distance, and was originally intended for use in a baseball [5]. This device has a similar impact on the balance of the ball as the "Speed indicating Ball", and also is precluded from use in actual competition. US Patent 6,151,563 (November 21, 2000) presents the most comprehensive of devices with regard to bowling. It describes a device that is capable of measuring the speed, spin rate, and curve of a moving object, and specifically mentions applicability to both baseball and bowling. The device uses magnetic field sensors to detect the rotation of the ball within the earth's magnetic field. It supplements these readings with input from multiple accelerometers that indicate the inertial forces acting on the ball. The device has no direct display; instead it transmits the collected data in real-time to an external 2

9 receiver that stores, processes, and displays the data for the user [6]. Although comprehensive in nature, the device is expensive to implement and must be installed in the center of the ball at the time of its manufacture. As of this writing, no devices of the nature described in the patent literature have been brought to market with regards to bowling. Between the inconvenience, expense, and narrow availability of external (instrumented lane) solutions, and the dearth of internal solutions, it remains particularly difficult for a bowler to accurately and adequately assess the various impacts that changes in bowling style and bowling equipment have on their game. Without such timely and consistent feedback on changes in wrist and hand position, arm swing, stance, and grip, as well as changes in equipment (ball type, weight, balance, and/or surface), the bowler generally participates in a guessing game when assessing the effectiveness and usefulness of any of these considerations. The information presented in this paper has been gathered with the intention of developing an inexpensive, portable, user installable and replaceable performance analysis system geared towards the individual bowler. The system captures, quantifies, and analyzes the impetus the bowler applies to the ball, as well as the subsequent interaction of the ball with the lane surface from the point of release to the point of impact with the pins. This system is hereafter referred to as SMARTDOT. The SMARTDOT system consists of the following components: an in-situ sensor module (the SMARTDOT module) that resides in the ball and collects sensor data; a wireless communication link (the COMM wand); and a PDA or PC-hosted MASTER software application that uploads, archives, analyzes, and displays the data captured by the in-situ sensor module. 1.2 INTRODUCTION TO THE PHYSICS OF BOWLING The only force of any significance that acts upon a bowling ball after the ball is released is the force due to friction generated between the ball and the lane (this force varies a great deal due to the variations in oil distribution on the lane). A bowler invariably releases a ball at an initial linear velocity greater than that which would result from the ball's initial angular velocity. In other words, the distance the ball travels during one complete revolution of the ball is greater than the circumference of the ball (the ball is skidding or sliding). The bowler also imparts an axis of rotation to the ball that is tilted or turned from normal, which is intended to make the ball hook towards the pocket. It is the interaction of the linear and angular velocities with the frictional force acting between the ball and the lane that causes the ball to hook. As the ball travels down the lane, the frictional force also causes the ball to slow down. As long as the ball is skidding, friction acts to transfer some of the ball's linear momentum into angular momentum, decreasing the linear velocity while increasing the angular velocity. A small (but not insignificant) percentage of the ball's linear momentum is also lost due to the heat, noise, and vibration generated as the surfaces of the ball and the lane rub against each other. If the linear and angular velocities resolve themselves completely, the ball is no longer sliding (it has rolled out), and the frictional force now causes both the angular and linear velocities of the ball to decrease in direct proportion to each other [9,12,13]. 3

10 By measuring the time between release and impact, and noting the duration of each revolution of the bowling ball, it is possible to derive the angular velocity of the ball for each revolution, and the energy necessary to induce this change in angular velocity. The average linear velocity of the ball and the changes in the ball's angular velocity during the course of the shot can then be combined with certain assumptions regarding energy conservation and friction to derive the linear velocity and longitudinal location of the ball at any instant. Using the same criteria, it is also possible to derive the varying frictional force that acts between the ball and the lane. Section III gives a formal presentation of the assumptions, physics, and mathematics that are used to extract this information from the SMARTDOT sensor data. 1.3 SCOPE OF THE PAPER/PROJECT The overall project development breaks down into two distinct phases: an investigative feasibility phase and a product development phase. This paper presents the results of the feasibility phase Investigative Feasibility Phase The feasibility phase has focused on developing working prototypes of each component of the system - the in-situ SMARTDOT sensor module, the wireless communications link, and a PC-based data analysis tool, called the MASTER. The major tasks have been: Building a working prototype of the SMARTDOT module that conforms to all of the physical constraints the in-situ sensor module is required to meet - these constraints are presented in detail later in the paper. This task also determined the extent to which adequate embedded software could be developed that fit within the constraints of the embedded microprocessor's resources while still performing all of the tasks essential to the success of the system. The working prototype serves as proof-of-concept for the in-situ sensor module, while it simultaneously has served as the data acquisition platform for characterizing the response of the on-board sensors to the ambient conditions they sense. Building the COMM wand - a prototype wireless communications device that serves as the physical link between the SMARTDOT module and the PC-hosted MASTER software. A custom communications protocol also had to be implemented in both the SMARTDOT module and the MASTER application so that they could communicate via the COMM wand. Developing the MASTER program - a preliminary PC-based communications and analysis software package that interacts with the prototype SMARTDOT module through the COMM wand, uploads the acquired sensor data, and facilitates analysis and graphical presentation of that data. This version of the MASTER software is actually a tool geared toward cataloging the uploaded waveforms, analyzing those waveforms, identifying appropriate data-analysis techniques, and implementing those techniques to extract useful information from the data. 4

11 1.3.2 Product Development Phase The product development phase will put to practice the discoveries from the feasibility phase, both in refinement of the SMARTDOT module's capabilities, and in the development of a PC-based (and possibly a PDA-based) GUI software application for the end-user. The major tasks of the development phase will be to: Refine the operation of the SMARTDOT sensor module to generalize its design and performance for a wide range of bowlers. Such refinements will be derived from the analysis of data gathered in the feasibility phase of the development, as well as from data collected during additional testing by other bowlers. Develop a GUI-based software application that interacts with the SMARTDOT module, and uploads, catalogs, analyzes, and presents the data in a form useful to the bowler. This application could take two forms: a full-featured, PC-hosted, Windows -based application, and a compact PDA-based application. 1.4 OVERVIEW OF THE FEASIBILITY PHASE The SMARTDOT system consists of a custom hardware module integrated with custom embedded software that interacts with a PC-based user application through a (currently) custom wireless communications device. The "intelligence" of the SMARTDOT system is distributed across two portions of software: the SMARTDOT module embedded software, and the PC-hosted MASTER application. The SMARTDOT module is designed to collect sufficient data with a fine enough granularity that the MASTER software can perform accurate and meaningful analysis of that data. The paper discusses the design assumptions, constraints, capabilities, and performance of the in-situ data collection module, and the underlying assumptions and techniques used to analyze and present the data in the MASTER software, as well as the conclusions drawn from the analysis of the data acquired in this phase of the project, and suggestions for further development. The key to the feasibility of the system was the initial development of the in-situ sensor module. Without the means to gather sensor data from the perspective of the ball, development of the remainder of the system would have been extraneous. Consequently, the feasibility portion of the project encompassed these distinct stages: Designing and building a viable hardware platform for the in-situ SMARTDOT sensor module and implementing the COMM wand hardware. Developing the embedded software for the SMARTDOT module, including the communications protocol between the module and the MASTER application. This portion of the feasibility phase is presented in Section II, "Collecting the Data - The SMARTDOT Module". Analyzing the data the module collected in order to reveal the types of useful information that could be extracted from that data. To that end, the MASTER program was developed, which has served as the preliminary communications, data analysis, and presentation application. Section III, "Analyzing the Data - The MASTER Application", presents this portion of the feasibility phase in detail. 5

12 Prior to the start of this project (May 1992), there were no references in the literature or the various patent databases to any previous attempts to develop this kind of internal system. Brunswick Corporation has since developed a robot that can throw a bowling ball with repeatable and precise amounts of speed, spin, and axis turn and tilt, but the subsequent response of the ball is still measured with external sensors [9]. It is certainly possible that one or more of the various bowling ball manufacturers may have developed proprietary means for internally assessing the performance of their products. If that is the case, they have chosen to retain that information in the form of trade secrets. With no prior research to fall back on, it was necessary to design and build an initial sensor module simply to establish that it was physically possible to construct such a device within the extremely limited confines of its intended environment. A reliable and inexpensive means for transferring data in a wireless (non-contact) fashion from the module to a PC also had to be developed. Those two tasks were completed as an initial part of the feasibility study. The paper presents relevant background and details of the hardware that are essential to understanding the design and development of the embedded software, and/or the analysis of the raw data collected. However, an exhaustive presentation on the hardware is not within the scope of this paper. Since the waveform that SMARTDOT was attempting to capture had apparently never before been seen, the first prototype module was also designed as a flexible data collection device. That first module was intended to serve as both the bowling ball's eye and its memory as it looked out through the finger hole and recorded what it saw while the ball rolled down the lane. The basic assumptions and design for the embedded software for the SMARTDOT module have been developed based on the analysis of that captured data. With the feasibility of the hardware established, the real problem at hand has been largely one of software engineering. Although the module works as intended, this version has been developed solely through the author's personal use and input. The development phase of the project will involve a refinement of the sensor module, as described later in the paper, followed by a limited beta test among a collection of bowlers with different styles and capabilities. A subsequent refinement of the module's embedded software will most likely follow to accommodate variations discovered during the beta test. As for the PC-hosted MASTER software, the paper reports the results of, and the conclusions drawn from, the various types of data analysis performed on the raw data collected during this phase of development. The MASTER program was developed as a custom data analysis and presentation application to facilitate review of sensor data under a real-world scenario (i.e., during real practice sessions at a local bowling center), and to apply the information extraction techniques presented in Section III of the paper. Based on this preliminary analysis package, high-level design suggestions for the development of the end-user application are included at the end of Section III. 6

13 SECTION II: COLLECTING THE DATA - THE SMARTDOT MODULE This section presents, in detail, the initial development, current implementation, and future considerations of the in-situ SMARTDOT sensor module. Discussions of the design constraints, the hardware implementation, and the embedded software implementation (including flowcharts, timing diagrams, and a memory map) are included, along with an assessment of the prototype's performance. Suggestions for future refinements to the module's hardware and software are also given. 2.1 DESIGN BASIS The in-situ sensor module, at a minimum, must be a capable of detecting release of the ball, rotation of the ball, and the ball's impact with the pins. It must also have an accurate "clock" with which to time-stamp those occurrences. For the system to be economically viable, a major premise behind the in-situ sensor module rests on the assumption that the ball's rotation can be accurately inferred by observing the amount of ambient light impinging on a particular point on the surface of the ball as the ball rolls down the lane, and that an inexpensive device can be developed that fits unobtrusively into the ball for the purpose of recording this data. Since all modern bowling centers have overhead lighting of some type, a source of ambient light is always present (except for the novelty of "moonlight" or "glow" bowling). Figure 2-1 provides a cut-away view of the SMARTDOT sensor module installed in a bowling ball. For the following reasons, the ideal place to install the module is under a finger insert in an existing finger hole: To optimize the dynamic range of the ambient light incident on the sensor module, the module should be placed so that it alternately rotates through the shadow the ball casts on the lane, and then up towards the lighted ceiling. The finger holes generally follow this line of rotation. If the module is installed in an existing finger hole, it is not necessary to drill an additional hole, or modify the ball in any way. Finger insert holes have a standard diameter, allowing for a standard size (diameter) module. The sensor module has been made small enough that minimal additional material must be removed from the ball in order to install it, simplifying the installation procedure. This location also allows for easy replacement of the module's battery. Locating the module in close proximity to a finger hole facilitates detecting the removal of the bowler's finger from that hole, which is necessary for accurately detecting release of the ball during the bowler's delivery. Locating the module below the surface of the ball affords a good deal of protection from the extreme forces that the surface of the ball experiences when impacting the lane, the pins, the pit cushion, the gutter, and when being handled by an automatic ball return. 7

14 SMARTDOT Module Cut-Away View CL 1.375" Finger Insert Piezoelectric Film Light Sensor (TSL251) Transmit LED's Crystal ( MHz) Printed Circuit Board (PCB) µprocessor (87C752) 0.375" 6V Lithium Battery 0.938" 0.969" Figure 2-1: SMARTDOT Module Cut-Away View 8

15 2.2 Design Constraints The feasibility of the SMARTDOT system rests on being able to create an in-situ sensor module that is small, inexpensive, light-weight, convenient to install and remove, and does not affect the balance of the ball nor interfere with the bowler's normal delivery or release motions. These design constraints are interrelated and are discussed below Ease of Use Ideally, the module must be "invisible" to the bowler. It should not alter the manner in which the bowler grips or releases the ball, nor should the bowler be able to tactilely detect the presence of the module. The operation of the module must have no impact on the bowler's normal routine and, except for uploading data from the device for analysis, there should be no interaction required from the bowler Size, Weight, and Impact on the Balance of the Ball The module must be placed in a hole drilled in the ball, which can affect both the weight and the balance of the ball. The module does have some intrinsic weight and placing the module in the hole drilled for it offsets some of the weight removed from the ball, but the density of the module will most likely differ from that of the ball. The closer the module is placed to the surface of the ball (the shallower the hole is drilled), the greater any difference in density affects the dynamic balance of the ball. However, a deeper hole removes more material, also impacting the weight and balance. The location of the hole relative to the finger holes also impacts the static and dynamic balance of the ball. It is possible to minimize these effects by placing the module in one of the existing finger holes. With the module sized and designed to perform its intended function while located at the bottom of a finger hole, an additional hole is unnecessary. Also, the module has less of an impact on the inertial balance of the ball if it can be located further below the surface, especially if its overall weight offsets the weight of any extra material removed from the finger hole. The vast majority of bowlers of the caliber that would benefit from the SMARTDOT system utilize replaceable plastic or rubber finger inserts. These inserts fit into a finger hole with a standard diameter of 31 / 32 " (.969"). Allowing for tolerance and clearance, the module must then fit on a circular printed circuit board (PCB) no more than 30 / 32 " (.938") in diameter. Finger holes are generally drilled only as deep as is necessary to fully accept the finger insert. Inserts are 1 3 / 8 " (1.375") to 1 1 / 2 " (1.5") high, and require a similar depth hole. In order to limit the depth to which the finger hole must be drilled to accommodate the module, the module's height must be kept to a minimum. The overall height of the SMARTDOT module prototype shown in Figure 2-1 is 0.375" ( 3 / 8 "). The volume of material that must be removed from the ball to accommodate the module is: (.969 / 2) 2 π =.277 in 3. The specific gravity of the weight block material (the area where the finger holes are normally drilled) is generally 1.5 to 2.0, thus the weight of the material to be removed (assuming a density of oz 3 / in for a specific gravity of 1.0) is 0.24 oz to 0.32 oz (7-9 grams). The SMARTDOT module prototype weighs 7 grams, resulting in a net loss to the 9

16 ball of 2 grams or less. Given that a simple plastic case enclosing the module will contribute an additional 2-3 grams, the total weight of the module with case approximates the weight of the material removed, resulting in an essentially neutral impact on the weight and balance of the ball Cost Good bowling balls now cost in excess of $150. A reasonable target retail price for the SMARTDOT module is approximately one-quarter to one-third of that, or no more than $50. Assuming normal margins and distribution channels places the target production cost in the range of $12.50-$ The target production cost determines the means and methods that can be used to detect the action of the ball (the type and number of sensors), as well as the technology used to implement the module, i.e., the type of microprocessor and its on-board resources, the size and type of data memory, the means of communicating with the outside world, and the costs associated with the battery, case design, and assembly. The estimated production cost of the SMARTDOT module prototype is currently $ Power Consumption Although the module is readily accessible, battery life must be long enough that the bowler is not frequently forced to replace the battery. Limiting the energy requirements of the module extends the battery life, while also limiting the size (height) of the battery, which is important, since the battery comprises a significant fraction of the height and weight of the module. Ideally, the module will spend most of its time in a micro-power standby state. It wakes up as the bowler releases the ball, monitors and records the output of its sensors while the ball is rolling down the lane, and then returns to standby mode soon after the ball hits the pins. The only other time the module should wake up is to upload the sensor data it has collected to the MASTER application. Lithium coin cells are the most appropriate battery technology for the module. They are round (as is the module), light, thin, inexpensive, readily available in standard sizes, and have a high energy density and cell voltage (3-3.6 volts). The SMARTDOT module prototype uses two 3-volt BR2016 lithium coin cells, which collectively weigh 3-4 grams (a little over half of the module's total weight, and contribute a little over one-third (0.13") to the overall height Convenience of Installation and Removal Since the module has a user-replaceable battery, it must be convenient to install and remove. By placing the module underneath a removable finger insert, the bowler has ready access to the module, requiring no special equipment for installation or removal. 10

17 2.3 SENSING REQUIREMENTS The module must be able to sense when the ball is released, when it hits the lane, when it hits the pins, and the ball's angular velocity as it rolls down the lane. The module must be able to accurately sense the passage of time, and to record time-stamped samples of the light waveform and of the impacts the ball experiences. It also must be able to sense the presence of the communication device and contain a transceiver of some type so that the module can transfer information to/from the MASTER application. The ease-of-use, size, cost, and power consumption criteria, combined with locating the module underneath a finger insert, limit the types of sensors that the module can employ Sensing Rotation of the Ball (Angular Velocity) Several methods have been considered to directly sense the rotation (angular velocity) of the ball using passive techniques (measuring some response to ambient conditions): Sensing the changing orientation of the ball in the earth's magnetic field. Sensing the changing orientation of the ball in the earth's gravitational field. Measuring the angular acceleration directly with an accelerometer. Measuring the ambient light falling on a fixed point on the ball. Honeywell makes an integrated two-axis magnetometer (HMC1052) that physically fits the application, but the cost ($18) and peak current draw (~400 mamps) are both prohibitive [17]. Analog Devices makes a dual-axis tilt sensor/accelerometer (ADXL202E) that also fits the application, both in size and power requirement, but its cost (~$15 in 1000 piece quantities) makes it too expensive for this application, although it could be used for a later upscale version of the module [15]. The main thrust of the research for this project centers on the fourth, albeit less obvious, alternative. Besides presenting the feasibility of the in-situ sensor module, this paper demonstrates that a photometric sensor placed at the bottom of a finger hole, underneath a finger insert, can be used to accurately sense the angular velocity of the ball. TAOS (Texas Advanced Optical Systems) makes a series of small, inexpensive, lowpower, integrated visible light detectors (TSL25x) that suit the application [23]. In addition, the same light sensor can also be used to detect the moment of release (indicated by a sudden transition from dark-to-light), and serve as the receiver for an IR-based wireless communications scheme. Refer to Figure 2-1 for the orientation of the light sensor in relation to the finger insert. An increasing light level is seen as the finger hole revolves up to face the ceiling, while a decreasing light level is sensed as the finger hole revolves toward the lane. Peaks in the light waveform occur at the top of each revolution (defined as the orientation of the ball when the finger holes are facing toward the ceiling), and valleys occur at the bottom of each revolution (defined as the orientation of the ball when the finger holes are closest to the lane). In developing the light-sensor based module, it was the author's belief that the ambient light level the sensor "sees" as the ball rotates would roughly transcribe a sinusoidal shape, and that the sampled and digitized light waveform could be stored, 11

18 uploaded, processed, and analyzed in such a way as to yield results useful to the bowler. See Figures 2-2a and 2-2b for an example of the module installed in the ball and rolling down the lane. The dotted lines emanating from the finger hole indicate the module's "viewing angle" for ambient light Sensing Release, Lane Impact, and Pin Impact As previously presented, in order to limit the size of the battery, the module should remain in an ultra-low power "sleep" state whenever the ball is not being held by the bowler, or rolling down the lane. For the module to detect that the ball has been released, it must have some means for identifying that the bowler has removed their fingers from the ball. The light sensor could be used for this purpose, since the bottom of the finger hole is dark while the bowler's finger is in the hole, and light(er) when the finger is removed. However, to accomplish this task, the TSL251 must remain powered, even while the module is asleep. This is not possible at the ultra-low standby current level (~1 µamp) that is required for extended battery life. The module also requires a means to detect impact with the pins (which also gives it the capability of detecting impact with the lane). This "impact" sensor has been implemented with a piezoelectric plastic film made from PVDF (polyvinylidene fluoride) [19]. This film is inexpensive, durable, and requires no external power to generate a voltage signal strong enough to wake up the module. Since it is piezoelectric, when pressure is applied to the film, the film responds by producing a voltage proportional to the rate-of-change of the pressure applied. With a piece of this film inserted between the outside of the finger insert and the wall of the finger hole, it can sense not only the lane and pin impacts, but also the bowler applying pressure to the insert. Since the film detects changes in pressure, and not the applied static pressure, it can be placed between the insert and the finger hole wall without concern that the static pressure of that placement might set off the module. Refer to Figure 2-1 for the position of the piezoelectric film sensor. Since the bowler must apply significant pressure to the insert during release, the impact sensor also serves to wake up the module immediately before release. The light sensor is then used to detect the moment of release by looking for a rapid increase in the light level, from near or total darkness, to some higher level of light (or lesser level of darkness) Measuring Time and Recording Data The microprocessor supplies the clock to measure time, and coordinates all of the various activities required to make the module work. A stable time-source, currently a miniature quartz crystal, serves as the basis for the microprocessor's clock. Additional external non-volatile memory (EEPROM) is required for storing the sampled light waveform, the impact data, and any configuration parameters that are required. 12

19 Pin Deck Light Foul Line Figure 2-2a: Lane Layout and Overhead Lighting Release Point (finger removed from insert) Sampled Light Waveform Foul Line Impact with Lane Pin Deck Light Impact with Head Pin Figure 2-2b: Ambient Light Waveform 13

20 2.3.4 Communications The SMARTDOT module must transfer the data it collects to an external device for archival, analysis, and display. The module must be able to detect the presence of the external communications device, and both receive commands from it, and transmit data to it. Communications occur in a non-contact (wireless) fashion, and a light-based (infrared) communications scheme is used. The on-board transceiver consists of the previously described light sensor and two visible red (660 nm) LEDs. An algorithm has been developed that relies on the on-board transceiver to detect the presence of the external communications device (COMM wand), and initiate communication. 2.4 CAPABILITIES The module is intended to detect and record (at least some of) the major forces that the ball experiences. A bowler attempts to exert various forces on a bowling ball during delivery, to varying degrees, in a controlled manner. These forces are: Lift: Force applied to cause the ball to rotate about a primary axis relative to the finger holes. The more lift that is applied to the ball at release, the faster the ball rotates as it travels down the lane. Turn: The amount by which the axis of rotation of the ball is rotated away from normal with respect to the length of the bowling lane. The more turn that is applied at release, the more the ball has the potential to hook. Tilt: The amount by which the axis of rotation is tilted away from parallel with the lane surface. The amount of tilt directly impacts how long the ball delays (skids or slides) before starting to hook. Velocity: The speed and direction with which the ball leaves the bowler's hand. The higher the velocity, the harder the ball hits the pins, but the less it hooks. The velocity consists of a large x-coordinate component (towards the pins) and a small (but not insignificant) y-component (towards either gutter). The x-component is always positive, originating at the foul line and running towards the pins. The y- component can be negative (toward the right gutter for a right-handed bowler) or positive (toward the left gutter for a right-hander). Loft: The distance the ball travels (in the air) before it first makes contact with the lane after release. A bowler can control the amount a ball hooks by altering the distance the ball is lofted before it hits the pins. More loft generally means less hook. The basic premise behind the SMARTDOT module is that two sensors, an ambient light sensor and a piezoelectric pressure/impact sensor, combined with an accurate time source, are sufficient to accurately capture the amount of lift applied to the ball (the angular velocity), the moment of release, and the various times of impact with the lane and the pins. It was not expected that this combination of sensors would be capable of reliably capturing the amount of turn, tilt, or the y-component of the ball's velocity. 14

21 2.4.1 Ambient Light Sensor The ambient light sensor serves three purposes: It senses when the bowler has released the ball. A finger in the insert blocks ambient light from reaching the module. When the ball is released, a sudden increase in the ambient light level is detected. It detects the revolution of the ball as it rolls down the lane. The light sensor, located on the top side of the SMARTDOT module PCB, "looks" out through the finger insert and "sees" the ambient light as the ball rolls down the lane. It was presumed that the ambient light level the sensor sees would be brighter when the module faces upward (toward the ceiling), since the lights are located there, and darker when the module faces downward (toward the lane surface). It was further presumed that the light waveform the module sees would be roughly sinusoidal in nature, exhibiting peaks when the module faces the ceiling, and valleys when the module faces the lane. Counting these peaks and valleys results in the total number of revolutions (to within ½ revolution) that the ball underwent during its traversal of the lane. By measuring the time between peaks (and/or valleys), it is then possible to calculate the angular velocity (rpms) of the ball for any given revolution. Fractional revolutions (immediately following release, and immediately before impact) can be extrapolated from the angular velocity of the closest complete revolution, hopefully resulting in a resolution of 30 of rotation, or better than 0.1 revolution. It receives serial data from the communications module Pressure/Impact Sensor The pressure/impact sensor serves these purposes: It wakes up the module when finger pressure is applied to the insert - indicating that the bowler is holding the ball, and preparing for delivery and release. It senses the moment(s) of impact with the lane - ball loft distance. It senses the moment(s) of impact with the pins. It senses that the ball has rolled over a finger hole (the ball "hops" when it rolls over one of the finger holes, since the hole acts like a flat spot on the ball) Clock The microprocessor's time-base serves the following purposes: It generates the ambient light sample timer. It provides a time-stamp for the impacts that the piezoelectric film sensor detects. It generates the baud rate(s) for the communications transceiver. It generates several precise time intervals and time out functions required for coordination of the various microprocessor tasks. 15

22 2.5 HARDWARE IMPLEMENTATION. The following is a summary of the SMARTDOT module's hardware configuration and an overview of the hardware theory of operation. A working prototype of the SMARTDOT sensor module (based on this hardware configuration) has been used under real-world conditions (placed in a ball and rolled down the lane) for a total of about 500 frames (~50 games) Hardware Configuration A summary of the major hardware components and their respective features is given below. See Figure 2-3 for a block diagram of the prototype SMARTDOT module. Microprocessor - Phillips 87C752 [21] Intel 8051-based core. Crystal Frequency MHz (3.26 µsec instruction cycle). 64 bytes on-board RAM (including general purpose registers and stack space). 2 Kbytes on-board program EPROM. 8-bit Analog-to-Digital Converter (130 µsec conversion MHz). 16-bit auto reload timer. Additional fixed timer ( MHz). Interrupts (timers, external, ADC). Idle mode. Light Sensor - TAOS TSL251 Light-to-Voltage Converter [23] Output: 60 mv/(µw/cm 2 ), 7.5 µsec rise/fall time. Memory - Microchip 24C04 Serial I 2 C EEPROM (4096 bits, 512 x 8) [20] 8 byte page write. 10 msec maximum write time per page. 400 khz maximum clock rate. Amp Sensors Piezoelectric Film Sensor [19] Responds to changes in pressure. Maxim MAX931 Ultra-Low Power Comparator [18] Current draw: <1 µamp. Built-in 1.18V ±2% voltage reference. Resistor programmable hysteresis. Toshiba Single D Flip-Flop with Asynchronous Preset and Clear [24] 16

23 RST V CC V CC 5 6 hyst ref V DD MAX931 Out 4 - GND V PR V DD D-FF Q CLK D Q V SS CLR C752 SDA SCL P0.3 (SHUTDOWN_PIN) INT0 (IMPACT_PIN) AV CC SDA SCL A 2 A 1 A 0 24C04 V SS 4 T1 SMARTDOT MODULE BLOCK DIAGRAM V+ Battery Ground Microprocessor Ground Light Sensor Ground Signal Lines 2 V DD TSL251 GND 1 Out P0.2 (TRX_PIN) ADC0 (LITE_INPUT_PIN) AV SS P0.4 (LITE_PWR_PIN) X 2 X 1 V SS Figure

24 2.5.2 Hardware Operation Overview Figure 2-3 depicts a combination block diagram and pseudo-schematic detailing the physical connectivity of the SMARTDOT module's hardware components. The following discussion presents the theory of operation of the module's hardware, and refers to the components shown in the block diagram. The piezoelectric film sensor (T1) serves as both the "wake-up" sensor and impact detector, and is connected to the negative input (-) of an ultra-low power comparator (MAX931). Bias for the positive (+) input is provided by a voltage divider connected to the MAX931's internal 1.18V reference, with hysteresis provided through connection to the '931's "hyst" pin. The MAX931's output is connected to the asynchronous preset of a single, low-power CMOS D flip-flop (D-FF). Pressure applied to the insert is transferred to T1, generating a voltage spike that triggers the comparator, forcing the state of the D-FF to a logical '1'. The Q output of the D-FF transitions to the low (0) state, providing ground to the remainder of the module, which causes the Philips 87C752 microprocessor to "wake-up" and begin executing its program. The comparator output is also connected to an external interrupt on the '752 (labeled IMPACT_PIN) so that the microprocessor can record any subsequent activity (additional finger pressure, impact with the lane, impact with the pins, etc.) sensed by T1. With a MHz crystal, the 87C752 draws ~3 mamps while running, but through use of the '752's IDLE mode between light samples, the average current drawn is reduced to less than 2 mamps. When the '752 reaches the point where it is time to shutdown, it clocks a logical '0' into the D-FF (the 'D' input is tied to ground and the CLK pin is positive edge triggered), the Q output returns to the high (1) state, which removes ground from the microprocessor portion of the circuit, putting the module back to "sleep". The powered portion of the module (the comparator and the D-FF) draws less than 1 µa while the module is in sleep mode. The output of the TSL251 light-to-voltage converter is connected to the '752's on-board ADC (at LITE_INPUT_PIN) and the '251's ground is controlled by the microprocessor through LITE_PWR_PIN. The TSL251 draws about 800 µa when powered, and since the light waveform is sampled, rather than continuously monitored, the '752 turns off (removes ground from) the TSL251 between samples and then enters a power-reducing IDLE mode until the next sample time. The TSL251 also serves as the receiver portion of the IR communications transceiver. The transmit portion of the IR transceiver is comprised of two LED's and a resistor that limits the LED current to ~500 µa, driven by TRX_PIN. Since the transmit LEDs are only lit during a '0' pulse, and there is generally an equal distribution of 0's and 1's in a transmission, the average transmit current is ~250 µa. The 24C04 serial EEPROM stores the configurable parameters and the collected sensor data (impacts and light waveform samples) in nonvolatile memory. It draws approximately 1 ma during a write operation, and ~300 µa during a read operation. The 24C04 draws negligible current while idle (not being accessed). 18

25 2.6 HARDWARE/SOFTWARE INTERACTION DESIGN CONSIDERATIONS There are a number of areas where the design decisions for the hardware and the embedded software are interdependent. These issues are presented next Microprocessor Clock Frequency The clock frequency directly affects the current drawn by the microprocessor: the lower the clock frequency, the less current the 87C752 draws from the battery. The lowest standard oscillator frequency that supports the sample rate, the serial communications baud rates, and the processing demands of the application is MHz. The internal clock frequency for the 87C752 is 1 / 12 of the oscillator frequency, resulting in an instruction time of 3.26 µsec (307,200 instructions per second) for a MHz crystal. Quartz crystals and ceramic resonators are available in standard frequencies for microprocessors. Crystals easily can maintain an accuracy (over their temperature range) of 200 ppm (.03%), while ceramic resonators (cheaper and smaller) typically run in the 1-2% range. During the feasibility phase, a crystal has been used to enhance the accuracy of the sample clock, with the hope of switching to a ceramic resonator, in combination with some clock calibration software, as part of the development phase Sampling Rate The 87C752 microprocessor contains an 8-bit ADC with a conversion time of 130 µsec (~7600 Hz) at the clock frequency of MHz. It is important to minimize the sample rate, since the amount of data collected directly affects the amount of external data memory required. Complicating matters, EEPROM technology has a fairly slow write speed (5-10 msec per page write), thus presenting the possibility that the rate of writing data to memory might not keep pace with the production of data to be written. Also, it is desirable to run the microprocessor in IDLE mode as much as possible, since it cuts the current draw in half, and the light sensor (TSL251) and the '752's on-board ADC can be turned off between sample times. The higher the sample rate, the more time the microprocessor must spend collecting and processing data, which shortens the life of the battery. Data must also be collected from the impact sensor, but this is a different process. An impact can occur asynchronous to the time of a light sample, with a much shorter duration than the sample period. Therefore, impact detection is interrupt driven. By limiting the stored value of the light samples to the range (0x00-0x7F), the impact data for a sample can be stored in the high-order bit of the sample byte, thus associating each impact with the light sample during which the impact occurred. The primary factors in determining an appropriate sampling rate are the maximum angular velocity (rpms), the minimum and maximum linear velocities (ball speed), and the amount of memory available for the storage of captured data. Maximum RPMs: According to tests conducted by the ABC (American Bowling Congress), the best bowlers, those that average greater than 210, generate an average rotational rate of about 300 rpms (5 Hz) at release. In fact, the ABC found a direct correlation between average score and angular velocity [12]. There is an upper bound on the number of revolutions the ball can make. If the ball did not skid at all, it would travel 27 inches per revolution, while revolving 19

26 almost 27 times between the foul line and the head pin. The ball would also have to be thrown at over 25 miles an hour for the rotational rate to reach 1000 rpms. Those values are extreme, but they allow an upper limit of 1000 rpms (16.7 Hz) to be set as the maximum angular velocity. The vast majority of bowling establishments utilize fluorescent lighting. Preliminary testing with the TSL251 revealed that the sensor is responsive enough to detect the 120 Hz optical ripple of the overhead fluorescent lights. This ACinduced ripple becomes part of the ambient light level, and could cause a problem, since the pseudo-sinusoidal target waveform must be extracted from the ambient light. However, the AC ripple is confined to a narrow band at 120 Hz, while the desired fundamental waveform is of a much lower frequency. Sampling the waveform at a frequency less than twice the 120 Hz ripple could result in "aliasing" the 120 Hz content down into the frequencies of interest (< 20 Hz). And sampling at a frequency other than a harmonic multiple of 120 Hz could introduce harmonic variations into the raw waveform that the module must then deal with, since it certainly won't have the processing capabilities to digitally filter the data. Sampling at a harmonic multiple of 120 Hz, such as 240 Hz, and storing the average of two consecutive samples (yielding a net 120 Hz data rate), averages out the AC ripple. The frequency of the AC ripple exceeds the target waveform by at least a factor of 7 (in the extreme case), but is actually closer to a factor of Hence, the 120 Hz ripple should not interfere with data collection as long as an appropriate sample frequency is chosen, allowing for a resolution of at least of rotation. Ball Speed: The vast majority of bowlers, even at the 200+ average level, generate an average ball speed of less than 20 mph (~30 fps). At 30 fps, it takes at least 2 seconds for the ball to travel from the foul line to the head pin (60 feet). For a ball speed of 30 fps and a net sampling frequency of 120 Hz, the ball travels 3" per sample period, good enough for 0.4% resolution over 60 feet. The vast majority of bowlers generate ball speeds greater than 10 mph (15 fps), especially those that average greater than 180. At 15 fps, it takes the ball 4 seconds to completely traverse the lane, or 480 samples at 120 Hz. Data Memory: The hardware for the prototype SMARTDOT module was originally specified in January of At that time, the highest serial memory density readily available that was cheap enough to be practical was a 4096 bit (512 x 8) chip. This size memory is only big enough to capture a single roll of the ball. Affordable serial EEPROM memory density has increased dramatically since the SMARTDOT module prototype was designed, and the "Sample Memory" section details the implications of using a higher memory density. For the prototype module, ambient light sample data is produced faster than it can be consumed by single byte writes to the EEPROM. However, the EEPROM can handle 8 samples at a time, with a 10 msec max write time. A sample is produced every msecs (120 Hz), and a circular sample buffer is used to accumulate 8 consecutive samples for writing to the EEPROM. The EEPROM performs the actual write in the background, after the data has been input to its write buffer. The 87C752 can continue collecting data in the circular buffer without having to wait for the EEPROM to finish storing the data. 20

27 2.6.3 Baud Rate The module communicates with the outside world through a serial IR interface using standard baud rates. A software UART had to be implemented for the SMARTDOT module, since the 87C752 does not have an on-board hardware UART. The MHz crystal supports both the 240 Hz sampling rate, and running the software UART at all of the standard baud rates up to baud. The rise/fall time of the TSL251 limits the module's reception rate to 600 baud, which is not a problem, since the module receives little information compared to what it must transmit. On the transmit (upload) side, the entire contents of memory (512 bytes) must be uploaded rapidly so as not to inconvenience the user. At the baud rate, the entire contents of memory can be uploaded in less than a second. 2.7 EMBEDDED SOFTWARE DESIGN AND OPERATION This section presents a detailed description of the SMARTDOT module's embedded software operation. The module's software architecture is shown in Figure 2-4, which diagrams the interrelation of the major software tasks, and their interaction with the interrupt service routines (ISR's). The following software description and the architecture diagram both make reference to flowcharts for the embedded tasks and interrupt service routines, which are included in Appendix A. The actual assembly code is thoroughly documented, and has been included in Appendix B Software Design Considerations Due to the cost and physical size constraints of the application, the SMARTDOT module relies on a relatively simple hardware design. The complexity of the module is contained within its embedded software and the efficient use of the microprocessor's on-board resources and peripherals. The 87C752 microcontroller has severe constraints on both its on-board program EPROM (2048 bytes) and RAM (64 bytes). The RAM space also includes the general-purpose registers, the bit addressable space, and any required stack space. Although 'C' compilers are available for the 87C752, they are notoriously spaceinefficient, and 'C' makes heavy use of the stack. Due to the limited sizes of the code and data spaces, the embedded software was implemented in Intel 51 assembly language, with careful attention paid to the maximum depth of procedure calls, and with minimal parameter passing via the stack. The required stack space has been held to 16 bytes, allowing for a call depth of four (two-byte return addresses and two additional bytes (usually ACC and PSW) PUSHed onto the stack for each call). The application is both event and interrupt driven, with pre-emptive, round robin multitasking used on a limited basis to implement task time-outs, sampling, and discrimination between "valid" waveforms, attempts to communicate, and spurious activations. Microprocessor interrupts are used for acquiring regular light waveform samples, for impact detection, for implementation of the software UART, and for keeping accurate track of time. Event driven (polled) tasks include detection of release and detection of the COMM Wand. Semaphores are used for task synchronization. 21

28 SMARTDOT Module Software Architecture SLEEP MODE Wake Up on Pressure Applied to Insert Not DARK enough at start-up START-UP TASK (Figure A-1A) Initialize Module Check Start-Up LITE Level Enable Interrupts Waited too long for RELEASE PRE-SAMPLING TASK (Figure A-1B) Wait for Sample (IDLE) Check for RELEASE Select Active Scratch Pad Write to EEPROM (8 pre-samples) RELEASE detected RELEASE not detected LIGHT SAMPLE ISR (Figure A-2) Reached END of Sample Space Scratch Pad END and sampling disabled SAMPLING TASK (Figure A-3) Wait for Sample (IDLE) Write to EEPROM (every 8 samples) Check for END of Sample Space Check for END of Scratch Pad Check for Sampling Enabled In TEST mode, waveform VALID, and sampling disabled DISCRIMINATION TASK (Figure A-4) Check for Valid Waveform Check for Test Mode Check for Sampling Enabled Waveform invalid and not in TEST mode Waveform is still VALID In TEST mode with sampling enabled COMMUNICATION TASK (Figure A-5) Wait for DARK (IDLE) Contact WAND Wait for LITE (IDLE) Acknowledge WAND Get Command (UART Receive Task - Figure A-7) Process Command (UART Receive Task - Figure A-7) Check for Command Retry Done trying Continue trying WAND DETECTION ISR (Figure A-6) BIT SAMPLE ISR (Figure A-8) RECEIVE TIME OUT ISR (Figure A-9) SHUTDOWN TASK (Figure A-10) Done Sampling Save Run Time Back to Sleep Figure

29 Configuration settings and the sampled light waveform are stored in the external serial EEPROM. Sample memory is divided into three parts: two scratch pad areas, and a main sample area. While the previously collected waveform is stored across one of the scratch pads and the main sample memory, the other scratch pad is used to store potential waveform data while the module decides whether the waveform is the result of a ball rolling down the lane, or from some other activation (communications or spurious impact). Each scratch pad holds 600 msecs (72 samples) of the waveform, including the 8 pre-samples taken immediately prior to release. The remainder of the waveform (up to 2933 msecs or 352 samples) is stored in main sample memory. Figure 2-5a shows the logical layout of external memory. SDM_DATE_CODE [year] 000h SDM_DATE_CODE [week] 001h SDM_SERIAL_ [HI byte] 002h SDM_SERIAL_ [LO byte] 003h SDM_CFG_BYTE (see Figure 2-5b below) 004h SDM_SAMPLE_END (end of digitized waveform) 005h SDM_RUN_TIME [HI byte] 006h SDM_RUN_TIME [LO byte] 007h SDM_ACTIVATION_CNT [HI byte] 008h SDM_ACTIVATION_CNT [LO byte] 009h SDM_BALL_CNT [HI byte] 00Ah SDM_BALL_CNT [LO byte] 00Bh SDM_AUTO_GROUPS (Discrimination routine) 00Ch SDM_GROUP_SIZE (Discrimination routine) 00Dh SDM_HYSTERESIS (Discrimination routine) 00Eh SDM_RELEASE_LEVEL (light level for release) 00Fh 010h SDM_SCRATCH_PAD_0 Sample Scratch Pad 0 017h (72 bytes msec Sample time) 050h 057h 058h SDM_SCRATCH_PAD_1 Sample Scratch Pad 1 05Fh (72 bytes msec Sample time) 098h 09Fh 0A0h SDM_SAMPLE_BGN Main Sample Space 0A7h (352 bytes msecs Sample time) 1F8h 1FFh Figure 2-5a: EEPROM Memory Map Unused Auto Mode Sample Bit New Ball Bit Active Scratch Pad Overflow Test Mode Unused 0 - Single 1 - Auto 0 - Disabled 1 - Enabled 0 - Old Data 1 - New Data SDM_CFG_BYTE 0 - Scratch Pad Scratch Pad No 1 - Yes 0 - No 1 - Yes Figure 2-5b: SDM_CFG_BYTE Layout 23

30 2.7.2 Start-Up The SMARTDOT module spends the vast majority of its time in an ultra-low power sleep mode, which draws less than 1 µamp. Finger pressure applied to the insert wakes the module from its sleep. Since the bowler's finger must still be in the insert immediately after start-up, if SMARTDOT detects too much light at start-up, the release is presumed to be invalid (for instance, caused by another ball striking it on the ball return), and the module shuts down (goes back to sleep). If it is dark enough after start-up, SMARTDOT continues sampling the ambient light level, waiting for the release of the ball (indicated by the measured light level exceeding a configurable "release" level). The release process takes several seconds, while the bowler picks up the ball from the ball return and subsequently delivers it to the lane during their approach. If release is not detected within one second of activation, the module shuts down. Since the bowler grips the inserts throughout their approach, the module may experience several "false" start-ups before the actual release occurs. Refer to Figure A-1a (Start-Up Task Flowchart) for the sequence of events at module start-up Pre-Sampling As part of the actual release, the bowler applies significant pressure to the inserts immediately before release. The module is again activated (several hundred milliseconds before release), giving SMARTDOT sufficient time to see the ambient light release point. Since the module detected a valid pre-release light level at start-up, it looks for the release light level for up to one second. While waiting for release, the module stores the pre-release light samples in an 8-byte circular buffer. This "pre-sampling" allows the MASTER application to identify the precise moment of release. See Figure A-1b (Pre- Sampling Task Flowchart) for the pre-sampling sequence of events. The waveform is sampled at 240 Hz, but the sample data is collected and stored at a 120 Hz rate. In order to cancel the effects of the 120 Hz AC ripple superimposed on the waveform by the overhead fluorescent lights, two consecutive 240 Hz samples are averaged together to yield a single 120 Hz sample. The maximum stored sample value is clipped to 127 (0x7F) so that the high-order bit of each sample is available for storing the impact status for that sample. Refer to Figure A-2 (Light Sample ISR Flowchart) Waveform Discrimination and Validation The SMARTDOT module always runs in one of two major operational states: it samples, validates, and stores the ambient light waveform; or it communicates with the COMM wand. While the module samples and stores the waveform, it also executes a routine that discriminates between waveforms that result from the ball rolling down the lane, the MASTER attempting to make contact, and spurious activations. After detecting the actual release of the ball, the module continues to sample the waveform and collect data in its 8-byte RAM sample buffer (the same one used for storing the pre-samples), transferring the buffer contents to the active scratch pad in external EEPROM while scanning the sampled data for a pattern consistent with the ball rolling down the lane. If the presence of a "valid" waveform (one that looks like the ball is rolling) is not detected within 600 msecs (72 samples plus the 8 pre-samples) following release, the module automatically switches from sampling the waveform to its communication routines, and attempts to contact the COMM wand. Refer to Figure A-3 (Sampling Task Flowchart) and Figure A-4 (Discrimination Task Flowchart). 24

31 2.7.5 The Ball is Rolling If the waveform is still valid after 600 msecs (when the active EEPROM scratch pad has been filled) and sampling is enabled (see "Sampling Modes" below), the module begins overwriting the previous waveform data stored in the main sample memory in EEPROM with the data from the waveform it is currently sampling. The module continues to sample, store, and validate the new waveform for up to seconds (424 samples), depending upon the sampling mode currently selected Sampling Modes The SMARTDOT module can execute three different sampling modes: AUTO mode, SINGLE mode, and TEST mode. Bits 1, 5, and 6 of SDM_CFG_BYTE, shown in Figure 2-5b, are used to store the sampling mode. Also, refer again to Figure A-3 (Sampling Task Flowchart) and Figure A-4 (Discrimination Task Flowchart). AUTO mode enables the module to automatically capture every valid waveform it detects. If the previously captured waveform is not uploaded to the COMM wand before the next valid waveform is detected, the previous data is overwritten with the new data. Since the module always stores the waveform of the most recent ball rolled, this mode is useful when the bowler wants to upload the latest waveform, based on the observation of an interesting or unusual ball reaction, without having to interact with the module before every shot. SINGLE mode enables the module to store a new waveform only after the previous waveform has been uploaded to the COMM wand. Uploading the previous data automatically enables capture of the next valid waveform. If the previous data has not been uploaded, the module will not capture a new waveform. This mode is useful when the bowler wants to look at specific shots (such as the first ball of each frame), but doesn't want to be required to upload the data in the middle of a frame. TEST mode enables the module to capture a waveform only when it has been expressly instructed to do so. On the first valid release following each receipt of the TEST command, the module bypasses the waveform discrimination and validation routine and unconditionally samples the resulting waveform for the maximum seconds. This mode is useful for recording events that fall outside of the module's current definition for a valid waveform Shutdown Rather than require the module to collect data for the full sample time of seconds, the discrimination and validation routine is used to limit the total run time of the module. The module shuts down when the first of two shutdown conditions occurs: either the end of the sample space is reached at seconds, or the waveform discrimination routine determines that the waveform has become invalid, signifying that the ball has stopped rolling (entered the pit at the end of the lane). Once the module detects a shutdown, it updates the total run time, the activation count, and the ball count, and goes back to sleep. Refer to Figure A-10 (Shutdown Task Flowchart). 25

32 2.7.8 Communication with the COMM Wand Communications with the module are conducted over a wireless, infrared (IR) interface, using the TSL251 as the receiver, and two surface-mount LED's as the transmitter. Since the 87C752 does not contain an on-board hardware UART, a software UART has been implemented. The software UART conforms to several design constraints specific to the SMARTDOT module hardware. Baud Rates: Due to the limited response time of the TSL251, and the relatively slow conversion rate of the '752's ADC at the module's clock frequency, reliable reception is only possible up to 600 baud. The communication protocol between the module and the COMM wand is designed such that the module normally receives single character transmissions from the wand. Consequently, the 600 baud reception rate does not create a communications bottle-neck. Since the COMM wand can receive at a much higher baud rate than the SMARTDOT module, the module transmits to the COMM wand at up to baud (another limitation imposed by the module's clock frequency). Data Frame: A 12-bit serial protocol is used on transmission: 1 START bit, 8 DATA bits, 1 PARITY bit (EVEN), and 2 STOP bits. An 11-bit protocol (using a single STOP bit) is used for reception. This imbalance in STOP bits guarantees a minimal extra dead space between back-to-back characters, and allows for clock skew between the module and the COMM wand. Bit Sampling: The TSL251 and the 87C752's ADC are used for serial reception. The light waveform is sampled at 4800 Hz (8 samples per bit time), and the middle four samples of each bit determine the value (0 or 1) for that bit. Ignoring the first two and last two bit samples allows for some clock skew between the transmit baud rate of the COMM wand and the receive baud rate of the module. A count of two or more DARK middle samples constitutes a logical '1', otherwise the bit is considered a logical '0'. The bias is toward the DARK samples since the COMM wand's presence over the finger insert creates a dark ambient condition. As long as the COMM wand is held relatively close to the insert, the background remains dark enough for the module to discriminate between the light pulses (0's), and the ambient background level (1's). A noise margin is also built into the bit-sampling scheme. There is a gap established between the DARK and LITE levels, with the transition point switched between the two depending on the value of the last sample received, creating a digital hysteresis function. Refer to Figure A-7 (UART Receive Task Flowchart) and Figure A-8 (Bit Sample ISR Flowchart) Communication Protocol All communications with the module are initiated by pressing on the insert, and then placing the COMM wand over the insert, covering the opening. The bowler has one second to remove their finger from the insert, and another second following release to cover the insert with the COMM wand. If either of these conditions is not met, the module shuts down and must be reactivated. Upon activation, the module waits for release to occur, as previously described. When it identifies a release condition, it looks for a valid waveform. In the case of a COMM wand transmission, the module discovers that the ball is not rolling within 600 msecs (through the discrimination and validation routine), switches to the COMM wand detection routine, and waits for up to one second for the insert to become dark (become 26

33 covered by the wand). When the module detects the appropriate level of darkness, it assumes the COMM wand is in place, and transmits a specific "HI" character to the wand. An ASCII 'U' (0x b) is used as the "HI" character because it requires an alternating light level of Hz to be detected, which is highly unlikely to occur under ambient light conditions. If the COMM wand is actually in place over the insert, it receives the "HI" character, and responds with a NULL character at 600 baud. The NULL character (0x00) appears to the module as a light pulse of a fairly precise length (~16.7 msec - 10 consecutive '0' bit times, including the START bit and the EVEN parity bit) in an otherwise dark ambient background, another condition that is unlikely to occur under ambient conditions. The module waits for up to 200 msecs to receive the COMM wand's acknowledgment. If the module does not receive a valid acknowledgement light pulse within this time, it retransmits the "HI" character, and waits for the COMM wand's response. The module tries to contact the COMM wand three times before assuming the wand is not present, at which time it shuts down. Refer to Figures A-5 (Communication Task Flowchart), A-6 (Wand Detection ISR Flowchart), and A-9 (Receive Time Out ISR Flowchart). If the module receives a valid light pulse, it transmits another "HI" character to the COMM wand, at which point a "conversation" ensues between the SMARTDOT module and the COMM wand. If the protocol fails at anytime, or a reception error is detected, the module aborts the conversation and tries to reestablish communications with the COMM wand from the beginning, for a total of three attempts, before finally shutting down Commands The MASTER program can issue various commands through the COMM wand to the module to retrieve data, to select the module's sampling mode, and to configure certain module parameters shown in Figure 2-5a. Before the bowler can view the waveform the SMARTDOT module has captured, the MASTER must upload that data from the module by issuing the TRANSMIT command, which instructs the module to transmit the contents of its data memory. As an example, the protocol for uploading data from the module to the MASTER is: MODULE: "HI" 'U' baud - "Are you there?" MASTER: NULL 600 baud - "I'm Here" MODULE: "HI" 'U' baud - "Clear to Send" MASTER: 'T' "Transmit" 600 baud MODULE: 'T' Echoed back to baud MASTER: 'XON' 600 baud, MASTER is ready to receive data MODULE: EEPROM contents baud To accommodate baud rate switching in the MASTER, the SMARTDOT module inserts a delay between each reception from the MASTER and subsequent transmission to the MASTER. Including the delays, the entire upload process still takes less than a second. Appendix C includes timing diagrams for the individual command protocols: Figures C-1 (Upload Command), C-2 (Mode Command), and C-3 (Configuration Command). 27

34 2.8 PERFORMANCE Approximately 500 frames (about 50 games) have been thrown with various versions of the SMARTDOT module installed in several different bowling balls. To this point, the author has been the sole user of the device and his bowling style has been the sole source of input for developing the embedded software for the module. Although care has been taken to generalize the module's embedded software, until wider range testing can be performed, the embedded software must be considered as adapted to the author's style of bowling and the specific parameters of his game. The graph of a typical waveform captured by the SMARTDOT module prototype is shown in Figure 2-6, which is a screen capture from the PC-based MASTER application developed in concert with the SMARTDOT module. The raw data points are shown in blue, the resulting waveform is shown in green, and the impacts registered for this shot are shown in orange. The numerical results of the analysis of the data are shown under the "RELEASE" and "IMPACT" headings. The MASTER application is presented in Section III of the paper. Figure 2-6: MASTER "Raw Data" Screen Capture 28

35 2.8.1 Detecting Release Detecting the point of release by using a RELEASE light level has been quite effective. Since the bowler must cover up the light sensor when placing their fingers in the ball, the module sees a very low level of light (essentially 0) while the bowler is gripping the ball. There are circumstances when, as part of a bowler's normal ritual, they insert and remove their fingers in the ball several times before commencing their delivery. SMARTDOT detects each of these as a release, assuming enough pressure has been applied to activate the module, but the discrimination routine is intended to recognize, and ignore, such behavior. Pre-sampling of the waveform helps capture the moment of release - that point when the light samples start to increase from their dark pre-release levels. Although the module uses the configured RELEASE level to detect release (at which time it writes the eight pre-samples to EEPROM), the MASTER program determines the exact moment of release from those pre-sample values, which might differ from the time the module used by one or two sample times. Referring to Figure 2-7, which zooms in on the first 400 msecs of the waveform shown in Figure 2-6, the pre-sample light level is actually 0 (completely dark) until the bowler starts to release the ball at -17 msecs. Release occurs between -8 msecs and 0 msecs, where a sharp increase in the light level is evident Impact with Lane (ball loft) Light Level Release Point Finger Pressure at Release Milliseconds (since Release) Figure 2-7: Raw Data Release Region (400 ms) Detecting Impacts The piezoelectric film sensor and the comparator circuitry are more than adequate for detecting the various impacts the ball experiences. Several impacts are shown in Figure 2-7, which presents the first few hundred milliseconds after release. At two consecutive sample times, -8 msecs and 0 msecs, the sudden pressure that the bowler applied to the finger insert while releasing the ball is indicated. At 183 msecs, the graph indicates the ball contacting the lane. The module consistently records both the pressure applied at release and the impact generated when the ball hits the lane. At the other end of the lane, the module has no problem detecting multiple impacts with the pins, as seen in Figure 2-8 (an expansion of the waveform in Figure 2-6). This particular waveform is from a ball that hit the 1-3 pocket and resulted in a strike. A good pocket hit generally results in the ball hitting four pins on its way through the rack, and there are four impacts indicated on the graph. Throughout testing, solid pocket hits tended to generate four impacts, while light pocket hits, and high hits resulted in three 29

36 impacts. By looking at the "signature" of the impacts, it might be possible for the MASTER application to utilize the impact information at the pins to discern whether or not the ball hit the pocket. It might also be possible to discriminate between the first and second balls of a frame by looking at the impact signatures of consecutive waveforms. Light Level Impact (Head Pin) Impact (5 Pin) Impact (3 Pin) Impact (9 Pin) Milliseconds (since Release) Figure 2-8: Raw Data Impact Region (800 ms) Waveform Discrimination and Validation Correct operation of this function is critical for proper and convenient operation of the module. The discrimination routine implemented in this version of the module is quite simplistic, and is based on observations of waveforms from just a single individual. In that regard, the routine served its purpose, but it does have some inherent limitations. Figure 2-9 shows the first 800 msecs following release of the ball. The module must determine, within the first 533 msecs after release, whether to continue recording the waveform, or to switch to detecting the COMM wand. With the limited scratch pad space available (72 samples worth) for the module to make this decision, it is possible for the routine to "misfire". Since the author generates about 420 rpms (7 rps) at release, the routine can detect three revolutions in the validation time of 533 msecs, causing it to decide that the ball is, in fact, rolling down the lane. However, when executing certain spare shots, many bowlers release the ball with as little rotation as possible in order to "flatten" the ball's hook. In this case, the module reaches the end of the scratch pad before the discrimination routine has determined that the ball is, in fact, rolling down the lane. The discrimination routine decides that the waveform is invalid, and switches to detecting the COMM wand. The waveform in Figure 2-10 was captured using the module's TEST mode, and displays a waveform from just such a spare conversion (10-pin). This waveform resulted from the ball rolling down the lane, but the first 600 msecs do not conform to the current definition for a "valid" waveform in the module's embedded software. 30

37 Light Level st complete Revolution 2 nd complete Revolution 10 0 Release Point Milliseconds (since Release) Figure 2-9: Raw Data Release Region (800 ms) Figure 2-10: 10-Pin Shot, "Raw Data" Screen Capture 31

38 Also, there have been instances in AUTO mode where the module recorded what appeared to be the ball returning to and rolling on the ball return. SMARTDOT is activated on every impact (as well as when the finger insert is pressed), and one of these impacts can occur when the ball is hoisted from the subway up to the ball return. If the module is facing downward after this impact (so that the release level is not detected at start-up), and the ball rolls fast enough after start-up to satisfy the discrimination routine, a "misfire" results. If the module is in AUTO mode when this scenario occurs, the result is that the waveform from the ball just rolled is lost, overwritten by the "misfire" generated at the ball return. See the "Future Work" section for more information on revisions to the discrimination routine. An interesting observation from the waveform in Figure 2-9 is that the first complete revolution of the ball occurred before the ball hit the lane. Thus, this revolution has not yet been impacted by the interaction between the ball and the lane, and is truly representative of the angular velocity of the ball at release Waveform Shape The initial premise behind using a light sensor to detect revolution of the ball was that the digitized light waveform would be roughly sinusoidal in nature. Looking at Figures 2-9 and 2-11, the actual waveform is much "rougher" than anticipated. Figure 2-10 shows the first 800 msecs of a waveform, Figure 2-11 shows 800 msecs of the same waveform, centered at the ball's initial impact with the pins Last complete Revolution Impact (Head Pin) Light Level Milliseconds (since Release) Figure 2-11: Waveform Shape, Impact Region (800 ms) Although the captured waveform is not exactly sinusoidal, it exhibits some basic characteristics that are encouraging, such as a periodic oscillation, and a sinusoidal shape in the "valleys" of the waveform. A sinusoidal envelope closely approximating the digitized waveform is superimposed on the graphs, and the beginnings and endings of each complete revolution of the ball, located by the peaks in the sine wave, are demarcated in red. A digital filter applied to the captured data could extract the target sine wave. 32

39 By filtering the data, and then counting the number of samples between the peaks, it is possible to find the angular velocity (rpms) for each of the revolutions. In Figure 2-9, there are between 16 and 17 samples in each of the revolutions, and the time between samples is msec (120 Hz sample rate), yielding an angular velocity of 424 to 450 rpms ( Hz). In Figure 2-11, there are between 15 and 16 sample times, yielding an angular velocity of 450 to 480 rpms (7.50 to 8.0 Hz). One concern immediately apparent from the results just obtained is that by using the method described (measuring time by counting samples), a difference of one sample time resulted in a change of ~25-30 rpms over a range of rpms (± 2.8%). A finer resolution in the angular velocity calculations is probably required. Another concern is developing a method for calculating appropriate cut-off frequencies for the digital filter. Suggestions for dealing with these problems are presented in Section III Communications The module's software UART has turned out to be quite reliable. In an infrared (IR) wireless environment, the proximity of the communicating devices and ambient background light infiltration are the two main concerns. The proximity of the devices is fixed at about 1 3 / 8 " (1.375"), as long as the user does not remove the COMM wand during communications. Normally, an IR filter would be used to block visible light, but in this application, detection of visible light is necessary. By having the module detect the presence of the COMM wand (by looking for a very low light level), the module can assure that background light infiltration has been reduced to an acceptable level before initiating communications with the wand. One recurring problem was encountered that will be fixed in a later version of the module software. During the upload portion of the "Transmit" command, if the COMM wand was moved such that light infiltrated during the wand's reception of the EEPROM contents, the data file could be corrupted without detection by the MASTER program. There is no handshaking going on during this portion of the exchange, and if the COMM wand is positioned just right, it is possible for the 120 Hz fluorescent noise to simulate repeated START bits. The wand continues to see START bits, and consequently continues to receive data until it has counted 512 bytes, at which time it proceeds to process the data. Suggested improvements for the communication routines are discussed in the "Future Work" section Battery Life A major design goal was to limit the overall current drawn by the module. Lithium coin cells are rated in milliamp-hours (the number of hours the battery can supply one milliamp of current while maintaining its rated battery voltage). Several different techniques were used to limit the current draw of the module. The TSL251 light sensor is turned off when not in use, reducing current draw by 800 µamps. While the module is running, the 87C752's IDLE mode is used between sample times. This cuts the average current draw of the module from 3.5 mamps to under 2.0 mamps. Extensive use of time outs has also helped to limit the run time of the module. For any given shot, the average current draw is 2.5 mamps for 3-4 seconds, yielding mamp-seconds per shot. 33

40 However, testing revealed that there are also multiple "false" activations per shot, which occur before release of the ball and from the ball return mechanism handling the ball. These activations typically accumulate seconds of additional run time, accounting for another mamp-seconds per shot. Therefore, the actual battery usage works out to be ~40 mamp-seconds per ball. For a 200 mamp-hour coin cell, this yields a battery life of 18,000 shots (about 1000 games). The bowler could use the module up to 20 games a week for a year without having to replace the battery. A lower capacity battery could also be specified, reducing the cost, weight, and height of the module. 2.9 FUTURE WORK The prototype SMARTDOT module was developed to serve three functions: first, as a proof-of-concept; second, as a data collection device to capture and characterize the ambient light waveform that the module was being developed to record; and third, to serve as the initial hardware platform upon which to develop and test the embedded software for the commercial SMARTDOT module. Recall that the nature of the light waveform was unknown at the start of this project. Much knowledge has been gained since then from actually being able to observe and analyze the captured data. This knowledge will be put to use in future iterations of the module's embedded software. Also, in the time since the design and construction of the SMARTDOT module prototype, component technology has improved tremendously. Upgrading the module with these advanced components will allow for significant improvements in the capabilities of both the hardware and the embedded software, as well as in reductions in the cost, size, and weight of the module Microprocessor Microprocessor technology in the 8-bit arena has changed quite dramatically in the last few years. Cygnal Integrated Products just recently introduced a true system-on-a-chip 8051-based microprocessor (C8051F300x). The 'F300x contains 8K bytes of on-board flash memory (which can be used for both program and data), 256 bytes of RAM, an advanced serial UART, advanced power-management functions, on-board ultra-low power comparators, a low-power analog-to-digital converter (ADC), on-board programmable oscillator, and reset circuitry, all in a package that measures 3mm by 3mm. With this microprocessor, the TSL25x light sensor, LED's and a small amount of passive components, the module can be redesigned to be smaller, cheaper and more powerful than the current design. It will even be possible to upgrade the module's embedded software via the infrared interface while the module remains in the ball. The 'F300x also makes certain software improvements possible. Since it contains both an on-board comparator and a hardware UART, it will be possible to feed the TSL251 output to the comparator and then to the reception port of the UART. In addition, the transmission port of the UART can directly drive the transmit LED's, allowing for much higher transmit baud rates. This will be an issue with the much higher serial EEPROM densities now available (see "Sample Memory" below). These improvements also eliminate the software UART, freeing up a significant amount of code space. 34

41 The 'F300x can write to any portion of its flash memory "on the fly". Therefore, flash memory that is not used for code space is available as sample memory. If the code can be limited to 2K bytes, as it is in the prototype, 5.5K of on-board flash memory is available for data space (the high-order 512 bytes are reserved for factory use). A scheme for compressing the sample data is proposed in the "Data Compression" section that allows for the recording of an entire game's worth of data (up to 21 shots) for most bowlers. Using the excess on-board flash memory as the sample memory eliminates the need for an external serial EEPROM chip, which results in cost savings and reductions in PCB space and the overall weight of the module. The 'F300x provides additional advantages. Where as the Philips 87C752 has an instruction rate that is 1 / 12 of the clock frequency, the 'F300x's average instruction rate is one-half that of the clock frequency, executing instructions at six times the rate of the '752. Faster instruction execution means more time can be spent in the IDLE mode. The 'F300x also has an on-board ADC that samples at a rate 10 times faster than the '752, again cutting down on time spent out of IDLE mode. In addition, the 'F300x has the ability to switch its internal clock frequency, meaning that it can slow down when it's not processing data, and speed up when it has work to do. Once again, this results in a reduction in current draw. These additional power reductions could result in an average current draw of one-eighth to one-quarter that of the current SMARTDOT prototype, allowing the use of a smaller, cheaper, lighter-weight battery Communications Since it is very easy to inject noise into an IR connection, the module should issue a checksum after each grouping of bytes so that the MASTER program can verify the contents of the data. The module should also send a fixed terminating character to indicate that the transmission is complete. This character won't be unique to the transmission since the data can take any of the 256 values, but it will be positioned at a fixed location in the transmit stream. These were oversights in the current version of the embedded software. Ultimately, it would be beneficial to implement a limited IrDA (InfraRed Data Association) protocol stack. Using one of the standard IrDA protocols would facilitate communication with just about any PDA-type device, all of which utilize various IrDA protocols to "beam" information back-and-forth. Unfortunately, implementing an IrDA stack in an 8-bit device is a fairly complex task, which also consumes a fair amount of code space. For now, it is something that will remain on the backburner Sample Memory and Multiple Waveforms As the prototype is currently designed, the SMARTDOT module can only record one shot at a time. This has proven to be highly inconvenient and time-consuming. Much more desirable is the ability to record multiple shots, preferably at least an entire game's worth of data, between uploads. In addition, the effectiveness of the waveform discrimination and validation routine is severely impacted by the limited amount of scratch pad memory in the prototype. If the module had more time (meaning more space) to record data while deciding the source of a waveform, it could perform this task much more reliably. In the time since the SMARTDOT module prototype was assembled, serial EEPROM memory densities have increased dramatically. Using the assumptions previously presented (a 4 second maximum sampling time at a 120 Hz sample rate), the amount of data memory required to store the data for a single game can now be determined. It is 35

42 possible to roll up to 21 shots in one game of bowling. Allowing a maximum of 512 bytes per ball (500 samples, plus some additional header information), bytes are required to store the "worst-case" game: 21 balls thrown at 10 mph. Serial EEPROM is now available in 8Kx8 (64K bits), 16Kx8 (128Kk bits), and 32Kx8 (256K bits) chips, with 64Kx8 (512K bits) soon to be available. The 16Kx8 chip is mandated using the above criteria. If a sample rate of 240 Hz is required, the 256Kb module would have to be specified, with a commensurate increase in cost. At a 120Hz data rate, the 256Kb chip will also accommodate three full games of bowling, which is significant, since a league series usually consists of three games. The above calculations are based on minimum ball speeds (maximum sample time per ball). However, a greater number of shots can be captured for a given size memory if the data is stored in variable length records. Such a record would consist of header information (the ball count, the activation count, the run time, the length of the record, a pointer to the previous record, a pointer to the next record, etc.) and the actual sample data. The records would be stored as a doubly-linked list, and uploaded as a group, probably at the end of each game, which would free up the memory for the next game Data Compression Although serial EEPROM memory has increased in capacity while also becoming cheaper, it is cost-effective to use the smallest memory space that will hold a game's worth of data (21 balls maximum). The data collected so far might possess characteristics that could be exploited by a data compression routine. Bearing in mind that the collected waveforms are from a single bowler and a single bowling establishment, it would be incorrect to assume that this data is representative of the entire bowling population. However, it should be possible to draw some initial useful conclusions that are worth further study. It was originally assumed that the waveform the SMARTDOT module records would have a roughly sinusoidal shape. Looking at just the lower half of the waveform, that assumption is basically valid. However, the waveform exhibits striking directionality when the module is facing the ceiling, as can be seen in Figure By setting 0 to be that point where the module is facing directly toward the ceiling, it is apparent that the sample-to-sample values change rather rapidly (20 or more counts at a time) in the range from 270 to 90. This phenomenon results from the fluorescent ceiling lights acting as point sources, rather than as a uniformly distributed light source, and from the module being located below the surface of the ball. However, the sample-to-sample values in the 180 of rotation between 90 and 270 change relatively slowly (only a few counts at a time). This portion includes the valleys of the waveform, which are produced when the module faces the lane surface, in the shadow of the ball. The "interesting" portion of the waveform falls within the range (0x0A to 0x32), where the waveform exhibits a finer granularity. This information can be used to advantage in contemplating appropriate data compression techniques. A system needs to be established that can store two samples in one byte - 4 bits per sample. If samples could be stored as a value relative to each other, or relative to some known fixed value, this goal might be accomplished. It would be beneficial to maintain a fine granularity around the inflection points of the valleys in the waveform, and loosen that granularity as the sample values move further away from those inflection points. 36

43 One possibility is to use a transformation table to record the data. Each sample would be compressed into four "value" bits, plus a fifth "range" bit. Two adjacent compressed values would be stored together in a byte, while the "range" bits would be stored consecutively in groups of eight comprising a "range" byte. The impact bits would also need to be stored in separate bytes. In this fashion, six bytes would be required to store eight samples: four dual sample bytes, one range byte, and one impact byte. Thus, a compression of 25% has been achieved, allowing an 8-Kbyte external EEPROM to hold a "worst-case" game's worth of sample data. The data for one waveform would be stored as shown in Figures 2-12a and 2-12b. (one header per waveform) Ball Count Previous Record (address / 8) Next Record (address / 8) Pre-Samples Impact Byte (8 impact bits) Pre-Sample Bytes (no translation) Figure 2-12a: Waveform Header (repeated up to 60 times for 480 samples) Impact Byte (8 Impact bits) Range Byte (8 Range bits) Sample Bytes (translated values) Figure 2-12b: Waveform Compressed Sample Record An example translation table is shown in Figure Notice that this table yields a nonlinear translation, resulting in a hash function that converts 8-bit values into 5-bit values (4 data bits plus the "range" bit). For example, using the translation table of Figure 2-13, if eight consecutive samples contained the values 10, 12, 16, 38, 57, 75, 118, and 85 and impacts were registered at the third (16) and fourth (38) samples, the compressed data would appear as shown in Figure 2-12c Impact Byte 30h ( ) Range Byte 1Fh ( ) Sample Bytes (translated values) B C E D Figure 2-12c: Compressed Samples Example 37

44 2.9.5 Module Training Due to variations in bowler style and bowling equipment, and with inherent variations in the ambient background light levels at various bowling establishments, it will probably be necessary to "train" the module for a given bowler, and for a given establishment. This can be easily accommodated at the beginning of each session of bowling. The MASTER application would issue a command to the module to take samples without data compression. This data, collected from several "training" shots would then be uploaded to the MASTER program, which would scan the data and come up with the best-fit translation table, and download the table to the module. The module would then use these values in its data compression routines. If the module was not trained, it could use the last translation table downloaded to it as a default. The MASTER program could also determine the average ball speed of the bowler and use this information to decide whether there was enough room to store uncompressed data (since the amount of space used is dependent on the waveform sample time), or to use the data compression function. Stored Nibble Value Actual Sample Value (0) Range Bit (1) Range Bit 0x0 < x x x x x x x x x xA xB xC xD xE xF 27 >127 Figure 2-13: Data Compression Translation Table Adjustable Sampling Parameters Preliminary analysis of the data collected revealed that some type of digital filtering is required in order to extract useful data from the captured waveform. However, the 120 Hz sampling rate may not be high enough to accurately achieve the desired resolution in angular velocity (rpms). The 120 Hz rate is the minimum acceptable, but 240 Hz, or even 480 Hz, may be required. Of course, higher sampling rates increase the data storage requirements, and require faster EEPROM write times. Ramtron makes an appropriate density ferroelectric serial EEPROM with a write time equivalent to the data bus speed that fits the application, although the cost-per-bit is 50% higher than that for standard serial EEPROMs [22]. The sampling rate could be adjusted based on the rate of rotation the bowler applies to the ball and on the velocity that the bowler throws the ball. The higher the rate of rotation, and/or the velocity, the higher the sampling rate should be. But with a higher ball speed, less time is required to sample the full waveform, so there should be some offset between the increased sample rate and the reduced sample time. Another option is to interpolate between 120 Hz samples based on the rate of change of the sample values surrounding the values to be interpolated. This interpolation would be handled by the MASTER application. 38

45 2.10 SUMMARY This portion of the research has shown that the in-situ sensor module is a viable concern, although the current prototype has its limitations. The major limitation is that the module is capable of capturing only one shot at a time. Given the advances in data storage density and reductions in cost-per-bit, this limitation can be easily overcome. Another major limitation is the effectiveness of the discrimination routine, but the routine has been hampered by a lack of scratch pad memory space. This limitation is also solved with an increase in the available storage space. Now that the nature of the waveform is better understood, the next version of the module will be more attuned to capturing the essence of the data. In addition, advances in technology have made it possible to cut the weight and height of the module, as well as the component cost, by at least a third. Those same advances also allow more sophisticated techniques to be implemented within the module's embedded software, such as data compression, variable sampling frequencies, better waveform discrimination, and more advanced communication techniques. The major concern to emerge during the SMARTDOT module's development is the "rough" shape and the directionality of the captured ambient light waveform. Although it is possible to visually count the revolutions of the ball directly from the waveform, it is not at all evident that the angular velocity of the ball changes as the ball rolls down the lane, nor is it possible to resolve the revolution count to better than about one-half rotation. Consequently, some level of digital signal processing is required in order to remove the "noise" from the waveform before beginning to extract the useful information from that waveform. The methods used to digitally filter the raw data and the assumptions and methods used to extract the "interesting" information from the filtered waveform are presented in the next section. 39

46 SECTION III: ANALYZING THE DATA - THE MASTER APPLICATION This portion of the paper presents the data manipulations used to extract the waveform from the raw data, the assumptions for analysis of the waveform, the mathematics and physics behind those assumptions, and the possible information that can be derived from the extracted waveform. Consideration is also given to future possibilities for analysis and presentation of the data. The SMARTDOT sensor module is intended solely as a data collection device, serving as the sensing mechanism for the SMARTDOT system. The actual power of the system, however, will reside in the MASTER application. For the purposes of this portion of the project, it was necessary to develop a data-analysis program that was capable of communicating with the module, and uploading, storing, and facilitating a quick analysis and assessment of the data at the test site (a local bowling establishment) on a laptop computer. As such, the current MASTER program is a research tool - the creation of a user-friendly, GUI-based analysis and presentation package falls into the development phase of the project. 3.1 RAW DATA ANALYSIS The original premise behind the development of the SMARTDOT system was that the light waveform the module captures would be sinusoidal in nature, and that information relevant to the action of the ball could be extracted from that digitized waveform. Under ideal circumstances, with truly uniform lighting, the data that SMARTDOT collects would closely transcribe a sine wave. In actuality, the captured waveform is quite "rough" - it does exhibit "peaks" and "valleys" like a sinusoid, and it also possesses a cyclic, repetitive shape, but it only loosely resembles a simple sine wave. It is possible to visually identify and count the revolutions of the ball from the raw data, to a resolution of one-quarter to one-half revolution. The release and impact times are captured with a fair amount of accuracy, and it is easy to use them to calculate the average speed of the ball. However, the "rough" shape of the waveform makes it impossible to reliably determine the starting and ending points of a particular revolution, nor is it "easy" to determine the total number of revolutions to better than one-half rotation. After the first look at the digitized waveform data in the early portions of the research, it was obvious that the raw data would have to be digitally filtered before it could be used in an automated analysis program The "Ideal" Waveform Before developing a digital filter for the raw data, some understanding of what the desired data should look like must be gained. Recall that the ball is released with a linear velocity that is greater than the corresponding angular velocity will support - the ball is skidding (traveling faster than it is revolving). Friction between the ball and the lane works to resolve this discrepancy between the angular and linear velocities of the ball. With no other force but friction acting on the ball from the moment of release until the moment of impact with the pins, the ball experiences a monotonic increase in its angular velocity (at any instant, the ball's angular velocity is greater than at any previous instant), and a corresponding monotonic decrease in its linear velocity. 40

47 The ball's angular velocity increases until the discrepancy between the angular and linear velocities is resolved (a condition called roll out). If the ball rolls out before reaching the pins, it is no longer skidding, and the continuing decrease in its linear velocity due to rolling friction also directly impacts the angular velocity (it begins to monotonically decrease, as well). Under normal circumstances, the ball does not roll out before hitting the pins, and therefore, the angular velocity generally increases until the ball hits the pins. Given a uniform light distribution along the length of the lane, the light level seen by SMARTDOT will be at its highest (brightest) when the module faces directly towards the ceiling, and at its lowest (darkest) when the module faces directly towards the floor, with a smooth transition occurring between those two points. Under these circumstances, a graph of the light waveform appears as an increasing frequency "chirp". The peaks and valleys of the sinusoid are spaced further apart near the release point, and get closer together as the ball approaches the pins. Figure 3-5, which is a capture of the filtered "Waveform" screen from the MASTER program, depicts this waveform. If the ball rolls out, its angular velocity reaches a maximum at the roll out point, and then begins decreasing. It is possible to use this information to detect whether or not roll out has occurred by looking for a decrease in the angular velocity. Recall also that friction-reducing lane oil is regularly applied to the first feet of the lane. Therefore, the ball is more prone to sliding on the upper half of the lane (nearer the foul line), with the majority of the increase in angular velocity occurring on the lower half of the lane (nearer the pins). Therefore, a graph of the angular velocity of the ball versus time (or distance from the foul line) will have a hyperbolic or exponential shape, assuming roll out has not occurred. The graph of the linear velocity will mirror that of the angular velocity, starting high and falling off at the end. Figure 3-7, which is a capture of the "Analysis" screen from the MASTER program, depicts these two graphs. If the ball had rolled out, the graph of its angular velocity in Figure 3-7 would display an inflection point at the point of roll out, decreasing after roll out, while the graph of its linear velocity would continue to decrease. Figure 3-9 depicts a waveform that resulted from the ball rolling out before hitting the pins The "Real" Waveform The "jagged" appearance of the raw data waveform, as shown in Figure 3-1, indicates that a good deal of high frequency "noise" has been captured along with the desired waveform. Since the module filters out the 120 Hz flicker of the overhead fluorescent lights while capturing the waveform, this noise must have another cause. In fact, the noise could be the result of three additional sources: the non-homogenous nature of the overhead lighting; the directionality of the light sensor that was introduced by placing the SMARTDOT module at the bottom of a finger hole, 1 3 / 8 inches below the surface of the ball; and from "aliasing" of frequencies greater than one-half the sampling frequency. These higher frequencies might result from flash bulbs, reflections, etc. Other than these transient sources, aliasing should have minimal impact, since there are no significant sources of flickering light greater than 120 Hz in a bowling center. 41

48 Figure 3-1: MASTER "Raw Data" Screen Capture The non-homogenous nature of the overhead lighting can be seen in Figure 3-2, which zooms in on the first 800 msecs of Figure 3-1. Multiple local peaks are evident during each revolution, with each of these "side lobes" occurring as a row of ceiling lights comes into view of the light sensor. Looking closer, it is also evident that the side lobes grow and recede as the ball travels further down the lane. Eventually they disappear completely, as is evident in Figure 3-3, which zooms in on the last 800 msecs of the shot in Figure 3-1. The directionality of the module can be seen in the shape of Figure 3-3. The light level rapidly approaches a peak value when the light sensor is pointing almost directly at the light source, and just as rapidly retreats as the light sensor rotates away from the light. Notice that the valleys of the waveform do not display this directional characteristic. Drawing from Fourier analysis techniques, the cyclic waveform shown in Figure 3-1 must have a fundamental frequency close to that of its major peaks, which resulted from each rotation of the ball. For a cyclic waveform to exhibit such sharp peaks, there must also be a significant amount of high-frequency harmonic content. The multiple local peaks present in each revolution, as shown in Figure 3-2, will be responsible for some significant intermediate harmonic content, as well [7]. 42

49 Light Level Release Point Milliseconds (since Release) Figure 3-2: Raw Data Release Region (800 ms) By considering the nature of the ideal waveform (an increasing frequency "chirp"), it is possible to deduce the shape of the frequency spectrum of the raw data. Since the lane is more heavily oiled near the foul line, the coefficient of friction is lower, and the ball will slide more. This sliding prevents the ball's linear momentum from being transferred into angular momentum, thus maintaining a fairly constant velocity for the first few revolutions of the ball. Thus, a fundamental frequency is established that is close to the initial angular velocity at release Impact (Head Pin) Light Level Milliseconds (since Release) Figure 3-3: Raw Data Impact Region (800 ms) As the ball continues down the lane, it eventually gains angular velocity, and this change will be reflected in additional higher frequency content, albeit with a decreasing magnitude, in the frequency bands immediately adjacent to the fundamental frequency. Due to the harmonic content introduced by the sharp peaks and multiple local peaks, there should be additional frequency content at integer multiples of the fundamental frequency, appearing as an attenuated "echo" of the shape of the frequency content around the fundamental. The characteristic frequency spectrum shape just described is shown in Figure

50 3.2 FILTERING THE RAW DATA Figure 3-4 is a capture of the "Spectrum" screen from the MASTER program, and demonstrates the use of digital signal processing (DSP) and, more specifically, the application of the Fast Fourier Transform (FFT) to the raw data waveform shown in Figure 3-1. By obtaining the frequency spectrum of the raw data, it is possible to identify and retain the fundamental frequencies, while removing the harmonic content and other noise. Applying the inverse FFT function (FFT -1 ) to the modified spectrum then yields the filtered waveform of Figure 3-5, which closely resembles the ideal waveform that was previously described [7,10]. Figure 3-4: MASTER "Spectrum" Screen Capture The MASTER program must be able to perform this filtering automatically, without any user input. Therefore, a reliable method for the MASTER to identify the fundamental frequency, and the band of frequencies of interest, must be developed. For this application, the fundamental frequency will be considered the component of the spectrum with the greatest magnitude in excess of 2.0 Hz. Looking at the spectrum of Figure 3-4, it is easy to identify the fundamental frequencies centered at ~7.5 Hz (disregarding the low-frequency components located below 2.0 Hz), with the first harmonic centered at twice the fundamental (~15 Hz). The magnitude of 44

51 the fundamental frequency has been normalized to 1.00, with the remainder of the frequency components normalized relative to the fundamental frequency [7]. Extracting the desired waveform requires a bandpass filter that removes the unwanted low and high frequencies while leaving the frequencies of interest unaltered. It is important to note that the fundamental frequency will vary from bowler to bowler. Consequently, a bandpass filter with fixed upper and lower bounds is not appropriate. Instead, the MASTER must calculate the pass band dynamically for each bowler, and possibly for each individual shot. Several basic methods are appropriate for calculating the pass band limits. These limits can be set based on: A percentage of the fundamental frequency. A percentage of the magnitude of the fundamental frequency. A combination of the first two. There are two separate limits imposed on the upper band of the filter. First, the pass band should not be allowed to extend into the harmonic portion of the spectrum, as this will introduce components of the noise the filter is intended to remove. Second, the ball reaches its highest angular velocity at the point of roll out, or at impact with the pins if it doesn't roll out, and it can revolve, at most, 26.7 times in 60 feet (if it did not skid at all). Combining that information with the time of transit of the ball, it is possible to apply an upper bound to the maximum angular velocity of the ball and, therefore, the high side of the bandpass filter. The dashed orange line around the fundamental frequencies in Figure 3-4 represents the adaptive bandpass filter for this spectrum. The MASTER program calculated these limits automatically, using the third method listed above (through a combination of frequency percentages and magnitudes). The MASTER identifies the fundamental frequency, and then extends the pass band limits on either side of the fundamental until it finds an area of "insignificant contribution". In this case, it finds a contiguous group of frequency components with magnitudes less than 0.1 (10% of the fundamental). The bandpass filter limits must also conform to minimum and maximum percentages of the fundamental frequency. The spectrum shown is typical for the author's bowling style and he has found that the minimum low cut-off frequency can be set relatively close to the fundamental frequency (75% of the fundamental), while the high cut-off frequency should be at least 125% of the fundamental, but no more than 175% of the fundamental. Of course, these limits may differ for other bowlers. With the pass band limits identified, a digital bandpass filter can now be applied to the spectrum. The magnitudes of the frequency components within the pass band are retained, while those outside the pass band are set to zero (0.00). Applying the inverse FFT function (FFT -1 ) to the altered spectrum yields the waveform shown in Figure 3-5. This filtered sinusoidal waveform describes the rotation of the finger hole that contained the SMARTDOT module and, since the entire surface of the ball rotates at the same rate as the finger hole, this waveform also describes the rotation of the ball. The 'C' source code from the MASTER application for the adaptive bandpass filter implementation has been included in Appendix D. 45

52 3.3 FINDING REVOLUTIONS AND ANGULAR VELOCITY Due to the regular sinusoidal nature of the filtered waveform of Figure 3-5, it should be possible to develop methods that enable the MASTER to automatically "count" the total revolutions of the ball, find the period of each revolution, and calculate the angular velocity (rpms) for each of those revolutions. Figure 3-5: MASTER "Waveform" Screen Capture Define a full revolution of the ball as starting at any local maximum or minimum of the filtered waveform, and ending at the sample before the next local maximum or minimum, i.e., two consecutive "peaks" or "valleys" define a revolution. The period of any revolution can be found by counting the samples between the two peaks or valleys that define that revolution, and dividing that count by the sampling frequency. Let j i,0 and j i,n-1 be the indices of the starting and ending samples for revolution i, and f be the sampling frequency (120 Hz in this case), then t i = (i i,n-1 - i i,0 ) / f, where t i is the period, in seconds, for revolution i. The angular velocity (ω i ) during revolution i is simply the inverse of the period. ω i = 1 / t i. 46

53 Since the fundamental frequency and the minimum and maximum frequencies of the waveform have already been found, and the manner in which the frequency changes over time (monotonically increasing, with a possible inflection point, if roll out occurred) is known, it is easy to develop a method to locate the local maxima and minima of the filtered waveform. This is accomplished by starting at the beginning of the filtered sample array (which includes the pre-samples), and working through the array, looking for inflection points (those points where the waveform changes direction). Each time an inflection point (a local minimum or local maximum) is found, the index of the inflection point is recorded in a separate array. Due to the monotonically increasing nature of the frequency of the waveform, once the distance (the number of samples) between the first two inflection points is found, that distance can be used to help estimate the location of the next inflection point. There are still two fractional revolutions that must be dealt with: from release until the first peak, and from the last peak (or valley) to pin impact. Both of these fractional values can be extrapolated from the angular velocity of the revolution immediate adjacent to each fractional value. Again let f be the sampling frequency (120 Hz), and j R be the index of the release sample, j 1,0 be the index of the sample that begins the first full revolution, j F be the index of the sample that ends the last full revolution, and j P be the index of the pin impact sample, and ω 1 and ω F be the angular velocities during the first and last full revolutions of the ball, respectively, then R R = ((j 1,0 - j R ) / f) ω 1, and R P = ((j P - j F ) / f) ω F, where R R and R P are the fractional revolutions of the ball immediately after release and immediately before pin impact, respectively. The discussion in Section II established that there would be at least samples per revolution, allowing R R and R P to be resolved to at least 30 of rotation. Thus, it should be possible to count the total revolutions of the ball to within 0.1 revolutions, yielding a resolution of better than 1% for counts greater than 10 revolutions. Even though a resolution of 1% has been obtained in counting the total revolutions, the angular velocity can only be resolved to about 4% for a rotation rate of 300 rpms, using the same technique. This discrepancy arises from the 120 Hz sampling frequency, which yields a time resolution of msecs. Although the waveform does not necessarily capture the exact peaks and valleys of the waveform, it does at least capture a pair of consecutive samples that form an msec "window" around each true peak or valley. It is possible to get around the sampling-induced resolution issue by interpolating between each of those pairs of values to obtain very good approximations of the true peaks and valleys of the waveform. Figure 3-6 illustrates a simple interpolation technique for finding the "true" location of the local maxima and minima of the filtered waveform. By finding the intersection point of the slope lines of both sides of a peak or valley, the actual peaks and valleys can be accurately located. Two sample values are used to find each slope line. These samples 47

54 are located on either side of the mid-point between the top and bottom of each side of a peak or valley. Recall that the indices of the peak and valley samples were recorded earlier. The intersection of the resulting two slope lines is considered as the true peak or valley for subsequent calculations. Each adjacent peak-valley pair defines a halfrevolution of the ball, and the lateral distance between them, measured in msecs, gives the period of that half-rotation. The angular velocity for that half-revolution is simply the inverse of the period Interpolated Peaks Half (180 ) Revolutions Filtered Light Level Interpolated Valley Milliseconds (since Release) Figure 3-6: Maxima and Minima Location Interpolation Having obtained the angular velocity for each revolution of the ball, a graph of the angular velocity of the ball with respect to time can be drawn, as shown in Figure 3-7. The raw angular velocity values that were just found are shown in blue, with each entry representing one-half revolution of the ball. Obviously, something has gone awry. The angular velocity of the ball should be monotonically increasing, yet the graph of the raw values exhibits a noticeable oscillation, especially in the first two-thirds of the waveform. Since the angular velocity of the ball can't actually be rising and falling as indicated by the raw angular velocity graph in Figure 3-7, some other factor must be at work here. By looking back at Figures 2-2a, 3-2, and 3-3, the cause of this oscillation can be deduced. Figure 2-2a depicts the ball rolling down the lane under several rows of ceiling lights. As stated before, these lights act as a point source, rather than as a uniformly distributed source of light. As the SMARTDOT module rotates up towards the ceiling, the light sensor faces backwards (toward the foul line) and "sees" the ceiling lights that it has already passed under. These lights are detected earlier than they "should" be, i.e., before the light sensor has rotated directly toward the ceiling. Consequently, the peak light level for that revolution occurs earlier than it should. As the ball continues down the lane, the module rotates toward the ceiling, and if it is not directly under a light, the light level gets darker (rather than brighter), and a dip occurs where the peak is expected to be. As the ball continues to rotate and travel down the lane, the module eventually aligns with a different ceiling light and another local peak is created. Figure 3-2 shows this phenomenon quite clearly. As the ball continues down the lane, these point sources eventually combine to look like a single light source, hence the lack of "side lobes" in Figure

55 Figure 3-7: MASTER "Analysis" Screen Capture Depending on the position of the ball relative to the ceiling lights, and the current orientation of the module in relation to the ceiling, the directionality of the light sensor can cause it to "see" a ceiling light too early, while at other times it must rotate longer before encountering the next ceiling light. This action imposes a Doppler-like effect on the waveform the module captures. The differences must average out, since the ball will eventually transition from approaching a specific light source to moving away from that same source, but the effects that this Doppler effect has imprinted on the filtered waveform must still be dealt with. Referring to Figure 3-7 again, the green line superimposed over the blue raw angular velocity graph is a 5 th -order polynomial curve created by a generalized least squares curve-fitting function, using the raw angular velocity data as input [10,11]. This line yields the expected shape for the angular velocity curve. This is a "simple" fix that presents a good approximation for the actual response of the angular velocity of the ball. However, this method has its limitations. Unlike the actual monotonic response of the ball, the polynomial curve-fitting scheme allows the angular velocity to initially dip following release, and then recover as the ball travels down the lane. The 'C' source code from the MASTER application for locating the revolutions and finding the angular velocities has been included in Appendix D. 49

56 3.4 LINEAR VELOCITY, DISTANCE, AND COEFFICIENT OF FRICTION If the manner in which the linear velocity of the ball changes over time can be determined, it is then possible to determine the initial (release) velocity, which is one of the major execution variables that a bowler must learn to control. The ball could then be located (along with each revolution) on the lane relative to the foul line, rather than relative to the time of release. This would allow the determination of the ball loft distance (another major execution variable). Having found the conversion from time (sample index) to distance, the coefficient of friction acting between the ball and the lane can also be found, which can be used to infer the distribution of oil on the lane. Since the length of the lane and the time that it took for the ball to travel from the foul line to the pins are both known, it is easy to calculate the average speed (linear velocity) of the ball. But this average value reveals little about the initial velocity that the bowler applied to the ball at release, except that the release velocity must have been greater than the average velocity (since the linear velocity of the ball is always decreasing). Calculating the angular velocity of the ball was fairly straight forward, once the waveform had been filtered. Even the Doppler effect created by the ball traveling underneath multiple discrete light sources is fairly simple to deal with. However, recovering the instantaneous linear velocity from the ball's average linear velocity and the angular velocity of each revolution presents an interesting, challenging, and non-trivial problem. That task is currently the major focus of the ongoing research. One method that is based on a simplistic form of energy conservation has already been developed. It relies on the assumption that no energy is lost as friction works to transfer energy from the linear momentum of the ball to the angular momentum of the ball. The same method can be generalized to allow for a constant (but arbitrary) percentage of the energy transferred from the linear momentum to be lost to friction. To this point in the discussion, all of the MASTER screen captures, with the exception of Figure 3-7, contained graphs with respect to time, rather than distance. Figure 3-7 contains graphs of both the angular and linear velocities of the ball with respect to distance from the foul line, and represents the current state of the "Analysis" portion of the MASTER program, which relies on the simplified version of the linear velocity extraction function mentioned above. Throughout the paper, it has been assumed that friction is the only force of any significance acting on the ball. The results of the frictional force are apparent by observing the angular velocity of the ball increase as friction acts to resolve the discrepancy between the initial linear and angular velocities of the ball. Assume, for the moment, that the ball loses no energy throughout the course of a shot (the total kinetic energy and the total momentum of the ball remain constant). The conclusion can then be drawn that all of the momentum the ball gains from the increase in its angular velocity must have been transferred from the ball's linear momentum, i.e., any increase in angular momentum must be exactly offset by a decrease in linear momentum. Having assumed constant energy, the energy of the ball for each revolution of the shot must remain the same. Since the angular velocity (and thus the angular momentum) for each revolution of the ball has already been found, if the energy for that revolution is 50

57 known, the linear momentum (and thus the linear velocity) for that revolution can also be found. Once the linear velocity for each revolution is known, the location of each revolution of the ball and the ball loft distance, relative to the foul line, can be found. Putting those assumptions and deductions into more formal terms, the assumption that the ball does not lose energy over time means that the ball possesses constant energy throughout its trip to the pins, and that its energy at any instant is equal to its energy at any other instant [8]. The total energy of the ball (E) is the sum of its potential (P) and kinetic (K) energies: E = P + K. Since the ball rolls on a flat, level lane surface, there is no potential energy (P = 0), and E = K. Since it is assumed that the ball has constant energy from its release at the foul line to its impact with the pins, K R = K i = K P, where K i is the energy of the ball for each revolution i between release (K R ) and pin impact (K P ). The assumption of constant energy implies that energy losses due to vibration, heat, wind resistance, and noise generation are negligible. Therefore the only components of the energy of the ball are its angular momentum (K ω ) and its linear momentum (K v ), thus K = K ω + K v. The angular momentum of an object with angular velocity ω is given by K ω = ½Iω 2, where I is the moment of inertia of the rotating object. The moment of inertia I of a bowling ball with mass m and radius R falls somewhere between the moments of inertia of a solid sphere and a spherical shell, such that 2 / 5 mr 2 < I < 2 / 3 mr 2. The actual moment of inertia for a given ball will fall between these two values, but closer to the first, since the density of a bowling ball in the pound range is fairly constant across the radius of the ball [8]. The 2 / 5 R 2 term is a constant, where R is the radius of the ball (nominally 4.3"), so if k = 2 / 5 R 2 = 0.4 ( ft) 2 = ft 2, then K ω = ½kmω 2. The linear momentum of an object with mass m and linear velocity v is K v = ½mv 2. Therefore, the total kinetic energy K of the ball, under the assumptions, is given by K = ½mv 2 + ½kmω 2 = ½m(v 2 + kω 2 ), where k = ft 2. 51

58 3.4.1 Finding the Linear Velocity of the Ball The following values have already either been measured or calculated: 1) The total distance D T the ball traveled from release to pin impact (nominally 60 feet from foul line to head pin). 2) The time T it took for the ball to travel D T feet. 3) The average linear velocity of the ball v ave = D T / T. 4) The number of revolutions R T that occurred in time T. 5) The period t i and angular velocity ω i = 1 / t i of each revolution i in R T. Using these values, an equation can be developed that gives the linear velocity v i for each revolution i of the ball. Recalling the previous calculations for R R and R P (the fractional revolutions at release and pin impact), D T can be represented as D T = R R (v 1 t 1 ) + v 1 t 1 + v 2 t v n t n + R P (v n t n ) = (1+ R R ) v 1 t 1 + v 1 t 1 + v 2 t v n t n + (1 + R P ) v n t n. By letting t 1 ' = (1 + R R ) t 1, t n ' = (1 + R P ) t n, and t i ' = t i for 1 < i < n, the above equation can be reduced to the summation R T D T = Σ (v i t i '). i=1 Recall the assumption that the kinetic energy K of the ball remains constant from release to pin impact, and let K i be the kinetic energy of the ball during revolution i. Then K i = m / 2 (v i + kω 2 i ), where ω i = 1/t i ' and K 1 = K i = K n, for 1 i n. From the above, m / 2 (v kω 2 1 ) = m / 2 (v 2 i + kω 2 i ), and solving for v i in terms of v 1, v i = (v k(ω ω 2 i )) ½. For constant energy, no energy is lost to friction, and the above equation reveals that friction acts solely to transfer energy from linear momentum to angular momentum. An expression can now be obtained for each velocity v i in terms of v 1. Substituting that expression into the previous summation yields R T D T = Σ (v k(ω ω 2 i )) ½ t i '. i=1 The value of D T is nominally 60 feet, and this summation can be used in developing a converging iterative solution for v 1. The remaining values for v i can be generated from the value found for v 1. 52

59 In order to find the value for v 1, an initial "seed" value v is needed to start the iteration. A good first guess for v is the average linear velocity v ave of the ball, v ave = D T / T, The actual value for v 1 (the initial velocity) is greater than v ave, since the ball is constantly slowing down after release. Plugging v ave into the above summation will result in a value D' that is less than D T. D' can be used to arrive at the next guess, as follows: v' = v + (D T - D') / R T. Iteration continues in this fashion (guess, calculate, adjust), until the difference between D T and D' does not exceed a predefined threshold, at which point a value for v 1 has been found. The velocities for the remaining revolutions are obtained by plugging v 1 and the values for ω 1 and ω i into v i = (v k(ω ω 2 i )) ½ Finding the Distance from the Foul Line Using the values for v i from this equation, a method for converting time (sample index) to distance for each sample in the waveform can be derived. With such a conversion, it is possible to find the distance the ball has traveled at any time in the waveform, and also to graph the linear and angular velocities of the ball with respect to distance. The location of each revolution on the lane relative to the foul line, and the ball loft distance (the distance the ball traveled before impacting the lane) can also be determined. Recall that R T D T = Σ (v i t i '). i=1 By performing the summation from i = 1 to R i-1, such that R i-1 D i = Σ (v i t i '), i=1 D i then gives the distance from the foul line where revolution i started. The value for each of the v i 's was found previously, and v i can now be assigned to each sample of revolution i. Since the distance D i from the foul line to the start of each revolution i has also been found, the distance for each sample in revolution i, relative to the foul line can be calculated. Define s i,0 to be the first sample of revolution i, so that s i,0, s i,1,, s i,n-1 are the n samples of revolution i and let d i,j be the corresponding distance for sample s i,j. A method for finding the velocity v i and the distance D i for s i,0 has already been given. Assuming a constant velocity during revolution i, the distances for the remaining samples of revolution i can be generated from the equation d i,j = D i + (j / f) v i, where 0 j < n, and f is the sampling frequency (currently 120 Hz). Thus, a conversion from time (sample index) to distance for each sample has been found, and it is now possible to graph the linear and angular velocities of the ball with respect to distance from the foul line, as well as indicate the location of each impact. 53

60 3.4.3 Finding the Coefficient of Friction The coefficient of friction can be recovered from the previous calculations. Under the assumptions, the only active force is the force due to friction acting between the ball and the lane, and that force acts solely to transfer linear momentum to angular momentum. Since the changes in angular and linear momentum for each sample are known, the frictional force required to generate those changes can be found. For any revolution i, the frictional force F µi acting during i is given by Fµi = m / 2 k(ω 2 i - ω 2 i-1 ) / (D i - D i-1 ) = m / 2 (v 2 i - v 2 i-1 ) / (D i - D i-1 ). The coefficient of friction µ i between the ball and the lane for revolution i is then µ i = Fµi / mg, where g is the acceleration due to gravity. Similarly, the frictional force for any sample j of revolution i can be found from Fµi,j = m / 2 k(ω 2 i,j - ω 2 i,j-1 ) / (d i,j - d i,j-1 ) = m / 2 (v 2 i,j - v 2 i,j-1 ) / (d i,j - d i,j-1 ). The coefficient of friction µ i,j between the ball and the lane for any sample j of revolution i is then given by µ i,j = Fµi,j / mg. Using this result, there is now enough information to graph the coefficient of friction between the ball and the lane with respect to the distance from the foul line. 54

61 3.5 ASSUMPTIONS AND ERROR ANALYSIS The derivations behind the MASTER calculations presented in the previous discussion rely heavily on several basic assumptions, some of which have already appeared in other sections throughout the course of the paper. This section presents the analysis assumptions in detail, along with an assessment of their possible error contributions Distance Throughout the paper, it has been assumed that the ball travels 60 feet - the distance from the foul line to the head pin. Under normal circumstances, release of the ball occurs close to the foul line, and the first pin the ball encounters is the head pin (at least on the first ball of any frame). It is time to take a closer look at what this assumption entails. The ball is released at the foul line: An error factor is introduced in the average linear velocity calculation if the ball is released behind the foul line (the actual velocity will be higher than calculated), or beyond the foul line (the actual velocity will be lower than calculated). Generally, the bowler releases the ball at, or just beyond, the foul line. For a legal delivery, no part of the bowler's body may touch the lane beyond the foul line. This presents a physical limitation on release beyond the foul line of approximately 12 inches. Additional error is possible from behind the foul line, usually resulting from a noticeable lapse in execution on the bowler's part (dropping the ball, releasing the ball early, or stopping short of the foul line). Although the module can not detect the absolute point of release, it does indicate when the ball hit the lane, in relation to release. In addition, the bowler easily recognizes when these major lapses in execution occur, and can take note of them. The nominal margin of error at the point of release is estimated to be ±6", with the vast majority of releases occurring within a ±3" range. The ball hits the head pin at a fixed location: At the other end of the lane, the ball can hit the head pin in different spots - head on, or on the right or left side. A pin is 4½" in diameter at the height at which the ball contacts it, and the center of the pin is located 60' ±½" from the foul line. A ball is nominally 8½" in diameter. Assuming the ball is released with its center over the foul line and it hits the head pin dead center, it must travel 59' 5" to 59' 6" from the point of release. If the ball barely grazes the right or left side of the head pin, the ball traveled at least 59' 11½" to 60' ½". A solid pocket hit (the goal of any potential strike delivery) falls halfway between these two ranges, so the expected distance from the foul line that the initial pin impact should occur is 59' 8¾". Therefore, the margin of error introduced in hitting the head pin is ±3¾" If the ball misses the head pin, it must travel at least an additional 10.4" to get to the next pin, and the same error factors as for hitting the head pin come into play. The bowler could take note of the first pin that was hit - the head pin, the 2/3 pins, the 4/6 pins or the 7/10 pins, and the analysis software could again adjust for the difference. Bowlers readily identify the location of the ball based on the board it is on when it hits the pins. This information could be used to better locate the ball at pin impact, along with the first pin hit, and this error could be reduced to approximately ±1". 55

62 The ball takes the shortest path from the foul line to the head pin: In actuality, the ball is rarely thrown straight at the head pin from the center of the foul line. Instead the ball is rolled with some amount of hook, and is released from some place other than the center of the lane, and is initially directed somewhat toward the right gutter (for a right-handed bowler). If the ball were thrown from the outside edge of the right gutter in a straight line feet down the lane, and then suddenly hooked straight toward the pocket, it would travel an extra 7 / 8 ". At the other extreme, if the ball were released at the left gutter, and traced a regular arc to the right gutter at 30 feet, and then back to the head pin, it would travel an extra 6". This is an extreme amount of hook, but will be factored into the error budget as ±3". The ball and pins each have fixed diameters: The ABC maintains tight control over the allowed dimensions of the ball and the pins. The ball has a nominal diameter of ±0.047", resulting in a nominal circumference of ±0.149". The diameter of the ball contributes a negligible error. However, the circumference of the ball, which is used in later calculations to estimate the amount of sliding and the coefficient of friction, could be multiplied by the total number of revolutions the ball makes during a shot, which can total 20 or more. In this case, the error contribution due to the ball's circumference could contribute up to ±3". At the height that the ball strikes a bowling pin (8.77"), the pin must have a nominal diameter of ±0.031". This is an insignificant contribution to the error calculations. Combining the three significant errors (at the foul line, at the pins, and the ball path), yields a total of approximately ±12" of error in the distance the ball travels. For a nominal distance of 60 feet, the total error works out to ±1.67%. For a ball thrown at 15 mph, this error will manifest itself in the velocity calculations as a difference of 0.25 mph. This error could be reduced further by supplying the appropriate information to the MASTER program. The bowler could input their normal release point as a configuration parameter. Then, during normal play, they would indicate the approximate board where the ball was released, the extreme right (or left) board that the ball crossed on its path to the pins, and the first pin the ball hit, along with the type of hit (head on, right, left, graze, etc.) and/or the board the ball was on at the time of impact. The analysis software would utilize this information in its calculations. This type of input could reduce the margin of error to less than 6", increasing the velocity resolution to 0.1 mph Time Another assumption is that the microprocessor's clock is accurate. If the clock is based on a quartz crystal, it will be accurate over temperature to at least ±200 ppm (0.02%), or 600 µsecs over a 3-second shot, which is an insignificant error contribution. If a ceramic resonator is used (because it is much cheaper and much more durable), a ±2% error over temperature is possible, which is ±60 msecs over a 3 second shot. This is not insignificant, and would be additive to the distance error in any calculation of velocity. However, this error could be calibrated out by measuring the actual clock rate with a more precise clock and compensating for the difference in the MASTER software. 56

63 3.5.3 External Forces and Friction The major assumption is that the frictional force between the ball and the lane is the only force of any significance acting on the ball following release. Losses due to noise, vibration, and aerodynamic drag are considered negligible. A further assumption is that the force due to friction acts on the ball in such a way as to translate its linear momentum to angular momentum. The ball is released with an initial linear velocity that exceeds the ball's angular velocity. That is, the ball travels further during one revolution of the ball than one circumference of the ball. This difference causes the ball to skid (slide). Also, generally speaking, the axis of rotation of the ball is neither parallel to the surface, nor is it normal to the direction of the lane. The resolution of these differences as the ball traverses the lane causes the ball to hook. The force due to friction causes the ball to resolve these differences, slowing the ball down, while increasing its angular velocity. This resolution occurs until such time as the ball is no longer skidding (rolled out), or the ball has completely traversed the lane and entered the pit. The ball is always slowing down after it is released: The force due to friction causes the ball to translate linear momentum to angular momentum, until such time as the resolution (rollout) point is reached. If rollout is reached, both the angular and linear velocities decrease. Therefore, the linear velocity is always continuously and monotonically decreasing. The angular velocity is always increasing: The angular velocity of the ball will continuously and monotonically increase until the rollout point is reached, at which time the angular velocity also starts to decrease in a continuous and monotonic fashion, along with the linear velocity. Roll out can be detected by observing the angular velocity of the ball near the pins. The ball has rolled out if the angular velocity has begun to decrease, in which case, the linear velocity of the ball can be directly deduced, since it must travel 27" (one circumference of the ball) for every revolution of the ball. Perfect transfer from linear momentum to angular momentum occurs: Actually this is not the case, but the amount of transfer from linear to angular momentum can be detected in the change in angular velocity between each revolution of the ball. Since the force due to friction is the only force acting on the ball, it will be directly related to the amount of change in the angular velocity. The actual unaccounted for losses due to friction result from heating of the ball and/or the lane, noise generation, vibration, and inelastic deformation of the ball and lane. If the ball rolls out, it is possible to directly observe the effects of friction, since the linear velocity is directly related to the angular velocity, and the drop in kinetic energy of the ball can then be measured. While the ball is skidding, the actual losses due to friction are very probably some constant fraction (percentage) of the change in angular momentum, i.e., 90% of the change in linear momentum is transferred to angular momentum, 10% is given up as heat, noise, etc. The exact percentage is not yet known, and it probably varies for each type of ball, but with additional research, it should be possible to place an upper and lower bound on the frictional losses. 57

64 3.6 IMPLEMENTATION, PERFORMANCE, AND ACCURACY The version of the MASTER application that was used to generate the screen captures for this paper incorporates most of the derivations and methods given in Sections 3.1 to 3.4. Figure 3-8 presents a data flow diagram of the various routines that generate the data for the graphs displayed on the "Spectrum", "Waveform", and "Analysis" screens. Appendix D contains the 'C' source code for those routines. MASTER Analysis Calculations Data Flow Diagram From: Upload/Archive Routines A vcalcspectrum (page D-3) Initialize: RealData[ ] = RawData[ ] Calc Spectrum: RealSpectrum[ ] = FFT (RealData[ ]) Calc Magnitudes: FFTMag[ ] = FFTMagnitude (RealSpectrum[ ]) Calc Frequencies: FFTFreq[ ] = FFTFrequency() Find Fundamental: FundFreq = max (FFTMag[ ]), Freq > 2.0 Hz Normalize: FFTMag[ ] / FFTMag[FundFreq] Find Pass Band Limits: LOFilterIndex, HIFilterIndex vcalcvelocitydata (page D-15) Calc RPM Energies: RPMEnergy[i] = k * RPMData[i] 2 Calc RPM Ave Energy: RPMAveEnergy = Σ (RPMEnergy[ ]) / (PinImpactIndex - ReleaseIndex) Estimate Linear Energy: SpeedAveEnergy = ((LaneLength * SamplingFreq) / (PinImpactIndex - ReleaseIndex)) 2 Calc Ball Ave Energy: BallAveEnergy = (1+FrictionCoef) * RPMAveEnergy * SpeedAveEnergy Calc Linear Velocities: VelocityData[i] = (BallAveEnergy - ((1 + FrictionCoef) * RPMEnergy[i])) 1/2 Get Ball Loft Distance: Get Release Velocity: BallLoft = Σ ((VelocityData[i] * 12.0) / SamplingFreq), ReleaseIndex i LaneImpactIndex ReleaseVelocity = VelocityData[ReleaseIndex] vcalcfilterdata (page D-5) Remove LO Freqs: RealData[i] = 0.0, i < LOFilterIndex Remove HI Freqs: RealData[i] = 0.0, i > HIFilterIndex Keep Pass Band Freqs: RealData[i] = RealSpectrum[i], LOFilterIndex i HIFilterIndex Get Impact Velocity: ImpactVelocity = VelocityData[PinImpactIndex] Get Ball Speed: BallSpeed = (LaneLength * SamplingFreq) / (PinImpactIndex - ReleaseIndex) Get Ball Time: BallTime = (PinImpactIndex - ReleaseIndex) / SamplingFreq Filter Data: RealData[ ] = FFT -1 (RealData[ ]) Remove DC Bias: RealData[ ] - Min (RealData[ ]) vcalcdistancedata (page D-16) Calc Distance to Sample: Distance[i] = Σ ((VelocityData[j] * 12.0) / SamplingFreq), 0 j i fanalyzedata (page D-7) Fill Distance Vectors: RPMDistance[ ], VelocityDistance[ ], RawRPMDistance[ ], ImpactDistance[ ] Find Rev Loc Indices: RevBGNLoc[ ], RevENDLoc[ ] Interpolate: RPMLoc[i] = Interpolate (RevENDLoc[i-1], RevBGNLoc[i]) Calc Angular Velocities: CalcRPMs[i] = 1 / (RPMLoc[i] - RPMLoc[i-1]) Remove Doppler: RPMData[ ] = PolyCurveFit (CalcRPMs[ ]) Get Release RPMs: ReleaseRPMs = RPMData[ReleaseIndex] Get Impact RPMs: ImpactRPMs = RPMData[PinImpactIndex] Calc Rev Distance: vcalcrevlocations (page D-17) Fill Distance Vector: RevLocDistance[ ] RevDistance[rev] = Σ ((VelocityData[i] * 12.0 ) / SamplingFreq), 0 i RPMLoc[rev] A Figure 3-8 To: Graphing Routines 58

65 3.6.1 Implementation and Performance There are several performance issues with the current version of the MASTER software that are currently being addressed. The coefficient of friction calculations from Section have not yet been incorporated. Instead, a command-line argument specifies the percentage of the change in angular momentum that is lost due to friction. For this paper, frictional losses were set at 10%. A somewhat less accurate method for deriving the linear velocities than that described in Section 3.3 is currently implemented. This method derives the average linear momentum from the average linear velocity of the ball, and calculates the average angular momentum from the angular velocities for each revolution. Although this yields the proper shape for the waveform, it misrepresents the magnitude of the linear velocities. See vcalcvelocitydata in Figure 3-8 for more detail. The current linear velocity extraction algorithm does not check for roll out of the ball (that the angular velocity is decreasing). Therefore, under the constant energy assumption, when the angular velocity begins to decrease, the calculated linear velocity increases. The graph in Figure 3-9 demonstrates this phenomenon. Figure 3-9: Effects of Roll Out, "Analysis" Screen Capture 59

66 The angular velocity graph is highly sensitive to a "phase shift" that can occur in the waveform when the ball crosses under the pin deck light. Referring back to Figures 2-2a and 2-2b in Section II, the pin deck light is bright enough that it can alter the duration of the last revolution significantly, depending on the orientation of the light sensor as the ball approaches the pins. Consequently, the revolution location algorithm detects a longer (or shorter) duration than actually occurred, artificially inflating or deflating the final angular velocity of the ball. Figure 3-10 illustrates this phenomenon. Light Level Last complete Revolution Phase Shift Impact (Head Pin) Milliseconds (since Release) Figure 3-10: Pin Deck Phase Shift, Impact Region (800 ms) Figures 3-11a and 3-11b indicate the adverse effects of this "phase shift" on the analysis of the waveform. The analysis captured in Figure 3-11a was performed on the waveform with the phase-shifted portion of the raw data included. The angular velocity begins to roll off 10 feet in front of the pins. The same waveform was used for the analysis captured in Figure 3-11b, but the phaseshifted portion of the raw data was excluded from the calculations. As a consequence, Figure 3-11b shows the angular velocity continuing to increase all the way through impact with the pins. The difference in the two raw data waveforms is only 50 msec (6 sample times), but the difference in the resulting analysis is dramatic. The simplest method for correcting the problem is to find the pin impact point in the waveform, and then exclude from the spectrum calculation the msecs (6-9 samples) that immediately precede pin impact. After the raw data waveform has been filtered, the time is reinserted by extrapolating the results of the angular velocity extraction routine back into the excluded data. The problem arises because the filtered waveform that is used for all of the analysis calculations is reconstructed for time-independent frequency content. Using an FFT function over the entire waveform at one time yields frequency components of the data, but does not reveal when those frequencies were present in the waveform. A more advanced technique would be to use wavelet methods in the spectrum calculations to yield time-correlated frequency content. 60

67 Figure 3-11a: Effects of Phase Shift, Apparent Rollout Figure 3-11b: Effects of Phase Shift, No Rollout 61

68 3.6.2 Accuracy The question of accuracy has not yet been addressed. Just how accurately do the graphs displayed in the "Analysis" screen of the MASTER program depict the actual response of the ball? What accuracy can be claimed for the SMARTDOT system and, more importantly, how can this accuracy be verified? The SMARTDOT system is intended to serve the following functions: quantify the consistency of a bowler's release; provide objective feedback with which to measure their performance and improvement; and capture and measure the response of a bowling ball over the course of a game or match, as well as capture its response to varying lane conditions. Therefore, it is more important that the system give consistent and repeatable results, rather than absolutely accurate results. Ideally, if the bowler rolls the ball the same way on two different shots, and the ball responds identically to that stimulus, then the results that the MASTER reports should be the same. If the bowler releases one ball with a velocity 10% higher than another ball, the MASTER should report a 10% difference in the two release velocities. There are several options available for accurately verifying SMARTDOT's performance: Take SMARTDOT to a CATS-instrumented facility and correlate the MASTER's analysis results against the CATS findings [12] and/or contact Brunswick and possibly obtain time on their "Throbot" machine, which can apply known amounts of velocity, spin, and loft to the ball, and then correlate the MASTER's findings against the release parameters of "Throbot" [9]. Instrument a lane and perform external verification and validation. By fitting a lane with a fast and accurate position/velocity sensing system, the actual response of the ball from foul line to head pin could be captured. Since the linear velocity and distance results are derived from the angular velocity data, if those results can be externally quantified, it will be possible to determine the accuracy of the assumptions and the calculations underlying the entire SMARTDOT system. Add a solid-state accelerometer/tilt-sensor to the module and correlate the actual results of the accelerometer with the inferred angular velocity results from the light sensor. This is a realistic possibility, using the ADXL202E accelerometer from Analog Devices [15], although it requires a fair amount of additional development effort on the sensor module. To this point, the only practical (meaning cost-effective) assessment method has been to use video analysis. With markers applied at known distances on the lane, and additional markers applied to the ball each 30 of rotation, multiple shots have been simultaneously captured with SMARTDOT and on videotape. Through this practice, the current MASTER analysis techniques appear to be accurate to within 1/2 mph and 90 of rotation. However, standard video is limited to 30 frames per second, yielding a resolution of 33 msecs per frame, which is insufficient for verifying accurate measurement to 0.1 revolution and 0.1 mph. It is also not possible, using this technique, to verify the angular velocity measurements resulting from the filtered waveform, nor the actual locations of each revolution. It will eventually be necessary to utilize one or more of the previously mentioned techniques to reliably validate SMARTDOT. 62

69 3.6.3 The "Perfect" Game to Analyze Several years ago, with an earlier prototype of the SMARTDOT sensor module installed in the ball, the author had the extreme good fortune of rolling a perfect game while testing the module. SMARTDOT successfully captured the waveforms for all 12 strikes of that game. Figure 3-12 gives a tabular summary of the "Analysis" statistics and Appendix E contains screen captures from the "Raw Data", "Spectrum", and "Analysis" screens for the 12 frames of the 300 game. Frame Release MPH RPMs Impact MPH RPMs Loft (in) Time (sec) Average MPH Total Revolutions Average RPMs Min Max Median Mean Deviation ±1.5% ±2.5% ±2.3% ±2.4% ±5.0% ±2.0% ±1.8% ±3.2% ±3.1% Figure 3-12: 300 Game Analysis Summary This set of 12 waveforms possesses some interesting characteristics that could be used in future versions of the MASTER analysis software, as well as to refine the embedded software of the SMARTDOT module. First, the valleys of the waveforms exhibit a shape much closer to that of a sinusoidal waveform than the peaks do. This suggests that much of the impact of the Doppler effect and the directionality of the ceiling lights could be eliminated by restricting the analysis to only the lower half of the waveform. Also, the peak and average light levels increase dramatically when the ball crosses under the pin deck light. The time interval between detection of the pin deck light and impact with the pins could be used to determine whether or not the ball hit the head pin. The "signature" of the pin impacts might also be useful. Although the accuracy of the MASTER analysis algorithms requires a more rigorous analysis, and has not yet been formally verified, the relative consistency of the results from these twelve shots, all of which resulted in pocket hits, lends some credence to the validity of the analysis methods. It was also especially gratifying to the author to have thrown the first-ever 300 game captured with the SMARTDOT system. 63

70 3.7 FUTURE WORK The MASTER application, in its current incarnation, has served solely as a research tool. It facilitates rapid assessment of the SMARTDOT module's performance, and enables the review and archival of previously collected data. As the MASTER analysis algorithms have been developed and modified, this version of the MASTER application has made it possible to recall previous raw data waveforms and observe the effects of the changes to the algorithms Algorithms The analysis algorithms are still evolving. Various concerns and problems have been presented over the course of the paper, and several of these stand out. Filtering the Raw Data Waveform: This is the most important step in the entire analysis process. The basis for the analysis algorithms is that the waveform is representative of the angular position of a single point on the ball. As the ball rolls down the lane, that point transcribes a sinusoidal path that the SMARTDOT module captures, and that the MASTER unit analyzes to recover the action of the ball. If this waveform cannot be recovered "cleanly", the analysis will be flawed. A simple FFT function was used to find the spectrum, and an adaptive filter was used to filter the waveform. Although the spectrum of the waveform reveals a great deal of information, the major focus of interest is the manner in which the frequency changes over time, which an FFT does not reveal. Therefore, further investigation needs to be performed into more advanced digital processing techniques, more specifically into wavelet theory, which will allow the MASTER algorithms to characterize the timing of the frequencies in the waveform. Curve Fitting: Due to the Doppler effect observed in the raw angular velocity waveform, it has not been possible to directly recover the instantaneous angular velocity of the ball from the raw data. Therefore, a least-squares curve-fitting scheme was used to approximate the true shape of the angular velocity waveform. However, this scheme does not include facts about the nature of the waveform that are known to be true, i.e., that it is monotonically increasing, at least until rollout occurs. A more refined method must be identified that takes into account the specific nature of this problem. Friction: Throughout the analysis, an assumption has been maintained that no energy is lost due to friction. Actually, the energy lost is relatively small, but not negligible. Since the linear velocity is derived from the change in angular momentum, any portion of the linear momentum that is not transferred to angular momentum causes the resultant linear velocity calculation to be too low. It appears to be possible to recover the actual frictional force or, at the very least, to place upper and lower bounds upon it. Since the ball is always revolving slower than it is traveling, and the number of revolutions of the ball is known, the total distance the ball would have traveled had it not been skidding during those revolutions can be calculated. This distance will always be less than the distance the ball actually traveled (nominally 60 feet). 64

71 Since the change in angular velocity for each revolution of the ball is known, it should be possible to distribute the discrepancy in the two distances in relation to the changes in angular velocity. This process yields the distance the ball covered for each revolution, and the linear velocity can be recovered using that distance and the period of each revolution. The kinetic energy of the ball can then be calculated for each revolution. Knowing the weight of the ball, and the energy lost between revolutions, the coefficient of friction could be calculated for each revolution End-User MASTER Software The eventual development of the end-user version of the MASTER application is an entire project in itself. The current version is merely a tool to aid in developing and assessing the analysis algorithms, which are at the heart of the SMARTDOT system. Even though further refinement of those algorithms is required, and formal verification of their accuracy has yet to be performed, they have demonstrated the feasibility of the entire system. Although some form of the algorithms will be part of the end-user version of the MASTER software, the final implementation of the MASTER application will look and feel nothing like its current incarnation. There are two forms that the MASTER application will ultimately take. The first is as a full-blown, PC-hosted, Windows -based GUI application, and the second is as a portable PDA-based application. The two would tie together, resulting in real-time utility for the bowler at the bowling center, while also allowing for in-depth analysis and performance tracking and data archiving at home. PDA-based application: The PDA application would allow the bowler to upload waveform information from the SMARTDOT module, and then save and review the information during the course of a practice session or match. The application would also accept user-input about the particular bowling session (bowling establishment, lanes, ball used, etc.), and pertinent details for each frame thrown (release point, ball path, impact location, result, etc). The application would provide on-site feedback that pertains to the bowler's current execution in relation to previously established norms. It could also provide trending information regarding differences in ball response between the two lanes of a pair, or from the beginning of a match to the end, or between several different bowling balls. The bowler could also find out the manner in which their execution changes over the course of a match: did their release velocity decrease/increase; did the release RPMs drop-off or pick-up, etc. Windows application: The Windows MASTER application would have all of the capabilities of the PDA application, but would also create and maintain a database of past performances. The PDA would automatically upload the information it had previously collected at the bowling alley to the MASTER application, which would then archive that information in its database. The primary function of the MASTER software would be to facilitate queries of this database for various trends and relationships between scores, bowling balls, execution parameters, etc. Ultimately, it would not only help correlate the bowler's execution (release parameters) with their performance (score), it could also provide a correlation between that information and the different equipment (bowling balls) that the bowler uses. 65

72 3.8 SUMMARY - MASTER ANALYSIS The SMARTDOT concept was predicated on the assumption that the action of a bowling ball could be captured by sampling and recording the ambient light level at a single point on the ball as the ball rolls down the lane. This concept was developed in two stages: first, by building an in-situ sensor module that captures and uploads the waveform; and second, by deriving and implementing a set of algorithms that filter, analyze, and display the captured waveform. It was assumed that the digitized waveform would be sinusoidal in nature, with the peaks and valleys of the waveform occurring at 0 and 180 of rotation, respectively. In actuality, the digitized waveform required some "massaging" through adaptive digital filtering before the analysis process could be automated. Further, the discrete rows of overhead fluorescent lights imprint a Doppler-like effect on the filtered waveform, resulting in apparent oscillations in the angular velocity of the ball, especially on the first half of the lane (closest to the foul line). A polynomial curve-fitting scheme was used to smooth out the angular velocity waveform, and the linear velocity of the ball was recovered through energy conservation techniques, combined with certain assumptions about the effects of friction. From the linear velocity, it was possible to find the distance the ball was lofted at release, and the location of each revolution of the ball relative to the foul line. A method for finding the coefficient of friction between the ball and the lane was also derived, although this technique has not yet been implemented. Another problem that arose from the analysis was that of "phase shift", where the pin deck light overpowers the ceiling lights and imposes a sudden phase shift on the waveform immediately before the ball hits the pins. This phase shift occurs in the last revolution of the ball, and can drastically affect the resulting analysis. The effects of the phase shift can be removed by excluding from the data passed to the digital filter the msecs (6-9 samples) of the waveform immediately preceding impact. Before proceeding with the remainder of the analysis algorithms, the filtered waveform is extrapolated back into the samples that were previously excluded. It is important to note that all of the waveforms used for development of the MASTER algorithms have originated from the author's use of the SMARTDOT system. As such, testing of the SMARTDOT system with a wider range of users is mandated, and further refinement of the algorithms will most likely result. Ultimately, the results of the MASTER analysis algorithms must be verified and validated with formal testing. That testing could also be used to reveal which algorithms are the most applicable to the SMARTDOT system. Admittedly, there is much development, verification, and validation yet to be done. However, this phase of the project has shown that the SMARTDOT system, as described, is a feasible and viable method for quantifying and assessing a bowler's level of execution and performance. 66

73 BIBLIOGRAPHY [1] United State Patent and Trademark Office, March 2002 [2] US Patent 4,893,182 (January 9, 1990) - Video Tracking and Display System ABSTRACT: An imaging processing system for displaying a succession of selected separated images of a moving object moving in an otherwise substantially static scene includes an image sensor for generating video signals of the static scene and for generating video signals of the static scene including the object moving therethrough. The video signals are generated over a plurality of frames. A first memory stores the video signals of at least one of the plurality of frames from the static scene. A second memory stores the video signals of the plurality of frames from the static scene including the object moving therethrough. Structure is provided for comparing on a frame-by-frame basis the video signals stored in the first memory with the video signals stored in the second memory to thereby determine the presence of the object in each of the plurality of frames. A display illustrates the location of the object in each of the plurality of frames. [3] US Patent 5,118,105 (June 2, 1992) - Bowling Statistics Display System ABSTRACT: A statistical analysis package for a bowling center system provides displays used to analyze bowling ball trajectories. The bowling center system includes a central processing unit having a memory and connected to a ball trajectory unit. The ball trajectory unit generates information representing the trajectory of a bowling ball in a lane which is stored in the processing unit memory. The processing unit memory is operable in response to a user request for selecting trajectory information to develop statistical graphs illustrating historical tendencies at a select trajectory position for display on a monitor. [4] US Patent 5,526,326 (June 11, 1996) - Speed Indicating Ball ABSTRACT: A speed indicating ball includes a timer, which is activated upon throwing of the ball, and deactivated upon catching of the ball, for measuring the ball's time of flight. The timer is connected to a display which provides a direct read out which is inversely proportional to the time of flight of the ball, and which corresponds to the relative velocity of the ball. [5] US Patent 5,761,096 (June 2, 1998) - Speed-sensing projectile ABSTRACT: A speed-sensing projectile such as for example a baseball includes a generally spherical body. An inertial switch is positioned within the body and is actuable between open and closed conditions in response to accelerations of the body greater than a threshold value. A processor also within the body is responsive to the inertial switch and calculates the average speed at which the baseball is thrown over a fixed distance. A visible display on the body is in communication with the processor and displays the calculated speed. [6] US Patent 6,151,563 (November 21, 2000) - Speed, spin rate, and curve measuring device using magnetic field sensors ABSTRACT: A device for measuring a movable object, such as a baseball, football, hockey puck, soccer ball, tennis ball, bowling ball, or a golf ball. Part of the device, called the object unit, is embedded, secured, or attached to the movable object of interest, and has a spin detection circuit, electronic processor circuit, magnetic field sensor circuit, and a radio transmitter. The other part of the device, called the monitor unit, is held or worn by the user and serves as the user interface for the device. The monitor unit has a radio receiver, a processor, an input keypad, and an output display that shows the various measured motion characteristics of the movable object, such as the time of flight, speed, trajectory height, spin rate, or curve of the movable object, and allows the user to input data to the device. 67

74 [7] Bose, Nirmal K., Digital Filters - Theory and Applications, North-Holland, New York, New York, 1985 [8] Halliday, David and Resnick, Robert, Physics - Parts 1 & 2, John Wiley and Sons, New York, New York, 1978 [9] Saunders, Fenella, "The Physics of... Bowling", Discover Magazine, March 2000 [10] Science and Engineering Tools Version 9.0, Quinn-Curtis, Inc., Needham Massachusettes, 1995 [11] Simmons, George F., Calculus with Analytic Geometry, McGraw Hill, New York, New York, 1985 [12] Vezina, Larry, "High-Tech Help", Bowling Magazine, Members Only Edition 1994/1995 [13] Vint, Bill, "Bowling's Invisible Obstacle Course", Bowling Magazine, December/January 1993 [14] ABC Equipment Specifications Manual, March 2002 [15] Analog Devices Incorporated, March 2002 [16] Cygnal Integrated Products, March 2002 [17] Honeywell Sensor Products, March 2002 [18] Maxim Integrated Circuits, March 2002 [19] Measurement Specialties, Incorporated, March 2002 [20] Microchip Technologies, Incorporated, March 2002 [21] Philips Semiconductor, March 2002 [22] Ramtron International Corporation, March 2002 [23] Texas Advanced Optical Solutions (TAOS), March 2002 [24] Toshiba Corporation, March

75 APPENDIX A - SMARTDOT MODULE EMBEDDED SOFTWARE FLOWCHARTS Figure A-1a Start-Up Task Flowchart...A-2 Figure A-1b Pre-Sampling Task Flowchart...A-2 Figure A-2 Light Sample ISR Flowchart...A-3 Figure A-3 Sampling Task Flowchart...A-4 Figure A-4 Discrimination Task Flowchart...A-5 Figure A-5 Communication Task Flowchart...A-6 Figure A-6 Wand Detection ISR Flowchart...A-7 Figure A-7 UART Receive Task Flowchart...A-8 Figure A-8 Bit Sample ISR Flowchart...A-9 Figure A-9 Receive Time Out ISR Flowchart...A-9 Figure A-10 Shutdown Task Flowchart...A-10 A-1

76 Appendix A: SMARTDOT Module Embedded Software Flowcharts START-UP TASK FLOWCHART A PRE-SAMPLING TASK FLOWCHART B SLEEP MODE Wait for Pressure on Insert IDLE MODE Wait for SAMPLE Interrupt (T0) Release LITE Level Detected? Initialize Module Resources and Variables Get Start-Up LITE Sample Wait too long for Release? Select Active Scratch Pad (0 or 1) Write Pre-Samples to EEPROM (Sample Buffer - 8 bytes) Is Sample DARK? Impact Detected Since Last Sample? Set Impact Bit for Sample Advance to Next Page of EEPROM (8 bytes) Enable Interrupts Sample Timer (T0) Impact Detection (EX0) Time Out Timer (TI) Move Sample to BUF[PTR] PTR++ At End of Sample Buffer? PTR = Buffer BGN Figure A-1a A To: SHUTDOWN SAVE RUN TIME B Figure A-1b To: SAMPLING START A-2

77 Appendix A: SMARTDOT Module Embedded Software Flowcharts LIGHT SAMPLE ISR FLOWCHART On: Timer 0 (T0) Overflow A B C Disable Interrupts Push ACC Push PSW First Sample = TRUE New Sample = TRUE Turn ON TSL251 (start next ADC conversion) First Sample Of 240 Hz Pair? Sample = ADAT (from previous conversion) Reached Shutdown Time? Is Sample = Release Level? Impact = FALSE First Sample = FALSE Is Sample Level below Shutdown Level? Reset Shutdown Count for Release Time Out Release = TRUE Sample += ADAT (from previous conversion) Is Sum > 255? B Sample = 127 (clip to 127 for Impact Bit) Shutdown Count++ Has it been Dark too Long? Has Release Already Occurred? Reset Shutdown Count for Shutdown Time Out Update Run Time Turn Off TSL251 (waits for ADC to complete) Pop PSW Pop ACC Enable Interrupts Sample /= 2 (average out 240 Hz noise) Shutdown = TRUE (reached Shutdown condition) A Figure A-2 C RETURN FROM INTERRUPT A-3

78 Appendix A: SMARTDOT Module Embedded Software Flowcharts START CONTINUE A SAMPLING TASK FLOWCHART B Is Sampling Enabled? Initialize GROUP Variables Group Max = 0 Group Min = 255 Sample CNT = 0 Write BUF Contents to EEPROM (8 bytes) Advance to Next Page of EEPROM (8 bytes) IDLE MODE In TEST Mode? Wait for SAMPLE Interrupt (T0) Reached End of Sample Space? Overflow = TRUE Impact Detected? Set Impact Bit for Sample In AUTO Mode? Move Sample to BUF[PTR] PTR++ Reached End of Scratch Pad? Ball Rolling = TRUE Enable Sampling Reached End of BUF? Initialize AUTO Detection PTR = BUF_BGN Local Max = Sample Local Min = Sample Group CNT = 0 PTR = Buffer BGN Is Sampling Enabled? A B Figure A-3 To: DISCRIMINATION AUTO DETECTION To: SHUTDOWN SAVE RUN TIME To: SHUTDOWN DONE SAMPLING A-4

79 Appendix A: SMARTDOT Module Embedded Software Flowcharts AUTO DETECTION A DISCRIMINATION TASK FLOWCHART B Is Sample > Group Max? Group Max = New Sample Did Direction Change? (Change < 0) Is Sampling Enabled? In TEST Mode? Is Sample < Group Min? Group Min = New Sample Is Change > Hysteresis? Group Min = New Sample Group Min = New Sample Is Ball Rolling? At End of Group? Group Min = New Sample Group Min = New Sample Group Min = New Sample Is Waveform Going UP? Change = Sample - Group Max Reach AUTO Time Out? Change = Group Min - Sample To: SAMPLING CONTINUE B To: COMMUNICATION SWITCH TO COMM To: SHUTDOWN DONE SAMPLING A Figure A-4 A-5

80 Appendix A: SMARTDOT Module Embedded Software Flowcharts COMMUNICATION TASK FLOWCHART SWITCH TO COMM A B C Initialize Communications Wait for Wand = TRUE Wand Present = FALSE Dark = FALSE Level Count = 0 Shutdown Count = 0 Set Timer 0 (T0) for Wand Detection Delay 40 msecs for Wand to switch to baud Retry Count = 3 Receive Time Out = 200 msecs Did Command Terminate Normally? Transmit baud (acknowledge successful completion) IDLE MODE Transmit baud to Wand ("Clear to Send") Update Run Time Count Wand Interrupt (T0) (darkness for 125 msecs) Receive Command Byte from 600 baud Shutdown Count++ Transmit "HI" to Echo Command Byte to baud IDLE MODE Wand Interrupt (T0) (receive 600 baud) Wait for Wand = FALSE Wand Present = TRUE Process Command 'A' - Set AUTO Mode 'S' - Set SINGLE Mode 'T' - Transmit Data 'X' - Set TEST Mode 0x0X - Set CFG Bytes X and X+1 Done All Retries? B C A To: SHUTDOWN SAVE RUN TIME Figure A-5 A-6

81 Appendix A: SMARTDOT Module Embedded Software Flowcharts On: Timer 0 (T0) Overflow A WAND DETECTION ISR FLOWCHART B Disable Interrupts Push ACC Push PSW Waiting for Dark? Is Sample = LITE Level? Did LITE Pulse Just End? Was it the Correct Length? Dark = FALSE Sample = ADAT (from previous conversion) Update Run Time Turn ON TSL251 (start next ADC conversion) Is Sample < Dark Level? Reset Level Count Level Count++ (counting LITE samples) Turn OFF TSL251 (waits for ADC to finish) A Level Count++ (counting DARK samples) Pop PSW Pop ACC Enable Interrupts Reached Minimum Dark Time? Shutdown Count++ Was Shutdown Detected? Dark = TRUE (Wand is in place) Waited Too Long? Push SAVE RUN TIME on to Stack Shutdown = TRUE Figure A-6 B RETURN FROM INTERRUPT A-7

82 Appendix A: SMARTDOT Module Embedded Software Flowcharts RECEIVE BYTE (from Wand) A UART RECEIVE TASK FLOWCHART B C Wait for Start Bit Wait for Parity Bit Reset Receive Time Out Bit Sample Interrupt T0) Bit Sample Interrupt (T0) Turn ON TSL251 (starts ADC conversion) New Bit = FALSE Is PARITY Bit corrrect? Halt Bit Sample Timer (T0) Wait for Dark Wand Interrupt (T0) Valid START Bit? New Bit = FALSE Turn OFF TSL251 (ADC has already finished) Set Bit Sample Timer (T0) for 4800 Hz Wait for Stop Bit Wait for 1 to 0 Transition Wait for Data Bit Bit Sample Interrupt (T0) Wand Interrupt (T0) Bit Sample Interrupt (T0) New Bit = FALSE Initialize Bit Sampling New Bit = FALSE Bit Dark Counter = 0 DARK Level = ZERO Level Start Bit Sample Timer (T0) Bit Count = 0 Bit Sample Count = 0 New Bit = FALSE Shift Bit into RCV Byte Valid STOP Bit? Done All 8 Data Bits? Push RESPONSE on to Stack New Bit = FALSE A B Figure A-7 C RETURN A-8

83 Appendix A: SMARTDOT Module Embedded Software Flowcharts BIT SAMPLE ISR FLOWCHART RECEIVE TIME OUT ISR FLOWCHART On: Timer 0 (T0) Overflow A B On: Timer TI Overflow Disable Interrupts Is this a Middle Bit Sample? Take All 8 Bit Samples? Disable Interrupts Sample = ADAT (from previous conversion) Reached Time Out? Start ADC conversion (TSL251 is already ON) A Is Sample < Dark Level? DARK Samples = 2? Halt Time Out Timer (TI) Level Count++ (counting DARK samples) Bit = 1 Bit = 0 Push RESPONSE onto Stack DARK Level = ZERO Level (hysteresis between LITE and DARK) DARK Level = ONE Level (hysteresis between LITE and DARK) Bit Sample Count++ Enable Interrupts Enable Interrupts B RETURN FROM INTERRUPT RETURN FROM INTERRUPT Figure A-8 Figure A-9 A-9

84 Appendix A: SMARTDOT Module Embedded Software Flowcharts SHUTDOWN TASK FLOWCHART DONE SAMPLING A SAVE RUN TIME BACK TO SLEEP Disable Interrupts Update Run Time in EEPROM Switch Active Scratch Pads Update Ball Count in EEPROM Update Activation Count in EEPROM Sample Overflow? Write ZEROs to Unused Sample Memory Turn Off TSL251 Turn Off TRX LEDs SHUTDOWN_PIN = 0 (D-FF CLK) Write CFG Byte, Sample End to EEPROM Run Shutdown Delay Start Shutdown Time Out SHUTDOWN_PIN = 1 (D-FF CLK) (clocks '0' to D-FF on 0 to 1 edge) SLEEP MODE Shutdown Time Out or Pressure on Insert A To: START-UP Figure A-10 A-10

85 APPENDIX B - SMARTDOT MODULE SOURCE CODE SDM-DECL.R07 - Definitions and Declarations...B-2 SDM-REGS.H - Register bank 0 Definitions...B-11 SDM-MAIN.R07 - Start-Up, Sampling and Discrimination Routines, ISRs...B-12 SDM-MSTR.R07 - Communication Routines, Software UART, Commands, ISRs...B-22 SDM-2404.R07 - I 2 C 24C04 EEPROM Routines...B-36 B-1

86 APPENDIX C - SMARTDOT MODULE COMMAND TIMING DIAGRAMS Upload Command Timing Diagram... C-2 Mode Command Timing Diagram... C-3 Configuration Command Timing Diagram... C-4 C-1

87 Appendix C: SMARTDOT Module Command Timing Diagrams 'U' - 0x55 'U' - 0x55 'T' EEPROM CONTENTS baud 200 msec time out 200 msec time out 200 msec time out 10 msec typical "HI" baud "HI" baud Echo baud 500 msec typical to 1second max 160 msec nominal C msec typical to 1 second max 125 msec 40 msec delay 40 msec delay 40 msec delay TRANSMIT 1 Start 8 Data EVEN Parity 2 Stop 0x00 'T' 0x11 up START-UP RELEASE WAND IN PLACE MODULE: "HI" WAND: "I'M HERE" MODULE: "CLEAR TO SEND" WAND: "TRANSMIT" MODULE: ECHO WAND: "CLEAR TO SEND" MODULE: UPLOADING DATA up SHUTDOWN NULL 600 baud Transmit 600 baud XON 600 baud RECEIVE 1 Start 8 Data EVEN Parity 1 Stop Figure C-1 AMBIENT LIGHT UPLOAD COMMAND TIMING DIAGRAM

88 Figure C-2 Appendix C: SMARTDOT Module Command Timing Diagrams MODE COMMAND TIMING DIAGRAM 0x00 'A','S','X' AMBIENT LIGHT 'U' - 0x55 'U' - 0x55 ECHO 200 msec time out 200 msec time out "HI" baud "HI" baud Echo baud 500 msec typical to 1second max C msec typical to 1 second max 125 msec 40 msec delay 40 msec delay 10 msec delay NULL 600 baud Set Mode 600 baud RECEIVE 1 Start 8 Data EVEN Parity 1 Stop TRANSMIT 1 Start 8 Data EVEN Parity 2 Stop 'A' - Auto Mode 'S' - Single Mode 'X' - Test Mode up START-UP RELEASE WAND IN PLACE MODULE: "HI" WAND: "I'M HERE" MODULE: "CLEAR TO SEND" WAND: "SET MODE" MODULE: ECHO up SHUTDOWN

89 Figure C-3 Appendix C: SMARTDOT Module Command Timing Diagrams CONFIGURATION COMMAND TIMING DIAGRAM 'U' - 0x55 'U' - 0x55 ECHO 200 msec time out 200 msec time out 200 msec time out 10 msec typical "HI" baud "HI" baud Echo baud 500 msec typical to 1second max 0x00 0x00-0x0E 1 st BYTE C msec typical to 1 second max 125 msec 40 msec delay 40 msec delay NULL 600 baud Configure 600 baud Data 600 baud RECEIVE 1 Start 8 Data EVEN Parity 1 Stop AMBIENT LIGHT TRANSMIT 1 Start 8 Data EVEN Parity 2 Stop 2 nd BYTE ECHO up START-UP RELEASE WAND IN PLACE MODULE: "HI" WAND: "I'M HERE" MODULE: "CLEAR TO SEND" WAND: "CONFIGURE" MODULE: ECHO WAND: 1 st DATA BYTE MODULE: ECHO WAND: 2 nd DATA BYTE MODULE: ECHO up SHUTDOWN 40 msec delay 200 msec time out 40 msec delay Echo baud Echo baud Data 600 baud ECHO

90 APPENDIX D - MASTER "ANALYSIS" CALCULATIONS SOURCE CODE vcalcspectrum...d-3 vcalcfilterdata...d-5 fanalyzedata...d-7 vcalcreleaseimpactrpms...d-14 vcalcvelocity Data...D-15 vcalcdistancedata...d-16 vcalcrevlocations...d-17 D-1

91 APPENDIX E GAME MASTER SCREEN CAPTURES Frame Release MPH RPMs Impact MPH RPMs Loft (in) Time (sec) Average MPH Total Revolutions Average RPMs Min Max Median Mean Deviation ±1.5% ±2.5% ±2.3% ±2.4% ±5.0% ±2.0% ±1.8% ±3.2% ±3.1% Raw Data Screen Captures (Figure E-1)...E-2 Spectrum Screen Captures (Figure E-2)...E-4 Analysis Screen Captures (Figures E-3)...E-6 E-1

92 Appendix E: 300 Game Analysis Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Figure E-1a E-2

93 Appendix E: 300 Game Analysis Frame 7 Frame 8 Frame 9 Frame 10, 1 st Ball Frame 10, 2 nd Ball Frame 10, 3 rd Ball Figure E-1b E-3

94 Appendix E: 300 Game Analysis Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Figure E-2a E-4

95 Appendix E: 300 Game Analysis Frame 7 Frame 8 Frame 9 Frame 10, 1 st Ball Frame 10, 2 nd Ball Frame 10, 3 rd Ball Figure E-2b E-5

96 Appendix E: 300 Game Analysis Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Figure E-3a E-6

97 Appendix E: 300 Game Analysis Frame 7 Frame 8 Frame 9 Frame 10, 1 st Ball Frame 10, 2 nd Ball Frame 10, 3 rd Ball Figure E-3b E-7

OPTICAL POWER METER WITH SMART DETECTOR HEAD

OPTICAL POWER METER WITH SMART DETECTOR HEAD OPTICAL POWER METER WITH SMART DETECTOR HEAD Features Fast response (over 1000 readouts/s) Wavelengths: 440 to 900 nm for visible (VIS) and 800 to 1700 nm for infrared (IR) NIST traceable Built-in attenuator

More information

Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module

Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module Introduction The vibration module allows complete analysis of cyclical events using low-speed cameras. This is accomplished

More information

Interface Practices Subcommittee SCTE STANDARD SCTE Measurement Procedure for Noise Power Ratio

Interface Practices Subcommittee SCTE STANDARD SCTE Measurement Procedure for Noise Power Ratio Interface Practices Subcommittee SCTE STANDARD SCTE 119 2018 Measurement Procedure for Noise Power Ratio NOTICE The Society of Cable Telecommunications Engineers (SCTE) / International Society of Broadband

More information

Innovative Rotary Encoders Deliver Durability and Precision without Tradeoffs. By: Jeff Smoot, CUI Inc

Innovative Rotary Encoders Deliver Durability and Precision without Tradeoffs. By: Jeff Smoot, CUI Inc Innovative Rotary Encoders Deliver Durability and Precision without Tradeoffs By: Jeff Smoot, CUI Inc Rotary encoders provide critical information about the position of motor shafts and thus also their

More information

Figure 2: components reduce board area by 57% over 0201 components, which themselves reduced board area by 66% over 0402 types (source Murata).

Figure 2: components reduce board area by 57% over 0201 components, which themselves reduced board area by 66% over 0402 types (source Murata). 01005 production goes industry wide Satoshi Kataoka, Production Manager, Assembléon Asia Pacific Region and Eric Klaver, Commercial Product Manager, Assembléon, The Netherlands The introduction of the

More information

In this paper, the issues and opportunities involved in using a PDA for a universal remote

In this paper, the issues and opportunities involved in using a PDA for a universal remote Abstract In this paper, the issues and opportunities involved in using a PDA for a universal remote control are discussed. As the number of home entertainment devices increases, the need for a better remote

More information

Design of Fault Coverage Test Pattern Generator Using LFSR

Design of Fault Coverage Test Pattern Generator Using LFSR Design of Fault Coverage Test Pattern Generator Using LFSR B.Saritha M.Tech Student, Department of ECE, Dhruva Institue of Engineering & Technology. Abstract: A new fault coverage test pattern generator

More information

DISTRIBUTION STATEMENT A 7001Ö

DISTRIBUTION STATEMENT A 7001Ö Serial Number 09/678.881 Filing Date 4 October 2000 Inventor Robert C. Higgins NOTICE The above identified patent application is available for licensing. Requests for information should be addressed to:

More information

Practical Application of the Phased-Array Technology with Paint-Brush Evaluation for Seamless-Tube Testing

Practical Application of the Phased-Array Technology with Paint-Brush Evaluation for Seamless-Tube Testing ECNDT 2006 - Th.1.1.4 Practical Application of the Phased-Array Technology with Paint-Brush Evaluation for Seamless-Tube Testing R.H. PAWELLETZ, E. EUFRASIO, Vallourec & Mannesmann do Brazil, Belo Horizonte,

More information

Why Use the Cypress PSoC?

Why Use the Cypress PSoC? C H A P T E R1 Why Use the Cypress PSoC? Electronics have dramatically altered the world as we know it. One has simply to compare the conveniences and capabilities of today s world with those of the late

More information

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used to convert the external analog voltage-like sensor

More information

Nondestructive Testing Device for Tie Bar Placement Accuracy

Nondestructive Testing Device for Tie Bar Placement Accuracy Nondestructive Testing Device for Tie Bar Placement Accuracy Stanley E. Young Kansas Department of Transportation 2300 Van Buren Street Topeka, KS 66611 young@ksdot.org Nathan W. Holle Department of Electrical

More information

High Performance TFT LCD Driver ICs for Large-Size Displays

High Performance TFT LCD Driver ICs for Large-Size Displays Name: Eugenie Ip Title: Technical Marketing Engineer Company: Solomon Systech Limited www.solomon-systech.com The TFT LCD market has rapidly evolved in the last decade, enabling the occurrence of large

More information

Simple motion control implementation

Simple motion control implementation Simple motion control implementation with Omron PLC SCOPE In todays challenging economical environment and highly competitive global market, manufacturers need to get the most of their automation equipment

More information

Techniques for Extending Real-Time Oscilloscope Bandwidth

Techniques for Extending Real-Time Oscilloscope Bandwidth Techniques for Extending Real-Time Oscilloscope Bandwidth Over the past decade, data communication rates have increased by a factor well over 10X. Data rates that were once 1Gb/sec and below are now routinely

More information

Introduction. Edge Enhancement (SEE( Advantages of Scalable SEE) Lijun Yin. Scalable Enhancement and Optimization. Case Study:

Introduction. Edge Enhancement (SEE( Advantages of Scalable SEE) Lijun Yin. Scalable Enhancement and Optimization. Case Study: Case Study: Scalable Edge Enhancement Introduction Edge enhancement is a post processing for displaying radiologic images on the monitor to achieve as good visual quality as the film printing does. Edges

More information

Exploratory Analysis of Operational Parameters of Controls

Exploratory Analysis of Operational Parameters of Controls 2.5 Conduct exploratory investigations and analysis of operational parameters required for each of the control technologies (occupancy sensors, photosensors, dimming electronic ballasts) in common commercial

More information

ECE 480. Pre-Proposal 1/27/2014 Ballistic Chronograph

ECE 480. Pre-Proposal 1/27/2014 Ballistic Chronograph ECE 480 Pre-Proposal 1/27/2014 Ballistic Chronograph Sponsor: Brian Wright Facilitator: Dr. Mahapatra James Cracchiolo, Nick Mancuso, Steven Kanitz, Madi Kassymbekov, Xuming Zhang Executive Summary: Ballistic

More information

EngineDiag. The Reciprocating Machines Diagnostics Module. Introduction DATASHEET

EngineDiag. The Reciprocating Machines Diagnostics Module. Introduction DATASHEET EngineDiag DATASHEET The Reciprocating Machines Diagnostics Module Introduction Reciprocating machines are complex installations and generate specific vibration signatures. Dedicated tools associating

More information

EngineDiag. The Reciprocating Machines Diagnostics Module. Introduction DATASHEET

EngineDiag. The Reciprocating Machines Diagnostics Module. Introduction DATASHEET EngineDiag DATASHEET The Reciprocating Machines Diagnostics Module Introduction Industries Fig1: Diesel engine cylinder blocks Machines Reciprocating machines are complex installations and generate specific

More information

SRV02-Series. Rotary Pendulum. User Manual

SRV02-Series. Rotary Pendulum. User Manual SRV02-Series Rotary Pendulum User Manual Table of Contents 1. Description...3 2. Purchase Options...3 2.1 Modular Options...4 3. System Nomenclature and Components...5 4. System Configuration and Assembly...6

More information

METHOD, COMPUTER PROGRAM AND APPARATUS FOR DETERMINING MOTION INFORMATION FIELD OF THE INVENTION

METHOD, COMPUTER PROGRAM AND APPARATUS FOR DETERMINING MOTION INFORMATION FIELD OF THE INVENTION 1 METHOD, COMPUTER PROGRAM AND APPARATUS FOR DETERMINING MOTION INFORMATION FIELD OF THE INVENTION The present invention relates to motion 5tracking. More particularly, the present invention relates to

More information

Powerful Software Tools and Methods to Accelerate Test Program Development A Test Systems Strategies, Inc. (TSSI) White Paper.

Powerful Software Tools and Methods to Accelerate Test Program Development A Test Systems Strategies, Inc. (TSSI) White Paper. Powerful Software Tools and Methods to Accelerate Test Program Development A Test Systems Strategies, Inc. (TSSI) White Paper Abstract Test costs have now risen to as much as 50 percent of the total manufacturing

More information

Intelligent Pendulum Hardness Tester BEVS 1306 User Manual

Intelligent Pendulum Hardness Tester BEVS 1306 User Manual Intelligent Pendulum Hardness Tester BEVS 1306 User Manual Please read the user manual before operation. PAGE 1 Content 1. Company Profile... 3 2. Product Introduction... 3 3. Operation Instruction...

More information

PRACTICAL APPLICATION OF THE PHASED-ARRAY TECHNOLOGY WITH PAINT-BRUSH EVALUATION FOR SEAMLESS-TUBE TESTING

PRACTICAL APPLICATION OF THE PHASED-ARRAY TECHNOLOGY WITH PAINT-BRUSH EVALUATION FOR SEAMLESS-TUBE TESTING PRACTICAL APPLICATION OF THE PHASED-ARRAY TECHNOLOGY WITH PAINT-BRUSH EVALUATION FOR SEAMLESS-TUBE TESTING R.H. Pawelletz, E. Eufrasio, Vallourec & Mannesmann do Brazil, Belo Horizonte, Brazil; B. M. Bisiaux,

More information

Evaluating Oscilloscope Mask Testing for Six Sigma Quality Standards

Evaluating Oscilloscope Mask Testing for Six Sigma Quality Standards Evaluating Oscilloscope Mask Testing for Six Sigma Quality Standards Application Note Introduction Engineers use oscilloscopes to measure and evaluate a variety of signals from a range of sources. Oscilloscopes

More information

CHARACTERIZATION OF END-TO-END DELAYS IN HEAD-MOUNTED DISPLAY SYSTEMS

CHARACTERIZATION OF END-TO-END DELAYS IN HEAD-MOUNTED DISPLAY SYSTEMS CHARACTERIZATION OF END-TO-END S IN HEAD-MOUNTED DISPLAY SYSTEMS Mark R. Mine University of North Carolina at Chapel Hill 3/23/93 1. 0 INTRODUCTION This technical report presents the results of measurements

More information

Re: ENSC 370 Project Physiological Signal Data Logger Functional Specifications

Re: ENSC 370 Project Physiological Signal Data Logger Functional Specifications School of Engineering Science Simon Fraser University V5A 1S6 versatile-innovations@sfu.ca February 12, 1999 Dr. Andrew Rawicz School of Engineering Science Simon Fraser University Burnaby, BC V5A 1S6

More information

An Introduction to the Spectral Dynamics Rotating Machinery Analysis (RMA) package For PUMA and COUGAR

An Introduction to the Spectral Dynamics Rotating Machinery Analysis (RMA) package For PUMA and COUGAR An Introduction to the Spectral Dynamics Rotating Machinery Analysis (RMA) package For PUMA and COUGAR Introduction: The RMA package is a PC-based system which operates with PUMA and COUGAR hardware to

More information

INFRARED BAT-SPEED-TRACKING DEVICE CVG Systems Baseball Edition ASENIORTHESISPROPOSAL

INFRARED BAT-SPEED-TRACKING DEVICE CVG Systems Baseball Edition ASENIORTHESISPROPOSAL INFRARED BAT-SPEED-TRACKING DEVICE CVG Systems Baseball Edition by Brent E. Coonrod J.Scott George Marc A. Vergo ASENIORTHESISPROPOSAL Presented to the Faculty of The Computer and Electronics Engineering

More information

Optical Engine Reference Design for DLP3010 Digital Micromirror Device

Optical Engine Reference Design for DLP3010 Digital Micromirror Device Application Report Optical Engine Reference Design for DLP3010 Digital Micromirror Device Zhongyan Sheng ABSTRACT This application note provides a reference design for an optical engine. The design features

More information

E X P E R I M E N T 1

E X P E R I M E N T 1 E X P E R I M E N T 1 Getting to Know Data Studio Produced by the Physics Staff at Collin College Copyright Collin College Physics Department. All Rights Reserved. University Physics, Exp 1: Getting to

More information

SMT Encoder for High Performance, High Volume Designs Small Size High Resolution Low Cost ChipEncoder Reflective Surface Mount Encoder Features

SMT Encoder for High Performance, High Volume Designs Small Size High Resolution Low Cost ChipEncoder Reflective Surface Mount Encoder Features SMT Encoder for High Performance, High Volume Designs Small Size 7.0mm (W) x 11.0mm (L) x 3.1mm (H) High Resolution Linear: 10μm or 1μm per quadrature count Rotary: 3,300 to 327,000 quadrature counts per

More information

Designing Intelligence into Commutation Encoders

Designing Intelligence into Commutation Encoders I Designing Intelligence into Commutation Encoders By: Jeff Smoot, CUI Inc C U I NC Encoder users traditionally have been reluctant to change with good reason. Motor control on the factory floor or in

More information

Tech Paper. HMI Display Readability During Sinusoidal Vibration

Tech Paper. HMI Display Readability During Sinusoidal Vibration Tech Paper HMI Display Readability During Sinusoidal Vibration HMI Display Readability During Sinusoidal Vibration Abhilash Marthi Somashankar, Paul Weindorf Visteon Corporation, Michigan, USA James Krier,

More information

Pivoting Object Tracking System

Pivoting Object Tracking System Pivoting Object Tracking System [CSEE 4840 Project Design - March 2009] Damian Ancukiewicz Applied Physics and Applied Mathematics Department da2260@columbia.edu Jinglin Shen Electrical Engineering Department

More information

The Syscal family of resistivity meters. Designed for the surveys you do.

The Syscal family of resistivity meters. Designed for the surveys you do. The Syscal family of resistivity meters. Designed for the surveys you do. Resistivity meters may conveniently be broken down into several categories according to their capabilities and applications. The

More information

Benchtop Portability with ATE Performance

Benchtop Portability with ATE Performance Benchtop Portability with ATE Performance Features: Configurable for simultaneous test of multiple connectivity standard Air cooled, 100 W power consumption 4 RF source and receive ports supporting up

More information

WELDING CONTROL UNIT: TE 450 USER MANUAL

WELDING CONTROL UNIT: TE 450 USER MANUAL j WELDING CONTROL UNIT: TE 450 USER MANUAL RELEASE SOFTWARE No. 1.50 DOCUMENT NUMBER: MAN 4097 EDITION: MARCH 1998 This page is left blank intentionally. 2 / 34 TABLE OF CONTENTS SUBJECTS PAGE WELDING

More information

System Quality Indicators

System Quality Indicators Chapter 2 System Quality Indicators The integration of systems on a chip, has led to a revolution in the electronic industry. Large, complex system functions can be integrated in a single IC, paving the

More information

Solutions to Embedded System Design Challenges Part II

Solutions to Embedded System Design Challenges Part II Solutions to Embedded System Design Challenges Part II Time-Saving Tips to Improve Productivity In Embedded System Design, Validation and Debug Hi, my name is Mike Juliana. Welcome to today s elearning.

More information

03-Durchfuehren_RZ_0708_EN.qxd:03-Durchfuehren GB.qxd :06 Uhr Seite 200 Feed-through

03-Durchfuehren_RZ_0708_EN.qxd:03-Durchfuehren GB.qxd :06 Uhr Seite 200 Feed-through Feed-through Feed-through FEED-THROUGH Series Size Page Rotary Feed-through for Robots DDF 202 DDF 031 206 DDF 040 208 DDF 040-1 210 DDF 050 212 DDF 050-1 214 DDF 063 216 DDF 080 218 DDF 080-1 220 DDF

More information

UNIT-3 Part A. 2. What is radio sonde? [ N/D-16]

UNIT-3 Part A. 2. What is radio sonde? [ N/D-16] UNIT-3 Part A 1. What is CFAR loss? [ N/D-16] Constant false alarm rate (CFAR) is a property of threshold or gain control devices that maintain an approximately constant rate of false target detections

More information

PC BOARD MOUNT DISPLAYS

PC BOARD MOUNT DISPLAYS PC BOARD MOUNT DISPLAYS The Trusted Source for Innovative Control Solutions 1-717-767-6511 891 QUICK Specs Counters LCD DISPLAY SUB-CUB 1 & 2 SUB-CUB 2-8A SUB-CUB D SUB-CUB T Description Count Indication

More information

High Performance Raster Scan Displays

High Performance Raster Scan Displays High Performance Raster Scan Displays Item Type text; Proceedings Authors Fowler, Jon F. Publisher International Foundation for Telemetering Journal International Telemetering Conference Proceedings Rights

More information

Session 1 Introduction to Data Acquisition and Real-Time Control

Session 1 Introduction to Data Acquisition and Real-Time Control EE-371 CONTROL SYSTEMS LABORATORY Session 1 Introduction to Data Acquisition and Real-Time Control Purpose The objectives of this session are To gain familiarity with the MultiQ3 board and WinCon software.

More information

The Micropython Microcontroller

The Micropython Microcontroller Please do not remove this manual from the lab. It is available via Canvas Electronics Aims of this experiment Explore the capabilities of a modern microcontroller and some peripheral devices. Understand

More information

Sharif University of Technology. SoC: Introduction

Sharif University of Technology. SoC: Introduction SoC Design Lecture 1: Introduction Shaahin Hessabi Department of Computer Engineering System-on-Chip System: a set of related parts that act as a whole to achieve a given goal. A system is a set of interacting

More information

Laser Beam Analyser Laser Diagnos c System. If you can measure it, you can control it!

Laser Beam Analyser Laser Diagnos c System. If you can measure it, you can control it! Laser Beam Analyser Laser Diagnos c System If you can measure it, you can control it! Introduc on to Laser Beam Analysis In industrial -, medical - and laboratory applications using CO 2 and YAG lasers,

More information

Real-time Chatter Compensation based on Embedded Sensing Device in Machine tools

Real-time Chatter Compensation based on Embedded Sensing Device in Machine tools International Journal of Engineering and Technical Research (IJETR) ISSN: 2321-0869 (O) 2454-4698 (P), Volume-3, Issue-9, September 2015 Real-time Chatter Compensation based on Embedded Sensing Device

More information

A Keywest Technology White Paper

A Keywest Technology White Paper Six Basic Digital Signage Applications for the Hospitality Industry Synopsis The number of choices for both products and services available to consumers have grown exponentially, creating a demand for

More information

(Skip to step 11 if you are already familiar with connecting to the Tribot)

(Skip to step 11 if you are already familiar with connecting to the Tribot) LEGO MINDSTORMS NXT Lab 5 Remember back in Lab 2 when the Tribot was commanded to drive in a specific pattern that had the shape of a bow tie? Specific commands were passed to the motors to command how

More information

Bringing an all-in-one solution to IoT prototype developers

Bringing an all-in-one solution to IoT prototype developers Bringing an all-in-one solution to IoT prototype developers W H I T E P A P E R V E R S I O N 1.0 January, 2019. MIKROE V E R. 1.0 Click Cloud Solution W H I T E P A P E R Page 1 Click Cloud IoT solution

More information

Speech Recognition and Signal Processing for Broadcast News Transcription

Speech Recognition and Signal Processing for Broadcast News Transcription 2.2.1 Speech Recognition and Signal Processing for Broadcast News Transcription Continued research and development of a broadcast news speech transcription system has been promoted. Universities and researchers

More information

Application Note Using Buffered Outputs and Patch Panels with the SETPOINT Machinery Protection System

Application Note Using Buffered Outputs and Patch Panels with the SETPOINT Machinery Protection System Application Note Using Buffered Outputs and Patch Panels with the SETPOINT Machinery Protection System Doc 1446106 Page 1 of 8 Overview The SETPOINT Machinery Protection System provides three separate

More information

THE NEW LASER FAMILY FOR FINE WELDING FROM FIBER LASERS TO PULSED YAG LASERS

THE NEW LASER FAMILY FOR FINE WELDING FROM FIBER LASERS TO PULSED YAG LASERS FOCUS ON FINE SOLUTIONS THE NEW LASER FAMILY FOR FINE WELDING FROM FIBER LASERS TO PULSED YAG LASERS Welding lasers from ROFIN ROFIN s laser sources for welding satisfy all criteria for the optimized laser

More information

Pinewood Derby Finish Line Detection System

Pinewood Derby Finish Line Detection System Pinewood Derby Finish Line Detection System by Cody Clayton Robert Schreibman A Technical Report Submitted to the Faculty of Electrical Engineering Colorado School of Mines Submitted in partial fulfillment

More information

8 DIGITAL SIGNAL PROCESSOR IN OPTICAL TOMOGRAPHY SYSTEM

8 DIGITAL SIGNAL PROCESSOR IN OPTICAL TOMOGRAPHY SYSTEM Recent Development in Instrumentation System 99 8 DIGITAL SIGNAL PROCESSOR IN OPTICAL TOMOGRAPHY SYSTEM Siti Zarina Mohd Muji Ruzairi Abdul Rahim Chiam Kok Thiam 8.1 INTRODUCTION Optical tomography involves

More information

Senior Design Project: Blind Transmitter

Senior Design Project: Blind Transmitter Senior Design Project: Blind Transmitter Marvin Lam Mamadou Sall Ramtin Malool March 19, 2007 As the technology industry progresses we cannot help but to note that products are becoming both smaller and

More information

Pre-processing of revolution speed data in ArtemiS SUITE 1

Pre-processing of revolution speed data in ArtemiS SUITE 1 03/18 in ArtemiS SUITE 1 Introduction 1 TTL logic 2 Sources of error in pulse data acquisition 3 Processing of trigger signals 5 Revolution speed acquisition with complex pulse patterns 7 Introduction

More information

RESOLUTION MSC.333(90) (adopted on 22 May 2012) ADOPTION OF REVISED PERFORMANCE STANDARDS FOR SHIPBORNE VOYAGE DATA RECORDERS (VDRs)

RESOLUTION MSC.333(90) (adopted on 22 May 2012) ADOPTION OF REVISED PERFORMANCE STANDARDS FOR SHIPBORNE VOYAGE DATA RECORDERS (VDRs) MSC 90/28/Add.1 Annex 21, page 1 ANNEX 21 RESOLUTION MSC.333(90) THE MARITIME SAFETY COMMITTEE, RECALLING Article 28(b) of the Convention on the International Maritime Organization concerning the functions

More information

Innovative Fast Timing Design

Innovative Fast Timing Design Innovative Fast Timing Design Solution through Simultaneous Processing of Logic Synthesis and Placement A new design methodology is now available that offers the advantages of enhanced logical design efficiency

More information

Team Members: Erik Stegman Kevin Hoffman

Team Members: Erik Stegman Kevin Hoffman EEL 4924 Electrical Engineering Design (Senior Design) Preliminary Design Report 24 January 2011 Project Name: Future of Football Team Name: Future of Football Team Members: Erik Stegman Kevin Hoffman

More information

replacement systems. PT-F200 Series Permanent-Installation Projectors Please make these projectors your very first recommendations as new or

replacement systems. PT-F200 Series Permanent-Installation Projectors Please make these projectors your very first recommendations as new or 2008 January Approach Book Please make these projectors your very first recommendations as new or replacement systems. Permanent-Installation Projectors Are some of your customers hesitant to switch to

More information

Digital Strobe Tuner. w/ On stage Display

Digital Strobe Tuner. w/ On stage Display Page 1/7 # Guys EEL 4924 Electrical Engineering Design (Senior Design) Digital Strobe Tuner w/ On stage Display Team Members: Name: David Barnette Email: dtbarn@ufl.edu Phone: 850-217-9147 Name: Jamie

More information

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum Arif Sirinterlikci Ohio Northern University Background Ohio Northern University Technological Studies Department

More information

MAGNETIC CARD READER DESIGN KIT TECHNICAL SPECIFICATION

MAGNETIC CARD READER DESIGN KIT TECHNICAL SPECIFICATION MAGNETIC CARD READER DESIGN KIT TECHNICAL SPECIFICATION Part Number: D99821002 Rev 212 MAY 2017 REGISTERED TO ISO 9001:2008 1710 Apollo Court Seal Beach, CA 90740 Phone: (562) 546-6400 FAX: (562) 546-6301

More information

Boosting Performance Oscilloscope Versatility, Scalability

Boosting Performance Oscilloscope Versatility, Scalability Boosting Performance Oscilloscope Versatility, Scalability Rising data communication rates are driving the need for very high-bandwidth real-time oscilloscopes in the range of 60-70 GHz. These instruments

More information

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015 Optimization of Multi-Channel BCH Error Decoding for Common Cases Russell Dill Master's Thesis Defense April 20, 2015 Bose-Chaudhuri-Hocquenghem (BCH) BCH is an Error Correcting Code (ECC) and is used

More information

HELICAL SCAN TECHNOLOGY: ADVANCEMENT BY DESIGN

HELICAL SCAN TECHNOLOGY: ADVANCEMENT BY DESIGN HELICAL SCAN TECHNOLOGY: ADVANCEMENT BY DESIGN By Curt Mulder And Kelly Scharf Exabyte Corporation THIC Conference Del Mar, CA 1/20/98 1685 38 th Street Boulder, CO 80301 +1-303-442-4333 +1-303-417-7080

More information

Processes for the Intersection

Processes for the Intersection 7 Timing Processes for the Intersection In Chapter 6, you studied the operation of one intersection approach and determined the value of the vehicle extension time that would extend the green for as long

More information

Virtual Piano. Proposal By: Lisa Liu Sheldon Trotman. November 5, ~ 1 ~ Project Proposal

Virtual Piano. Proposal By: Lisa Liu Sheldon Trotman. November 5, ~ 1 ~ Project Proposal Virtual Piano Proposal By: Lisa Liu Sheldon Trotman November 5, 2013 ~ 1 ~ Project Proposal I. Abstract: Who says you need a piano or keyboard to play piano? For our final project, we plan to play and

More information

Good afternoon! My name is Swetha Mettala Gilla you can call me Swetha.

Good afternoon! My name is Swetha Mettala Gilla you can call me Swetha. Good afternoon! My name is Swetha Mettala Gilla you can call me Swetha. I m a student at the Electrical and Computer Engineering Department and at the Asynchronous Research Center. This talk is about the

More information

Durham Magneto Optics Ltd. NanoMOKE 3 Wafer Mapper. Specifications

Durham Magneto Optics Ltd. NanoMOKE 3 Wafer Mapper. Specifications Durham Magneto Optics Ltd NanoMOKE 3 Wafer Mapper Specifications Overview The NanoMOKE 3 Wafer Mapper is an ultrahigh sensitivity Kerr effect magnetometer specially configured for measuring magnetic hysteresis

More information

All the functions you need in your hand

All the functions you need in your hand All the functions you need in your hand Rely on H30FLEX for installation and troubleshooting. Robust, light-weight and extremely easy to use. Carry out installation, maintenance and troubleshooting tasks

More information

NOTICE: This document is for use only at UNSW. No copies can be made of this document without the permission of the authors.

NOTICE: This document is for use only at UNSW. No copies can be made of this document without the permission of the authors. Brüel & Kjær Pulse Primer University of New South Wales School of Mechanical and Manufacturing Engineering September 2005 Prepared by Michael Skeen and Geoff Lucas NOTICE: This document is for use only

More information

VT5365. Single-chip optical mouse sensor for wireless applications. Features. Applications. Technical specifications. Description.

VT5365. Single-chip optical mouse sensor for wireless applications. Features. Applications. Technical specifications. Description. Single-chip optical mouse sensor for wireless applications Data Brief Features One chip solution with internal micro and minimal external circuitry 1.8V (single battery) or 2.0 V to 3.2 V (serial batteries)

More information

ECE 4220 Real Time Embedded Systems Final Project Spectrum Analyzer

ECE 4220 Real Time Embedded Systems Final Project Spectrum Analyzer ECE 4220 Real Time Embedded Systems Final Project Spectrum Analyzer by: Matt Mazzola 12222670 Abstract The design of a spectrum analyzer on an embedded device is presented. The device achieves minimum

More information

This module senses temperature and humidity. Output: Temperature and humidity display on serial monitor.

This module senses temperature and humidity. Output: Temperature and humidity display on serial monitor. Elegoo 37 Sensor Kit v2.0 Elegoo provides tutorials for each of the sensors in the kit provided by Maryland MESA. Each tutorial focuses on a single sensor and includes basic information about the sensor,

More information

Operation/Users Manual

Operation/Users Manual Operation/Users Manual 48-1-21 Please forward any suggestions or errors to: jillas@daumar.es 6- OPERATION MANUAL FOR MACHINE 48 VERSION 48-1-21 This document is made up of the following sections: COMPULSORY

More information

AMERICAN NATIONAL STANDARD

AMERICAN NATIONAL STANDARD Digital Video Subcommittee AMERICAN NATIONAL STANDARD ANSI/SCTE 197 2018 Recommendations for Spot Check Loudness Measurements NOTICE The Society of Cable Telecommunications Engineers (SCTE) / International

More information

Copyright 2008 Society of Manufacturing Engineers. FUNDAMENTALS OF TOOL DESIGN Progressive Die Design

Copyright 2008 Society of Manufacturing Engineers. FUNDAMENTALS OF TOOL DESIGN Progressive Die Design FUNDAMENTALS OF TOOL DESIGN Progressive Die Design SCENE 1. PD06A, tape FTD29, 09:14:22:00-09:14:48:00 pan, progressive die operation PROGRESSIVE DIES PERFORM A SERIES OF FUNDAMENTAL CUTTING AND FORMING

More information

Timing Error Detection: An Adaptive Scheme To Combat Variability EE241 Final Report Nathan Narevsky and Richard Ott {nnarevsky,

Timing Error Detection: An Adaptive Scheme To Combat Variability EE241 Final Report Nathan Narevsky and Richard Ott {nnarevsky, Timing Error Detection: An Adaptive Scheme To Combat Variability EE241 Final Report Nathan Narevsky and Richard Ott {nnarevsky, tomott}@berkeley.edu Abstract With the reduction of feature sizes, more sources

More information

Data Converters and DSPs Getting Closer to Sensors

Data Converters and DSPs Getting Closer to Sensors Data Converters and DSPs Getting Closer to Sensors As the data converters used in military applications must operate faster and at greater resolution, the digital domain is moving closer to the antenna/sensor

More information

ADS Basic Automation solutions for the lighting industry

ADS Basic Automation solutions for the lighting industry ADS Basic Automation solutions for the lighting industry Rethinking productivity means continuously making full use of all opportunities. The increasing intensity of the competition, saturated markets,

More information

Full Disclosure Monitoring

Full Disclosure Monitoring Full Disclosure Monitoring Power Quality Application Note Full Disclosure monitoring is the ability to measure all aspects of power quality, on every voltage cycle, and record them in appropriate detail

More information

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of applications such as home appliances, medical, automotive,

More information

Machinery Diagnostic Plots Part 1 ORBIT Back-to-Basics: What does the data really tell us?

Machinery Diagnostic Plots Part 1 ORBIT Back-to-Basics: What does the data really tell us? Machinery Diagnostic Plots Part 1 ORBIT Back-to-Basics: What does the data really tell us? Gaston Desimone Latin America Technical Leader Bently Nevada* Machinery Diagnostic Services (MDS) Buenos Aires

More information

Ensemble QLAB. Stand-Alone, 1-4 Axes Piezo Motion Controller. Control 1 to 4 axes of piezo nanopositioning stages in open- or closed-loop operation

Ensemble QLAB. Stand-Alone, 1-4 Axes Piezo Motion Controller. Control 1 to 4 axes of piezo nanopositioning stages in open- or closed-loop operation Ensemble QLAB Motion Controllers Ensemble QLAB Stand-Alone, 1-4 Axes Piezo Motion Controller Control 1 to 4 axes of piezo nanopositioning stages in open- or closed-loop operation Configurable open-loop

More information

Integrated Circuit for Musical Instrument Tuners

Integrated Circuit for Musical Instrument Tuners Document History Release Date Purpose 8 March 2006 Initial prototype 27 April 2006 Add information on clip indication, MIDI enable, 20MHz operation, crystal oscillator and anti-alias filter. 8 May 2006

More information

UNIT V 8051 Microcontroller based Systems Design

UNIT V 8051 Microcontroller based Systems Design UNIT V 8051 Microcontroller based Systems Design INTERFACING TO ALPHANUMERIC DISPLAYS Many microprocessor-controlled instruments and machines need to display letters of the alphabet and numbers. Light

More information

The Measurement Tools and What They Do

The Measurement Tools and What They Do 2 The Measurement Tools The Measurement Tools and What They Do JITTERWIZARD The JitterWizard is a unique capability of the JitterPro package that performs the requisite scope setup chores while simplifying

More information

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

SWITCH: Microcontroller Touch-switch Design & Test (Part 2) SWITCH: Microcontroller Touch-switch Design & Test (Part 2) 2 nd Year Electronics Lab IMPERIAL COLLEGE LONDON v2.09 Table of Contents Equipment... 2 Aims... 2 Objectives... 2 Recommended Timetable... 2

More information

Light Emitting Diodes

Light Emitting Diodes By Kenneth A. Kuhn Jan. 10, 2001, rev. Feb. 3, 2008 Introduction This brief introduction and discussion of light emitting diode characteristics is adapted from a variety of manufacturer data sheets and

More information

HIGH SPEED ASYNCHRONOUS DATA MULTIPLEXER/ DEMULTIPLEXER FOR HIGH DENSITY DIGITAL RECORDERS

HIGH SPEED ASYNCHRONOUS DATA MULTIPLEXER/ DEMULTIPLEXER FOR HIGH DENSITY DIGITAL RECORDERS HIGH SPEED ASYNCHRONOUS DATA MULTIPLEXER/ DEMULTIPLEXER FOR HIGH DENSITY DIGITAL RECORDERS Mr. Albert Berdugo Mr. Martin Small Aydin Vector Division Calculex, Inc. 47 Friends Lane P.O. Box 339 Newtown,

More information

Final Report. Iowa State University Department of Electrical and Computer Engineering Senior Design December 2010 Team 04

Final Report. Iowa State University Department of Electrical and Computer Engineering Senior Design December 2010 Team 04 High Speed Wired Data Collection Final Report Iowa State University Department of Electrical and Computer Engineering Senior Design December 2010 Team 04 Team Zachary Coffin and Radell Young Faculty Advisor

More information

Digital Logic Design: An Overview & Number Systems

Digital Logic Design: An Overview & Number Systems Digital Logic Design: An Overview & Number Systems Analogue versus Digital Most of the quantities in nature that can be measured are continuous. Examples include Intensity of light during the day: The

More information

JAMAR TRAX RD Detector Package Power Requirements Installation Setting Up The Unit

JAMAR TRAX RD Detector Package Power Requirements Installation Setting Up The Unit JAMAR TRAX RD The TRAX RD is an automatic traffic recorder designed and built by JAMAR Technologies, Inc. Since the unit is a Raw Data unit, it records a time stamp of every sensor hit that occurs during

More information

PEP-II longitudinal feedback and the low groupdelay. Dmitry Teytelman

PEP-II longitudinal feedback and the low groupdelay. Dmitry Teytelman PEP-II longitudinal feedback and the low groupdelay woofer Dmitry Teytelman 1 Outline I. PEP-II longitudinal feedback and the woofer channel II. Low group-delay woofer topology III. Why do we need a separate

More information

ASK THE EXPERTS: Procedure for Verifying Magnetic Pickup Signal Integrity Using a Windrock Portable Analyzer

ASK THE EXPERTS: Procedure for Verifying Magnetic Pickup Signal Integrity Using a Windrock Portable Analyzer December 2016 ASK THE EXPERTS: Procedure for Verifying Magnetic Pickup Signal Integrity Using a Windrock Portable Analyzer QUESTION: Does Windrock have some standard procedures for verifying magnetic pickup

More information