WM40_S_MN_R1

advertisement
NASA-Threads
Work and Mechanics
Lesson 40: Accelerometers
Implementation of an Accelerometer
An accelerometer is a device that measures acceleration or g-force. The Memsic 2125 dualaxis accelerometer that we will use measures g-force in the x-and y-directions. We will also
use the accelerometer to measure how much our Boe-Bots tilt.
-x
+y
-y
+x
Install the Memsic 2125 accelerometer on your breadboard using the wiring diagrams
below.
Vss
220
P7 (y-out)
P6 (x-out)
Vdd
MX2125
220
NASA-Threads
Work and Mechanics
Lesson 40: Accelerometers
Enter the P-BASIC program below, and observe the numbers that result when you tilt the
Boe-Bot with your hand.
OOuuttppuutt ooff AAcccceelleerroom
meetteerr
Complete the table below referring to the axis labels shown:
Output of PULSIN command
(value of x or y)
x-acceleration output when the +x direction points upward
y-acceleration output when the +y direction points upward
x-acceleration output when the x-axis is horizontal
y-acceleration output when the y-axis is horizontal
x-acceleration output when the +x direction points downward
y-acceleration output when the +y direction points downward
Did the output change when you tilted your Boe-Bot? Do you see any trends? Discuss what
you found with your classmates.
NASA-Threads
Work and Mechanics
Lesson 40: Accelerometers
If things are working normally, the accelerometer output values around 3125 when an axis
points upward, 2500 when an axis is horizontal, and 1875 when an axis points downward.
Output of PULSIN
(x or y on DEBUG terminal)
Interpretation in terms of g-force
 positive axis (either x or y) points upward
 On earth, the accelerometer “feels” an acceleration of 1g or
3125
9.81 m/s2 in the direction of the upward-pointing positive
axis.
 A PULSIN output of 3125 corresponds to 1g
 x or y axis points horizontally
 On earth, the accelerometer “feels” no acceleration in the
2500
direction of the axis if the accelerometer not moving.
 A PULSIN output of 2500 corresponds to 0g
 positive axis (either x or y) points downward
 On earth, the accelerometer “feels” an acceleration of -1g or
1875
-9.81 m/s2 in the direction of the downward-pointing positive
axis.
 A PULSIN output of 1875 corresponds to -1g
Playing Around with the Accelerometer
Change the “HOME” command in the program to “CR” so that you can track accelerometer
output over time. Quickly accelerate upward in the +x and press “Pause” on the DEBUG
terminal. What happens to the value of “x” when accelerating upward? You will need to
scroll the DEBUG output window to the time just before you started the acceleration.
NOTE: You should find that the value exceeds 3125 which means that the accelerometer is
experiencing MORE than 1g.
NASA-Threads
Work and Mechanics
Lesson 40: Accelerometers
CLASS PROBLEM: A high school student who weighs 140 lbs visits an amusement
park and rides on the “VERTI-TRON.” This machine accelerates riders vertically
upward to a height of 100m, pauses for a few seconds, and then free-falls back to
the ground. Assume that an accelerometer is strapped to the rider with the +x axis
pointing upward.
(a) When the rider is sitting still before the ride starts, estimate the g-force on
the rider and the resulting output of the PULSIN command.
(b) If the VERTI-TRON takes off by accelerating upward at 9.81 m/s2, estimate the
g-force on the rider (don’t worry about PULSIN for this part). How much force
will the rider feel during the upward acceleration?
(c) After pausing at the top, the VERTI-TRON freefalls back toward the ground,
accelerating downward at approximately 9.81 m/s2. Estimate the g-force on
the rider and the resulting output of the PULSIN command (be careful, this is
tricky ).
(d) After riding, the student becomes dizzy and lies horizontally on the ground
under the care of several friends. If the x-axis of the accelerometer is oriented
horizontally, estimate the g-force on the rider and the resulting output of the
PULSIN command.
NASA-Threads
Work and Mechanics
Lesson 40: Accelerometers
Download