Pages: [1] 2   Go Down
Author Topic: dmp on MPU6050  (Read 10742 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi at all!

I have a platform drotek 10dof, arduino 2009 328p, ide1.01, win 7 64 bit.

The sketch of the site arduino.cc krodal in the playground, he runs well, with raw sensor data.

By jeff rowberg on github site, the file mpu6050_raw is ok but MPU6050_DMP6 gives me this screen



and then,  error: FIFO OVERFLOW.

does anyone know how I can fix it?


* seriale dmp.JPG (44.15 KB, 723x552 - viewed 555 times.)
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The FIFO is used with the INT (interrupt) to signal that something is waiting in the fifo.

If you check the example code, you see that an interrupt routine is used. So you have to connect the INT output of the sensor to some input of the Arduino.

Check this line in the code: attachInterrupt(0, dmpDataReady, RISING);
That where the interrupt routine is set with interrupt 0 (pin 2).
http://arduino.cc/it/Reference/AttachInterrupt
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I added the line suggested:
attachInterrupt (0, dmpDataReady, RISING); in the interrupt detection routine, before the initial setup.

The problem of fifo overflow is re-proposes after several seconds of time.

To use the potential of the sketch MPU6050_DMP, perhaps I have to change this line?

fifoBuffer uint8_t [64]; / ​​/ FIFO storage buffer
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Enlarging the FIFO buffer ? I don't know if the code can handle that.
You could try to double the size, just to test what it will do.

Sorry if my post was not clear.
You don't have to add that line, it is already in the code. So please remove what you added. Use the original code.
Look in the code for that line (search for "attachInterrupt"), you see that INT0 (pin 2) of the Arduino is used.

Question : Do you have the interrupt output of the sensor board connected to the interrupt input of the Arduino?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it is I who must apologize!

I found the line of code, I try to set the right number of the switch outside.

Your question to me is a problem ...
The connections between Arduino and 10dof drotek these should be ...



* drotek - MPU6050 - HMC5883 - MS5611 I2C 3.3.JPG (124.43 KB, 557x588 - viewed 432 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I do not understand what I do ...

interrupt by setting to 1, the serial ..

Initializing I2C devices...
Testing device connections...
MPU6050 connection successful

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...
$=vQÿ¹
FIFO overflow!
$:ÞWM¾
FIFO overflow!
FIFO overflow!


* Cattura seriale.JPG (46.95 KB, 726x559 - viewed 245 times.)
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There should be an extra line: the interrupt.
The sensor signals an interrupt, telling the Arduino that new data is in the FIFO. The Arduino reads the sensor FIFO data over the I2C-bus, but only if the Arduino gets the interrupt signal.

But your sensor board doesn't have an interrupt output !

If your Drotek sensor board is this one, there is no interrupt output.
http://www.drotek.fr/shop/en/62-imu-10dof-mpu6050-hmc5883-ms5611.html

But this Drotek sensor board does have a interrupt output.
http://www.drotek.fr/shop/en/42-mpu6050-gyro-accelerometer.html

The Sparkfun sensor board has a 'INT' output: http://www.sparkfun.com/products/11028
My Ebay sensor board has a 'INT' output: http://arduino.cc/playground/Main/MPU-6050
This has a 'INT' output: http://flyduino.net/MPU6050-Break-Out-onboard-33V-reg_1
Even this one has a 'INT' output: http://www.varesano.net/blog/fabio/libre-breakout-board-invensense-mpu6050

You bought the only board without 'INT' output, so you probably can't use the Jeff Rowberg library.
Perhaps you could ask Jeff Rowberg if this board can be used without interrupt.
Or you could ask Drotek.fr how to solve this.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks a lot, now I understand better the situation ..

I try to contact jeff (or drotek..),

but do you think can change the sketch of such free_imu or others to obtain a result similar to that of MPU6050_DMP?
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

...but do you think can change the sketch of such free_imu or others to obtain a result similar to that of MPU6050_DMP?
In the playground section: http://arduino.cc/playground/Main/InterfacingWithHardware#DOF
there is a link to the forum : http://arduino.cc/forum/index.php/topic,58048.0.html
which is about Kalman filtering and so. But I haven't used that yet, so I don't know much about it.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, for using your thread. I happened to have your same problem. Like Krodal said, i connected INT of my MPU-6050 to digital pin 2 of the arduino, still the serial monitor displays junk values. Any idea what i should do?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Never mind, guys. Got it working. I hadn't noticed the define statements were commented, i had to uncomment them to get the readings. But I haven't got the teapot application working though smiley-sad It just doesn't move. If anyone does get it, Please help me out.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the same problem. INT is connected to pin2, still FIFO overflow smiley-cry
Any sugestion?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe your code is too slow or ineffective? I had a FIFO overflow too when I set the baudrate to 4800 and when I had a small delay in the code smiley-wink But I have a problem with my arduino pro mini 8mHz 3.3V. I use the same code for my Uno and Mini, but the mini won't even execute the first part of the code whereas it runs fine on the UNO.. The mini doesn't seem to get past the mpu.initialize(); part..

Quote
void setup() {
    // join I2C bus (I2Cdev library doesn't do this automatically)
    Wire.begin();

    // initialize serial communication
    // (115200 chosen because it is required for Teapot Demo output, but it's
    // really up to you depending on your project)
    Serial.begin(19200);
  


    // initialize device
    Serial.println(F("Initializing I2C devices..."));
    mpu.initialize();

any ideas??
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i would be happy if the sketch comes to the FIFO Overflow, my problem and i dont know why:

Initializing MPU device...
Testing device connections...
MPU60X0 connection successful

Send any character to begin DMP programming and demo:
Initializing DMP...


Resetting MPU60X0...
Disabling sleep mode...
Selecting user bank 16...
Selecting memory byte 6...
Checking hardware revision...
Revision @ user[16][6] = 4D
Resetting memory bank selection to 0...
Reading OTP bank valid flag...
OTP bank is valid!
Reading gyro offset values...
X gyro offset = 63
Y gyro offset = 0
Z gyro offset = 1
Setting slave 0 address to 0x7F...
Disabling I2C Master mode...
Setting slave 0 address to 0x68 (self)...
Resetting I2C Master control...
Writing DMP code to MPU memory banks (1929 bytes)
Success! DMP code written and verified.
Writing DMP configuration to MPU memory banks (192 bytes in config def)

Can anybody please help me out with this?
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3032
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

that looks successful.   what are you actually complaining about ?
Logged

Pages: [1] 2   Go Up
Jump to: