[WIP] Self balancing robot


I have a project that I just got going and I need help choosing parts. Keep in mind that there is little planning involved and nothing specific regards requirements. Said project is meant to be introductory to robot programming/controlling/electronics and reusability of parts for future projects.

I have selected Arduino Uno as the main controller of the robot, but I seem to struggle to figure out what kind of motors I would need for the robot. I am planning on using plywood for the body of the robot, simple hollow/open box with controllers on the sides or middle section and wheels and motors at the base of the box.

For raw positional data, I intend to use MinIMU-9 v2 Gyro, Accelerometer, and Compass (L3GD20 and LSM303DLHC Carrier).
Then next major bits would be motors and motor controllers. I currently have my eyes on following parts :

Pololu Dual VNH5019 Motor Driver Shield for Arduino
Pololu Dual MC33926 Motor Driver Shield for Arduino

34:1 Metal Gearmotor 25Dx52L mm HP with 48 CPR Encoder
29:1 Metal Gearmotor 37Dx52L mm with 64 CPR Encoder

Could you please help me choose the best combination?

P.S. What would be the easiest way to power such robot? It seems that Arduino Uno can have 12V input voltage but how hard/expensive would be to acquire a decent 12V battery?

All robot has to do is maintain it’s vertical position, currently there are no plans for controlling it with a controller, just making it stay still and correct itself if moved.


That sounds like a fun project!

If you know how much your robot is going to weigh, you should be able to calculate how much torque it would take to move it. Keep in mind that we recommend running our motors at no more than 20% to 30% of their stall torque. If you need help figuring this out, the “Force and torque” post on our “Engage Your Brain” blog might be useful.

For the motors you listed in your post, the VHN5019 Motor Driver Shield for Arduino is a much more appropriate choice for your application. Since you are building a balancing robot, the motors will need to switch direction (sometimes rapidly). This could cause the motor to briefly draw upwards of twice the stall current if they are switched from full speed in one direction to full speed in the other direction. The 37D motor has a stall current of 5A at 12V, and the 25D motor would have a stall current of 12A at 12V. If you are planning on using a 12V power supply, you will probably want to use a 37D motor or one of our other 25D motors that has a 2.2A stall current at 6V (4.4A at 12V). Also, though you get higher performance from a motor when using it at a higher voltage than it is rated for, please note that it will decrease the life of the motor.

As for your question about batteries, LiPo batteries are a common choice for robots like this. A 3-cell LiPo battery has a nominal voltage of 11.1V and when fully charged can reach upwards of 12.6V. They are not hard to find; a lot of local hobby stores carry LiPo batteries, and you can also get them from many websites including SparkFun.


So I ordered these parts :
Pololu Dual VNH5019 Motor Driver Shield for Arduino
34:1 Metal Gearmotor 25Dx52L mm HP with 48 CPR Encoder

Would this battery be sufficient to power the motors? It seems that it is capable of 44A continuous discharge and that would more than enough to satisfy motors ( 12A MAX ). Would it be possible to power entire robot with one battery? What problems could occur if I wanted to do it? Voltage drops? How would I give power to controllers without frying them ( since they require a couple of hundred mA not A ), etc.

The battery : hobbyking.com/hobbyking/stor … ouse_.html

It has these XT60 connectors ( or whatever they are ), how would one connect that to motor controller?

That battery should be a good choice for your robot. However, it sounds like you are a little confused about how current works. In general, you should think of it as the components drawing current from the battery; the battery will not force current through the components. You can find some helpful information about batteries in the “Understanding battery capacity: Ah is not A” post on our “Engage Your Brain” blog.

You can power your entire system from the one battery, but I would recommend using an appropriate step-down voltage regulator for the Arduino Uno since powering it from more than 12V could damage the board. The MinIMU-9 V2 can be powered from the Uno’s regulated 5V output.

As for your questions about the XT60 connector on the battery, we carry XT60 connectors that you can solder wires to and use to connect the battery to your project.


He is the balancing robot I made using Pololu parts:

You can download the code from here:

blog.planetbuckley.com/2011/02/t … jects.html


I’m building a slf balancing robot,… is it really necessary to use motors with encoders?


You could make a self balancing robot without encoders, but you would likely be able to get better performance if you use them.


Motors to be used in self balancing robot
Is there any less costly option available for motor with encoder for this project?
I searched quite a lot…and almost each accurate made robot used motors with encoder…
I chose this motor 29:1 Metal Gearmotor 37Dx52L mm with 64 CPR Encoder 12V 365rpm
sainsmart.com/29-1-metal-gea … 65rpm.html
but as I live in India this will cost me very high for the project…So I am looking for cost effective solution for this project…


We sell a similar 37D gearmotors with encoders. You might check with some of our distributors in India to see if they sell them at a cost less that what you might pay for the motors you listed plus any shipping and custom costs that could apply.

Good luck with your project! Your balancing robot sounds fun!