Jump to content
I2Cdevlib Forums

Search the Community

Showing results for tags 'mpu6050'.

  • 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

  1. Question above. Also, is it possible to read the angular rate (only gyro) at a higher frequency when dmp is enabled?
  2. im creating my own Controller and quadcopter and i always run into a the question of "how do you filter your gyro and Acc and use them together to get a Angle" . My question is, do i need to filter the Acc and Gyro or is the OUTPUT_READABLE_YAWPITCHROLL just a filter that Uses both acc and gyro to produce the Angles? what i want to do is use both Acc and Gyro to create an angle that i will use for a PID controller to balance the quad but if the OUTPUT_READABLE_YAWPITCHROLL already does that, than that would be unnecessary.
  3. #ifdef OUTPUT_READABLE_WORLDACCEL #ifdef OUTPUT_READABLE_WORLDACCEL // display initial world-frame acceleration, adjusted to remove gravity // and rotated based on known orientation from quaternion mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetAccel(&aa, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); Serial.print("aworld\t"); Serial.print(aaWorld.x); Serial.print("\t"); Serial.print(aaWorld.y); Serial.print("\t"); Serial.println(aaWorld.z); #endif I want to ask that what is the unit of above aaWorld values ? I understand that if i need to get the acceleration without gravity i need to use these values , but the values that we get from these are in m/s^2? or do i need to do something acc_in_ms2=(aaWorld.x*9.8)/16384.0 ? or something else. my offset are as follows mpu.setXGyroOffset(220); mpu.setYGyroOffset(76); mpu.setZGyroOffset(6); mpu.setZAccelOffset(1262); and my output is as follows without doing any changes in code provided after 10-15 sec (the sensor is horizontal) aworld 0 28 60 aworld -1 29 40 aworld 5 29 33 aworld 6 24 20 aworld 2 23 22 aworld -4 13 26 aworld -6 11 28 aworld -10 11 30 aworld -15 5 38 aworld -7 -1 36 aworld 7 -4 37 aworld 7 0 33 aworld 4 5 29 aworld 0 2 30 aworld -3 -7 35 seems coreect all the values converging to zeros.. but when i move the sensor in one direction , i get totally unexpected values.. aworld -415 -306 304 aworld -505 -277 318 aworld -577 -270 399 aworld -587 -207 265 aworld -572 -166 63 aworld -589 -200 -28 aworld -631 -258 -7 aworld -638 -292 30 aworld -637 -334 29 aworld -647 -404 -23 aworld -640 -483 -75 aworld -611 -542 -72 aworld -633 -503 -24 aworld -723 -344 17 aworld -816 -125 36 aworld -908 72 1 aworld -988 241 -45 aworld -1015 378 -68 I am moving the sesor only to and fro in one direction but i am getting these values Why so? please help if you have any information /knowledge about this... I want acceleration mithout gravity affect in m/s^2
  4. Hello everyone. I'm quite new to Arduino and i2c so please bear with me even if my questions may have an obvious answer from your point of view. Looking at the example of 6 axis MPU 6050 I'm trying to wrap my head around some programming decision that was made, specifically: 1) Why do we run while loop while (!mpuInterrupt && fifoCount < packetSize) { inside the main Arduino loop() instead of just simply running single interrupt flag and fifoCount check each iteration of the loop(), is that to catch new data package as absolutely soon as possible? 2) Why do we use interrupt at all, can't we just check getFIFOCount() and if > packetSize - retrieve data. I've modified the example to do just that and it seems that data is still fine, nothing borked e.t.c. I might be missing the whole point of using interrupts here, please clarify this for me if possible. Thanks in advance!
  5. import smbus import time # Get I2C bus bus = smbus.SMBus(1) # MPU-6000 address, 0x68(104) # Select gyroscope configuration register, 0x1B(27) # 0x18(24) Full scale range = 2000 dps bus.write_byte_data(0x68, 0x1B, 0x18) # MPU-6000 address, 0x68(104) # Select accelerometer configuration register, 0x1C(28) # 0x18(24) Full scale range = +/-16g bus.write_byte_data(0x68, 0x1C, 0x18) # MPU-6000 address, 0x68(104) # Select power management register1, 0x6B(107) # 0x01(01) PLL with xGyro reference bus.write_byte_data(0x68, 0x6B, 0x01) I wish to convert the measurement range from +-16g of the accelerometer to +-2g and 2000dps of the gyroscope to 250dps. Any Gurus can help me on this? This is the register map for MPU 6050 https://www.invensense.com/wp-content/u ... r-Map1.pdf
  6. Dear Jeff, Could you please help to complete the "dmpGetTemperature()" function in MPU6050_6Axis_MotionApps20 ? I unable to find any resource to complete this function. https://github.com/jrowberg/i2cdevlib/blob/900b8f959e9fa5c3126e0301f8a61d45a4ea99cc/Arduino/MPU6050/MPU6050_6Axis_MotionApps20.h#L680 An other thing I need to know in the DMP configuration, Do I need to change some configuration when I consider vertical axes as Y, instead of Z axes ?
  7. Hi All, I have 5 different MPU6050 on one mechanic. I'm using Jeff's DMP6 code and I am especially interested in pitch and roll values from "OUTPUT_READABLE_YAWPITCHROLL". I already calibrated All 5 MPU with "MPU6050_calibration.ino" All sensors gives me "0 degree" when they placed in horizontal position, with package letters facing up. Also I'm getting "90 degree"(almost) they placed vertical. When i place sensors in forexample 45 degree all of them shows different angles between 43-47, this error follows me in different angles. i have no error on vertical and horizontal planes but there is a non lineer error occurs between 0-90 degree and its not same for all. supply voltage and ambient temperature is same for all and i read sensors from 5 different comport. I suspect for calibration process and try a lot of time to calibrate each other but nothing changed. DMP6 code works perfect, there is no freeze or connection problem but this difference makes me crazy :)
  8. To detect vibration I'm sampling the MPU6050 various times and averaging it with previous samples and the algo works very well, it's the following: Force = sqrt((currentX - lastX) * (currentX - lastX) + (currentY - lastY) * (currentY - lastY) + (currentZ - lastZ) * (currentZ - lastZ) ); However, the problem is the result is always a positive number, and since I've been studying accelerometers I've noticed they often give negative values too. So I'd like to be able to get these negative values. In the accelerometers initial state x, y can be negative depending on the axis, and y is never negative. I know x, y & z values can be changed by applying the DMP/quaternions/etc. Do I need to apply something like ypr or euler to get the proper G force? How do I get the full negative & positive values of G? Thank you for your time
  9. 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
  10. I have problem with MPU6050. Approximately every 1 - 2 minutes I get the NACK on the I2C bus from the sensor. This situation arises entirely by chance. I receive NACK during read "Current FIFO buffer size" register, but after reading this register again, the device responds normally. Do not know what could be the reason?
  11. Hello guys I have been trying to get yaw values from gyro MPU6050 for my application. The application is basically to control a robot's movement with respect gyro readings. Recently I started facing some issues relating calibration of the gyro. In my code I am mapping all the values of the whole range of yaw (-180 to 180) to pwm range (0 to 200). So ideally the sensor should get calibrated every time at value 100. The situation I am facing is that it gets calibrated at 100 just 3 times out of 10. What may be the possible issue? I am attaching the code for reference. Thank you GYRO.txt
  12. I'm working on a project that requiers high precision gyro Z axis on the atmega328 chip, in the mpu6050 lib it is explained that when you set dlpf mode to 0, the low pass filter is disabled and sample rate is set to 8kHz. That's what the invensense docs says as well, but then what is the purpose of the option to set DLPF to 0 and sample at 8000Hz while the bandwidth is only 256kHz? For some reason the output on 256kHz is very stable as if it was going through the low pass filter. I know I could sample directly at 1kHz but this is wasting way too much my system recources, so sampling every 3.9ms at 256Hz is ok for me. Any help is appreciated.
  13. Hi all, perhaps someone can help me to find a solution for my problem. I got the original teapod demo working together with the arduino code MPU6050_DMP6.ino. The plane on the processing sketch does exactly what I want to get out; the absolute position of the object in respect to the ground position (or point of view). All what i want is to get the angles for each axis of the object (yaw, pitch and roll) in realtime, just like i sit in the plane an look on an artificial horizon. All my attempts to convert quaternion to euer or YPR ended in solutions, where pitch an roll interact. So for example if i first roll about 30 degrees and then change the pitch angle from 0 to 70 degrees, the roll angle changes but there is no roll on the MPU6050. Does anybody have an idea how to solve this problem ? Thanks and regards Stefan
  14. Hi, I'm using MPU6050 for a wearable application and the IC responds well at times but gives out 0 acceleration at times even though Device-ID is read correct always. It is also found that, once I heat the IC with a hot air gun, it works again. In the datasheet provided by the link below, it is said under section 11.4 Assembly Precautions that the exposed pad must not be soldered, but I have it soldered it in my target board and it is also mentioned that thermo-mechanical stress will affect the IC . I also have a buzzer in my board, will it be as reason too? Regards, Joe https://www.google.co.in/search?q=MPU-6000+and+MPU-6050+Product+Specification+Revision+3.4&rlz=1C1CHWL_enIN764IN764&oq=MPU-6000+and+MPU-6050+Product+Specification+Revision+3.4&aqs=chrome..69i57.325j0j4&sourceid=chrome&ie=UTF-8
  15. Hi there, I am attempting to use an SSD1306 and a MPU6050 together. I am using the U8G2 and I2CDevlib libraries but the devices seem to be mixing each other up. The devices each work seperatly but not together and have different addresses. Does anyone know why this is happening?
  16. mpu6050GetDeviceID() hangs. Any idea why this happens? I'm building for stm32f405 attached to mpu6050 by i2c using nosys c stl w/c99. I have verified that the stm32f405 can run a program and that this program works with the arm-atollic-eabi-gcc compiler, but not with the arm-none-eabi-gcc compiler.
  17. Hi there,I am using the MPU6050 and I2CDevlib library to obtain quaternion values from the sensor. This sketch is currently taking up a bit too much memory for my liking and I noticed that there is a 64 byte buffer. Since I am only using one set of data, is there anyway to go into the library and not input the other data such as acceleration and gyro?Thanks
  18. Would anyone be able to explain these general terms about the library? 1. How does the Digital Motion Processing (DPM) within the chip work? What does it do?2. How does the interrupt work? What is it caused by? I have a heavy sketch going on in the meantime (SD card, display, heart rate sensor.etc) in the background. Can it still be used with all these modules without delaying other functions?3. How does the library incorporate quaternions? Thanks Daniel
  19. Hi there, I am trying to use this library with my MPU6050 and Arduino to count steps and it is working great but it is taking up too much flash. Is there anyway to reduce the amount flash this library takes up? Daniel
  20. Hello i would like to ask some help on how to interface the dsPIC30F4013 to MPU6050 i got the example code from jrowberg using the dsPIC30 in mplab x i build it and it was ok however i would like to know what external crystal is used for this example and if there is a schematic for this that would be great thanks in advance!
  21. Hello, I have been trying to find a solution for this issue for a while now. Any info/suggestion/pointing in the right direction would be of great help. I am working on a project where I extract quaternions to deduce orientation using MPU6050 (DMP). I use the Arduino and libraries by Jeff Rowberg for calibration and reading from sensor. I have had a prototype working with MPU6050 mounted the standard way(gravity along Z) and it works fine. I then built a custom PCB with MPU6050 chip, which is then assembled to my project. The difference being, PCB is assembled such that the gravity is not along Z, it is along X. It doesn't work as I expected (like the initial prototype). When I turn on the device, I do some initial calculations to reference it (world to body coordinates conversion). This doesn't behave as I expect. My questions are, 1. Does the DMP or library assume that the gravity is always aligned along Z by default? 2. What steps should I follow to tell the DMP/Sensor that the gravity is aligned along X and not Z? I am not an electronics guy and haven't worked extensively with sensors. So, if what I ask is stupid, please forgive me. Please do share your thoughts. Many Thanks. Kind Regards, Kailash
  22. Hello, I am a college student working to build a UAV. I selected the MPU6050 as my IMU because it seems to have a pretty substantial community around it. Time to test that! Does anyone know how to invert the orientation of the IMU sensor in order to change its frame from a quadcopter to a UAV? I have attached photos below. I have tried flipping the physical sensor and playing with the offsets but that has not yielded anything useful. I have designed a complicated quaternion attitude controller dependent on the AC orientation and it would be a real pain to have to redo all of my work because of a IMU coding issue. I have the MPU6050 connected to a raspberry pi, which runs the controller, and am using an Arduino Due to control the motors/servos. Any help with this would be greatly appreciated!
  23. I am building a head tracker for FPV using the MPU-6050. I need to add a button so that a user can tap it to say essentially 'this is the new center'. I imagine this should be done using the set____Offset functions but for the life of me I can't figure it out. Are the set___Offset functions accepting raw acceleration/gyro values, gravity free accelerations, etc? Sorry if this is a duplicate question, I've tried searching the forums but I'm not even sure I'm using the correct terminology. Thanks!
  24. I am building a head tracker for FPV using the MPU-6050. I need to add a button so that a user can tap it to say essentially 'this is the new center'. I imagine this should be done using the set____Offset functions but for the life of me I can't figure it out. Are the set___Offset functions accepting raw acceleration/gyro values, gravity free accelerations, etc? Sorry if this is a duplicate question, I've tried searching the forums but I'm not even sure I'm using the correct terminology. Thanks!
  25. To the I2CDev community, I am having trouble understanding the units of the MPU6050::dmpGetGyro() functions from the MPU6050_6Axis_MotionApps20.h file in the MPU6050 library (I can't find any documentation for the functions). It seems that these functions do not output raw integers like the MPU6050::getMotion6() function in the main library. In fact, I have figured out empirically that the dmpGetGyro(VectorInt16 *v, const uint8_t* packet) function outputs integers in degrees/second when the gyro range is the default of +/- 2000 deg/sec, but I would like a precision greater than 1 degree/second, and I cannot find out how to convert the 16 bit dmpGetGyro(int16_t *data, const uint8_t* packet) values to deg/second. Furthermore, if I change the gyro range (and therefore also the sensitivity), the readings change, and I need to know how to convert my readings at each sensitivity. My question is similar to this unanswered one from stack overflow. Thank you so much for your response.
×
×
  • Create New...