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 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 (2020). Polulu Motor Plot Generator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

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

Zach Oyog

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.

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.

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.

No units for power.

Osama Mutie


Complete re-write based on the feedback
1) Added comments in code
2) Added all units which are now Torque in oz-in, Current in mA, Resistance in Ohms, Power in Watts.

Corrected resistance formula which was not taking into account that current is in mA.
Added some comments to understand the units involved.

*small correction on the figure axis labels.

*Fixed the legends on the plots.
*The matlab window will now show the points of maximum efficiency and output power w.r.t current and torque.
Thanks to Pololu support (Jonathan Kosh) for these suggestions.

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