UNC at Charlotte Embedded Systems Lab

Lab Exercises / Educational Materials

  Home page - Educational Materials   |  Home page - James Conrad |  UNC at Charlotte ECE Dept.  |   UNC at Charlotte
 

Using an Accelerometer

This page updated

May 12, 2004



 

Infra Red Communication Device and Sending Packet data Lab 3

This lab will have students examine the Analog Devices ADXL311EB accelerometer evaluation board to measure the acceleration of a wheeled vehicle down an incline.

Consider the situation when the toy is sitting on an incline, like shown below.  The accelerometer will measure some portion of “g”, depending on the x/y orientation.

Now assume the toy is released.  The measurement in the x and y direction should change, but not to zero.  When the toy reaches the bottom of the ramp (like in the figure below), the acceleration on the y-axis will change to g.  The acceleration on the x-axis will start to decrease.

 

Eventually the toy will stop all motion, such that the x-axis measurement will be 0 and the y measurement will be g.

 

Requirements

Req. 1 – The code generated is written in C for the MSV30262-SKP
Req. 2 – The code is well commented and easy to follow
Req. 3 – Your lab report should include the final build output from the builder
Req. 4 – The serial communications with the PC should operate at 19200 baud 8,N,1
Req. 5 – HyperTerm will be used to transmit and receive characters.
Req. 6 – The Analog Devices ADXL311EB accelerometer evaluation board will be attached to the Renesas SKP and oriented such that the plane of the Renesas board is perpendicular to the plane of the ADXL311EB.
Req. 7 – The Renesas SKP will be attached to a wheeled toy vehicle such that the plane of the Renesas board is parallel to the ground when the four wheels of the toy are on the ground.
Req. 8 – The general operation of the system is that the toy, with board attached, will be rolled down an incline and roll to a stop on a level surface.  The attached Renesas SKP and ADXL311EB will record the acceleration of the vehicle.
Req. 9 – The system will start recording the X and Y components of the acceleration when the SW2 switch is pressed.  It will record 8 seconds of samples, once every 0.1 seconds, starting 0.1 seconds after the switch is pressed.
Req. 10 – The readings will be stored in a 80 by 2 word array.  The acceleration data may be saved in any format.
Req. 11 – The incline will be at a 30 degree angle, and the distance from the start to the bottom of the incline is 3 feet.
Req. 12 – The system will be powered by a 9v battery.
Req. 13 – Use only integer values in the system.  Do not use floating point.
Req. 14 – The system will be attached to a PC via a RS232 cable.  When the letter “P” is sent from the PC to the system, the system should send back the values of X and Y in g forces, with the format:

Time        X         Y

0.1       x.xxx     x.xxx

0.2       x.xxx     x.xxx