Your SlideShare is downloading. ×
0
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Accelerometer 1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Accelerometer 1

432

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
432
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. Learn about Accelerometer<br /><ul><li>The Indian Way - Low Cost and Quick</li></li></ul><li>Accelerometer<br />
  2. Accelerometer<br />An accelerometer is a device that measures the proper acceleration of the device.<br />It is an electromechanical device that will measure acceleration forces.<br />These forces may be static, like the constant force of gravity pulling at your feet, or they could be dynamic - caused by moving or vibrating the accelerometer. <br />
  3. Conti..<br />An accelerometer measures weight per unit of (test) mass, a quantity also known as specific force, or g-force.<br />Most accelerometers do not display the value they measure, but supply it to other devices.<br />Conceptually, an accelerometer behaves as a damped mass on a spring. When the accelerometer experiences an acceleration, the mass is displaced to the point that the spring is able to accelerate the mass at the same rate as the casing. The displacement is then measured to give the acceleration.<br />
  4. What are accelerometers useful for?<br />By measuring the amount of static acceleration due to gravity, you can find out the angle the device is tilted at with respect to the earth.<br />By sensing the amount of dynamic acceleration, you can analyze the way the device is moving.<br />An accelerometer can help your project understand its surroundings better.<br />
  5. Conti..<br />In the computing world, IBM and Apple have recently started using accelerometers in their laptops to protect hard drives from damage.<br />If you accidentally drop the laptop, the accelerometer detects the sudden freefall, and switches the hard drive off so the heads don't crash on the platters.<br />In a similar fashion, high g accelerometers are the industry standard way of detecting car crashes and deploying airbags at just the right time. <br />
  6. Applications<br />Engineering<br />Biology<br />Industry<br />Building and structural monitoring<br />Medical applications<br />Navigation<br />Transport<br />And more…<br />
  7. Types of Accelerometers<br />2-Axis Accelerometers<br />3-Axis Accelerometers<br />
  8. 2-Axis Accelerometers<br />Memsic 2125 Dual-axis Accelerometer<br />The Memsic 2125 is a low cost, dual-axis thermal<br />accelerometer capable of measuring tilt,<br />acceleration, rotation, and vibration with a range<br />of ±3 g. For integration into existing applications,<br />the Memsic 2125 is electrically compatible with<br />other popular accelerometers.<br />
  9. Conti..<br />Features:<br />- Measures ±3 g on each axis <br /> - Simple pulse output of g-force for each axis <br /> - Convenient 6-pin 0.1" spacing DIP module <br /> - Analog output fo temperature (Tout pin) <br /> - Low current at 3.3 or 5 V operation: less than 4 mA at 5 VDC .<br />
  10. Sample Applications:<br /> -Dual-axis tilt sensing for autonomous robotics applications <br /> - Single-axis rotational position sensing<br /> - Movement/Lack-of-movement sensing for alarm systems <br /> - R/C hobby projects such as autopilots <br />
  11. Key Specifications:<br /> - Power requirements: +3.3 to +5 VDC <br /> - Communication: TTL/CMOS compatible 100 Hz PWM - output signal with duty cycle proportional to acceleration <br /> - Dimensions: 0.42 x 0.42 x 0.45 in (10.7 x 10.7 x 11.8 mm) <br /> - Operating temp range: 32 to +158 °F (0 to +70 °C) <br />
  12. 3-axis accelerometer<br />Triple-axis accelerometer with 3 analog outputs for X, Y and Z axis measurements on a 0.75"x0.75" breakout board.<br />MMA7260 is 3-axis accelerometer and measure the accelerations in X Y and Z axis with range +-1.5 g to 6 g.<br />
  13. Conti..<br />Features<br /> -Selectable Sensitivity (1.5g/2g/4g/6g)<br /> -Low Current Consumption: 500 μA<br /> -Sleep Mode: 3 μA<br /> -Low Voltage Operation: 2.2 V – 3.6 V<br /> -6mm x 6mm x 1.45mm QFN<br /> -High Sensitivity (800 mV/g @ 1.5g)<br /> -Fast Turn On Time<br /> -Integral Signal Conditioning with Low Pass Filter<br /> -Robust Design, High Shocks Survivability<br /> -Pb-Free Terminations<br /> -Low Cost<br />
  14. Typical Applications<br /> -HDD MP3 Player: Freefall Detection<br /> -Laptop PC: Freefall Detection, Anti-Theft<br /> -Cell Phone: Image Stability, Text Scroll, Motion Dialing,<br /> E-Compass<br /> -Pedometer: Motion Sensing<br /> -PDA: Text Scroll<br /> -Navigation and Dead Reckoning: E-Compass Tilt Compensation<br /> -Gaming: Tilt and Motion Sensing, Event Recorder<br /> -Robotics: Motion Sensing<br />
  15. How to use<br />In Accelerometer we can read the change in output values corresponding to the change in X-axis, Y-axis and Z-axis.<br />Connect these PINS to the ADC pins of Atmega8.<br />The varying output at the pins is reflected to ADC and the converted digital values can be displayed on LCD display. <br />Calibration of the accelerometer can be done by giving the reference values in programs <br />
  16. Interfacing Accelerometer with AVR Microcontrollers<br /> #define F_CPU 8000000UL<br /> #include <avr/io.h><br /> #include <avr/interrupt.h><br /> #include<util/delay.h><br /> #include"lcd.h"<br /> #include"lcd.c"<br /> #define X_FORWARD 450<br /> #define Y_FORWARD 380<br /> #define Z_FORWARD 430<br /> #define X_BACKWARD 320<br /> #define Y_BACKWARD 380<br /> #define Z_BACKWARD 440<br />
  17. #define X_RIGHT 380<br />#define Y_RIGHT 330<br />#define Z_RIGHT 440<br />#define X_LEFT 380<br />#define Y_LEFT 450<br />#define Z_LEFT 430<br />#define X_STOP 380<br />#define Y_STOP 382<br />#define Z_STOP 460<br />
  18. char buffer[5];<br />intReadADC(uint8_t ch)<br />{<br /> ADC=0;<br /> //Select ADC Channel ch must be 0-7<br /> ADMUX = ADMUX & 0b11100000;<br />ch=ch&0b00000111;<br /> ADMUX|=ch;<br />//Start Single conversion<br /> ADCSRA |= (1<<ADSC);<br /> //Wait for conversion to complete<br /> while(!(ADCSRA&(1<<ADIF)));<br /> //Clear ADIF by writing one to it<br />ADCSRA|=(1<<ADIF);<br /> return(ADC);<br />}<br />
  19. void initADC()<br /> {<br /> ADMUX=(1<<REFS0); // For Aref=AVcc;<br /> ADCSRA=(1<<ADEN)|(1<<ADIE)|(1<<ADPS2)|(1<<ADPS1) |(1<<ADPS1); //Prescalar div factor =128<br /> }<br /> void wait(float x)<br /> {<br />inti;<br /> for(i=0;i<(int)(61*x);i++)<br /> _delay_loop_2(0);<br /> }<br />
  20. int main()<br />{<br />//DDRC=0x00;<br />DDRB=0xFF;<br />lcd_init(LCD_DISP_ON);<br />lcd_clrscr();<br />initADC();<br />int x=0,y=0,z=0, range=30;<br />while(1)<br />{<br />x=ReadADC(0);<br />y=ReadADC(1);<br />z=ReadADC(2);<br />lcd_gotoxy(0,0);<br />sprintf(buffer,"x=%4d, y=%4d,nz=%4d ",x,y,z);<br />lcd_puts(buffer);<br />
  21. if((x>(X_STOP-range))&&(x<(X_STOP+range))&&(y>(Y_STOP-range))&&(y<(Y_STOP+range))&&(z>(Z_STOP-range))&&(z<(Z_STOP+range)))<br />{<br />PORTB=0b00000000;// stop<br />lcd_gotoxy(8,1);<br />lcd_puts("STOP");<br />}<br />if((x>(X_FORWARD-range))&&(x<(X_FORWARD+range))&&(y>(Y_FORWARD-range))&&(y<(Y_FORWARD+range))&&(z>(Z_FORWARD-range))&&(z<(Z_FORWARD+range)))<br />{<br />PORTB=0b00100100; //forward<br />lcd_gotoxy(8,1);<br />lcd_puts("FRWD");<br />}<br />
  22. if((x>(X_BACKWARD-range))&&(x<(X_BACKWARD+range))&&(y>(Y_BACKWARD-range))&&(y<(Y_BACKWARD+range))&&(z>(Z_BACKWARD-range))&&(z<(Z_BACKWARD+range)))<br /> {<br /> PORTB=0b00011000; // back<br />lcd_gotoxy(8,1);<br />lcd_puts("BACK");<br /> }<br />if((x>(X_LEFT-range))&&(x<(X_LEFT+range))&&(y>(Y_LEFT-range))&&(y<(Y_LEFT+range))&&(z>(Z_LEFT-range))&&(z<(Z_LEFT+range)))<br />{<br />PORTB=0b00000100; // left<br />lcd_gotoxy(8,1);<br />lcd_puts("LEFT");<br />}<br />
  23. if((x>(X_RIGHT-range))&&(x<(X_RIGHT+range))&&(y>(Y_RIGHT-range))&&(y<(Y_RIGHT+range))&&(z>(Z_RIGHT-range))&&(z<(Z_RIGHT+range)))<br /> {<br /> PORTB=0b00100000; // right<br />lcd_gotoxy(8,1);<br />lcd_puts("RIGHT");<br /> }<br />wait(.1);<br />lcd_clrscr();<br />}<br />return 0; <br />}<br />
  24. Thank you…<br />
  25. About Open.Embedded<br />This is an initiative of group of professionals, students and hobbyists  to share their knowledge among others using low cost open source software.<br />We think it criminal when students are taught 8085 and 8051 in college when world is moving forward and technology changes are happening every where in the world.<br /> <br />Join us at  facebook.com/open.embedded<br /> <br />Buy low cost kits at stores.ebay.in/openembedded<br /> <br />
  26. MADE BY <br />SUMIT BALGUVHAR<br />M.TECH-EMBEDDED SYSTEM TECHNOLOGY<br />

×