-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
This means that HBridge is built from discrete components and requires two pairs of complementary PWMs to drive it (ie. 4 PWM outputs).
Note: H-bridges integrated circuits not discussed in this issue!
One HBridge allows connect one DC motor:
Two HBridges allows connect one stepper motor:
Three half-HBridges allows connect one BLDC motor:
A minimal API is:
motor = HBridge(a=Pin(), _a=Pin(), b=Pin(), _b=Pin(), c=Pin(), _c=Pin(), freq=, duty=, deadtime=)
a, _a - required, complementary PWM outputs (usually center-aligned with max deadtime as default)
b, _b - optional, complementary PWM outputs
c, _c - optional, complementary PWM outputs
freq - Hz, frequency for all PWM's
duty - load current - 0..100%
deadtime - Dead-time is a blanking time period (upper & lower transistors in off-state simultaneously) of half-bridge power stage. Both transistors are switched off for short period of time to prevent both transistors conducting simultaneously thus causing a short circuit from supply to ground.
motor.duty() change load current
motor.deinit() close all switches, free internal modules
The ESP32 port allows to use MCPWM to build an HBridge.