DOC PREVIEW
MSU ECE 480 - Implementation of Gyroscopes and Accelerometers

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1. Introduction2. Objective3. Background4. Implementation5. Conclusion6. ReferencesImplementation of Gyroscopes andAccelerometersMichael BekkalaECE 480 Design Team 6Application NoteNovember 13th, 2009Executive SummaryAccelerometers are used to measure accelerations relative to freefall, and gyroscopes are used to measure orientation based on angular momentum. These sensors are usefulin applications such as navigation, vibration measuring, and consumer electronics. Accelerometer and gyroscope implementation is increasingly becoming present in electronics today to detect device orientation in order to alter user displays. Keywords: accelerometer, gyroscopeTable of Contents1. Introduction.................................................................................................32. Objective.....................................................................................................33. Background..................................................................................................34. Implementation...........................................................................................45. Conclusion...................................................................................................66. References...................................................................................................71. IntroductionMeasuring movement and orientation is a very important part of many applications today. Accelerometers and gyroscopes provide these measurements. Accelerometers measure acceleration, which can be integrated to find velocity, which also can be integrated to find position. Gyroscopes measure angular velocity, which can be integrated to find angular position (pitch, yaw, and roll). This application note will instruct the user how to implement accelerometers and gyroscopes in a desired application. 2. ObjectiveThe objective of this application note is to provide the read with information on how to make use of accelerometers and gyroscopes in their desired application. Furthermore, the note will inform the reader on how to get sufficient outputs from a microcontroller. 3. BackgroundThe operation of accelerometers can essentially be thought of as a mass, inside of a case, suspended by two springs (Figure 1). When the axis along the spring undergoes forces caused by acceleration, the mass will be displaced. This displacement is proportional to the acceleration. In electronics, accelerometers are commonly capacitive, utilizing two plates that compress a diaphragm, creating a capacitance change proportional to acceleration. Figure 1: AccelerometerGyroscopes consist of a vibrating element which makes use of the Coriolis effect. When an object is moving along the “drive axis” of the gyroscope, there are vibrations along this axis. Once there is an angular movement, the Coriolis effect causes vibrations along the “sense axis” (See Figure 2). These vibrations can be measured to determine the angular velocity of the mass that is moving. Angular velocity can then be integrated to find angular position, if necessary. Figure 2: Gyroscope4. ImplementationThe output from accelerometers and gyroscopes is a DC signal that is proportional to acceleration and angular velocity, respectively. In particular, the accelerometer ADXL335from Analog Devices output voltage is 300 mV for every “g” of acceleration. The reference voltage for this accelerometer is about 1.6V. A “g” of acceleration correspondsto 9.81 m/s2. So, for every increase of 300 mV above the reference voltage of 1.6V, thereis an increase of 9.81 m/s2 in acceleration. This is different for the Z-direction of the accelerometer. Due to the gravitation pull of the earth, the reference voltage for the Z-direction is always about 1.9V, since there is always a “g” acting on the accelerometer in this direction. The LPY5150AL dual axis gyroscope, from STMicroelectronics, has asensitivity of 0.67 mV/⁰/s and a reference voltage of 1.23V. Based on the change in angular velocity (which is measured in ⁰/s), the output signal from the gyroscopes will change by 0.67 mV for every ⁰/s increase in angular velocity. This output signal can then be fed into a microprocessor for manipulation. For example, after setting up analog to digital conversion on the microprocessor, the output signal canbe read in through an ADC port. This can then be displayed on an LCD in volts using the following code (code for dsPIC30f4013 using MPLAB): //ADC_Init(); ADPCFGbits.PCFG9 = 0; //Sets pin RB9/AN9 to analog mode InitADC12();while(1){SetADCChannel(9); ADCON1bits.SAMP = 1; Delay_1kcyc(); ADCON1bits.SAMP = 0;W_ctr_8bit(0b00000001); while(ADCON1bits.DONE); ADResult1 = ReadADC12(0); d_i(ADResult1*(3.3/4096));}return 0;}}In the previous code, port B9 is set to take the input of the accelerometer. The signal is then sampled for a certain time controlled by Delay_1kcyc() and the LCD screen is cleared of its previous value. The code then converts analog to digital using the while loop. The result is read in as a hexadecimal value. This has to be converted to the correct voltage by multiplying by the reference voltage (3.3V in this case) and divided by the resolution of the ADC, which is a 12 bit ADC. This has to be converted to hexadecimal using 2^n, where n=12. This simple code will read in an accelerometer or gyroscope output and convert it to a readable voltage on an LCD screen. In most applications using accelerometers and gyroscopes, analog to digital conversion is required. However, displaying the voltage on an LCD is not the intended purpose.Implementing accelerometers and gyroscopes in applications such as inertial navigation systems require the microprocessor to do much more with the signal received from these sensors. Integration is needed in order to convert acceleration and angular velocity into velocity, position, and angular position. Specifically, angular position can becalculated by multiplying the angular velocity by the sampling time. In inertial navigation, finding velocity and position actually takes more computation, as reference frame conversion, the earth’s radius, and gravity have to be considered. Accelerometers and gyroscopes take measurements based on the body of the user. If these measurements are needed to be with reference to a different coordinate system due to integration of GPS or some other requirement, they need to be


View Full Document

MSU ECE 480 - Implementation of Gyroscopes and Accelerometers

Documents in this Course
ganttv1

ganttv1

6 pages

sd97

sd97

17 pages

ap_EO

ap_EO

14 pages

Load more
Download Implementation of Gyroscopes and Accelerometers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Implementation of Gyroscopes and Accelerometers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Implementation of Gyroscopes and Accelerometers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?