File Exchange

image thumbnail

Polulu Motor Plot Generator

Pololu sells dc motors used in differential drive robots. Plot useful info using their datasheet



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

Comments and Ratings (11)

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
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today