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.

<p>could you send me the code please?</p><p>ncmamm@gmail.com</p>
<p>All of you asking for the CODE, try reading the Ible and use some common sense.</p><p><a href="https://drive.google.com/open?id=0B_d2pPrExdfYd3hxeGNLUFM4elE&authuser=0" rel="nofollow">https://drive.google.com/open?id=0B_d2pPrExdfYd3hx...</a></p><p>Link for the Idle.</p>
<p>Thank you!!<br>Finally, someone speaks my mind.. it just feels wrong reading an instractable without finding a senseless comment like:</p><p>&quot;Send me AND JUST ME the code and the schematic and probably a copy of the robot to my email: Moron@StealingProject.com<br>Warning! Do not share the schematic or code on the website but send it to the only worthy person here which's me&quot;</p><p>Morons!!</p>
<p>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. </p><p> 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.</p>
<p>ola, estou construindo um destes e preciso do codigo e do esquema alguem pode me enviar, obrigado. </p><p></p><p><br>Ol&aacute;, eu estou construindo um destes e precisa do c&oacute;digo e esquema algu&eacute;m pode me enviar, obrigado.</p><p>galdinofsneto@gmail.com</p>
<p>Is there somewhere online where I can order the Acrylic board cut using a template?</p>
<p>Please, send methe code</p><p>jnhernan@gmail.com</p>
<p>I need learn this.<br><br>alexandre_ar@msn.com<br><br>Many thanks.</p>
<p>Superb Job</p><p>Can you send me the code</p><p>Thanks in advance</p><p>d.thirunavukarasu@gmail.com</p>
<p>Fantastic Job!</p><p>please send me the code and schematic?</p><p>Thanks!</p><p>jnhernan@gmail.com</p>
<p>Great Job!</p><p>please send me the code and schematic?</p><p>Thanks!</p><p>andrep.defaria@gmail.com</p>
<p>hi guys... send me the code too</p><p>ndamonauunona@gmail.com</p>
<p>guys does anyone have code?</p><p>pls share this code ı really need and ı ll apprıcıate </p><p>thank you</p><p>here ıs my gmail : the07ruben@gmail.com</p>
<p>please send me the code. thank you!</p><p>lengoc1997th@gmail.com</p>
<p>please send me the code, thank you!<br>duongvu.av@gmail.com</p>
<p>pls send me the code , thank you</p><p>saif120009@cceoman.net</p>
<p>pls send me the code , thank you</p><p>Ashkan.khajeh@gmail.com</p>
<p>Can you please send me the code ? Thank you so much.</p><p>phamdacphuoc1995@gmail.com</p>
<p>Hi. I`m making segway, could you please send me the code ? mkadakovskis@gmail.com</p>
<p>i really want code and schematic, send me please!</p><p>chelsee9x@gmail.com</p><p>Thank You !</p>
<p>Can you please send me the code and schematic ?<br>dbgt640@gmail.com</p><p>Thank You !</p>
<p>Can u send me the code and schematic please </p><p>roniiymerii@gmail.com</p>
<p>i proud it</p><p>please send me the code and schematic?</p><p>putra.pamungkas00@gmail.com</p>
Great !!!<br><br>can you please send me the schematic and code?<br><br>vohung8385@gmail.com
<p>cool and amazing job !!</p><p>would really appreciate it if u could send me the code</p><p>kesavanath@hotmail.com</p>
Can you please also send me the code? ?<br>Csolim@hotmail.com
<p>it's an amazing job ! <br>if you send me the code I'll be so grateful for you :) <br>mlr.t3ys95@gmail.com</p>
Can you please also send me the code? ?<br>mlhomsi@gmail.com
<p>Hi,</p><p>Great job !!!</p><p>can you please send me the schematic and code?</p><p>teitan1@walla.com</p>
Can send me the code<br><br>anandhs1996@gmail.com
<p>Hi everyone, I felt confused about the code in line 243;pwm = (Angle_Car-5 + K_Base)* KA_P //P</p><p> + Gyro_Car * KA_D //D</p><p> + Position_Add * KP_I //I</p><p>+ Position_AVG_Filter * KP_P; //P</p><p>does anyone know why use Angle_Car minus 5 and then plus K_Base?</p><p>Thank you:) </p>
<p>could you send me the code please?</p><p> rickynieto97@gmail.com</p><p>thx</p>
<p>Can you please send me the code </p><p>hortoncory77@gmail.com</p>
<p>can I have the the code please ! <br>mlr.t3ys95@gmail.com</p>
<p>send me the codes too..</p><p>vardeep.sandhu277@gmail.com</p>
<p>nice....can u send me the code ?</p><p>shahsomesh1@gmail.com</p>
<p>EXCELLENT PROJECT, CAN YOU SEND ME THE CODE? jvcortes2013@gmail.com</p>
<p>very nice! can you please send me the schematic and code? 7ossam.elwan95@gmail.com</p>
<p>nice job! would you please send me the schematic and code ?</p><p>ghorab_1995@hotmail.com</p>
<p>nice job! would you please send me the schematic and code ?</p><p>ghorab_1995@hotmail.com</p>
<p>I have completed the hardware part. But facing some problems with the code. But i really like to finish the project as soon as possible. Could you please send the code to me --&gt; leontalukdar@gmail.com, Thank you.</p>
<p>I got my BalanBot kit before about 1 month from makerstudio.cc.<br>My first problem was:<br>Because of the photos I assumed the Arduino Uno belong to the delivery.<br>This was not the case, and the Arduino Uno is also not listed in the bill of materials.<br>The BalanBot kit from makerstudio did not supply a single sheet of <br>paper, not any hints for adapting the Arduino ports or installing the <br>code.<br><br>I asked Steve from makerstudio.cc for schematics. <br>Steve sent me a schematic for the balance shield and a schematic for the bluetooth 2.0 shield.</p><p>Feel free to ask me for sending you the schematics.<br>My mail address: djk24@arcor.de<br><br> After I had bought the Arduino bought later and adjusting the code a bit, I could take the BalanBot in operation.<br>That means, the BalanBot balances standing on the floor.<br>In a further step I added the bluetooth 2.0 shield.<br>No I was able to let the BalanBot run by control with my Samsung S3 smartphone.<br>I wanted to steer the BalanBot using the Android gravity sensor. That did not work. :-(<br> I would like to stay in contact with other users you for further exchange of help and experience.<br><br>Dietrich</p>
<p>Hey, where did you find the code? I built it and would like to make it work .. Please share, my email is l.walckenaer@gmail.com, Thanks! </p>
<p>I have completed the hardware section and really would like it to work, please share your sketch code with me - l.walckenaer@gmail.com, Thank you much!</p>
<p>I have completed the hardware section, please share your sketch code with me - valmor_mello@terra.com.br, Thank you much!</p>
<p>I have completed the hardware section, please share your sketch code with me - hendrik.zwiegelaar@gmail.com, Thank you much!</p>
<p>Hi could you share a code to choikayam@gmail.com? Thanks! I feel interested on your work!</p>
Do you have a code? If you have share to me , please
Could you share a code to me, please ? My email: lanphong1994@gmail.com <br>Thank you
<p>i have 2 motor but they're not connecting with encoder. is this ok or i need to buy encoder motors?</p>

About This Instructable




Bio: I am maker_studio and I love to build the robot of Arduino and DIY something fun. Here is something new&amp;fun: kck.st/2q0eCUG
More by maker_studio:How to DIY a set of pictrue pannel earphones How to build  a Bluetooth wireless upload Self-balancing Robot How to DIY a magnetic car mount QI wireless charger 
Add instructable to: