File Exchange

image thumbnail

Polulu Motor Plot Generator

version (3.74 KB) by Ali Asgher Mansoor Habiby
Pololu sells dc motors used in differential drive robots. Plot useful info using their datasheet


Updated 20 May 2017

View Version History

View License

The website of Pololu or several (small) DC motor manufacturers generally only supply very few parameters such as stall torque, stall current, rated voltage etc. To get more information about the motor behaviour, these parameter values can be combined and analyzed.
This script does the same. The input is similar to the link here (
The output curves and methodology is similar to the link here (
Re-written to include all units as per the feedback from users.
Calculation guide is at

Cite As

Ali Asgher Mansoor Habiby (2021). Polulu Motor Plot Generator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

Michael Dörflinger

Forget my stackoverflow link. I got it. My matplotlib script works. I will push the current version tomorrow to my GitHub repository. Maybe there are people who are interested in it.

Michael Dörflinger

I tried to rewrite it for Python but it doesn't work. Maybe here are some people who are interested in it and could help. Thank you very much.


Thank for this model, I changed unit for N.m and add grid to plot.

alfredo maussa

Zach Oyog

Alexander Cornelio

Robert Guimond

I have updated the software to include all units and added comments in the code.

1) Clarified the code so that it is simpler
2) All units are available now. Power is in watts, Speed in RPM, Torque in oz-in, Current in mA, Resistance in ohms
3) Output information print includes the maximum Output mechanical power point in terms of Torque and Current.

Please provide feedback if it answers your questions.

Felix-Manuel Wichmann

Variables are still messy as you use different names for the same value. The calculation of power is wrong because you just multiplicate speed and torque. But then you have no watts - as you consider it to be later on when you calculate effiency. You need a proportional constant.

Kevin Darmawangsa

Really needs units. It's tough to dig through the comments to figure out what you meant when I don't think it would take a huge amount of effort to print the units also.

Michael : Thanks a lot for pointing at the Resistance formula needing correction. Done.
Daniel Covillon : Units for power were specified as (oz-in * RPM) because the script was supposed to be used directly with the inputs from Polulu website. (Torque in Oz-in and Speed in RPM).
In case you want to convert the units then the relevant formulas are present in the code which you can use as suited to you.


Watch out, the resistance is a factor 1000 incorrect. Multiply calculated resistance with 1000 to get actual resistance in Omhs.

Good documentation / commenting is missing in this script. I now need to check the whole scripts on correctness of units after finding this mistake with the resistance.

Daniel Covillon

No units for power.

Osama Mutie


Arman Kalikian

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!