Introduction: Build a Self-balancing Vehicle With MDrawBot

Picture of Build a Self-balancing Vehicle With MDrawBot

I got a mDrawBot from Makeblock a few days ago. This awesome robot kit is a kickstarter project now. Today I transform it into a self-balancing vehicle with a MPU6050 module. Check it out.

Step 1: The Frame

Picture of The Frame

Just three pieces, pretty simple.

Step 2: The Motors

Picture of The Motors

Then fix the stepper motor to the "L" piece.

Step 3: The Main Frame

Picture of The Main Frame

Step 4: Wheels

Picture of Wheels

Step 5: Wiring

Picture of Wiring

Step 6: The Battery

Picture of The Battery

Step 7: MPU6050

Picture of MPU6050

Step 8: Coding

Download the code here.

Step 9: Show Time

Picture of Show Time

There seem to be something wrong with the Kalman Filter. I will check it later.

Comments

MaximeP3 (author)2017-01-23

Hi

Thanks for your code, but I'v a probleme for compile on arduino

Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\max\Downloads\F9IH0QDI7RGBMI7\banlance_robot_stepper\banlance_robot_stepper.ino:11:0: warning: "PI" redefined

#define PI 3.1415926

^

In file included from C:\Users\max\Downloads\F9IH0QDI7RGBMI7\banlance_robot_stepper\banlance_robot_stepper.ino:2:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:47:0: note: this is the location of the previous definition

#define PI 3.1415926535897932384626433832795

^

C:\Users\max\Downloads\F9IH0QDI7RGBMI7\banlance_robot_stepper\banlance_robot_stepper.ino: In function 'void initMpu()':

banlance_robot_stepper:260: error: void value not ignored as it ought to be

int8_t ret = accelgyro.getMotion6(&acc[0], &acc[1], &acc[2], &gry[0], &gry[1], &gry[2]);

^

C:\Users\max\Downloads\F9IH0QDI7RGBMI7\banlance_robot_stepper\banlance_robot_stepper.ino: In function 'void calcAngle()':

banlance_robot_stepper:288: error: void value not ignored as it ought to be

int8_t ret = accelgyro.getMotion6(&acc[0], &acc[1], &acc[2], &gry[0], &gry[1], &gry[2]);

^

banlance_robot_stepper:292: error: 'Fastwire' has not been declared

Fastwire::setup(150, true);

^

C:\Users\max\Downloads\F9IH0QDI7RGBMI7\banlance_robot_stepper\banlance_robot_stepper.ino: In function 'void setup()':

banlance_robot_stepper:470: error: 'Fastwire' has not been declared

Fastwire::setup(150, true);

^

exit status 1

void value not ignored as it ought to be

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

2 year but if it's possible to help me?

thanks

smfox10 (author)2015-03-31

Can I make it by arduino?

Cration (author)smfox102015-03-31

Yes, I think so. But the wiring may be a little messy.

indream (author)2015-03-28

cool project

About This Instructable

6,941views

20favorites

License:

More by Cration:Build a self-balancing vehicle with mDrawBot
Add instructable to: