Discrete N-Channel MOSFET H-Bridge with Bootstrap Gate Drive
Construct an all-N-Channel discrete MOSFET H-Bridge capable of driving 24V 20A motors with high-side bootstrap charge-pump gate drive and hardware dead-time.
2. Prerequisites & Background Theory:
MOSFET gate charge Qg, bootstrap capacitor sizing, shoot-through prevention, and PCB high-current layout.
Goal & Engineering Objectives
Build a high-efficiency discrete motor driver capable of handling 24V at 20A continuous without heatsink thermal runaway.
Governing Mathematical Formulation & Physics
System Architecture & Block Flow Diagram
[MCU PWM Signals] --> [IR2104 / HIP4081 Gate Driver IC]
|
[Bootstrap Diode + Cap]
|
+-------------+-------------+
| |
[High-Side Q1 (NMOS)] [High-Side Q2 (NMOS)]
| |
+------ [DC Motor] ---------+
| |
[Low-Side Q3 (NMOS)] [Low-Side Q4 (NMOS)]
| |
+------------+--------------+
|
[Current Shunt] --> [PGND]
Required Hardware Bill of Materials (BOM)
| Hardware Component | Qty | Engineering Specification |
|---|---|---|
| N-Channel Power MOSFETs (IRFB3077PbF) | 4 | 75V, 210A, 2.8 mΩ RDS(on), TO-220 |
| Half-Bridge Gate Driver ICs (IR2104) | 2 | Integrated 520ns dead-time generator, 600V high-side capability |
| Ultrafast Bootstrap Diodes (UF4007) | 2 | 1000V, 1A, 75ns reverse recovery time |
| Bootstrap Ceramic Capacitors (0805) | 2 | 1 µF 50V X7R ceramic |
| Gate Resistors | 4 | 10 Ω 1/4W metal film for gate ringing damping |
| TVS Diodes (SMBJ30CA) | 2 | 30V bidirectional transient voltage suppressors across half-bridges |
Wiring, Pinout & Schematics Mapping
Firmware Implementation & Algorithms
// Arduino C++: 20 kHz Complementary PWM with Direction Control
#include <Arduino.h>
const int PIN_PWM_LEFT = 9; // Connects to Left IR2104 IN
const int PIN_PWM_RIGHT = 10; // Connects to Right IR2104 IN
const int PIN_ENABLE = 4; // Connects to IR2104 SD (Shutdown)
void setMotorHBridge(int speed) { // speed from -255 to +255
if (speed == 0) {
digitalWrite(PIN_ENABLE, LOW); // Disable both half-bridges
analogWrite(PIN_PWM_LEFT, 0);
analogWrite(PIN_PWM_RIGHT, 0);
return;
}
digitalWrite(PIN_ENABLE, HIGH);
int duty = constrain(abs(speed), 0, 250); // Cap at 98% to preserve bootstrap refresh
if (speed > 0) {
analogWrite(PIN_PWM_LEFT, duty);
analogWrite(PIN_PWM_RIGHT, 0);
} else {
analogWrite(PIN_PWM_LEFT, 0);
analogWrite(PIN_PWM_RIGHT, duty);
}
}
void setup() {
pinMode(PIN_PWM_LEFT, OUTPUT);
pinMode(PIN_PWM_RIGHT, OUTPUT);
pinMode(PIN_ENABLE, OUTPUT);
digitalWrite(PIN_ENABLE, LOW);
}