Make a Self-balancing Robot With Arduino UNO

by maker_studio in Circuits > Robots

107780 Views, 179 Favorites, 0 Comments

Make a Self-balancing Robot With Arduino UNO

20141027033300-_.jpg
IMG_1106.JPG
20141027035721-control.jpg
Maker Studio Balanbot
Maker Studio Balanbot

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.

Preparing

20141027035607-IMG_1061.JPG
IMG_0951.JPG
20141027040741-_1.jpg
20141027045145-opensource.png
IMG_1086.JPG
IMG_1123.JPG

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

Install Two Motors

IMG_0942.JPG
IMG_1089.JPG

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

Install Two Wheels

IMG_0940.JPG
IMG_0941.JPG

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

Install the Acrylic Board for Battery

IMG_0938.JPG
IMG_1087.JPG

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.

Install the Battery

IMG_0936.JPG
IMG_0884.JPG

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.

Install Arduino UNO and Balance Shield

IMG_0934.JPG
ArduinoUno_R3_Front.jpg
IMG_1086.JPG

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 .

Programming and Run

IMG_0933.JPG
IMG_1090.JPG
Maker Studio Balanbot
Maker Studio Balanbot

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.

More Applications

IMG_1074.JPG
11505903.jpg
IMG_1099.JPG
EB-Bluetooth2.0.JPG
EB-Bluetooth4.0.JPG
EB-WiFi.JPG
Maker Studio Balanbot

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.