Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Showing posts with label Accelerometer. Show all posts
Showing posts with label Accelerometer. Show all posts

Thursday, March 22, 2018

Arduino MPU6050 Gyroscope Accelerometer - GY521 MOU6050

In this post, I’ll show you how to read data from the MPU6050.

This is an integrated MEMS Accelerometer and Gyroscope unit that is so popular and can be easily attached to Arduino.

The unit uses I2C protocol.

In the first example from Arduino website, we can read data and show it on the serial monitor application in Arduino IDE.

In the second project, you can read data from the unit and view data on Processing.



Project #1

This project is brought to you from Arduino create website.


Project Schematics:


GY-521                                           Arduino
VCC                    ->                  3.3 V or 5 V 
GND                    ->                           GND
SCL                           ->                       A5
SDA                      ->                       A4
XDA ->                No Connection
XCL ->               No Connection
ADO ->               No Connection

INT ->               No Connection





Here is the code for the project:


#include
const int MPU=0x68; 
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;

void setup(){
  Wire.begin();
  Wire.beginTransmission(MPU);
  Wire.write(0x6B); 
  Wire.write(0);    
  Wire.endTransmission(true);
  Serial.begin(9600);
}
void loop(){
  Wire.beginTransmission(MPU);
  Wire.write(0x3B);  
  Wire.endTransmission(false);
  Wire.requestFrom(MPU,12,true);  
  AcX=Wire.read()<<8|Wire.read();    
  AcY=Wire.read()<<8|Wire.read();  
  AcZ=Wire.read()<<8|Wire.read();  
  GyX=Wire.read()<<8|Wire.read();  
  GyY=Wire.read()<<8|Wire.read();  
  GyZ=Wire.read()<<8|Wire.read();  
  
  Serial.print("Accelerometer: ");
  Serial.print("X = "); Serial.print(AcX);
  Serial.print(" | Y = "); Serial.print(AcY);
  Serial.print(" | Z = "); Serial.println(AcZ); 
  
  Serial.print("Gyroscope: ");
  Serial.print("X = "); Serial.print(GyX);
  Serial.print(" | Y = "); Serial.print(GyY);
  Serial.print(" | Z = "); Serial.println(GyZ);
  Serial.println(" ");
  delay(333);
}














Project #2

And as another source of a project using the same unit GY-521, here it is:

You can download Arduino code, connect the project, get Processing code and then run it on http://sketchpad.cc


Project Schematics is just the same as the previous project. I repeated them to make things easy:



GY-521                                           Arduino
VCC                    ->                  3.3 V or 5 V 
GND                    ->                           GND
SCL                           ->                       A5
SDA                      ->                       A4
XDA ->                No Connection
XCL ->               No Connection
ADO ->               No Connection

INT ->               No Connection



Get Arduino Code from here

Get Processing Code from here









Paid Online Surveys

Check our books on Amazon we created on our way to find happiness.


A Trip To Siwa Oasis: Tourist guide to an Egyptian Oasis by [ElSakhawy, Sara M.]


A Trip To Siwa Oasis




The Ultimate travel bag list by [ Elskhawy, Sara M.]

















Saturday, May 21, 2011

Gyro Horizon. Renesas RX62N Kit


In this post, we 'll show an advanced kit from Renesas based on a modern microcontroller RX62N.

I received this kit by participation in Renesas Design Contest 2010. The kit has various types of sensors and interfaces to the outer world that cannot be makes you wonder how to use them all in one application. For example, it contains a 3D accelerometer and a temperature sensor, USB , CAN , Ethernet and RS-232 interfaces and an alphanumeric LCD.



The contest allows each contestant participate using only one application.

I wondered what application should I design , and I decided to design an ADI after being inspired by the Embraer 170 ADI ( Attitude Direction Indication )



This is the ADI


The ADI is an important aviation instrument that helps the pilot controlling and the aircraft. It senses and indicates Pitch ( Up and Down ) and Roll ( Right and Left ) attitude of the aircraft.




The actual ADI instrument senses the attitude using sensors in the aircraft called Gyroscope. The modern types of ADI collects attitude data from an electronic device called Laser Gyro or Fiber Optic Gyro.

My version of ADI uses a built in sensor in the Renesas kit called Accelerometer.


This is the running application on the kit ( ADI appears on the LCD )


The
Accelerometer is an electronic MEMS sensor that senses acceleration in three dimensions.

The Accelerometer senses the acceleration in three dimensions and then the RX62N microcontroller reads the data and then draws the output indication on the LCD on the kit.




This is the kit and the application on the LCD



This is the video of the kit in action.




Here is the contest entry :

http://renesasrulz.com/design_contest_archives/the_rx_mcu_design_contest/contest_entries/m/mediagallery/260.aspx


Here is the project on instructables


http://www.instructables.com/id/Gyro-Horizon-DIY/





رابط المقالة على مدونتى باللغة العربية
This is the link to the post in Arabic





If you like this blog you can support us by many ways:
   
   1. Leave comments stating your point of view about this article.

   2. Buy our book on Amazon Learn By Making.

   3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
  4. Visit our new website outatime.tech.

Thank you for visiting our blog.

Tank