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:

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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.

Microcontroller Contest

Participated in the
Microcontroller Contest



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    76 Discussions


    Question 9 months ago on Step 3

    where can I buy the balance shield


    Question 9 months ago on Step 7

    Please send the code?


    Question 1 year ago on Step 8

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


    Reply 2 years ago

    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:
    Warning! Do not share the schematic or code on the website but send it to the only worthy person here which's me"



    Reply 2 years ago

    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.


    1 year ago

    Please send me the code

    thank you so much :)


    2 years ago

    Please send me the code,

    thank you so much :)

    dls sp

    2 years ago

    could you send me the code please?


    2 years ago

    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.


    3 years ago

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


    3 years ago

    Please, send methe code