Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use H-bridge PCB: Examples, Pinouts, and Specs

Image of H-bridge PCBDesign with H-bridge PCB in Cirkit Designer

Introduction

The H-bridge PCB is a printed circuit board designed to control the direction and speed of a DC motor using an H-bridge configuration. This versatile component enables bidirectional control of DC motors, making it an essential tool for robotics, automation, and motorized systems. By manipulating the polarity of the voltage applied to the motor, the H-bridge PCB allows for forward and reverse motion, as well as speed control through pulse-width modulation (PWM).

Explore Projects Built with H-bridge PCB

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino and ESP32 Controlled Dual Motor Driver System: A project utilizing H-bridge PCB in a practical application
Arduino and ESP32 Controlled Dual Motor Driver System

This circuit features an Arduino UNO microcontroller interfaced with an H-bridge (ponte h) to control two MRB Planetary gearbox motors, allowing for bidirectional motor control. The Arduino is also connected to an ESP32 microcontroller for potential communication or additional processing capabilities. Power is supplied by a 12V battery connected to the H-bridge, which in turn powers the motors and the Arduino's 5V pin.

Open Project in Cirkit Designer
Image of Arduino-Controlled Line Following Robot with H-Bridge Motor Driver and IR Sensors: A project utilizing H-bridge PCB in a practical application
Arduino-Controlled Line Following Robot with H-Bridge Motor Driver and IR Sensors

This circuit is designed to control two DC motors using an H-bridge (ponte h) connected to an Arduino UNO microcontroller. The Arduino receives input from two TCRT 5000 IR sensors to determine the path and controls the motors to move forward, backward, or turn left/right based on the sensor readings. The motors are powered by a 2x 18650 battery pack, and the entire system is intended for applications such as line following robots or automated guided vehicles.

Open Project in Cirkit Designer
Image of Arduino Nano Controlled Robotic Vehicle with Excavator Functions: A project utilizing H-bridge PCB in a practical application
Arduino Nano Controlled Robotic Vehicle with Excavator Functions

This circuit is designed to control a vehicle with two drive motors and four servo motors, using an Arduino Nano as the microcontroller. The H-bridge (ponte h) interfaces with the Arduino to control the direction and speed of the drive motors, while the servos are directly connected to the Arduino's PWM outputs for position control. The system is powered by 7.4V batteries, with a buck converter stepping down the voltage for the servos, and the Arduino receives commands via its serial interface to operate in either car or excavator mode, as defined in the embedded code.

Open Project in Cirkit Designer
Image of ESP32-Controlled Dual DC Motor Driver with H-Bridge: A project utilizing H-bridge PCB in a practical application
ESP32-Controlled Dual DC Motor Driver with H-Bridge

This circuit features an ESP32 microcontroller connected to an H-bridge motor driver (ponte h) to control two DC motors. The ESP32 uses its GPIO pins (D25, D32, D33, D35) to send control signals to the H-bridge, which in turn drives the motors by switching their direction and speed. Power is supplied to the system through a DC power source connected to both the ESP32 and the H-bridge, with common ground.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

The H-bridge PCB is designed to handle a wide range of DC motors and is compatible with microcontrollers like Arduino, Raspberry Pi, and others. Below are the key technical details:

General Specifications

Parameter Value
Operating Voltage 5V to 36V
Maximum Current 2A per channel (continuous)
Peak Current 3A per channel (short bursts)
Control Logic Voltage 3.3V or 5V
PWM Frequency Up to 20 kHz
Number of Channels 2 (can control 2 motors)
Dimensions 50mm x 40mm x 15mm

Pin Configuration and Descriptions

Pin Name Description
VCC Power supply for the motors (5V to 36V).
GND Ground connection.
IN1 Input signal to control Motor 1 direction (logic HIGH or LOW).
IN2 Input signal to control Motor 1 direction (logic HIGH or LOW).
IN3 Input signal to control Motor 2 direction (logic HIGH or LOW).
IN4 Input signal to control Motor 2 direction (logic HIGH or LOW).
ENA Enable pin for Motor 1 (connect to PWM for speed control).
ENB Enable pin for Motor 2 (connect to PWM for speed control).
OUT1 Output terminal for Motor 1.
OUT2 Output terminal for Motor 1.
OUT3 Output terminal for Motor 2.
OUT4 Output terminal for Motor 2.

Usage Instructions

How to Use the H-bridge PCB in a Circuit

  1. Power Supply: Connect the VCC pin to a power source that matches the voltage requirements of your motor (5V to 36V). Connect the GND pin to the ground of your power source.
  2. Motor Connections: Attach the motor terminals to the corresponding output pins (OUT1 and OUT2 for Motor 1, OUT3 and OUT4 for Motor 2).
  3. Control Signals: Connect the IN1, IN2, IN3, and IN4 pins to the digital output pins of your microcontroller. These pins control the direction of the motors.
  4. Speed Control: Use the ENA and ENB pins for speed control by connecting them to PWM-capable pins on your microcontroller.
  5. Logic Voltage: Ensure the control logic voltage (3.3V or 5V) matches your microcontroller's output.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to control a DC motor using the H-bridge PCB and an Arduino UNO:

// Define control pins for Motor 1
const int IN1 = 9;  // Direction control pin 1
const int IN2 = 8;  // Direction control pin 2
const int ENA = 10; // PWM pin for speed control

void setup() {
  // Set motor control pins as outputs
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(ENA, OUTPUT);
}

void loop() {
  // Rotate motor forward at 50% speed
  digitalWrite(IN1, HIGH);  // Set direction
  digitalWrite(IN2, LOW);   // Set direction
  analogWrite(ENA, 128);    // Set speed (0-255)

  delay(2000); // Run motor for 2 seconds

  // Rotate motor backward at 75% speed
  digitalWrite(IN1, LOW);   // Reverse direction
  digitalWrite(IN2, HIGH);  // Reverse direction
  analogWrite(ENA, 192);    // Set speed (0-255)

  delay(2000); // Run motor for 2 seconds

  // Stop the motor
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  analogWrite(ENA, 0);      // Set speed to 0

  delay(2000); // Wait for 2 seconds before repeating
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Not Spinning:

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check all connections, ensure the power supply matches the motor's voltage, and verify the control signals.
  2. Motor Spins in One Direction Only:

    • Cause: One of the direction control pins (IN1, IN2, etc.) is not receiving the correct signal.
    • Solution: Test the control pins with a multimeter or logic analyzer to ensure proper signal output.
  3. Overheating:

    • Cause: Excessive current draw or insufficient cooling.
    • Solution: Reduce the motor load, ensure the current is within the rated limits, and add a heatsink if necessary.
  4. PWM Not Controlling Speed:

    • Cause: Incorrect PWM frequency or improper connection to the ENA/ENB pins.
    • Solution: Verify the PWM frequency is within the supported range (up to 20 kHz) and ensure the ENA/ENB pins are connected to PWM-capable microcontroller pins.

FAQs