H-BRIDGE (DRV8833)
An H-Bridge is what TURL-X uses to control the 2 DC Motors (N20) that moves it around. The model it uses is the DRV8833.
The DRV8833 acts like a power switch for motors.
Why can’t the Arduino just control the motors directly, like it does for the LED?
The Arduino can think and send tiny signals (only about 5V and very little current, like 20-40 mA max per pin). But an N20 DC motor needs more power than that:
It wants more power (our N20 needs 6V).
It wants a lot more current (hundreds of mA, sometimes over 1A when it starts or gets stuck).
We need it to spin forward or backward.
If you connect a motor straight to Arduino pins → the Arduino gets fried (too much current), or the motor barely twitches. The DRV8833 is the muscle that takes the tiny brain signals from the Arduino and uses a separate battery/power supply to give the motors the real power they need.
If you want a motor to change direction, you swop the battery wires around. An H-Bridge does that by having 4 switches cleverly arranged so you can do exactly that. In the diagram above you can see how if switch 1 and 4 stays open the electricity flows in one direction. But if you close them and open the other 2 the power flows in the opposite direction; effectively changing the motor direction.
There are two of these H-bridges in one DRV8833 so we can control two separate motors independently.
It’s called an H-Bridge because the switches are positioned in an H-Shape.
How it works:
We send HIGH (ON)/LOW(OFF) signals from Arduino to the IN pins:
PIN 10 HIGH + PIN 9 LOW → Motor 1 spins one way (forward)
PIN 10 LOW + PIN 9 HIGH → Motor 1 spins the other way (backward)
Both LOW → stops