# How to determine the angular velocity of a DC motor correctly

I am given a small robot track vehicle, which uses a DC motor to power the left tracked wheel and another DC motor to power the right tracked wheel. I am using an optical wheel encoder to measure the angular velocity of the motor. Now I want to determine the precision of the optical wheel encoder. To do so, I need to know the EXACT angular velocity of the DC motor. Can somebody tell me how to determine the exact angular velocity?

The datasheet of the motor does not contain any electrical or torque constant. I am only given the no load speed, no load current. I get to choose what voltage I apply to the DC motor myself (in the code). Can I calculate the angular velocity the motor should have based on the voltage that I apply? Or do you know an easier or better way?

I am using this motor: TFK280SC-21138-45

• It is impossible with current technology to measure the exact angular velocity, so you need to be more specific about what you really need. Also, the words precision and accuracy do not mean the same thing, so think about the difference and reflect on what it is you are trying to accomplish. – Elliot Alderson Feb 12 '19 at 14:23
• A strobe light and some way of marking can provide a way of checking angular velocity – uglyoldbob Feb 12 '19 at 14:29
• There is no way to calculate the exact angular velocity of the motor. There are too many unknowns. – Hearth Feb 12 '19 at 14:45
• Strange request. Optical wheel encoder IS the MOST accurate sensor of rotation speed (except laser-based methods). Based on pulse forming, there should be no any "measurement noise", unless your MCU has a badly screwed software. – Ale..chenski Feb 12 '19 at 18:38
• How can an encoder be anything but accurate. If there are X counts per revolution, if you count to X, you've gone 1.0000 revolutions. – Scott Seidman Feb 12 '19 at 19:00

If you have wheel encoders and know their specifications (i.e the number of pulses per full revolution) then you can calculate the angular velocity you're looking for.

If you know pulses per revolution and can count pulses per time period you can calculate the proportion of a revolution which has occurred which gives you, as an instantaneous value, the angular displacement.

Velocity, generically, is the first differential of displacement with respect to time so you need at least two data points. In this case you've calculated the displacement and you know how long it took to occur; displacement per unit time is velocity (angular velocity).

An alternative way is to determine the time between pulses, each pulse indicates a certain proportion of a revolution / angular displacement. (hint: this way is quite microcontroller friendly and it sounds like a job for a simple ISR) This gives you displacement and the time which it took again which you can use to calculate the angular velocity which must be present (on average).

The accuracy and precision (which i think you might be confusing slightly) is mostly governed by the number of pulses per revolution and the kind of angular velocities you'll encounter. You can do things like calculate acceleration to help predict what the wheel is doing between pulses / speed updates if you have a particularly coarse encoder or have to operate a coarse encoder at low speeds but that's heading towards a control problem rather than the original question.

I am using an optical wheel encoder to measure the angular velocity of the motor. Now I want to determine the precision of the optical wheel encoder.

Personally, I wold just manually articulate (by hand, not motor) the encoder through one revolution and count the resulting encoder pulses.

If the angular resolution of the encoder is high, you can articulate the encoder through N rotations and find the mean counts per revolution.

• I know the counts per revolution already, don't I? I have a circular sticker with 36 black-white edges. My encoder should recognize each. Are you saying they sometimes don't ? – user503842 Feb 15 '19 at 9:35
• @user503842 That's perfect, that detail wan't included in your question. The angular rate of the encoder is the. (counts/sec)/36 in radians. – sstobbe Feb 15 '19 at 19:59