Jump to content
I2Cdevlib Forums

Search the Community

Showing results for tags 'accelerometer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • I2Cdevlib Web Tools
    • I2C Protocol Analyzer
    • I2C Device Entry Interface
    • I2C Device Library API
  • I2Cdev Platform Discussion
    • Arduino (ATmega)
    • Arduino Due (ARM Cortex M3)
    • MSP430
    • Other Platforms
  • I2C Device Discussion
    • AD7746 capacitance-to-digital converter (Analog Devices)
    • ADS1115 16-bit A/D converter (Texas Instruments)
    • ADXL345 3-axis accelerometer (Analog Devices)
    • AK8975 3-axis magnetometer (AKM Semiconductor)
    • BMA150 3-axis accelerometer (Bosch Sensortec)
    • BMP085 pressure sensor (Bosch Sensortec)
    • DS1307 real-time clock (Maxim)
    • HMC5843 3-axis magnetometer (Honeywell)
    • HMC5883L 3-axis magnetometer (Honeywell)
    • iAQ-2000 indoor air quality sensor (AppliedSensor)
    • IQS156 ProxSense capacitive touch sensor (Azoteq)
    • ITG-3200 3-axis gyroscope (InvenSense)
    • L3G4200D 3-axis accelerometer (STMicroelectronics)
    • MPL3115A2 Xtrinsic Smart Pressure Sensor (Freescale)
    • MPR121 12-bit capacitive touch sensor (Freescale)
    • MPU-6050 6-axis accelerometer/gyroscope (InvenSense)
    • MPU-9150 9-axis accelerometer/gyroscope/magnetometer (InvenSense)
    • PanelPilot multi-screen digital meter (Lascar Electronics)
    • SSD1308 128x64 OLED/PLED driver (Solomon Systech)
    • TCA6424A 24-bit I/O expander (Texas Instruments)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 10 results

  1. Hello Sir, I am using this git hub code https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/examples/MPU6050_DMP6/MPU6050_DMP6.ino and I want to find displacement from accelerometer. How can I Implement it? I know only If we have to find Displacement from accelerometer then we have to integrate it.But If we Directly integrate It then error will increase, so we have to use filter But which filtter I have to use? And which accelerometer data I have to integrate It raw data or gravity-free data. Please, anyone, help me how to find displacement from the accelerometer
  2. Hello there! I am beginner at this and I want to obtain the following: the raw gyroscope and accelerometer data from my MPU6050 (sparkfun edition). I did that. set the frequency of the IMU at 100 Hz. How to do this? the GNSS(GPS) data from arduino type GPS module. I did that. check/ set GPS frequency to 100 Hz. How to do this? use the MPU6050 fsync function so that I could get : 1 set of acc/gyro data at the same time as getting 1 set of gps data 99 sets of acc/gyro data (time spent since the beginning = 1 s) 1 set of acc/gyro data at the same time as getting 1 set of gps data 99.... etc. How to do this? Thank you! P.S. I need proper description:D
  3. Hi, Question about Accelerometer Scale Sensitivity Factor wrong values reading I have read accel values 8192 at +/- 2g but its should read 1g of 16384 at sensitivity of 2g From Datasheet https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf P.29 AFS_SEL | Full Scale Range | LSB Sensitivity--------+------------------+----------------0 | +/- 2g | 16384 LSB/g1 | +/- 4g | 8192 LSB/g2 | +/- 8g | 4096 LSB/g3 | +/- 16g | 2048 LSB/g Is somethings wrong? Thanks in advance.
  4. I have a final project at the school. Me and my friend make an earthquake detector with mpu6050 sensor Which makes me and my friend confused is how i measure the irregular numbers of this mpu6050 Is there any way how to convert the numbers generated by mpu6050 into the Richter scale (SR) Do i have to custom that number into SR to display into lcd. sorry my bad english. here is my code // I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class // 10/7/2011 by Jeff Rowberg <jeff@rowberg.net> // Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib // // Changelog: // 2013-05-08 - added multiple output formats // - added seamless Fastwire support // 2011-10-07 - initial release /* ============================================ I2Cdev device library code is placed under the MIT license Copyright (c) 2011 Jeff Rowberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =============================================== */ // I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files // for both classes must be in the include path of your project #include "I2Cdev.h" #include "MPU6050.h" // Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation // is used in I2Cdev.h #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE #include "Wire.h" #endif // class default I2C address is 0x68 // specific I2C addresses may be passed as a parameter here // AD0 low = 0x68 (default for InvenSense evaluation board) // AD0 high = 0x69 MPU6050 accelgyro; //MPU6050 accelgyro(0x69); // <-- use for AD0 high int16_t ax, ay, az; int16_t gx, gy, gz; int16_t vx, vy, vz; int xmax, xmin, ymax, ymin ,zmax, zmin; // uncomment "OUTPUT_READABLE_ACCELGYRO" if you want to see a tab-separated // list of the accel X/Y/Z and then gyro X/Y/Z values in decimal. Easy to read, // not so easy to parse, and slow(er) over UART. #define OUTPUT_READABLE_ACCELGYRO // uncomment "OUTPUT_BINARY_ACCELGYRO" to send all 6 axes of data as 16-bit // binary, one right after the other. This is very fast (as fast as possible // without compression or data loss), and easy to parse, but impossible to read // for a human. //#define OUTPUT_BINARY_ACCELGYRO #define LED_PIN 13 bool blinkState = false; void setup() { // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // initialize serial communication // (38400 chosen because it works as well at 8MHz as it does at 16MHz, but // it's really up to you depending on your project) Serial.begin(38400); // initialize device Serial.println("Initializing I2C devices..."); accelgyro.initialize(); // verify connection Serial.println("Testing device connections..."); Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed"); // use the code below to change accel/gyro offset values /* Serial.println("Updating internal sensor offsets..."); // -76 -2359 1688 0 0 0 Serial.print(accelgyro.getXAccelOffset()); Serial.print("\t"); // -76 Serial.print(accelgyro.getYAccelOffset()); Serial.print("\t"); // -2359 Serial.print(accelgyro.getZAccelOffset()); Serial.print("\t"); // 1688 Serial.print(accelgyro.getXGyroOffset()); Serial.print("\t"); // 0 Serial.print(accelgyro.getYGyroOffset()); Serial.print("\t"); // 0 Serial.print(accelgyro.getZGyroOffset()); Serial.print("\t"); // 0 Serial.print("\n"); accelgyro.setXGyroOffset(220); accelgyro.setYGyroOffset(76); accelgyro.setZGyroOffset(-85); Serial.print(accelgyro.getXAccelOffset()); Serial.print("\t"); // -76 Serial.print(accelgyro.getYAccelOffset()); Serial.print("\t"); // -2359 Serial.print(accelgyro.getZAccelOffset()); Serial.print("\t"); // 1688 Serial.print(accelgyro.getXGyroOffset()); Serial.print("\t"); // 0 Serial.print(accelgyro.getYGyroOffset()); Serial.print("\t"); // 0 Serial.print(accelgyro.getZGyroOffset()); Serial.print("\t"); // 0 Serial.print("\n"); */ // configure Arduino LED for pinMode(LED_PIN, OUTPUT); pinMode(11, OUTPUT); digitalWrite(11,LOW); delay(10000); accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); xmax=ax+2000; xmin=ax-2000; ymax=ay+2000; ymin=ay-2000; zmax=az+2000; zmin=az-2000; } void loop() { // read raw accel/gyro measurements from device accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); /*int t=10; vx=ax*t; vy=ay*t; vz=az*t;*/ if (ax>xmax||ax<xmin||ay>ymax||ay<ymin||az>zmax||az<zmin){ digitalWrite(11,HIGH); delay(8000); digitalWrite(11,LOW); } // these methods (and a few others) are also available //accelgyro.getAcceleration(&ax, &ay, &az); //accelgyro.getRotation(&gx, &gy, &gz); #ifdef OUTPUT_READABLE_ACCELGYRO // display tab-separated accel/gyro x/y/z values Serial.print("a/g:\t"); Serial.print(ax); Serial.print("\t"); Serial.print(ay); Serial.print("\t"); Serial.println(az); #endif #ifdef OUTPUT_BINARY_ACCELGYRO Serial.write((uint8_t)(ax >> 8)); Serial.write((uint8_t)(ax & 0xFF)); Serial.write((uint8_t)(ay >> 8)); Serial.write((uint8_t)(ay & 0xFF)); Serial.write((uint8_t)(az >> 8)); Serial.write((uint8_t)(az & 0xFF)); #endif // blink LED to indicate activity blinkState = !blinkState; digitalWrite(LED_PIN, blinkState); } thanks for the help master
  5. Hello, I am new to this forum and have started experimenting with the MPU-6050 a few weeks ago. I am using it for a Design Technology project in hopes of measuring acceleration in any specific direction. After much research it was concluded this cheap, but useful chip was the go-to piece and so after more searching around on youtube I stumbled upon Jeff Rowberg's code. It took me a lot of time to get the processing teapot screen running but it was so worth it. Anyways now that I accomplished that, I moved on to the main task at hand and found out that by uncommented "OUTPUT_READABLE_REALACCEL" . This gave a significant amount of values and raw data in the serial monitor itself but the problem I have is that I do not understand the values or know how to convert them into acceleration that I can then use to perform other functions. I have only started coding last year and I am currently 16 in Year 11. If anyone could give some input or understandable references on the following values I would appreciate that a lot. Send any character to begin DMP programming and demo: Initializing DMP... Enabling DMP... Enabling interrupt detection (Arduino external interrupt 0)... DMP ready! Waiting for first interrupt... areal -293 49 -1190 areal -153 22 66 areal -50 10 868 areal 4 -14 1370 areal 23 -39 1676 areal 59 -54 1878 areal 86 -68 2013 areal 107 -77 2119 areal 119 -83 2175 areal 112 -89 2187 areal 99 -10 72182 areal 116 -118 2198 areal 144 -120 2222 So here is the following data I have received: Also many thanks to Jeff Rowberg for producing such valuable and useful code. I will make sure to include you in my project credits and when I master Arduino I will definitely try to share and teach this to others. Thank you
  6. Hi! I've got the MPU-9250 working but there seems to be some problem with the accelerometer. When the board is moving and then at rest, the values of the accelerometer don't go back to the "resting values" (ideally it would be (x, y, z) = (0,0,0)). To make this clear I attached the image "accelerometer.png". For this image: between 1.5s to 3.2s I move the board, then leave it at rest for about 2 seconds and then I move it again for 1.7s and then I leave it at rest again. After each time, the values at rest of the axes X Y Z are different. It is like the registers stop updating when the board doesn't move any more even if the values didn't come back to the origin. Maybe, there is some threshold. The gyroscope doesn't have that problem. At rest, the values come back nicely to the "rest values". The module is initialized with the following command: I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_1, 0x00); // Clear sleep mode Delay; I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_1, 0x01); // Clock Source Delay; I2CSend(MPU9250_ADDRESS, 2, CONFIG, 0x06); // Gyroscope Filter BW = 5Hz, delay = 33,48ms, Fs = 1kHz Delay; I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_2, 0x00); // Enable Accelerometer and gyroscope Delay; I2CSend(MPU9250_ADDRESS, 2, GYRO_CONFIG, 0x00); // +-250dps Delay; I2CSend(MPU9250_ADDRESS, 2, ACCEL_CONFIG, 0x00);// +-2G Delay; I2CSend(MPU9250_ADDRESS, 2, ACCEL_CONFIG_2, 0x05); // Accelerometer Filter BW = 10Hz, delay = 35,70ms, Fs = 1kHz Delay; I2CSend(MPU9250_ADDRESS, 2, INT_PIN_CFG, 0x02); // Bypass for the magnetometer enable Delay; I2CSend(MPU9250_ADDRESS, 2, I2C_MST_CTRL, 0x00); // I2C speed at 358 kHz Delay; I2CSend(MAG_ADDRESS, 2, MAG_CNTL_1, 0x00);// Power down magnetometer Delay; I2CSend(MAG_ADDRESS, 2, MAG_CNTL_1, 0x16); // sampling rate 100Hz and word is 16-bit Delay; I2CSend() writes values in the specified register. I thought first that it could be tied to the Wake on Motion thing. But even if I set it to 0x00, it doesn't change anything. Basically, I would like to have the values read continuously without any sleep or standby mode. Does anyone has an idea of what could be wrong? Thank you for your time!
  7. Hey all, So I'm connecting my MPU6050 to an Arduino micro running the DMP Example code however, every time it says that the mpu connection fails! I ran the i2c scanner to see what address the MPU6050 was in but it says no devices found. I'm not sure what I'm doing wrong. I have the following pins connected: VIN to 5V (also tried 3.3V) GROUND to GROUND SDA to A4 SCL to A5 We've also tried INT to D2. Pictures of my breakout board and overall setup are below. Do you have any idea what could be causing this to go wrong. The light on the MPU lights up so we know that electricity is flowing/it's connecting.
  8. I was testing my MPU6050 with Raspberry PI and got accelerometer(X,Y,Z) and gyroscope(X,Y,Z) data forming on registers at decentely high sample rate. Looks like I've accidently fed +5v from RPI to SDA or SCL the other day and weird things started to happen with MPU6050. Looks like gyroscope got fried. Accelerometer still respond, but at very slow rate. It changes it's value about once a second no matter what clock source I set. Gyroscope stopped responding at all and writes 0 to each axis all the time. Did my MPU6050 got fried? Looks like RPI's current is fatal for i2c?
  9. Hello, I'm playing around with the MPU6050 to compute displacement (yes, quite aware of how inaccurate it is) using the real and world acceleration in the DMP sketche (a God sent!). I'm also using the raw data. With the raw data I was able to compute the displacement without any trouble, whereas in the case of the real and world acceleration I'm getting results that hardly make sense in the context of displacement. Which made me wonder what unit of measurement is being used? I assumed g (acceleration of gravity), but I must be mistaken. Apologises for the newb question and thank you!
  10. Hi All, I recently purchased the MPU-6050 6-axis accel from amazon for an awesome price. I connected everything per the documents provided and ran some sample code also provided on the I2C website. I am fairly new to this but if there were documents guiding me I am quick to learn. When I open the Serial Monitor window at the correct baudrate, I get "error = 2". I have no idea what this means, or where to go to guide me on how to resolve this. Has anyone seen this before or know where/how I can troubleshoot this? Any help would be greatly appreciated. Thanks everyone! emerjer
×
×
  • Create New...