Hobbies And Interests
Home  >> Science & Nature >> Science

How to Graph an Accelerometer With Processing

Accelerometers sense changes in motion. When you turn your cell phone sideways and it changes the orientation of the camera, it is reading the input of an accelerometer. Your game controller, the airbag in your car, the hard drive in your computer --- all use accelerometers to monitor changes in velocity, that is, acceleration. If you monitor the output of an accelerometer, you can record the way its output changes with time and get a history of the motion of the device to which it is attached.

Things You'll Need

  • Accelerometer
  • Data recorder
  • Data analysis program, spreadsheet program, or equivalent
Show More

Instructions

    • 1

      Connect the accelerometer output to the data recorder. This can be a scrolling voltage monitor, an data input device for your computer or just a digital voltmeter and a clipboard and pen --- anything that will record the voltage out of the accelerometer for the time you're monitoring. You could just graph the voltage output with respect to time, but it wouldn't be very informative.

    • 2

      Multiply the voltage output by the calibration curve for the device. The calibration curve will be in the form of a scale and an offset. For example, your accelerometer could be calibrated in terms of "g," the acceleration due to gravity at the Earth's surface, and the equation could be something like: acceleration = 1.26 x output voltage + 0.02.

      So, a reading of 0.58 V would correspond to an acceleration of 1.26 x 0.58 + .02 = 0.75 g.

    • 3

      Create a table of acceleration with respect to time. If you've collected the data by hand, such as recording a measurement every five seconds, then you will have one column with times incrementing by five seconds and another column with accelerations recorded at each of those times. You can also enter the data in a spreadsheet in an analogous way, or your data acquisition and analysis program will do this automatically.

    • 4

      Graph the data. If you're doing this by hand, you will mark the horizontal axis with the time markers, then mark a point on the graph for each of the acceleration numbers you calculated corresponding to those times.


https://www.htfbw.com © Hobbies And Interests