Introduction: Make a Self-balancing Robot With Arduino UNO
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.
We have a be nice policy.
Please be positive and constructive.
Could you post or send me the template of the acrylic parts?