1 / 7

Acquiring Data from Accelerometers

l iving with the lab. Acquiring Data from Accelerometers. Arduino Uno microcontroller board. DIGIKEY DKSB1002A 3-axis accelerometer. Parallax USB Oscilloscope m easure voltage vs. time. data sheet for accelerometer is available at.

aya
Download Presentation

Acquiring Data from Accelerometers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. living with the lab Acquiring Data from Accelerometers Arduino Uno microcontroller board DIGIKEY DKSB1002A 3-axis accelerometer Parallax USB Oscilloscope measure voltage vs. time data sheet for accelerometer is available at . . . http://www.analog.com/static/imported-files/data_sheets/ADXL335.pdf

  2. living with the lab Implementing a 3-axis Accelerometer: Hardware • DKSB1002A is a prototyping board • $20 from www.digikey.com • Screw holes for mounting board onto “object of interest” • Board is ~ 20mm square • ADXL3355 3-axis accelerometer chip • 3-axis • ±3g • COM - ground • VSS - power (we will provide 5V) • X - acceleration in x-direction • Y - acceleration in y-direction • Z - acceleration in z-direction z x y

  3. living with the lab Implementing a 3-axis Accelerometer: Wiring to Arduino • COM - ground • VSS - power (we will provide 5V) • X - acceleration in x-direction • Y - acceleration in y-direction • Z - acceleration in z-direction

  4. living with the lab Implementing a 3-axis Accelerometer: Programming void setup() { Serial.begin(9600); } void loop() { int xaccel = analogRead(0); int yaccel = analogRead(1); int zaccel = analogRead(2); Serial.print(xaccel); Serial.print(" "); Serial.print(yaccel); Serial.print(" "); Serial.println(zaccel); }

  5. living with the lab Implementing a 3-axis Accelerometer: Analysis of Output • Output from accelerometer will vary from 0 to 5 V • Output when +x points upward: __________ • Output when +x points downward: __________ • Difference: _______ • Change in acceleration = 2g • Change in accelerometer per g: ___________ • Output when accelerometer is flat: _________ z x y

  6. +x qx ax qx 1g (perceived vertical acceleration) living with the lab Implementing a 3-axis Accelerometer: Angle Measurement z x y θx = asin(ax/g) • Expected output of Arduino when accelerometer is flat: _________ • Expected output of Arduino when accelerometer is at 45 degrees? ________ • If the Arduino output is 350, then what is the angle? ___________

  7. living with the lab Measuring Output of Accelerometer with Parallax Scope 5V switch trigger input 10kW • Attach channel 1 leads between x-acceleration signal and ground • Oscilloscope plots voltage vs. time • Export data to a file to acquire voltage (or acceleration) vs. time data • Example of how a switch circuit is used to trigger data acquisition

More Related