ME 240 – Instrumentation Final Project “Using the SpeedMat to Measure the Velocity of a Baseball” By: Nathaniel Dickinson, Ashton Kappelman, and Caleb Smith Date: Thursday, May 06, 2010 Objective: The objective of this project is to build a transducer that will use data acquisition to read the velocity of a baseball traveling through the strike zone. Using a radar gun as a reference will be used to create a best fit curve formula, which the DAQ program will use to convert voltage measured into a velocity that the ball was thrown within a percent error. The hysteresis, linearity, and repeatability of the transducer will be tested and measured. Materials: ITEM PRICE 2” wood screws $5.94 Four 2 by 4s $10.00 One 18” by 20” piece of plywood $5.00 Rotational Linear-Taper Potentiometer $2.99 Metal mounting plate $3.00 Bread board N/A control knob $2.99 3/4” inside diameter pvc pipe $1.42 National Instruments DAQ 6009 N/A Jug’s Radar Gun $1,000.00+ Pitching Machine N/A Procedure: Concept generation was used for creating multiple ideas for the creation of a transducer that would accomplish the set objective. The first ideas for doing so included using a carpet strike zone on a hinge and an optical transducer to measure the displacement of the carpet when the ball hit it. This idea was complicated and the transducer was fairly expensive. It was apparent that a rigid swinging arm would be more effective. The first transducer idea for the rigid swinging arm was a homemade slide potentiometer made with pvc tubing and medium resistance wiring. However, this transducer was over complicated to manufacture and find ideal parts for as it was ruled it out after a trip to the hardware store. After the idea of a slide potentiometer was scratched, a Hall Effect’s sensor was considered. While this could have been the ideal transducer, the parts were hard to obtain locally and the group’s familiarity with them was not enough to implement one with confidence. The final solution was to use a rotating linear-taper potentiometer. It was easy to implement when the hinge was made to rotate with the swinging arm. The construction started with making a stand out of two by fours that was approximately 48” tall, 26” wide, and 48” long. The swinging arm hung about 36” with a 20” x 18” strike zone. It was necessary to make the swinging arm longer than the strike zone to ensure that balls of the same speed would give similar results with different points of contact. This arm was then screwed to the hinge, so that the hinge would rotate as the arm swung. The potentiometer was fixed to the hinge using a knob with set screw that was fitted to the inside of [2] the pvc pipe. The potentiometer was wired to the DAQ through a solderless breadboard obtained in the parts kit. An external voltage source with an approximate difference of three volts (2 AA batteries in series) was placed across the entire potentiometer using the DAQ card to read the only the variable voltage. A test was run to see that, because of our wiring schematic, the larger the deflection of the swinging arm; the smaller the voltage read. The Collection program, while running continuously, took the readings from the DAQ and ran each of them through a while loop with a series of case structures that only saved the smallest value. For each trial, the reading from the radar gun was entered by the user. When the user pressed the stop button, the while loop ended and the value stored as “minimum” was combined with the ball speed value and turned into a string. This string was then saved as the first row into a used defined file. To avoid any complications with saving only one value per trial, the file storing portion of this code was placed into the back end of a sequence structure. The pitching machine was set up from 60’6” away from apparatus. The apparatus and program were calibrated with ball speeds from 50-90 mph producing the given value range that was to be operated within. Once the apparatus and DAQ program were calibrated and functioning correctly. The Jug’s Radar Gun was calibrated using a simple harmonic metal U horseshoe. The gun is calibrated by taking multiple readings of the horseshoe as it vibrates. The radar gun is finally calibrated once the Jug’s gun is reading 61 mph. Once the radar gun was calibrated, the pitching machine was calibrated by using the Jug’s gun as a reference and a known value to obtain the range of speed desired. However there was a little inconsistence due to the pitching machine and the baseball thrown causing the velocity to vary slightly accompanied by the Jug’s gun having an unknown error in its readings and reads only to the closest 1 mph. This was deemed acceptable due to the fact that it is used throughout the game of baseball and is accepted as the industry standard. To create the best fit curve, 20 DAQ readings were taken and stored versus the ball speed using the Collection program created. The 20 readings were from 5 each at 4 different approximate speeds (50-60, 60-70, 70-80, and 80-90). This data was used to create a best fit curve which was then placed into a formula node in the Formula program. [3] Radar Ball Speed (mph) Curve Fitting 100 90 y = -609.44x2 + 3101.6x - 3859.5 80 70 60 50 2.500 2.550 2.600 2.650 2.700 2.750 2.800 DAQ Reading (volts) Figure 1: Radar Ball Speed vs. DAQ Reading (Collection.vi) The output of the Formula program is the Calculated Ball Speed obtained from inserting the DAQ Reading into the best fit curve formula. The validity of this reading was then tested against the Radar Ball Speed using hysteresis, linearity, and repeatability calibration tests. The hysteresis test was conducted ranging from 50-90 mph taking 4 values were and recording them with increasing the speed each time and another 4 values were recorded with decreasing speeds. The data obtained from this test was opened in excel to create figure 2. DAQ Calculated Ball Speed (mph) Hysteresis 100.00 y = 0.9441x + 3.1391 90.00 y = 1.0737x - 4.3019 80.00 Rise 70.00 Fall 60.00 Linear (Rise) Linear (Fall) 50.00 50 60 70 80 90 100 Ball Speed (mph) Figure 2: Radar Ball Speed vs. DAQ Calculated Ball Speed (Formula.vi) The hysteresis curve shows that the value collected on the rise were generally higher than those on the fall. The most likely explanation for this is that the values on the rise may have struck lower in the strike zone than those on the fall thus causing higher torques and larger deflections. The calculated results of this test can be seen in equations 1. [4] Equations 1: Hysteresis Error Calculations π¦πππ π = 1.0737π₯ − 4.3019 = 76.23 @ π₯ = 75 π¦ππππ = 0.9441π₯ + 3.1391 = 73.95 @ π₯ = 75 π»π¦π π‘ππππ ππ πΈππππ % = π¦ππππ − π¦πππ π π¦ππππ + π¦πππ π 2 × 100% = 3.00% The linearity was tested by taking 12 readings from 50 to 90 mph taking three readings every ten mph increment. This data was used to create figure 3. DAQ Calculated Ball Speed (mph) Linearity 100.00 90.00 y = 0.9717x + 0.3791 80.00 70.00 60.00 50.00 50 55 60 65 70 75 80 85 90 Ball Speed (mph) Figure 3: Radar Ball Speed vs. DAQ Calculated Ball Speed (Formula.vi) The linearity curve shows that the errors were generally larger at higher speeds and the calculated values seemed to be higher than the radar gun. This is probably because of the higher difficulty with reading higher speeds. The calculated results of this test can be seen in equations 2. Equations 2: Linearity Error Calculations π¦ππππππ = 0.9717π₯ + 0.3791 = 73.27 @ π₯ = 75 π¦ππππ = 76.03 @ π₯ = 75 π¦ππππ − π¦ππππππ πΏπππππππ‘π¦ πΈππππ % = × 100% = 3.77% π¦ππππππ The repeatability was tested by taking 12 readings at 75 mph because this was determined the most common value to be read. This took several attempts to get 12 data points at this speed. This data was used to create figure 4. [5] DAQ Calculated Ball Speed (mph) Repeatabilty 80.00 78.00 76.00 74.00 72.00 70.00 50 55 60 65 70 75 80 85 90 Ball Speed (mph) Figure 4: Radar Ball Speed vs. DAQ Calculated Ball Speed (Formula.vi) The repeatability graph shows that the calculated values could vary both above and below the radar gun reading. The majority of this error could be associated with the size of the strike zone and the repeatability of the pitching machine. The calculated results of this test can be seen in equations 3. Equations 3: Repeatability Error Calculations π = 1.259 & π = 75.64 2π π πππππ‘ππππππ‘π¦ πΈππππ % = × 100% = 3.33% π Conclusion and Reflection: When it came to our design there were some flaws that could have been addressed that may have improved our design and possibly the data collected. In the design there were no locking pins on the pvc pipe hinge allowing it to slide from side to side. This caused all the stress to be on the set screw of the control knob that connected and held the potentiometer in place. Unfortunately, since there were no pins occasionally the hinge system would slip off the potentiometer. Another possible solution to this issue would have been to put a cross beam on the top of the two supports preventing the upright beams from moving apart. The hinge system could have been improved by putting ball bearings around the pvc providing less friction and a higher consistence for repeatability. The hinge system would also be aided by using lighter materials for pendulum system, resulting in less force being required to move the system. When compiling data we had some issues with high impact and not providing accurate readings. This could have been improved by putting a rubber mat on the strike zone to dampen the impact, or it could have been from loose wiring to potentiometer which could have been soldered for a better connection so as not to lose connection with the potentiometer on impact. Overall, our transducer would have been very effective for this experiment with a few improvements. The data collected was relatively accurate for being a homemade transducer, and is much more cost effective than buying a radar gun. [6] Appendices: Sample Data: Photos: [7]