Objective Cell Phone Vibration Experiment Most cell phones are designed to vibrate. But at what frequency do they vibrate? With an accelerometer, data acquisition and signal analysis the vibration frequency of cell phones can be determined. This is the objective of this experiment. At the end of this lab students should understand, how the accelerometer is calibrated, how to interpret its signal, data acquisition with LabVIEW, conversion of the raw data signal to engineering units and signal analysis of the acceleration signal using FFT. Apparatus 1. Personal computer with LABVIEW software 2. National Instruments (8 slot) cdaq NI9178 data acquisition 3. Crossbow Accelerometer and Signal Conditioner 4. Cell phone supplied by student to generate vibration signal (or data downloaded from website) Experiment 1. SENSORS AND SIGNALS: Review the spec sheet for the Crossbow accelerometer; it is online. Identify the range and sensitivity of the accelerometer. Connect the signal conditioner from Z to AI0 of the junction box with a BCN cable. Make sure the notch on the accelerometer cable is facing upward as you plug it into the signal conditioner. Cell Phone Vibration Experiment Page 1 of 9
DATA ACQUISITON SETUP: 1. Build a simple VI to collect analog input data (as voltage) 1.1. Open a new VI. On the Block diagram right click and select Express Input DAQ Assist 1.2. Acquire signals Analog Input Voltage NI 9205 ai0 1.3. Set the voltage range from 0 to 5 volts 1.4. Set the timing to collect 1024 samples at 1024Hz from this channel What is the Nyquist frequency? What is the smallest frequency that can be detected? 2. Add a Waveform Graph on the front panel to display the data and wire it to the DAQ assist on the block diagram 2.1. Change Amplitude on the y-axis to Voltage [V] 2.2. Change Time to Time [s] 2.3. Test the VI by pressing the Run button or Ctrl-R. You must hold in the red button on the signal conditioner as you collect data. The accelerometer voltage signal should now be displayed in the graph window. 2.3. Move the accelerometer or turn it upside down to confirm that a signal proportional to acceleration is being recorded. 3. Perform a basic calibration check 3.1. Use the VI to measure the gravity signal with accelerometer pointing up (+1g) and down (-1g). 3.2. Determine sensitivity from voltage change versus acceleration change. V Sensitivty g 3.3. Compare the sensitivity of the accelerometer to the spec sheet value. 4. Plot the frequency spectrum 4.1. On the Front Panel add two numeric controls: Numeric Numeric Control Rename one Number of Samples and the other Sampling Rate 4.2 Add an XY Graph Rename the graph Frequency Spectrum Change Amplitude to Voltage [V] and Time to Frequency [Hz] 4.3 Add a numeric indicator: Numeric Numeric Indicator Rename it Predominate Frequency Your front panel should now look similar to the one shown below. Cell Phone Vibration Experiment Page 2 of 9
4.4 On the block diagram, pull down the arrows on the bottom of the DAQ Assistant until you can see number of samples and rate. Wire the appropriate controls into these inputs. The values you specify in the numeric controls on the front panel will now override the value from the DAQ Assistant setup. Cell Phone Vibration Experiment Page 3 of 9
4.5 Convert the data into an array of rms voltages of the detectable frequencies. Signal Processing Spectral Amplitude and Phase Spectrum Wire from the signal input to the data output of the DAQ Assistant. The data will be automatically converted to an array. 4.6 We have an array storing the rms voltages of the data at certain frequencies. We now need to create another array that will store the corresponding frequencies. 4.6.1 Create a for loop: Structures For Loop 4.6.2 Outside of the loop add a divide operation: Numeric Divide Wire this to divide the Number of Samples by 2. To place the 2: Numeric Numeric Constant Wire the quotient to the Loop Count of the Loop. 4.6.3 Create another divide operation outside of the loop. Divide the Sampling Rate by the Number of Samples. The result is the minimum detectable frequency. 4.6.4 Create a multiply operation inside of the loop: Numeric Multiply Multiply the Loop Iteration by the minimum frequency. The result of this multiplication is an array containing the detectable frequencies. Cell Phone Vibration Experiment Page 4 of 9
4.7 The corresponding amplitude at zero frequency is the average offset from zero of the signal. Because this value is often much larger than the amplitudes of the frequencies detected, we will remove it by deleting the zero index from each array. 4.7.1 Make a Delete From Array function for each array: Array Delete From Array 4.7.2 Wire the Array input of the delete function into the Amp Spectrum Mag (Vrms) output of the amplitude array. 4.7.3 Wire the other Array input of the other delete function to the product of the multiplication from the loop (the frequency array.) 4.7.4 Create a numeric constant of zero and wire it to the index input for each delete operation. 4.8 Bundle the arrays together and wire the output to the frequency spectrum graph. Cluster, Class, & Variant Bundle The frequency array is the top input, the amplitude array is the bottom input. Cell Phone Vibration Experiment Page 5 of 9
5. Alter the VI to display the predominate frequency 5.1 Create an Array Max and Min function: Array Max & Min 5.2 Wire the amplitude array as the input. 5.3 Create an Index Array function: Array Index Array 5.4 Use the frequency array as the array input and the max index from the amplitude array as the index input. 5.5 Wire the output to the Predominate Frequency indicator. 6. Save the VI You will be altering this VI for future lab assignments. Make sure to keep a copy in your zipspace or another location separate from the computer hard drive. Cell Phone Vibration Experiment Page 6 of 9
7. Collect Vibration Data 7.1. On the Front Panel, set the Number of Samples and the Sampling Rate numerical indicators both to 1024. You can change these settings later if it is necessary. 7.2. Use rubber bands to attach the accelerometer to a cell phone. Use paper to separate the accelerometer from the phone to avoid scratches. 7.3. Put the cell phone on a foam pad. 7.4. Be ready to collect data (Ctrl-R). Repeatedly press Run until a good vibration signal is captured. Make sure you hold the red button on the signal conditioner while recording data. 7.5. Either call the phone from another phone or make the phone vibrate by setting an alarm. 7.6. When the phone vibrates, start the data acquisition. Visually check the data. If it looks ok, proceed to the next step. Otherwise, try again. An example signal of a vibrating phone is shown below. Cell Phone Vibration Experiment Page 7 of 9
8. Record the results 8.1 To export the data from the charts, right click on the chart and select. Export Export Data to Excel 8.2 Print the charts and staple them neatly into you lab notebook. To do this, export the charts as image files: Right click the chart and select Export Export Simplified Image Cell Phone Vibration Experiment Page 8 of 9
Show your results to the TA. Discuss any open questions you may have. 9. WRAP UP DISCUSSION WITH TEAM (write each response neatly in your lab notebook) 9.1 What could be done to improve this experiment? Where do you see potential sources for measurement or signal errors? 9.2 How accurate is the frequency measurement? What could be affecting it? 9.3 How accurate is the vibration amplitude measurement? What could be affecting it? Do you have a concern using this accelerometer for this frequency? 9.4 Address the following questions and write down your ideas for improving this measurement/experiment. Sensor Calibration Sensor Frequency Range Sensor Mass Signal Conditioning Signal Analysis YOU ARE DONE STORE ALL EQUIPMENT AND LOG OFF FROM THE COMPUTER! Cell Phone Vibration Experiment Page 9 of 9