Home
FLIGHT DATA RECORDER FOR THE AMERICAN FOOTBALL
Contents
1. 126 gt 124 c gt 6 122 8 2 120 118 0 500 1000 1500 2000 X2 Y2 Time 1 200 second Figure 29 Baseline Data For Accelerometer 2 Accelerometer 3 Calibration 132 130 2 128 9 126 9 v 124 lt 122 120 0 500 1000 1500 2000 X3 Time 1 200 second Figure 30 Baseline Data For Accelerometer 3 30 After acquiring baseline data I began to simulate actual conditions present in the motion of the ball as best I could to determine if the data I was going to receive from an actual throw could be successfully interpreted The graph seen below in Figure 31 15 data collected from an induced spin on the ball which by the previously defined coordinate system would be classified as condition I held the ball in a laces up orientation induced the roll with very little horizontal displacement of the ball and some limited vertical displacement and then caught the ball again before it struck the ground The data from Accelerometer 1 was of little interest and was omitted from the graph to aid in clarity Spin About Long Axis Accelerometers 2 amp 3 150 9 140 9 I o O O lt 0 50 100 150 200 250 300 X2 Y2 Time 1 200 second Figure 31 Roll about Xb with minima
2. us 4 Component E Values 100 t Sensitivities D gt uu EE 1 Resistors Real 3 Lovv Pazsz Butterworth 1 00 kHz cutoff Passband Gain of 1 00 Response at 10 0 k Hz 15 0 nF DC gain G Gain Phase 3 pome ane 42 Figure19 Screen capture of Filter Pro a freeware program to aid in the design of low pass filters I had chosen 200 samples per second per channel to be my target data acquisition rate and as such selected 200 Hz as the cutoff frequency Filter design 1s a very complex area of electrical engineering and as such I was relying heavily on advice from people that are much better versed in it than I At some point I had a misunderstanding of exactly how to enter the criteria into Filter Pro to achieve the result that I wanted After the unit was built and testing had begun it was learned that what I actually should have had was a filter with a cutoff frequency in the range of 75 100 Hz This cutoff frequency has to do with the sampling theorem which states that to reconstruct the frequency content of a measured signal accurately the sample rate must be more than twice the highest frequency contained in the measured signal If the filter was set at a 200 Hz cutoff the sampling rate would have to be increased to 400 samples per second to meet these criteria The 2 nested PCBs of the football unit are joined toget
3. Figure 11 PCB Layout for Plan B The design is seen twice here the board was ordered from a stock size and the layout fit on the available space 2 times After the finished boards were received they were cut in half 15 Microprocessor L TS HHH 777771 LI I L1C0I612 Plan assembled The flaw in the design of Plan that ultimately led to the decision to move on Plan was in the choice of the microprocessor The Microchip PIC16C717 was chosen based on its features most notably 5 built in A D converters a direct SPI interface and an 18 pin surface mount package The fact that was overlooked was that it was not a flash programmable microprocessor but was instead a write once microprocessor After programming if any problems were discovered in the code and the software needed revising the microprocessor had to be replaced with a new one If I had realized this when I chose it I would have not soldered it directly to the board but instead would have had a socket placed there so the microprocessor could be easily changed I also only had a few of them on hand that I received as samples and felt that it would not be practical to de solder and re solder the microprocessor as many times as I d need to to make the device work I attempted to locate an alternate microprocessor that had the same pin layout which was flash programmable but failed to
4. A D C we The programmer runs off two 9 volt batteries or an AC adapter 16VDC 500 It plugs into the PC parallel printer port using a 25 pin male to 25 pin female parallel printer extension cable It connects to the ICSP in circuit serial programming header on each of the football PCBs with a custom built cable The design of a cable such as this 15 detailed in the microEngineering Lab website and the schematics seen in the appendix of this document After a period of software debugging and experimental code writing the code for each of the two boards was finalized and the microprocessors were flash programmed a final time This code can be found in Appendix E at the end of this document It was at this point that data collection began The final step before collecting real data was to install the electronics into a football or in this case a football like enclosure As seen in Figure 10 page 8 Plan utilized a hard plastic football shaped enclosure which was actually the carcass of a football phone It was the same size as a real football and with the system installed weighed only a couple ounces more Both of those features were attractive but it also had serious drawbacks Its primary drawbacks were that it was rather fragile and more 25 importantly poorly balanced For Plan it was decided that something a little more robust might be requir
5. MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE BO Read data 51 1 Disable Return eeread2 CS2 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE B1 Read data CS2 Disable Return eeread3 CS3 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address ShiftIn SO SCK MSBPRE B2 Read data CS3 1 Disable 65 Return eeread4 CS4 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE B3 Read data CS4 1 Disable Return Subroutine to write data at addr in serial EEPROM eewrite 51 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS1 1 Disable to execute command CS1 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 adx1 Send address and data 51 1 Disable eewrite2 CS2 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS2 Disable to execute command CS2 0 Enable ShiftOut SI MSBFIRST 02 addr bytel addr byteO ady1 Send address and data CS2 1 Disable eewrite3 CS3 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS3 1 Disable to exec
6. www ti com the Texas Instruments website screen capture of the program can be seen on the next page in Figure 19 This software allows you to easily select the sizes of the resistors and capacitors needed to accomplish the desired result The Multiple Feedback MFB or Infinite Gain topology places two feedback paths around an op amp This Filter is less sensitive to component values that the Sallen Key topology which uses an op amp in a noninverting gain mode The Sallen Key filter provides excellent passband gain accuracy The Butterworth filters have the flattest possible passband response and a smooth transition into the stopband The MFB Butterworth filter was recommended to me by a colleague that has past experience working with the ADXL250 and a Pic processor with built in A D conversion An Texas Instruments Filter Pro Print About Filter Pro 4 poles 5 Ripple EE TUN Ti Circuit Type INSTRUMENTS i Cutotf Freq 100k Hz WELCOME 47 Sallen Key Settings his program can be used to design 2 fe ultiple Feedback and Sallen Key 7 a a ote MI Seed 10 0k Ohm ow pass active fiters The default type is _ Filter LII Response H u L FB Press the radio button ta change the Bessel Ere 100k Hz Butterworth Optional Entry LI ircuit type E See Texas Instruments Application Bulletin 4 5 SBFAOC for details PP
7. 21 Figure 20 PicBasic Pro la CodeDesigner Lite C CDLite CJN Football Code pbp File Edit Compile Programmer Options Window Help 15I XI dA A E SE p Pce v Biles 2 PicBasic Pro program to log result of 7 channel 8 bit A D conversion to SRAM Connect analog input to 0 1 2 4 5 6 7 Figure 21 __ capture Define ONINT USED to allow use of the boot loader of CodeDesigner Lite A This will not affect normal program operation 1 programming environment DEFINE ADC BITG used with PicBasic Pro Set number of bits in result DEFINE CLOCK 3 Set clock source 3 rc DEFINE ADC SAHPLEUS 50 Set sampling time in uS Define Clock Speed DEFINE OSC 20 define the serial transmit pin to PortC bit 6 DEFINE DEBUG REG PORTC mese DEBUG Define haud rate fnr serial Upon writing the code PicBasic the Code was compiled into hex and asm files that could be used by a programmer to install the software on to the Pic Microcontroller The programmer that was used was the EPIC Programmer see below in Figure 22 by microEngineering Labs Inc Figure 22 The pocket sized EPIC Plus Programmer quickly and easily programs most PICmicro microcontrollers The basic programmer includes an 18 pin socket for programming 8 14 and 18 pin PICmicro MCUs The connection for ICSP is circled in red i Ppl
8. LED pin create memloop to store of address I I e e e I e dd ed OFF OF OG OF OF OD OF OD OD OD OP OP OP OD I I I ed I I I I I I ed PDO OG OFF OG OF OF OF OD OP PP Pd ed ed ed ed ed ed Od Fd Fe dd Fd Fd Fd Fd ed ed dF Fd ed Fd Fd Fd ed ed m m m Fd dd ed Fd Fd Fd ed ed ed Fd Fd ed OG OFF OG OF OF OD OP PP ed ed ed ed ed ed ed Cd Fd Od Fd Fd Fd Fd Fd ed dd Fd Fd ed Fd Fd Fd dd Fd Fd Fd Fe dd Fd Fd Fd Fd Fd ed ed ed Fd Fd TRISB O 0 TRISB 1 0 TRISB 2 0 TRISB 4 0 ADCONI 00000010 High REDLED Pause 1000 High GREENLED Pause 1000 Low REDLED Pause 1000 set CS4 to output Set CS3 to output Set CS2 to output Set CS1 to output Wait 1 second Set PORTA analog led turns red led turns amber Wait 1 second led turns green Wait 1 second Debug DATA COLLECTION BEGINNING 10 13 GoSub AccelData GoSub OvrSmplX ms i GoSub eewritel GoSub eewrite3 dumY 1 I dumY2 adY2 For addr 1 TO memloop Loop memloops times Pause 2 GoSub AccelData GoSub OvrSmplY GoSub eewrite2 Write to SEEPROMs GoSub eewrite4 Write to SEEPROMs dumX adX1 dumX2 adX2 Pause 2 Delay 2ms GoSub AccelData Read Accelerometers GoSu
9. crossed traces and misplaced traces All these were fixed after the fact with a razor blade and fine wire I couldn t find any more mistakes on the memory area of the PCB but that didn t convince me that there wasn t one e The code required to manipulate Port D was complicated e Because surface mount components were chosen for this design the questionable part of the circuit could not be taken off the PCB and tested on a breadboard to aid diagnosis 10 My lack of experience reading data sheets resulted in my running the clock pins to the flip flop chips and the SRAM chip reverse possibly damaging the chips The clock pin was active low which means that it 1s held high normally and then pulled low to make something happen I had been driving it as if it were active high 1442 152 6 Figure 6 Front of for Plan showing major components hey S 25154541173 Figure 7 Rear of PCB Plan showing major components 11 ANALOG FOOTBALL FLIGHT DATA RECORDER NV MECHANICAL ENGINEERING MASTERS PROJECT SUNY AT BUFFALO QJN 11702 REV B MANUAL TRIGGER cil TY TY A l I lv i 18 CC 2 NS 21811 vij 2 E Ehe HE ume Srey Power Su A gt C gt Y Figure 8 Layout This design was created with software downl
10. the size of a pinhead They have developed complex manipulators capable of grasping a single red blood cell and demonstrated prototype micromachines ranging from gear trains to microscopic steam engines notions once reserved for science 2 fiction writers TOP VIEW TETHER PROOF MASS AP FLIED BEAK ACCELERATION Figure I The basic theory on how a differential capacitor 15 used to measure acceleration Bl ANCHOR FIXED PLATES RESPONDING TO AN APPLIED ACCELERATION SENSOR AT REST MOVEMENT SHOWN 5 GREATLY Surface micromachining builds layers of material on top of a silicon wafer and then selectively etches material away to make sensor structures as opposed to machining material out of the wafer itself Figure 2 H Diffusion Fazavation Didectric Because it is easy to electrically isolate the different structural components most implementations use a capacitive sensing technique to measure the movement of the mass due to acceleration This is a significant advantage as the capacitors drift little over M 6 temperature and therefore temperature compensation circuitry 1s minimal Analog Devices uses an integrated approach that combines the sensor and the electronics on a single chip They call this process is called or integrated MEMS to highlight the more integrated nature of this approach The advantages of the surface approach are versatility in design t
11. 5 TRISD 11111111 Set PORTD to all input Peek PORTD scratch 5 Debug 16 add16 9 RAM HI jaddhigh 9 RAM LOW addlow 9 DATA scratch 10 13 PauseUs 5 TRISD 9500000000 Set PORTD to all output Next AddLow Next AddHigh Next Addl6 triggeron 1 Then WriteLoop GoTo ReadLoop endless read loop if no trigger detected WriteLoop Debug TRIGGER CONDITION WAS MET 10 13 Debug DATA SAVED TO RAM 10 13 Debug TRIGGER MEMORY ADDRESS IS BIN trig16 9 BIN trighigh 9 BIN triglow 10 13 Blinker For scratch 1 TO 20 Low GreenLED temporary blinker to indicate program finished High RedLED Pause 500 Low RedLED Pause 500 Next Scratch End Subroutines AccelData ADCIN 0 advalX1 Read channel 0 to adval ADCIN 1 advalY1 Read channel 1 to adval ee AccelTrigger IF advalY3 gt t ADCIN 2 advalY2 ADCIN 4 advalX3 ADCIN 5 advalY3 ADCIN 6 advalX4 ADCIN 7 advalY4 Return Read channel 2 to adval Read channel 4 to adval Read channel 5 to adval Read channel 6 to adval Read channel 7 to adval rigValu Then triggeron 1 triglow addlow trighigh addhigh trigl6 addl6 Return _ 54 Code was never written 55 Plan 1 PicBasic Pro program to log result of 4 channel 8 bit A D conversion to SRAM Connect analog input to ANO 1 2 3 Define ONINT USED to allow use
12. 50 10k Resistor 5 20 1 CustomPcB 1550 1550 ees eee Total Lee se 1 1 2 _6_ _9 13 18 _ 41 Parts List Plan C 0 022 uF Capacitor Ceramic TO 220 8 pin LM358 Op Amp SOIC 0 50 1 00 Bi Color LED 16 17 18 19 0 2 OQutomPCB 2067 20 67 1 1 10 positiondip swith _ 079 5079 SPDTslideswth 115 115 battery _ X 3 65 730 24 2 1 8 phono jack female cable 258 5 16 uj Total 242010 Lee ma N 6 2 4 2 _17_ 19 _21_ NIN sd Appendix Data Sheets Microchip 16F876 16F877 http www microchip com download lit pline picmicro families 16187x 30292c pdf 16C717 http www microchip com download lit pline picmicro families 16c71x 41 120b pdf Atmel AT25640 EEPROM http www atmel com dyn resources prod documents doc0675 pdf Cypress SRAM http rocky digikey com WebLib Cypress Web 20Data CY 62128BLL pdf Texas Instruments Flip Flop http www s ti com sc psheets scls148e scls148e pdf Analog Devices Accelerometer ADXL202 210 http www analog com UploadedFiles Datasheets 70885338ADXL202 10 b pdf Accelerometer ADXL250 http www analog com UploadedFiles Datasheets 573918736ADXL150_250_0 pdf National Semiconductor Dual Op Amp http www national com ds LM LM158 pdf Voltage Regulator http www natio
13. D will Flash red to signal that data 1s available for download on a PC with Microsoft Windows 95 or better start HyperTerminal Unzip and open the football Connect the Data Cable to Connector 1 inside the football Set up a connection to Com x whatever port the cable is connected to Setting are as shown below COM Properties Port Settings Bits per second 9600 v Data bits B Parity Noe Stop bits 1 w Flow control Hardware Restore Defaults 12 13 14 I5 In the Transfer pull down select capture text amp 1 HyperTerminal Eu Help Send File _ Receive File Capture Text Send Text File Capture to Printer Enter a file name When all data 15 captured close HyperTerminal Open the Data File in a Spreadsheet and view and or graph data _ 48 Appendix Microcontroller Code Plan A PicBasic Pro program to log result of 7 channel 8 bit A D conversion to SRAM Connect analog input to 1 2 4 5 6 7 Define ONINT USED to allow use of the boot loader This will not affect normal program operation DEFINE ONINT USED 1 Define ADCIN parameters DEFINE ADC BITS 8 set number of bits in result DEFINE ADC CLOCK 3 set clock source 3 rc DEFINE ADC SAMPLEUS 50 set sampling time in uS Define Clock Speed DEFINE OSC 20 define the serial transmit pin to Po
14. FLIGHT DATA RECORDER FOR THE AMERICAN FOOTBALL By Chris J Nowak A project submitted to the Faculty of the Graduate School of otate University of New York at Buffalo in partial fulfillment of the requirements for the degree of Master of Engineering May 25 2003 Table of Contents 1 Abstract 2 Background 3 Technical Background Plan Implementation 4 Data 5 Discussion 6 Conclusions and Recommendations 7 Endnotes 8 References 9 Acknowledgements 10 Appendices Appendix A Parts List Appendix B Data Sheets Appendix C Schematics Appendix D Operating Instructions Appendix E Microcontroller Source Code 10 27 35 36 37 38 39 40 43 44 47 49 Abstract American Football is a game enjoyed both by participants and spectators young and old The game 15 played on a field 100 yards long by 30 yards wide with an inflatable ball that is somewhat oval in shape with a point on each end When properly thrown the ball spins as it travels not unlike a bullet fired from a rifled gun barrel As the ball flies along its trajectory its spin begins to degrade and it exhibits a wobble It s also been observed that the ball follows a curved path to its target as opposed to a simple ballistic trajectory The goal of this project is to develop an electronic data collection system that can be mounted inside a football to measure store and download several seconds of accelerati
15. MSBPRE B2 Read data CS3 1 Disable 259 Return eeread4 CS4 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE B3 Read data CS4 1 Disable Return Subroutine to write data at addr in serial EEPROM eewrite 51 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS1 1 Disable to execute command CS1 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 adx1 Send address and data 51 1 Disable eewrite2 CS2 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS2 Disable to execute command CS2 0 Enable ShiftOut SI MSBFIRST 02 addr bytel addr byteO ady1 Send address and data CS2 1 Disable eewrite3 CS3 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS3 1 Disable to execute command CS3 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 adx2 Send address and data CS3 Disable eewrite4 CS4 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS4 I Disable to execute command CS4 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 ady2 Send address and data CS4 1 Disable Return 60 Subroutine to read accelerometer data into microprocessor AccelData ADCI
16. N 0 adX1 Read channel 0 to adx ADCIN 1 adY1 Read channel 1 to adyl ADCIN 2 ad X2 Read channel 2 to adx2 ADCIN 3 adY2 Read channel 3 to ady2 Return OvrSmplX adX1 dumX1 2 adX2 adX2 dumX2 2 Return OvrSmplY adY1 1 dumY1 2 adY2 adY2 dumY2 2 Return End Plan 2 PicBasic Pro program to log result of 4 channel 8 bit A D conversion to SRAM Connect analog input to ANO 1 2 3 Define ONINT USED to allow use of the boot loader This will not affect normal program operation DEFINE ONINT USED 1 DEFINE OSC 20 define the serial transmit pin to PortC bit 6 DEFINE DEBUG REG PORTC DEFINE DEBUG BIT 6 Define baud rate for serial debug DEFINE DEBUG BAUD 9600 Define serial debug mode for inverted DEFINE DEBUG MODE 1 Define ADCIN parameters DEFINE ADC BITS 8 set number of bits in result DEFINE ADC CLOCK 3 set clock source 3 rc DEFINE ADC SAMPLEUS 50 Set sampling time in uS INCLUDE modedefs bas CSI VAR 4 Chip select pin CS2 VAR PORTB 2 Chip select pin CS3 VAR 1 Chip select pin CS4 VAR PORTB 0 Chip select pin SCK VAR PORTC 3 Clock pin SI VAR PORTC 4 Data pin SO VAR PORTC 5 Data out pin addr VAR WORD Address BO VAR BYTE Data 81 VAR BYTE Data B2 VAR BYTE Data B3 VAR BYTE Data VAR BYTE Create adval to store result of ANO adY 1 VAR BYTE Cre
17. PORTA analog led turns red led turns amber Wait 1 second led turns green Wait 1 second Debug DATA COLLECTION BEGINNING 10 13 GoSub AccelData GoSub OvrSmplX 63 GoSub eewritel GoSub eewrite3 dumY 1 I dumY2 adY2 For addr 1 TO memloop Loop memloops times Pause 2 GoSub AccelData GoSub OvrSmplY GoSub eewrite2 Write to SEEPROMs GoSub eewrite4 Write to SEEPROMs dumX adX1 dumX2 adX2 Pause 2 Delay 2ms GoSub AccelData Read Accelerometers GoSub OvrSmplX GoSub eewritel Write to SEEPROMs GoSub eewrite3 Write to SEEPROMs dumY 1 adY1 dumY2 adY2 Next addr Low GREENLED High REDLED Debug DATA COLLECTION OVER 10 13 Pause 1000 Wait 1 second Debug DATA DUMP BEGINNING 10 13 PDO OG OFF OG OF OF OD OD PP Pd ed I dd Fd Od Fd Fd Fd Fd Fd ed Fd Fd I Fd Od Fd dd ed Fd Fd Fd ed ed ed Fd ed ed loop Debug Address 9 Z1 9 X2 9 Y2 13 64 For addr 0 TO memloop Loop memloop times GoSub eeread 1 Read from SEEPROM 1 GoSub eeread2 Read from SEEPROM 2 GoSub eeread3 Read from SEEPROM 3 GoSub eeread4 Read from SEEPROM 4 Debug DEC addr 9 DEC B0 9 DEC B2 9 DEC B3 13 Low REDLED Pause 50 High REDLED Next addr High GREENLED Debug DATA DUMP OVER 10 13 Pause 5000 Low GreenLED GoTo loop Subroutines to read data from addr in serial EEPROM eeread 1 CS1 0 Enable serial EEPROM ShiftOut SI SCK
18. Port D to low byte of Low ClkHiReg Send nothing to add hi High ClkLowReg enable low register to PauseUs 5 DELAY FOR 5 uS Low ClkLowReg lock address low byte Poke PORTD AddHigh Port D to high byte High ClkHiReg enable high register to PauseUs 5 DELAY FOR 5 uS Low ClkHiReg address in high IF Addl6 1 Then High 0 set ram A16 to PauseUs 5 FOR 5 uS NES High WriteRAM enable writing to memory address GoSub AccelData triggeron 1 Then GoTo skiptrigger GoSub AccelTrigger SkipTrigger Poke PORTD addlow write mem address low to memory address accdata 1 Then Poke PORTD advalY 1 write accel yl to memory address accdata 2 Then Poke PORTD advalY2 write accel y2 to memory address accdata 3 Then Poke PORTD advalX3 write accel x3 to memory address accdata 4 Then Poke PORTD advalY3 write accel y3 to memory address accdata 5 Then Poke PORTD advalX4 write accel x4 to memory address accdata 6 Then Poke PORTD advalY4 write accel y4 to memory address accdata 7 Then Poke PORTD 00000000 write zeros to memory address Debug DEC advalx1 9 DEC advaly1 9 DEC advaly2 9 _ advalx3 9 DEC advaly3 9 DEC advalx4 9 DEC advaly4 9 DEC addhigh 9 DEC addlow 10 13 send accelerometer data to hyperterminal PauseUs 5 DELAY FOR 5 uS accdata accdata 1 Low WriteRAM lock in data to memory address PauseUs
19. Sundaram Their idea of mounting a single tri axial accelerometer in the center of a football was a good one however there were flaws in the design mostly revolving around technology available and selection of components My first idea was to do away with the accelerometer at the centroid of the ball and instead mount accelerometers a radially around the circumference of the ball as well as at the points The electronics would be laid out not on a circuit board per se but instead on a flex circuit of Kynar film with copper traces This would then be held 1n place between the ball s bladder and outer shell In researching available accelerometers 1t was decided early on that an integrated circuit or chip style package was desirable for purposes of both cost and of ease of integration Because it could be mounted directly on a printed circuit board or flex circuit it eliminated excess cables connectors and bracketry that would otherwise be required Analog Devices manufactured the least expensive accelerometers I found that would suit my needs They were available in single and dual axis configurations and in varying sensitivities The orientation for the sensing elements for these was 1n the X or X Y axis on the plane of the chip Motorola had similar form factor accelerometers and also made a single axis accelerometer that was sensitive normal to the chip Details of how these accelerometers function was presented in an earlier section of t
20. a much more substantial learning experience that I originally thought it would be The data recorder that I designed served its purpose however it if far from being optimized If I were to continue development the next iteration would see the following improvements e optimized power source the 9v batteries work well but they are big and heavy e Instead of through hole resistors and capacitors I d switch to surface mountable chip versions e Surface mount IC s for the Pic and EEPROMS Anadditional EEPROM per channel which would allow 400 samples per second to be recorded Wireless serial communication for transmitting the data from memory to a PC for analysis either with an infrared link or RF communication e Better integration into the ball itself with the switches and download ports if necessary available on the exterior of the ball More development of a trigger algorithm that would allow for an indefinite window for data capture e Acustom downloading application that will have 2 way communication with the ball to start the download only when it 1s ready to receive the data e Scale the accelerometers to increase resolution e Diagnose and repair the intermittent data collection problem The design being what it was I feel that it was a good solid foundation on which to build a football analysis simulation system The goal of this project was to capture 3 axis of acceleration at the centroid of the ball as well as atte
21. acteristics could be discerned and differentiated from good characteristics the good characteristics being a fast tight spiral with little wobble Seen below in Figure 33 is what is usually referred to as an over end or tumbling pass which is a result of little if any roll and excessive yawing and or pitching End Over End Pass Accelerometers 2 amp 3 150 I 140 130 I A 5 120 Ny 1 wv 110 gt lt 100 90 0 100 200 300 400 500 600 2 Y2 X3 Time 1 200 second Figure 33 20 Yard Dropped Tumbling Pass 23 This pass initiated be holding the ball at its point and flipping it high into the air with an underhand toss An effort was made to impart as little roll on the ball as possible It can be seen that Y2 X3 and Y3 have and oscillatory behavior but of small magnitude The data of X2 however shows that same sort of characteristics that was seen in the previous examples that being that large change in acceleration gradually decaying back nearing to the quiescent value NC MS Discussion The data presented in the previous section focused primarily on the recordings of the accelerometers located at the periphery of the ball and paid little attention to the accelerometer at the centroid The reasons for this are two fold 1 The accelerations at the centroi
22. age output of the ADXL250 accelerometer which 15 equivalent to 2 5 volts There 15 some variation between the 4 accelerometers and thus the test data seen in the following figures shows the accelerometers either under 1 0 or 1 g s of acceleration depending on the orientation of the ball Figure 27 is a graph showing all seven channels of recorded data and 28 30 19 the same data shown per accelerometer The data received for channel Z1 fluctuates rapidly between 128 and 129 when sitting at Og Once the accelerometer has been exposed to accelerations under a power on this appears to subside The other channel of the physical accelerometer chip that Z1 is a part of is not relevant as it is redundant with Y 1 but it does not exhibit this behavior 28 Calibration Rolls 132 1 1 I 5 128 124 5 gt 2 122 9 120 JP Laces Up LED Front Roll 90 About X Axis Laces Up LED Front Roo About YAN 4 4 1 0 500 1000 1500 2000 Sample 1 200 Z1 X3 Y3 X1 Y1 X2 Y2 Figure 27 Baseline Data For AII Accelerometers Accelerometer 1 Calibration 132 130 c 2 c 128 9 o 126 lt 124 122 0 500 1000 1500 2000 Z1 X1 Y1 Time 1 200 second Figure 28 Baseline Data For Accelerometer 1 29 Accelerometer 2 Calibration
23. ate adval to store result of ANI adX2 VAR BYTE Create adval to store result of AN2 NUR adY2 dumX 1 dumY 1 dumX2 dumY2 VAR VAR VAR VAR VAR REDLED VAR GREENLED VAR memloop VAR fU UJ I OS OS fU UJ I OS OY fJ UJ OS OS OY BYTE BYTE BYTE BYTE BYTE PORTC 0 PORTC 1 WORD Create adval to store result of AN3 Create adval to store adX1 Create adval to store adY 1 Create adval to store ad X2 Create adval to store ad Y2 Red LED pin Green LED pin create memloop to store of address I I e e e I e dd ed OFF OF OG OF OF OD OF OD OD OD OP OP OP OD I I I ed I I I I I I ed PDO OG OFF OG OF OF OF OD OP PP Pd ed ed ed ed ed ed Od Fd Fe dd Fd Fd Fd Fd ed ed dF Fd ed Fd Fd Fd ed ed m m m Fd dd ed Fd Fd Fd ed ed ed Fd Fd ed OG OFF OG OF OF OD OP PP ed ed ed ed ed ed ed Cd Fd Od Fd Fd Fd Fd Fd ed dd Fd Fd ed Fd Fd Fd dd Fd Fd Fd Fe dd Fd Fd Fd Fd Fd ed ed ed Fd Fd TRISB O 0 TRISB 1 0 TRISB 2 0 TRISB 4 0 ADCONI 00000010 High REDLED Pause 1000 High GREENLED Pause 1000 Low REDLED Pause 1000 set CS4 to output Set CS3 to output Set CS2 to output Set CS1 to output Wait 1 second Set
24. b OvrSmplX GoSub eewritel Write to SEEPROMs GoSub eewrite3 Write to SEEPROMs dumY 1 adY1 dumY2 adY2 Next addr Low GREENLED High REDLED Debug DATA COLLECTION OVER 10 13 Pause 1000 Wait 1 second Debug DATA DUMP BEGINNING 10 13 PDO OG OFF OF OF OF OF OP PP I I Od ed I Fd ed Fd ed ed Od Fe dF Fd Fd Fd ed ed Fd Fd Fd dd Fd Fd Fd ed ed Fd Cd Fd Fd Fd ed Fd Fd Fd Fd Fd Fd ed Fd ed loop Debug Address 9 9 Y1 9 X2 9 Y2 3 9022 For addr 0 TO memloop Loop memloop times GoSub eeread 1 Read from SEEPROM 1 GoSub eeread2 Read from SEEPROM 2 GoSub eeread3 Read from SEEPROM 3 GoSub eeread4 Read from SEEPROM 4 Debug DEC addr 9 DEC B0 9 DEC 81 9 DEC 82 9 DEC 83 13 Low REDLED Pause 50 High REDLED Next addr High GREENLED Debug DATA DUMP OVER 10 13 Pause 5000 Low GreenLED GoTo loop Subroutines to read data from addr in serial EEPROM eeread 1 CS1 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE BO Read data 51 1 Disable Return eeread2 CS2 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address shiftin SO SCK MSBPRE B1 Read data CS2 Disable Return eeread3 CS3 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 03 addr bytel addr byte0 Send read command and address ShiftIn SO SCK
25. cording time envelope The code for each of the two boards in the football 1 virtually identical and the exact same code could be used The only differences between the two versions are in the interface with HyperTerminal This stems from the fact that although the 4 channels of acceleration data available on the secondary board only three are useful When the primary board downloads it streams out via a serial cable the following information 1 Start of data recording 2 Endof data recording 3 Beginning of data dump 4 Data in tab delimited columns a Memory Address b Acceleration X1 om Acceleration 1 d Acceleration X2 e Acceleration Y2 5 Endof data dump go to step 3 and loop indefinitely The secondary board works the same except for step 4 which downloads the following a Memory Address b Acceleration 71 actually the X channel of accelerometer U3 Acceleration X3 s Acceleration The code for the football was written PicBasic Pro which is compiler based on the BASIC computer language and very similar to the code used to program the Parallax family of Basic Stamps The user s manual and disk can be seen to the left in Figure 20 The final code for each of the 2 PCBs as well as for some of prior design iterations in the football can be found in Appendix E The actual coding is done in a program called CodeDesigner Lite or CD Lite A screenshot of CD Lite can be seen below in Figure
26. d are relatively small when compared to the values of the other 2 accelerometers 2 The PCB that records X1 Y1 X2 and Y2 seems to have an intermittent problem that I m unable to fully diagnose To elaborate on the second point the electronics seem to function perfectly while sitting on a workbench or collecting random data such as violently shaking the ball the impact between the ball and the ground some good data like the test data that was presented in Figure 28 page 30 the calibration roll test etc Where the problem seems to manifest itself is during an actual forward pass As you can see below in Figure 34 the data seems to collect without variation and then suddenly begins to respond Fortunately for the sake of this project the data that 1s invalid 1s of the least interest for the test performed but it is a problem that must be solved before the football flight data recorder can be declared complete My primary theory for the problem is that a soldered connection is losing contact somewhere when subjected to the sustained high G s imparted by a fast roll condition of the ball Data Collection Problem gt gt lt 118 0 100 200 300 700 800 900 1000 X1 Y1 X2 Y2 Time 1 200 second Figure 34 Data Recording Problem E Conclusions and Recommendations This project proved to be
27. d record data about some sort of event in a moving body is not new crash test dummies can have 30 or more accelerometers in them to measure forces on the different body parts 1n an automotive crash test There are products on the market available to race car owners that will monitor vehicle performance based on accelerations 1n each of the 3 principle axes Recent breakthroughs in accelerometer design have allowed accelerometers which were once fairly large high precision expensive instruments to become much smaller and less expensive The accelerometers chosen for this project are actually micro machined semiconductors in an integrated circuit package that be soldered directly onto a printed circuit board Some accelerometers also contain multiple axes of sensitivity as well as a broad range of acceleration sensing ability with their maximum range being as little as 1 or 2 G s up to the thousands of G s The accelerometers chosen for this project will be 50 G s sensitivity They are based on micromachining a differential capacitor into the actual die of the chip Figure 1 at the top of the next page shows the basic theory behind the accelerometer technology Micromachining or the manufacture of tiny moving mechanical structures 1 considered to be one of the most significant new technologies since genetic engineering Funded by governments universities and corporations worldwide researchers have actually built motors smaller than
28. ed A Nerf football was settled upon as a reasonable compromise After a failed search for an official size Nerf football a smaller football was chosen The football was sectioned into halves along the plane in the middle of the ball so that it would split into a laces half and a non laces half Additional material was then removed to create voids that then would accept the electronics batteries wires etc To return the ball into a single unit a variety of mechanisms were considered ranging from tape to Velcro to snaps The solution finally chosen was a zipper Since the current design mandated that the electronics be exposed for downloading data to a PC the zipper provided an ideal access control device The zipper was secured to the ball with cloth gaffer s tape and adhesive glue A LED from one of the PCB 1 poked through the ball to tell the user the status of the data recorder The electronics can be seen in the ball below in Figure 23 24 Figure 23 Electronics installed into the Nerf football Figure 24 Zipper closure The green arrow points out the status LED Data Data collection began with some bench testing of the PCBs individually The first test performed involved holding the boards and just shaking and wiggling them to induce some random accelerations A sample plot of the data can be seen below in Figure 25 Test data was also collected for the other PCB which looked similarly random At thi
29. find an exact match However I found one that was close but the programmer and compiler I was using was not compatible and an upgrade for those was prohibitively expensive 16 Plan was devised as a combination of the better design aspects of both Plan and Plan It was decided that rather than needing 4 separate self contained units a more integrated approach was attractive similar to Plan The design details from Plan B that were retained were the EEPROM memory with a separate chip for each channel of acceleration data and the idea of multiple microprocessors on multiple less complex identical PCBs Even Plan A was not truly a one PCB design as there was a small area of the main board that was cut out and turned 90 to the plane of the main PCB and reattached This was done so that an accelerometer that 1s only sensitive in the plane of the chip could be turned on end so that the chips Y axis would be the Z axis of the main board The can be seen below detailed in Figure 13 ATL Accelerometer at centroid of ball to measure data in the X Y plane HE Ser L TT B s zal i Yu x NE od Al j RIS 9 Accelerometer turned 90 to plane of main PCB to measure Z axis data at the centroid of the ball Figure13 Detail of modification to Plan A board to allow triaxial acceleration data to be captured at centroid of t
30. he ability to build a two axis sensor on a single chip and a built in capacitive sensing technique that is superior to the piezoresistive approach The disadvantage is that the sensor structures are much smaller and have lower mass Deflections of the structures are minute generating capacitive changes at the attofarad E level the ability of the electronics to sense these small changes sets the resolution limit of the device Figure 3 iMEMS Accelerometer showing structural beam and surrounding electronics Figure 3 above shows a photograph taken of an actual sensing element on an accelerometer and Figure 4 below shows the sensing elements in place on the die of the ADXL250 Figure 4 Sensing Elements pink areas in place on the die of the ADXL250 19 The Calspan Corporation now part of Veridian has used these small inexpensive accelerometers in systems that monitor driving behavior in automobiles as well as in systems designed to automatically detect if the vehicle has been in an accident and assistance is required Other uses for these small accelerometers include vibration measurement tilt sensing and also as a replacement for a shock switch which 1 a sensor that can determine if a package was handled roughly during shipping Technical Background Plan The plan for the design of the project began with the idea to expand and improve upon the project design of David Francis and Narayana
31. he ball qu To maintain the ability to capture triaxial data from the 5 centroid but to allow all the PCBs to identical and therefore requiring only a single board layout design a slotted board was designed that allowed 2 boards to nest together similar to a divider in packing container The board layout can be seen below in Figure 13 and photos of the boards both individually and also nested together can be seen in figures 15 18 on the following pages 950 0 pS per E I mm IC T L SI y SIOR gt He rel lo lo lo e aX I II qc eR Figurel4 PCB Layout for Plan C The Blue area with the holes in the middle right side of the board is material that would need to be removed after the boards were received In the notation in Figure 15 a vacant area is shown for an accelerometer The circuit is designed so that an accelerometer 15 placed in either the location denoted as vacant U13 or in the location at the middle of the left side of the board U4 but not both The data output pins for both locations are wired together and share common low pass filters for the X and Y accelerations before the signal 1s sent to the microprocessor for A D conversion and then on to the EEPROMS for storage These low pass filters were present in Plans A B and and will be detailed out a later section Acce
32. her by hot melt glue that had encapsulated some of the ze resistors and capacitors that would need to be replaced in order to change the filter s cutoff frequency and because of time and expense rebuilding the entire unit or trying to remove the glue was not an option The EEPROM chosen as the storage device was limited to performing a read or write action with a minimum of 5ms between each action This limits the EEPROM to recording 200 samples per second An additional EEPROM could be designed and have the data sent to alternating to get 400 data samples per second but again extensive hardware redesign was not an option What was decided on as a solution was to oversample the accelerometer or to take more samples than you record since the microprocessor was very capable of working faster and to average 2 consecutive samples from the accelerometer at 400 samples per second thus recording 200 samples per second The algorithm for this process was as follows 1 do A D conversion on x1 yl x2 and y2 save 1 and y2 each to a dummy variable do the A D conversion on x1 yl x2 and y2 VI yl stored y1 2 and y2 2 stored y2 2 save VI and y2 to memory 2 3 4 5 6 save XI and x2 each to a dummy variable 7 do A D conversion on x1 yl x2 and y2 XI xl stored x1 2 and x2 x2 stored x2 2 9 save xl and x2 to memory 10 go to step 2 and repeat for the duration of the data re
33. his report This idea was abandoned for a number of reasons such as expense of the manufacture of the flex circuit selection of accelerometers available cost of other electrical components and also of course my own ability to accomplish this task It was also decided that although this would be a very packageable solution the lack of sensors at the centroid would make the calculation of the ball s position with respect to the ground much more difficult as well as the need for at least some of the accelerometers to be sensitive 1n the normal direction It was decided that if accelerometers would be needed at the centroid then they could all be attached to 2 PCB s printed circuit boards and somehow suspended within the ball After consulting with an expert electrical design who had experience with the Analog Devices products and who volunteered to assist me in answering technical questions and offering advice the configuration of four bi axial accelerometers 8 was chosen Two accelerometers would be placed at the centroid to measure accelerations of the ball regardless of spin and wobble one at a point of the ball to capture and end over end rotations and one a distance off to the side of the ball to measure roll velocity The raw acceleration data would be processed by a low pass Butterworth multiple feedback MFB filter for the ADXL250 seen below in Figure 5 The filtered data will be read by one of two Microchip 16 876
34. l horizontal displacement The most noteworthy data in the above figure 15 the data from channel The roll condition is introduced after about 2 5 seconds of sampling had begun 50 200ths of a second as can be seen by the activity across all 4 displayed channels The X3 value shifts abruptly from 131 to 112 and then gradually up to about 116 before the ball was caught which 1s the event at about 225 on the time scale This 15 the centripetal acceleration induced by the rotation At 0 40 per acceleration unit this equated to an induced acceleration of 7 6 G s which degraded to 6 G s before the roll was stopped The offset from the axis of rotation 15 1 inch The rpm s of the ball can be calculated from this as follows gt 7 6 32 2 ft sec 2 244 72 ft sec 2 is the revolutions per second of the ball w is the angular velocity v 2 r and therefore v sqrt A r so that 15 64 in sec Since r 1 w v N w 2n therefore 15 64 6 28 2 49 RPS The ball rolled at 149 rpm Another noteworthy bit of data from the graph is the Y3 channel is the sinusoidal oscillation present That 15 an acceleration that 1s induced by the wobble of the ball as it spins which is an observed phenomenon present in actual football flight The next test to be preformed was an actual forward pass of the football The conditions were a pass of 25 yards thrown to the best of my quarterbacking abilities The bal
35. l was not caught and instead impacted the ground The data from Accelerometer 3 can be seen below in Figure 32 25 Yard Tight Spiral Pass Accelerometer 3 Data 150 140 130 BV 120 110 100 90 80 Acceleration Units 0 100 200 300 400 500 600 700 800 Time 1 200 second Figure 32 25 Yard Dropped Forward Pass 200 similar to the data seen the previously discussed roll condition test X3 Exhibits predictable behavior A sudden and abrupt change of the acceleration of X3 that gradually over time drifts back closer to it s quiescent value followed by a chaotic event and then some unpredictable oscillations After some interpretation what is visible is that at the point in time the ball is released a roll condition is initiated The angular velocity of the roll decreases over time as the ball flies to the target The oscillation in 1 again characteristic of the wobble of the pass as the desirable spiral condition of the forward pass was not ideal It can be seen in the Y3 data that the wobble changes over time as the roll speed is reduced The frequency 1 gradually decreasing and the amplitude 1 slightly increasing A longer pass thrown by a stronger individual ought to show continued loss spiral integrity as the ball fights aerodynamic forces The final test preformed was to see if undesirable pass char
36. lerometers at these locations are 18 used to measure the centripetal accelerations from the spinning and or tumbling ball to better formulate a complete picture of the ball s motion Vacant location for accelerometer mounting see text 1 pot pi E 1 1 _ _ 200000 o pE pz m uui a Figurel15 Assembled PCB Two almost identical units are required to record all the data inside the football 19 Figurel6 Two assembled PCBs nested together On Board 1 the accelerometer is placed in the U4 location which 1s nearest the point of the football and on board 2 the accelerometer is placed in the U13 location Figurel7 Alternate view of Board 1 and Board 2 nested together 20 df II Accelerometer at the U13 location Accelerometers at the U3 location forming the triaxial unit at the centroid of the ball Figurel8 Two assembled PCBs nested together The accelerometers at the U3 position of each PCB are 90 opposed to each other at the centroid of the ball The X axis of the accelerometer on board 2 15 recorded as the Z axis acceleration at the centroid Each channel of acceleration has a Multiple Feedback Butterworth style of filter in place to remove the high frequency components of the acceleration data freeware program called Filter Pro which is a low pass filter design program was downloaded from
37. m K CO 0932 2 EL M0MI0 531 37135 ON ro V E T A L SES LV 2 0432 Jnr LI Bec 1509 Ag y cSas wt Plan B 45 I JO I obey __ 002 61 144 00 1 J 44440544 9190 11941003 FE ANS AUBBU 1531 031 2 23 1a Test Header C V A 81990 _ 55 219 219 C V 91895 9319909 2 2 5 4 01 11981003 a COY 9 0932 1 je14es 108 LON 11089 rin XO YSHLIZ 39979 EIN ONY 108 303 1 0 97 09 Y TIIM 89 gs 052 A ola Eo do e 037 4o102 g 53 7422 0 IX gMS 3591 3195 Cae 9 0932 NONWO 531 4135 A CUY 9 0432 ENB A CI 5359751 C V E en e m 513 912 gt 034347173 v 53 14 03331773 1x 03431113 3591 3195 Cav 9 0932 9 isa sug 531 4135 C V EI L 4 COY 5 0932 ON eR PT TN 21 6 Plan 46 Appendix D Operating Instructions gt EE ow 242 22 27 Unzip football Slide power switch to ON I position LEDs will cycle red then amber then green While LED 1 green data 1s collecting LED will hold steady red at end of data collection LE
38. microprocessors which has 5 channels of built in A D Conversion each of which 1 responsible for 4 channels of acceleration 2 accelerometer chips Each channel of acceleration data will then be written to a 64k EEPROM electronically erasable programmable read only memory chip for storage To extract the data form the ball after the event a serial cable 15 plugged into the ball and the data 1s continuously looped and can be captured by a communications program such as Microsoft s HyperTerminal The data can be imported into a spreadsheet and analyzed further The plan in the previously described paragraphs 15 the third in a series of designs that was attempted for this project and the first one to actually succeed Plan A was a more elegant and ambitious design that involved a single PCB and a larger single microprocessor and conventional SRAM as found in a PC plan B involved 4 small self contained data acquisition units each of which was able to record 2 channels of acceleration to EEPROMS Details of the design and implementation problems of those designs will be addressed in a later section of this report Figure 5 Schematic of a Multiple Feedback Filter Implementation The electronics for Plan A can be seen on the following pages in Figures 6 9 with the major components labeled This plan was abandoned because I was never able to successfully read from and I m assuming also to write to the SRAM device
39. mpt to measure spin and wobble that are important contributors to a balls in flight characteristics I believe that all those goals were met This project taught me a great deal about integrating an electronic measurement system to capture real world events electronics in general microprocessors in particular and also and possibly most importantly that it is possible to look forward to and enjoy working on engineering problems 36 Endnotes 1 Accelerometer for Football Aerodynamics Study Francis David and Narayana Sundaram SUNY at Buffalo 2001 2 Analog Devices www analog com 3 ibid 4 ibid 5 ibid 6 ibid 7 ibid 8 ibid 9 ibid 10 ibid 11 ibid 12 Filter Pro Texas Instruments www ti com 13 MicroEngineering Labs www melabs com 14 ibid N References Accelerometer for Football Aerodynamics Study Francis David and Narayana Sundaram SUNY at Buffalo 2001 The Art of Electronics 2 Edition Horowicz Paul and Winfield Hill Cambridge University Press 1989 Reprinted 2001 http www analog com http www digikey com http www expresspcb com http http www melabs com http www ti com PicBasic Pro Compiler microEngineering Labs Inc 2002 Programming and Customizing PICmicro Microcontrollers ane Edition Predko Mike McGraw Hill 2001 _ 3 Acknowledgements The completion of this project would have been impossible without the input and guidance of the f
40. nal com ds LM LM7512C pdf _ 43 Appendix C Schematics izixav 091 11100 x 2 1 osL 091 ND La E C je 22 inigo Fr 091 091 15 7 Boer 22 Jugo 62 Plan 5 09 Gal gt EP 9CMM1 _ _ _ 100248 031 lt gt 22 I FA zr 20 11839124 2 1 ig TX 031914 N02 ex 1954 1904 94954994 45454 242215011124 0I25I I CCCI I059 260 44 Im IM 9391LV9 991LV9 2 118 IX Boer 22 W 5 eBeg 6282 52 1449 m UNE OOd INIW 11941003 o eijjng FE ANNS 370 187 495 9521 4521 Nid 05 4049433 Nid JS er 1 HOBd33 Nid 2 WDead33 AOS n1 Ind 191935 4399151 2 Nid 52 era 031 1 037 A 03331723 039314114 A382 6a V nce EN _ m 8399184 8 1 16 717 1250 F PED AJS A 03031713 C V 15 pup 9 ose 2 7 nv 3 f 865 1 92 213 tJ 459 3195 ot
41. oaded from ExpressPCB com who was the manufacturer of the PCB This software both allows you to lay out the traces and components on the PCB and also automatically transfers the information over the internet to the manufacturing facility The printed bare boards arrived 3 business days later NC Figure 9 Front and back of PCB as received from ExpressPCB com a i d GEER ws REFNO 11 13 Figure 10 Assembled electronics shown in football shaped enclosure 14 The design cycle for Plan was much shorter than that of Plan A since there were fewer learning curves involved A smaller microprocessor was chosen as well as for the memory unit instead of the SRAM The schematic for the Plan B design can be found in Appendix C In a trade off for speed as Plan A was expected to record 1000 samples per second per acceleration channel the could only record 200 but the advantage being in the simplicity of the interface The data 1s written to and read from them via a SPI serial interface which 1s a much less complex procedure from both hardware and software standpoints The board layout for Plan B can be seen below Figure 11 A photo of the assembled 2 channel board can be seen on the following page in Figure 12 Ht ede Dla 5405 al 5 Pe C L SS 9
42. of the boot loader This will not affect normal program operation ONINT USED 1 DEFINE DEFINE OSC 20 define the serial transmit pin to PortC bit 6 DEFINE DEBUG REG PORTC DEFINE DEBUG BIT 6 Define baud rate for serial debug DEFINE DEBUG BAUD 9600 Define serial debug mode for inverted DEFINE DEBUG MODE 1 Define ADCIN parameters DEFINE ADC BITS 8 DEFINE ADC_CLOCK DEFINE ADC SAMPLEUS 50 INCLUDE modedefs bas 51 CS2 CS3 54 1 adY 1 ad 2 VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR set number of bits in result 3 set clock source 3 rc set sampling time in uS PORTB 4 Chip select pin PORTB 2 Chip select pin PORTB 1 Chip select pin PORTB 0 Chip select pin PORTC 3 Clock pin 4 Data 1n pin PORTC 5 Data out pin WORD Address BYTE Data BYTE Data BYTE Data BYTE Data BYTE Create adval to store result of ANO BYTE Create adval to store result of ANI BYTE Create adval to store result of AN2 adY2 dumX 1 dumY 1 dumX2 dumY2 VAR VAR VAR VAR VAR REDLED VAR GREENLED VAR memloop VAR fU UJ I OS OS fU UJ I OS OY fJ UJ OS OS OY BYTE BYTE BYTE BYTE BYTE PORTC 0 PORTC 1 WORD Create adval to store result of AN3 Create adval to store adX1 Create adval to store adY 1 Create adval to store ad X2 Create adval to store ad Y2 Red LED pin Green
43. ollowing individuals and or institutions in alphabetical order Mr Daniel P Fuglewicz Mr James Hussar e Dr Venkat Krovi e Dr William Rae e Mr David G Schabel e Veridian Engineering The all have my utmost thanks and appreciation for their advice moral support understanding and any other burdens which I bestowed upon them _ 39 Appendix Parts Lists Parts List Plan A 2 2 J22pFCapacior Ceramic i leads 0 07 0 14 8 0 0224 Capacitor Ceramic 4 8 _0 033uF Capacitor Ceramic leads 048 144 5 1 47 uF Capacitor Electrolytic 1 leads 2 85 2 85 2 ADXL250JQC Accelerometer 14 17 00 34 00 1 LM7805VoltageRegultor TO 220 048 0 48 8 pin LM358 Op Amp m 0 50 0 50 9 084 084 10 2 ADXL210JQC Accelerometer 14 17 00 34 00 44 pin PIC16C877 Microprocessor 18 99 18 99 11 13 1 Pushbutton Switch NO 100 100 1 I 50 3 49 18 6 7 fOkResito5 1 4 watt_ 006 5034 19 1 500 5 14 0 06 5006 Fire S494 21 1 OCutomPCB 7 152 00 15200 Total 1 st 06 40 Parts List Plan B 0 022 uF Capacitor Ceramic 8 pin LM358 Op Amp SOIC 0 50 0 50 8 pin AT25320 Serial EEPROM SOIC 3 21 6 42 18 pin PIC16C717 Microprocessor SOIC 2 50 2
44. on data that are sampled while the ball 15 in play The data recorders that I will design will each be a small self contained unit with 2 dual axis accelerometers microprocessor and 4 memory devices The entire project will require 2 of these devices to monitor accelerations in different areas within the football The electronics are all mounted on professionally printed circuit boards powered by a battery and containing enough electronic memory to store the data A total of seven channels of acceleration data will be recorded at a rate of 200 samples per second Data will be continually stored for at least 10 seconds from the point that the recording 1s initiated The ball used for this project will have the familiar shape and appearance of a football but will be constructed of foam rubber a Nerf football and a zipper for ease of access to the electronics for service repair battery replacement or future system upgrades Efforts will be made to keep the weight of the unit within 2 ounces of regulation and that the ball will be approximately balanced Background This project follows the research done in 2001 for SUNY at Buffalo by David Francis and Narayana Sundaram about mounting an accelerometer inside a football They proceeded to mount a singe tri axial accelerometer at the center of the ball and broadcast data from this accelerometer while in flight to a receiver connected to a desktop PC Using accelerometers to measure an
45. rtC bit 6 DEFINE DEBUG REG PORTC DEFINE DEBUG BIT 6 Define baud rate for serial debug DEFINE DEBUG BAUD 9600 Define serial debug mode for inverted DEFINE DEBUG MODE 1 advalX VAR WORD Create adval to store result of ANO advalY1 VAR WORD Create adval to store result of ANI advalY2 VAR WORD Create adval to store result of AN2 advalX3 VAR WORD Create adval to store result of ANA advalY3 VAR WORD Create adval to store result of AN5 advalX4 VAR WORD Create adval to store result of AN6 advalY4 VAR WORD Create adval to store result of AN7 accdata VAR BYTE create accdata to count which accel channel to write to memory addlow VAR BYTE create addlow to generate low byte of sram address addhigh VAR BYTE create addhigh to generate high byte of sram address add16 VAR BIT create addlow to generate 16 of sram address triglow VAR BYTE create triglow to store low byte of trigger address trighigh VAR BYTE create trighigh to store high byte of trigger address 49 71916 address triggeron scratch CIkLowReg CIKHiReg GreenLED RedLED both on WriteRAM ReadRAM VAR BIT create trig16 to store A16 value of trigger VAR BIT create triggeron to indicate trigger status VAR BYTE dummy variable for misc VAR 4 rename clock pin on low register VAR 5 VAR PORTB 2 VAR PORTB I VAR 2 VAR PORTC 1 rename clock pin on high register Tename pine to control green led Tename pin
46. s time the programming on the 2 boards was identical and as such both boards had channels X2 and Y2 Preliminary Test Data 140 135 i 5 190 Agi C I IM IV 9 125 di L I 120 lt 115 110 0 100 200 300 400 500 X1 Y1 X2 Y2 Data Sample Figure 25 Preliminary Test Data The coordinate system for the football was defined as seen on the following page in Figure 26 After reprogramming the boards to work together the seven channels of data to be collected were labeled X1 Y1 X2 and Y2 for the 4 channels available on the board in the X Y Plane of the ball and Z1 and for the board in the Y Z Plane 01 the ball X1 Y1 and Z1 are nearest the centroid of the ball which will be dubbed Accelerometer 1 from now on X2 and Y2 are at the forward point of the ball which will be dubbed Accelerometer 2 and X3 and Y3 are offset from the centroid of the ball along Yb which will be dubbed Accelerometer 3 a Figure 26 Axis Definitions The next step in data collection was to take some baseline data to determine calibration points for the various accelerometers Nominally at 00 each accelerometer would register 128 in what I m calling acceleration units but 15 actually the raw value stored as part of the 8 bit analog to digital conversion of the volt
47. schematic which can be seen in Appendix C called for port D of the microprocessor to have 3 separate functions 1 To send the high byte of the memory address a 17 bit number to one of the flip flop chips 2 To send the low byte of the memory address to the other flip flop chip 3 To send receive the data to from the SRAM chip A flip flop is actually a bistable multivibrator which is also a type of memory device In this case it s used to remember what either the high or low byte of the memory address 1s It had 8 input and 8 output pins as well as a clock pin When the clock pin 1s manipulated it will latch the output pins to match the input pins Each of these functions was controlled in software by enabling a clock pin on each of the chips flip flop 1 flip flop 2 and SRAM at the right time to determine which chip was receiving the data across the microprocessor s Port D This process was further complicated by having to toggle the pins between being output pins for generating the address and writing to memory to input pins for reading from memory I was never able to identify cause of the problem in either hardware of software The decision was made to abandon this approach and attempt a more brute force approach to solve the problem The factors influencing that decision are as follows e This was my first ever attempt at designing a PCB and no less than 12 mistakes were identified in the board layout including missing traces
48. to control red led LED 1 amber when red and green are write enable for SRAM object enable for SRAM K K K K K K K K K K K K K K K K K K K TrigValu CON 245 set trigger here for K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K TRISA 11111111 Set PORTA to all input TRISE 9611111111 Set PORTE to all input TRISD 9500000000 Set PORTD to all output 09000009909 099909000099909009199009090099090 09099999909 ADCONI 0 Set PORTA and PORTE analog and right justify result 999999999992092299999299299999999209999999929929999992099999 accdata 0 Low High GreenLED Low PORTC 0 triggeron 0 Readloop For Addl6 Set initial state of accdata turn off red LED on PORTB 1 Turn on Green LED connected to PORTB 2 set ram al6 to zero 1 For AddHigh 0 TO 255 sz Then High RedLED and the next line ensure that no wraparound in the buffer Then Low RedLED channel to write to memory SRAM low address register recieve in low register of address recieve byte of register For AddLow 0 TO 255 IF addlow 191 AND addhigh 99 AND add16 1 turns LED amber this the entireevent require IF addlow 255 AND addhigh 255 AND addl6 turns LED Green IF accdata 9 Then accdata 0 tracks which Low PORTC 0 set A16 of Poke PORTD AddLow Set
49. ute command CS3 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 adx2 Send address and data CS3 Disable eewrite4 CS4 0 Enable serial EEPROM ShiftOut SI SCK MSBFIRST 06 Send write enable command CS4 I Disable to execute command CS4 0 Enable ShiftOut SI SCK MSBFIRST 02 addr bytel addr byte0 ady2 Send address and data CS4 1 Disable Return 66 Subroutine to read accelerometer data into microprocessor AccelData ADCIN 0 adX1 Read channel 0 to adx ADCIN 1 adY1 Read channel 1 to adyl ADCIN 2 ad X2 Read channel 2 to adx2 ADCIN 3 adY2 Read channel 3 to ady2 Return OvrSmplX adX1 dumX1 2 adX2 adX2 dumX2 2 Return OvrSmplY adY1 1 dumY1 2 adY2 adY2 dumY2 2 Return End
Download Pdf Manuals
Related Search
Related Contents
Frontier 1370 1478 user guide5.23 MB - vaF 取扱説明書(PDF/122KB) Customer Service Call us at: 866-212-7466 Formulaire natation été 2015 Programme - Salon du livre libertaire Sommaire アズビル金門株式会社 - アズビル金門製作所 attenzione - Vandenborre AIR TECH C100 Copyright © All rights reserved.
Failed to retrieve file