Hello friends this post is about DIY self balancing robot in this post I’ll show how you can build your own Self balancing robot.

I have tried to build the project but failed not get results as expected. but this robot turn out quite good and accurate, though this is not perfect but best as compare to my previous bots.

I have use a custom made PCB, Arduno nano, MPU6050, A4988 driver, HC-05 bt module, MDF board and some hardware to build this self balancing robot, detail material list you can found further in this post. Balancingwii firmware and EZ-GUI android app is used in this project to control robot via Bluetooth connection.

I have used a custom build PCB in this project which I have ordered from

So lets begin with some basic of self balancing robot.

Basics of self balancing robot

Self balancing robot is the bot balance itself on two wheels, by constantly correcting its position. A Gyro sensor is used in self balancing robot, which continuously sends the robot orientation data to the controller. on the basis of this data controller command the motor to run forward or reverse to maintain the position of robot up straight.


This is the ideal position of self balancing robot, body is perfectly up staring on the wheel There is zero angle between the Y axis and body of robot.


When body tilt in forward direction then there is some angle between Y axis and body. This angle is detected by MPU6050 gyro sensor, then this data send to Arduino. Arduino now do PID calculation and command the stepper motor to run in forward direction to minimize the tilt angle upto zero degree.


Same thing happens if when robot tilt in backward direction, motor will rotate in backward direction and correct the tilt angle to zero. The bot in continue running motor forward and reverse more then 400 times in second so its looks us like robot is stable at its place.

Components Required

  1. Arduino Nano…………………………….1 no.
  2. MPU605 Gyro sensor……………….1 no.
  3. Nema 17 Stepper motors………….2 nos.
  4. 100mm Wheels…………………………..2 nos.
  5. A4988 Stepper driver IC…………..2 nos.
  6. HC-05 Bluetooth module………….1 no.
  7. 4mm MDF board.
  8. 150mm M5 threaded rods——–4 nos.
  9. some nuts and bolts

PCB design : -

Android app :-

Arduino code :-

DIY Self Balancing Robot Electrical drawing


Above image is the circuit drawing of self balancing robot. I have prepare a PCB also you can download the Gerber file to order PCB or you can also edit the PCB in easyeda platform.


Here I prepared a custom PCB for this Self balancing robot This PCB have provision to connect two stepper motors, one HC-05 BT module.

PCB is key of this project because if we build such project without custom PCB we will never get desire results and wiring became too messy

I have design this in EasyEDA platform and order it from and you won’t believe I get my PCB in just a week to my door step and in quite low price. offering PCB in as low as $2 for 1-4 Layer PCBs Guys I will recommended you must have to try service for your future PCB need.

MVI_5077 00_01_19_01 Still003





If you seriously need quality PCB quickly in your hand then you must have to try JLCPCB PCB manufacturing service. They have Special offer of $2 for 1-4 Layer PCBs, free SMT assembly monthly. If new user signup today from this link you will get welcome coupons from JLCPCB.

image image

SMT Assembly service of is cherry on top now get your PCB fully assembled and save your time and money Select components for your PCB from there Parts Library of 200k+ in-stock components they are offering $30 valued New User coupons & $24 SMT coupons every month $8.00 setup fee, and $0.0017 per joint...

Read more »