element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog Self Balancing Robot - Temporary Diversion from the Quadcopter Project - Demo
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ipv1
  • Date Created: 15 Apr 2015 4:37 AM Date Created
  • Views 2755 views
  • Likes 7 likes
  • Comments 11 comments
  • robot
  • ip_iot
  • arduino
Related
Recommended

Self Balancing Robot - Temporary Diversion from the Quadcopter Project - Demo

ipv1
ipv1
15 Apr 2015

Abstract

As most of you know, I am doing a quadcopter from scratch project where I make almost everything from scratch. In doing so, I had to understand the dynamics behind the software/firmware and in order to explain the quadcopter, I can start by explaining a balancing robot. In this post, I explain the build and provide a video demo for the robot. Lets go!

 

The build

I usually build stuff from scrap and recycle what I can and this project is no different. I start with some scrap wood and made a simple box like frame. I trimmed off wood from the sides to reduce weight and to make it a little more presentable. Finally I added some paint and a quick and dirty job later, I have a robot frame.

IMG_20150411_201416.jpg

As you can see, in the above pic, I have some motors and wheels attached as well. I bought the wheels a long time back and the motors were purchased online. These motors are 288RPM 12V rated and have optical encoders so that we can track the distance moved by each wheel. I clamped these motors in place using some sheet metal pieces I cut up from the scrap tin boxes I had. You can use soft-drink Tins etc as a source of the sheet metal and self threading screws to attach them to the wooden base.

 

In order to drive the motors, I am using an L293D motor driver which came from an older robot which lost it's wheels in an accident. image

Since we need a place to put the control board, I used a cardboard box and cut out an H shaped plane to sit atop the motor driver floor. The control board itself if an Arduino Uno which I received as a part of the Internet Of Holiday Lights Challenge from Element14 and I made a shield for the MPU9150 breakout board. The image below shows the same shield but on the FRDM K64F board which I was using for the quadcopter.

IMG_9611.jpg

I scraped together some libraries from the internet for the MPU9150 as well as PID control and a few hours of head scratching later, it actually worked! The video below shows the working robot in action.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

I had some failures along the way but it was quite easy and only a few hours of work once you know what you are doing. In the next post, I will be sharing some more details on the code as well as things that you need to consider when making one yourself.

 

Cheers,

IP

  • Sign in to reply

Top Comments

  • ipv1
    ipv1 over 10 years ago in reply to 4ringfan +3
    Mark Sir, Thank you. I am writing a detailed article/blogpost/roadtest review for the FRDM K64F which uses onboard sensors and replaces the arduino. It will be posted in the Freedom/ARM sections in the…
  • mcb1
    mcb1 over 10 years ago in reply to ipv1 +3
    IP/Mike It is easier to balance a broom with the heavy end at the top. You are quite right that the tipping movement becomes greater and occurs faster ith the weight up high. David Anderson made one called…
  • dtsartsanis
    dtsartsanis over 10 years ago +2
    Very interesting project.
  • ipv1
    ipv1 over 10 years ago in reply to shabaz

    Hello sir,

    It actually came out better than I though and it took me only a few hours on the weekend! This one is based on the arduino and I have a similar setup on the FRDM K64F that Dr. Defeo sent us(IBM kit). The eCompass demo works quite nicely and is quite stable using the on board sensors but I could not make it work with the MBED system and external I2C sensors.(Some issue with mbed- yuck!) and due to these instabilities I do not want to use it for my quadcopter. I experimented a lot and as a result I would prefer an arduino possibly. I am experimenting with KDS but progress is very slow. image

     

    As for the wood, I have a lot of scrap lying around and my Cel Robox just went back to the UK so it seemed like my only option image

     

    More coming soon.

    Cheers,

    IP

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago

    Hi Inderpreet,

     

    Wow, very nice!!

    It seems very stable. And well made!!

    I can see that this would be a good platform to test out some of your plans for the quad-copter safely.

     

    Wood is one of my favourite materials to work with too - don't see enough of it in technology projects!!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ipv1
    ipv1 over 10 years ago

    Hi all,

    Thanks for the positive comments.

    John Sir - To be honest this post was a toe dip to see if there is any interest in the subject. I have some interns producing some content that can use useful in understanding self balancing robots and possibly make a segway! I will definitely be posting more details about the build, theory and practice since there is much to be learned and also as I found out the hardway that there is no single place where this system has been discussed from the point of learning. More will come soon.

     

    Dimitrios sir - If there is anything sepcific you would like me to discuss, please do let me know.

     

    Neil Sir - I initially forked the code from a Mr. Franko who has done a similar project and the code is available on my github at http://github.com/inderpreet HOWEVER the code was not completely documented nor did it work out of the box for me. I made changes in a branch on my local machine which I will merge and push once I finish commenting properly. You are welcome to the existing code if you would like to experiment.

     

    cheers,

    IP

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • neilk
    neilk over 10 years ago

    Hi ipv1,

     

    Very impressive. I look forward to seeing some details of your code.

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dtsartsanis
    dtsartsanis over 10 years ago

    Very interesting project.image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube