Pages: [1]   Go Down
Author Topic: Sensor & Servo interfering [PROBLEM]  (Read 1254 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello peeps,

Maybe I should start by telling you what I am doing so you can get a perspective of my problem and maybe give me a helping hand.

I have a sensor called Triple Axis Accelerometer & Gyro Breakout - MPU-6050 , and Ive managed to get it working. I can get the information I want from it.
And to get the information I want from it Im using the interrupt function.  So the interrupt part is a big factor of the problem I will tell you about.

So Ive tried to expand the code further, by adding servos.
What Im trying to do is to control the servos depending on the values the sensor is generating. It works out, for a couple of seconds.

The problem is now that, after these couple of seconds the values from the sensor gets screwd up. Getting values that I shouldnt get.

Conclusions:
The servo and the sensor are overflowing the fifobuffer.

Help appreciated, cheers!

Edit:
Link for the code im using
https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino
« Last Edit: October 08, 2012, 07:42:12 am by freak174 » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bump!
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you powering the servos ?

Check the two links in my signature for why this maters

Duane B

rcarduino.blogspot.com
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I followed your advice but I still have the same issue as before.
But I will continue with using external battery to supply the servo, so thanks!

This is an answer I had from an other site but I dont know how to go any further.
Quote
Well, yeah, if you are getting FIFO overflow, you are not emptying it out in time so something must be using too much time. If you are generating PWM signals for the servo with the same processor that reads the MPU then you could easily overflow the FIFO. I mean if THAT’S your configuration. It also means your sensor is set for free running reads.

Please help me go further!

PS. DuaneB, nice projects uve done!
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bump!
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
   Quick suggestion - most of us will not click on links in posts, try adding your code to the post and dont forget to use the # button to include it inside code tags

Duane B

Logged


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

The servo and the sensor are overflowing the fifobuffer.

I have exactly the same problem! Did you figure out ? Also Im using same piece of code.
Logged

Pages: [1]   Go Up
Jump to: