Post Reply 
 
Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fully Working!! MPU 6050 Calibration and B-Robot with Big Easy Driver
07-21-2015, 08:53 AM (This post was last modified: 12-29-2016 05:49 PM by techobycr.)
Post: #1
Fully Working!! MPU 6050 Calibration and B-Robot with Big Easy Driver
****************
UPDATE:[/code]
Solution in Post #7
****************

Hi!

This is an amazing project, I been trying to make it work with what I have, and is not working.

I have Debug set to 1, and only shows the MPU data, no errors, but the wheels just turn to one direction and, obviously, B-robot falls.

What am I doing wrong?!!

Well... this is what I have.

- Arduino Leonardo
- 2 Big easy driver (spark fun)
- 6050 ITG/MPU
- Nema 17 Stepper

Motor 1
Step pin = 7
Dir pin = 8

Motor 2
Step pin = 12
Dir pin = 5

Enable pin = 4 (both drivers)

MS 1,2,3 = To HIGH (both drivers)

Not conected yet to wi fi module (I'll be using a ESP 8266)

Code uploaded as is.
Find all posts by this user
Quote this message in a reply
12-26-2016, 05:48 AM
Post: #2
Working!! B-Robot with Big Easy Driver
Got it working! After all this time... I just had time to put it to work.

But I am having this issue, does not matter if I turn it on lay down o standing up, is not vertical and walks backwards if I connect to with wifi an try to go forward just stops.

So close...

What it could be?
Find all posts by this user
Quote this message in a reply
12-26-2016, 10:06 AM
Post: #3
RE: B-Robot with Big Easy Driver
Could you post a video?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-26-2016, 03:30 PM
Post: #4
RE: B-Robot with Big Easy Driver
(12-26-2016 10:06 AM)jpedroc Wrote:  Could you post a video?

Thanks for the quick reply.

Of course!

https://youtu.be/n1PA_WgCOwQ

Lastnight I burnout the ESP8266, I'll had a new this afternoon.
Find all posts by this user
Quote this message in a reply
12-26-2016, 05:55 PM
Post: #5
RE: B-Robot with Big Easy Driver
I have found that there is no where to set the balance angle if the center is not that. If you adjust that angle by 5 degrees it will stop moving.

Mike
Find all posts by this user
Quote this message in a reply
12-26-2016, 08:11 PM
Post: #6
RE: B-Robot with Big Easy Driver
(12-26-2016 05:55 PM)iseries1 Wrote:  I have found that there is no where to set the balance angle if the center is not that. If you adjust that angle by 5 degrees it will stop moving.

Mike

That would be a momentary fix, just found the problem, Was the calibration process.
Find all posts by this user
Quote this message in a reply
12-27-2016, 12:07 AM
Post: #7
RE: B-Robot with Big Easy Driver
At the end was a easy fix. MPU 6050 needs to be CALIBRATED.

I found a script for auto calibration and works perfect!! Is attached to the this reply.

Place the offset values after "devStatus = mpu.dmpInitialize();" in setup.

Just like this:

Code:
devStatus = mpu.dmpInitialize();

  // MPU 6050 Offset Calibration
    mpu.setXGyroOffset(199);
    mpu.setYGyroOffset(-70);
    mpu.setZGyroOffset(-82);
    mpu.setXAccelOffset(-822);
    mpu.setYAccelOffset(1405);
    mpu.setZAccelOffset(977);

I hope helps anyone with the same problem.


Attached File(s)
.zip  Auto_Calibration_v2_MPU_6050_.zip (Size: 3.25 KB / Downloads: 67)
.zip  BROBOT_fix.ino.zip (Size: 10.06 KB / Downloads: 46)
Find all posts by this user
Quote this message in a reply
12-29-2016, 10:41 AM
Post: #8
RE: Fully Working!! B-Robot with Big Easy Driver and MPU 6050 Calibration
Ok, that fixed the offset I was using to balance the robot. I think the bigger problem here is that the mpu6050 is end of life and is not recommended for new projects. It looks like it will be replaced with the MPU9250 product which works on 3.3v instead of 5v.
I have purchased the sparkfun 9dof board and it will interface with the Leonardo board, but not with the jj shield board.

Mike
Find all posts by this user
Quote this message in a reply
12-29-2016, 01:26 PM
Post: #9
RE: Fully Working!! B-Robot with Big Easy Driver and MPU 6050 Calibration
Oops spoke to soon. Robot still moves forward. Had to add 5 degrees to PHI angle to get it to move evenly forwards and backwards.

Mike
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)