Make a Self-balancing Robot With Arduino UNO

94,457

160

66

Published

Introduction: Make a Self-balancing Robot With Arduino UNO

About: I am maker_studio and I love to build the robot of Arduino and DIY something fun. Here is something new&fun: kck.st/2q0eCUG

Self-balancing Robot is very interesting. Many friends around us were trying to make one, but they encounted a lot of chanllenges including the lack of the easy-to- assembly structures, the suitable electronic circuits and the programs. So I decided to make a self-balancing robot as simple as possible.

Thanks to Arduino team that almost every
maker has one Arduino board in hand. Among those Arduino boards, Arduino UNO R3 is the most universal entry-level board. Arduino UNO is open source and there are huge of applications based it. We want to help those who has the similar idea of making a self-balancing robot based on the Arduino UNO.

After a period of preparing including learning theory, programming, making PCB and etc..

My goal comes true and now I'm sharing with you.

Support us on Indiegogo.

Step 1: Preparing

I want the assembly of self-balancing robot to be very easy. It doesn’t need much wires, complicated connections and testing, just like playing with LEGO.

I designed a balance shield that includes gyroscope and motor driver part on it. After times of testing, it can now always work perfectly. Thanks to this shield, as it makes everything much easier.

Bill of the main materials:

  • 1 x Arduino UNO R3 or compatible board
  • 1 x Balance Shield for Arduino
  • 2 x High torque&speed motor with encoder
  • 2 x Wheels
  • 1 x 5mm Acrylic board
  • 2 x 3mm Acrylic board
  • 1 x 11.1V Lithium battery or
  • 1 x 18650 battery holder and 3 x 18650 batteries
  • N x Screws and Nuts

Step 2: Install Two Motors

To make the whole structure strong enough, I use a 5mm thickness acrylic board to fix the two motors.

Step 3: Install Two Wheels

Mount two wheels to the motors and put the motor’s wires out through the slot of the acrylic base board.

Step 4: Install the Acrylic Board for Battery

Install the 3mm acrylic board for fixing the battery.

The battery can be 11.1V battery for model aireplane, either be 3 18650 batteries.

If 18650 batteries are used, it needs to use a battery holder for that.

Step 5: Install the Battery

Using nylon ribbon to fix the lithum battery.

After the battery is fixed, we can now add a new layer of acrylic board by some screws.

Step 6: Install Arduino UNO and Balance Shield

Here we install the Arduino UNO and the Balance Shield with some screws.

The Shield has pin headers for connecting the wires from two motors.

There are also led indicators ,a buzzer and a power switch. A blue-tooth port is easy to connect a blue-tooth adapter for communicating with other device. 4 io pins of Arduino are left,use to connect other sensors or RC receiver .

Step 7: Programming and Run

Programming the code to the Arduino.

With the Balance Shield, and the Arduino collects the angle from gyroscope, position from motor’s encoder then process them. It will control two motors to keep balance.

Step 8: More Applications

With more adapters like bluetooth, WiFi, and RC Receiver, we can control the Balanbot in different ways.

I wrote an application running on computer and another application running on android. So i can easily adjust PID parameters and control my balance robot by android mobile phone via blue-tooth ,gamepad via computer and RC remote .

The balanbot works very stable because of the two high torque&speed motors and the optimized algorithm. It keeps balanced even when you push it suddenly.

It took me a lot of time to get the best matching PID parameter for Balanbot.

Thanks for reading to the end, but I believe the making for more interesting things never ends.

Share

    Recommendations

    • Oil Contest

      Oil Contest
    • Woodworking Contest

      Woodworking Contest
    • Planter Challenge

      Planter Challenge
    user

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

    Tips

    Questions

    Could you post or send me the template of the acrylic parts?

    66 Comments

    thanks kiu man :))

    Thank you!!
    Finally, someone speaks my mind.. it just feels wrong reading an instractable without finding a senseless comment like:

    "Send me AND JUST ME the code and the schematic and probably a copy of the robot to my email: Moron@StealingProject.com
    Warning! Do not share the schematic or code on the website but send it to the only worthy person here which's me"

    Morons!!

    Yep you do get them. I post projects on YouTube and get the same, Send me the code I need it now for a school project. where did you get the parts from that you made ?. I do persevere with them sending everything they normally ask for.

    I got at a bloke who uploaded a ible last week, asking him to put the original coder back in his arduino.ini code download link he had made, he never got back to me about it but days later I checked the code link and the original coder was back in the .ini file.

    Please send me the code

    thank you so much :)

    springstudio.vn@gmail.com

    Please send me the code,

    thank you so much :)

    squad4promo@gmail.com

    could you send me the code please?

    ncmamm@gmail.com

    ola, estou construindo um destes e preciso do codigo e do esquema alguem pode me enviar, obrigado.


    Olá, eu estou construindo um destes e precisa do código e esquema alguém pode me enviar, obrigado.

    galdinofsneto@gmail.com

    Is there somewhere online where I can order the Acrylic board cut using a template?

    Please, send methe code

    jnhernan@gmail.com

    I need learn this.

    alexandre_ar@msn.com

    Many thanks.

    Superb Job

    Can you send me the code

    Thanks in advance

    d.thirunavukarasu@gmail.com

    Fantastic Job!

    please send me the code and schematic?

    Thanks!

    jnhernan@gmail.com

    Great Job!

    please send me the code and schematic?

    Thanks!

    andrep.defaria@gmail.com

    hi guys... send me the code too

    ndamonauunona@gmail.com

    guys does anyone have code?

    pls share this code ı really need and ı ll apprıcıate

    thank you

    here ıs my gmail : the07ruben@gmail.com

    please send me the code. thank you!

    lengoc1997th@gmail.com

    please send me the code, thank you!
    duongvu.av@gmail.com

    pls send me the code , thank you

    saif120009@cceoman.net

    pls send me the code , thank you

    Ashkan.khajeh@gmail.com