Facebook Twitter Gplus YouTube RSS
Home » My Robots » EV3 » Tutorial: Building BALANC3R

Tutorial: Building BALANC3R

Published on June 23, 2014 by in EV3, EV3 Building


This tutorial provides step-by-step instructions to build BALANC3R, a self-balancing LEGO MINDSTORMS EV3 robot.




  • 1x Gyroscopic Sensor. Use one of the following sensors:
  • Both sensors work great in this project, but here are some considerations before you buy:
    • The EV3 Gyro is cheaper. It can measure the angular rate and estimate the accumulated angle. The accumulated angle is not used in this project, but it may be helpful for other projects, such as making accurate turns.
    • The HiTechnic Gyro is more accurate for this application because of the increased resolution. It can only measure angular rate.


Building Steps

Build the robot by following the steps in order. Click on the pictures for a bigger image. Be sure to connect the motors and sensors to appropriate port on the EV3 brick as indicated by the port icons.


















The following two steps are for the LEGO MINDSTORMS EV3 Gyroscopic sensor only. Skip these steps if you have another sensor.


Attach the LEGO MINDSTORMS EV3 Gyro sensor as follows. Be sure to connect it to the side of the EV3 brick with the USB port.


The following two steps are for the HiTechnic Gyroscopic sensor only. Skip these steps if you have another sensor.

BALANC3R_20Attach the HiTechnic Gyro sensor as follows. Be sure to connect it to the side of the EV3 brick with the speaker.



Now that you’ve finished building your robot, you’re ready to program it. See this article for instructions.


Click to go to the programming tutorial.

 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
25 Comments  comments 

25 Responses

  1. Robin Newman

    Great project Laurens. Looking forward to the code next week.

  2. Tomas Naslund

    Nice!Really looking forward to the program. I’ve been trying to wrap my head around the “segway”-programming for some time. Always ending up with my robot falling flat with both wheels full throttle in random directions:) Please tell me there will be an step by step tutorial for the programming as well! I’m dying to get it all explained to me! You are doning a great job! Thanx /Tomas

  3. Ronald Ledford

    Just finished building your Formula EV3 Race Car. Enjoyable project. I plan on having a programming joy using RobotC. But yet, the remote control program is keeping me busy driving the car.

    In the meantime, I having been looking at your BalancE3 robot. I will have to use my NXT motors instead of the EV3 motors. It will be interesting to see if your program will work with no problem.

    • Hi Ronald,

      Great to hear that robot was fun to build. Maybe after you’ve tried the BALANC3R project, you can make the Formula EV3 Race car balance on its two rear wheels, and continue controlling it with the remote :D (It’s one of the challenges at the end of the balancing tutorial)

      The NXT motors are indeed quite comparable. Actually, I find them to be slightly more precise because they seem to have less backlash, which is good for balancing.

      When rotating in place, you’ll notice that BALANC3R balances almost perfectly, while it moves back and forth while trying to stand still. That’s because when standing still, it constantly moves back and forth across the backlash. While turning, it’s always on one side of the backlash.


  4. ethan tran

    Can you use the dexter industries gyroscope sensor for the balanc3r?

  5. Ben

    Hello Laurens,
    I’m sorry that I posted this comment here but it wouldn’t work on the other page. I bought your book on my kindle but I saw the BRICK SORT3R so I put in the password in figure 15-9 and it didn’t do anything when I submitted it just looked liked it refreshed the page. Am I doing any thing wrong?

    sorry for posting on this page it was one of the pages that didn’t have passwords on it,


  6. Arafat Qureshi

    Hello Laurens,

    Great site and book. I will order that. I am taking and advanced Robotics course this fall and we will be using EV3. But a lot of advanced programming will be in leJOS. Do you have a book recommendation for leJOS programming?

    Thank you and keep up the great work.
    Best wishes

  7. Irvin Stafford


    I have used and enjoyed your EV3 book very much.
    The Balanc3r ‘bot is fantastic!

    I added an Arduino UNO, Emic2 text to speech module, EasyVR voice recognition module, Bluetooth module, Pixy CMUcam5 video camera, and a FrSky RC receiver to my Balanc3r ‘bot that I call Wilber.
    He is to have 5 modes of control and speech:
    1) IR control using the EV3 Beacon
    2) Voice recognition control
    3) Bluetooth-cell phone App. 1
    4) Bluetooth
    5) RC control
    6) Video control

    The basic idea is to convert all the control sources to ‘speed’ and ‘steering’ values.
    I was able to get each control mode working on a breadboard but have not combined them. The IR control and RC control are working now.
    I used Dexter Industries I2C block to communicate between the EV3 and the Arduino.
    Here is a short movie of Wilber under IR control.

    Again, thanks for creating such a great platform!

    Irv Stafford

    • Hi Irv,

      Thanks a lot for your comment. Sorry I didn’t see it before—I have to manually review any comment with a URL in it to reduce spam.

      Glad to hear you liked the book. The extended Segway project with sound is impressive, nice work!



  8. mike

    hi, i have the gyro from mindsensors http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=158
    can you give me any pointers on how to use this sensor in your program please.?
    thanks in advance.

  9. Jay

    Can you post the programing using absolute-IMU?

  10. Peter

    Hey Laurens,
    I have buildet jour balancer and i have building a line follower from that, i can give jou the instructions and the ev3 programm, THATS REALY WORK!

  11. Peter

    Hey laurens peter here!
    I need a challange to build an robot, why an DUCKS3GWAY or a realy fast car
    Or… Can jou reply and write it?ok. HAPPY HALLOWEEN!!!!

  12. Aubrey Johnson

    Enjoying your excellent book received as Xmas gift.
    Have you published any new build instructions as I’ve completed just about everything out there, but just not creative on my own at 78, ha.

    • Hi Aubrey,

      Thanks for your feedback!

      You can also build all 12 bonus projects in the LEGO software under the “more robots” tab. I designed the RAC3 Truck.

      And then there are the 150+ challenges in my book :)



  13. hanahwk

    ha gaaaaayyyyyyyyyy

  14. hanahwk

    ha gggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyyyy

  15. Catz

    my robot doesn’t move. any help?


  16. bluhhhhh

    hcdbc xhzcchadwet qyfehw4brsdncxfgwq7asufhbcewuysr you are duhhhhhhhhhhh and bluuuuhhhhhhhhhh code for…………..

  17. Ysiasia

    Dude my robot ain’t no moving please how can it work

  18. Daniel Piquée

    really congratulations for this wonderful project
    I would like to operate under Lejos
    Is there a java version of this program?
    Thank you for your response

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>