Gear Scale

From CPR Wiki

The gear scale parameter is used for converting between physical positions (in mm or degree) to motor steps. This article explains how to calculate the gear scale for robot and external joints.

The gear scales of robot axes are defined in the Robot Configuration File, the gear scales of external axes are defined in the Project Configuration File (configured via the CPRog/iRC PC application).

Calculating from hardware specification

You will need the number of encoder ticks (usually 500 per full rotation) and the gear ratio from motor to joint or linear axis. The following equation will give you the result in ticks per degree. The factor 4 may not be needed for non-stepper axes, like the BLDC ReBeL axes.

Gear Ratio x Encoder Ticks x 4 : 360 = Gear Scale

An example:

Gear Ratio: 48
Encoder Ticks: 500
48 x 500 x 4 : 360 = 266.667

Calculating from relative error

If you do not know the hardware specification you can try to measure the error of a gear scale value, then calculate the correct one from it using cross-multiplication.

  1. Use the gear scale of a similar axis (warning, if the value is too far off the axis might move faster than expected!)
  2. Jog the joint manually by a certain distance. Measure the actual distance (in degree or mm) and note the displayed distance.
  3. Calculate the new gear scale:
old Gear scale / displayed distance x actual distance = new Gear Scale