Un Puente H es un circuito electrónico que permite a un motor eléctrico girar en cualquier dirección. Es comúnmente utilizado en robots y vehículos controlados a distancia para controlar el movimiento del motor. Este componente es esencial para aplicaciones que requieren control bidireccional de motores de corriente continua (DC), como robots móviles, sistemas de control de movimiento y proyectos de automatización.
Parameter | Value |
---|---|
Operating Voltage | 5V - 12V |
Maximum Current | 2A per channel |
Power Dissipation | 25W |
Control Logic | TTL compatible |
Motor Channels | 2 (can control 2 motors) |
PWM Frequency | Up to 20 kHz |
Pin Number | Pin Name | Description |
---|---|---|
1 | ENA | Enable pin for Motor A (High to enable) |
2 | IN1 | Input 1 for Motor A (High/Low to control direction) |
3 | IN2 | Input 2 for Motor A (High/Low to control direction) |
4 | GND | Ground |
5 | GND | Ground |
6 | VCC | Supply Voltage (5V - 12V) |
7 | OUT1 | Output 1 for Motor A |
8 | OUT2 | Output 2 for Motor A |
9 | OUT3 | Output 3 for Motor B |
10 | OUT4 | Output 4 for Motor B |
11 | VCC | Supply Voltage (5V - 12V) |
12 | GND | Ground |
13 | GND | Ground |
14 | IN3 | Input 3 for Motor B (High/Low to control direction) |
15 | IN4 | Input 4 for Motor B (High/Low to control direction) |
16 | ENB | Enable pin for Motor B (High to enable) |
// Define motor control pins
const int ENA = 9; // PWM pin for Motor A
const int IN1 = 2; // Control pin 1 for Motor A
const int IN2 = 3; // Control pin 2 for Motor A
const int ENB = 10; // PWM pin for Motor B
const int IN3 = 4; // Control pin 1 for Motor B
const int IN4 = 5; // Control pin 2 for Motor B
void setup() {
// Set control pins as outputs
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
}
void loop() {
// Example: Move Motor A forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
analogWrite(ENA, 255); // Full speed
// Example: Move Motor B backward
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENB, 255); // Full speed
delay(2000); // Run motors for 2 seconds
// Stop motors
analogWrite(ENA, 0);
analogWrite(ENB, 0);
delay(2000); // Wait for 2 seconds
}
By following this documentation, users should be able to effectively utilize the Puente H Carrito in their projects, ensuring proper motor control and avoiding common pitfalls.