Build a Self-balancing Vehicle With MDrawBot

7,061

20

4

Posted in TechnologyRobots

Introduction: 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

Just three pieces, pretty simple.

Step 2: The Motors

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

Step 3: The Main Frame

Step 4: Wheels

Step 5: Wiring

Step 6: The Battery

Step 7: MPU6050

Step 8: Coding

Download the code here.

Step 9: Show Time

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

Share

    Recommendations

    • Space Challenge

      Space Challenge
    • Science of Cooking

      Science of Cooking
    • Spotless Contest

      Spotless Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    4 Comments

    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

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

    cool project