01.06.2015 Views

A Performance Analysis System for the Sport of Bowling

A Performance Analysis System for the Sport of Bowling

A Performance Analysis System for the Sport of Bowling

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.6 HARDWARE/SOFTWARE INTERACTION DESIGN CONSIDERATIONS<br />

There are a number <strong>of</strong> areas where <strong>the</strong> design decisions <strong>for</strong> <strong>the</strong> hardware and <strong>the</strong><br />

embedded s<strong>of</strong>tware are interdependent. These issues are presented next.<br />

2.6.1 Microprocessor Clock Frequency<br />

The clock frequency directly affects <strong>the</strong> current drawn by <strong>the</strong> microprocessor: <strong>the</strong> lower<br />

<strong>the</strong> clock frequency, <strong>the</strong> less current <strong>the</strong> 87C752 draws from <strong>the</strong> battery. The lowest<br />

standard oscillator frequency that supports <strong>the</strong> sample rate, <strong>the</strong> serial communications<br />

baud rates, and <strong>the</strong> processing demands <strong>of</strong> <strong>the</strong> application is 3.6864 MHz. The internal<br />

clock frequency <strong>for</strong> <strong>the</strong> 87C752 is 1 / 12 <strong>of</strong> <strong>the</strong> oscillator frequency, resulting in an<br />

instruction time <strong>of</strong> 3.26 µsec (307,200 instructions per second) <strong>for</strong> a 3.6864 MHz crystal.<br />

Quartz crystals and ceramic resonators are available in standard frequencies <strong>for</strong><br />

microprocessors. Crystals easily can maintain an accuracy (over <strong>the</strong>ir temperature range)<br />

<strong>of</strong> 200 ppm (.03%), while ceramic resonators (cheaper and smaller) typically run in <strong>the</strong> 1-<br />

2% range. During <strong>the</strong> feasibility phase, a crystal has been used to enhance <strong>the</strong> accuracy<br />

<strong>of</strong> <strong>the</strong> sample clock, with <strong>the</strong> hope <strong>of</strong> switching to a ceramic resonator, in combination<br />

with some clock calibration s<strong>of</strong>tware, as part <strong>of</strong> <strong>the</strong> development phase.<br />

2.6.2 Sampling Rate<br />

The 87C752 microprocessor contains an 8-bit ADC with a conversion time <strong>of</strong> 130 µsec<br />

(~7600 Hz) at <strong>the</strong> clock frequency <strong>of</strong> 3.6864 MHz. It is important to minimize <strong>the</strong><br />

sample rate, since <strong>the</strong> amount <strong>of</strong> data collected directly affects <strong>the</strong> amount <strong>of</strong> external<br />

data memory required. Complicating matters, EEPROM technology has a fairly slow<br />

write speed (5-10 msec per page write), thus presenting <strong>the</strong> possibility that <strong>the</strong> rate <strong>of</strong><br />

writing data to memory might not keep pace with <strong>the</strong> production <strong>of</strong> data to be written.<br />

Also, it is desirable to run <strong>the</strong> microprocessor in IDLE mode as much as possible, since it<br />

cuts <strong>the</strong> current draw in half, and <strong>the</strong> light sensor (TSL251) and <strong>the</strong> '752's on-board ADC<br />

can be turned <strong>of</strong>f between sample times. The higher <strong>the</strong> sample rate, <strong>the</strong> more time <strong>the</strong><br />

microprocessor must spend collecting and processing data, which shortens <strong>the</strong> life <strong>of</strong> <strong>the</strong><br />

battery.<br />

Data must also be collected from <strong>the</strong> impact sensor, but this is a different process. An<br />

impact can occur asynchronous to <strong>the</strong> time <strong>of</strong> a light sample, with a much shorter<br />

duration than <strong>the</strong> sample period. There<strong>for</strong>e, impact detection is interrupt driven. By<br />

limiting <strong>the</strong> stored value <strong>of</strong> <strong>the</strong> light samples to <strong>the</strong> range 0-127 (0x00-0x7F), <strong>the</strong> impact<br />

data <strong>for</strong> a sample can be stored in <strong>the</strong> high-order bit <strong>of</strong> <strong>the</strong> sample byte, thus associating<br />

each impact with <strong>the</strong> light sample during which <strong>the</strong> impact occurred.<br />

The primary factors in determining an appropriate sampling rate are <strong>the</strong> maximum<br />

angular velocity (rpms), <strong>the</strong> minimum and maximum linear velocities (ball speed), and<br />

<strong>the</strong> amount <strong>of</strong> memory available <strong>for</strong> <strong>the</strong> storage <strong>of</strong> captured data.<br />

• Maximum RPMs: According to tests conducted by <strong>the</strong> ABC (American <strong>Bowling</strong><br />

Congress), <strong>the</strong> best bowlers, those that average greater than 210, generate an<br />

average rotational rate <strong>of</strong> about 300 rpms (5 Hz) at release. In fact, <strong>the</strong> ABC<br />

found a direct correlation between average score and angular velocity [12].<br />

There is an upper bound on <strong>the</strong> number <strong>of</strong> revolutions <strong>the</strong> ball can make. If <strong>the</strong><br />

ball did not skid at all, it would travel 27 inches per revolution, while revolving<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!