The DC Mini Metal Gear Motor is a compact and robust electric motor designed for precision movement in a variety of applications. Its integrated metal gears provide high torque and durability, making it suitable for small-scale robotics, automation projects, and hobbyist applications where precise motion control is required.
Pin Number | Description | Notes |
---|---|---|
1 | Motor + (Vcc) | Connect to positive voltage |
2 | Motor - (GND) | Connect to ground |
#include <Arduino.h>
// Define motor control pins
const int motorPin1 = 3; // H-bridge leg 1 (pin 2, 1A)
const int motorPin2 = 4; // H-bridge leg 2 (pin 7, 2A)
void setup() {
// Set motor control pins as outputs
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
}
void loop() {
// Spin motor clockwise
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
delay(1000); // Run for 1 second
// Stop motor
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(1000); // Stop for 1 second
// Spin motor counterclockwise
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
delay(1000); // Run for 1 second
// Stop motor
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
delay(1000); // Stop for 1 second
}
Q: Can I reverse the motor's direction? A: Yes, by reversing the polarity of the motor's power supply or using an H-bridge.
Q: What is the lifespan of the gears? A: The lifespan depends on the load and usage frequency. Under normal conditions, the gears are designed to last for the motor's operational life.
Q: Can I control the speed of the motor? A: Yes, speed control can be achieved using pulse-width modulation (PWM) through a motor driver connected to a microcontroller.