A Gearmotor DC, or Motorreductor, is an integrated device that combines a direct current (DC) electric motor with a gearbox to enhance torque while reducing speed. This combination allows for precise control of large loads at low speeds, making gearmotors ideal for a wide range of applications such as robotics, industrial machinery, automotive systems, and consumer electronics.
Pin Number | Description | Notes |
---|---|---|
1 | Motor Positive (+) | Connect to positive voltage |
2 | Motor Negative (-) | Connect to ground |
// Example code to control a Gearmotor DC with an Arduino UNO
#include <Arduino.h>
const int motorPin1 = 3; // H-bridge leg 1 (pin 2, 1A)
const int motorPin2 = 4; // H-bridge leg 2 (pin 7, 2A)
void setup() {
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
}
void loop() {
// Rotate motor in one direction
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
delay(1000);
// Stop motor
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(1000);
// Rotate motor in the opposite direction
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
delay(1000);
// Stop motor
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(1000);
}
Note: This example assumes the use of an H-bridge for direction control. The motorPin1
and motorPin2
are connected to the H-bridge inputs, and the gearmotor is connected to the H-bridge outputs. Adjust the pin numbers and logic according to your specific H-bridge module and wiring. Always ensure that the power supply voltage and current are within the specifications of the gearmotor.