DC Gearmotor SKU: CQR37D

From CQRobot-Wiki
Jump to: navigation, search


Measuring 37 mm (1.46″) in diameter, these brushed DC gearmotors are the largest and most powerful we carry. They are available in a range of gear ratios from 6.25:1 to 810:1 and with 6 V or 12 V or 24 V motors, and all versions are available with integrated 64 CPR quadrature encoders on the motor shafts. The gearbox is mainly composed of spur gears, these units have a 16 mm-long, 6 mm-diameter D-shaped output shaft.


  • The first specification: 12V voltage metal DC geared motor, this series of motors are compatible with 6V voltage at the same time;
  • The second specification: 24V voltage metal DC geared motor;
  • The third specification: 12V voltage metal DC gear motor with encoder, this series of motors are compatible with 6V voltage at the same time;
  • The fourth specification: 24V voltage metal DC geared motor with encoder.

Note: The listed stall torques and currents are theoretical extrapolations; units will typically stall well before these points as the motors heat up. Stalling or overloading gearmotors can greatly decrease their lifetimes and even result in immediate damage. The recommended upper limit for continuously applied loads is 10 kg-cm (150 oz-in), and the recommended upper limit for instantaneous torque is 25 kg-cm (350 oz-in). Stalls can also result in rapid (potentially on the order of seconds) thermal damage to the motor windings and brushes; a general recommendation for brushed DC motor operation is 25% or less of the stall current.


Size and Display

Note: Do not screw too far into the mounting holes as the screws can hit the gears. CQRobot Manufacturer recommends screwing no further than 3mm (1/8 inch) into the screw hole.

CQR37D12V64EN CQROBOT-72.jpg
CQR37D12V64EN CQROBOT-73.jpg
CQR37D12V64EN CQROBOT-75.jpg
CQR37D12V64EN CQROBOT-76.jpg
CQR37D12V64EN CQROBOT-51.jpg

Encoder Diagram

A two-channel Hall effect encoder is used to sense the rotation of a magnetic disk on a rear protrusion of the motor shaft. The quadrature encoder provides a resolution of 64 counts per revolution of the motor shaft when counting both edges of both channels. To compute the counts per revolution of the gearbox output, multiply the gear ratio by 64. The motor/encoder has six color-coded, 8″ (20 cm) leads terminated by a 1×6 female header with a 0.1″ pitch, as shown in the main product picture. This header works with standard 0.1″ male headers and our male jumper and precrimped wires. If this header is not convenient for your application, you can pull the crimped wires out of the header or cut the header off. The following table describes the wire functions:


Diagram for Arduino UNO

CQR37D12V64EN CQROBOT-58.jpg

The Hall sensor requires an input voltage, Vcc, between 3.3 and 24 V and draws a maximum of 10 mA. The A and B outputs are square waves from 0 V to Vcc approximately 90° out of phase. The frequency of the transitions tells you the speed of the motor, and the order of the transitions tells you the direction. The following oscilloscope capture shows the A and B (yellow and white) encoder outputs using a 12 V motor at 12 V and a Hall sensor Vcc of 5 V:

CQR37D12V64EN CQROBOT-52.jpg

By counting both the rising and falling edges of both the A and B outputs, it is possible to get 64 counts per revolution of the motor shaft. Using just a single edge of one channel results in 16 counts per revolution of the motor shaft, so the frequency of the A output in the above oscilloscope capture is 16 times the motor rotation frequency.

Interrupt Port with Different Board

Notcie: attachInterrupt()


For example,with arduino UNO board, you want to use interrupt port 0(int.0). You should connect digital pin 2 with the board. So, the following code is only used in UNO and Mega2560. If you want to use arduino Leonardo or Romeo, you should change digital pin 3 instead of digital pin 2.

See the link for detail http://arduino.cc/en/Reference/AttachInterrupt

Encoder Sample Code

//The sample code for driving one way motor encoder const byte encoder0pinA = 2;//A pin -> the interrupt pin 0 const byte encoder0pinB = 4;//B pin -> the digital pin 4 byte encoder0PinALast; int duration;//the number of the pulses boolean Direction;//the rotation direction

void setup() {

 Serial.begin(57600);//Initialize the serial port
 EncoderInit();//Initialize the module


void loop() {

 duration = 0;


void EncoderInit() {

 Direction = true;//default -> Forward  
 attachInterrupt(0, wheelSpeed, CHANGE);


void wheelSpeed() {

 int Lstate = digitalRead(encoder0pinA);
 if((encoder0PinALast == LOW) && Lstate==HIGH)
   int val = digitalRead(encoder0pinB);
   if(val == LOW && Direction)
     Direction = false; //Reverse
   else if(val == HIGH && !Direction)
     Direction = true;  //Forward
 encoder0PinALast = Lstate;

 if(!Direction)  duration++;
 else  duration--;