← Back to Hardware Hub

2WD Robot & H-Bridge Motor Driver Simulator

Explore differential drive kinematics, DRV8833/L298N logic pin states, and RP2040 MicroPython motor control

1. 2WD Differential Arena

Pos: (0, 0) Heading: 0° State: STOPPED

2. Flight Deck & Steering Controls

Keyboard Controls: Use W A S D or Arrow Keys to drive in real time!

3. H-Bridge Signal Monitor (DRV8833/L298N)

Left Motor (Motor A)

Duty: 0%
Dir: STOP
GP14 (IN1): LOW (0V)
GP15 (IN2): LOW (0V)

Right Motor (Motor B)

Duty: 0%
Dir: STOP
GP12 (IN3): LOW (0V)
GP13 (IN4): LOW (0V)
IN1 / IN3 IN2 / IN4 H-Bridge Mode Motor Action
PWM / HIGH LOW Forward Direction Spin Clockwise
LOW PWM / HIGH Reverse Direction Spin Counter-CW
HIGH HIGH Active Fast Brake Locked Coil Stop
LOW LOW Coast / Standby Freewheel Inertia Stop

4. Real-Time Pin Oscilloscope

Displays relative PWM digital waveforms sent to H-Bridge Control Pins IN1–IN4.

5. Dynamic MicroPython Code


    

6. Differential Drive Quiz

To make a 2WD differential robot execute a tight Pivot (Tank) Turn to the Left in place, how should the motors be driven?
A. Left Motor Forward 100%, Right Motor Forward 100%.
B. Left Motor Reverse (-100%), Right Motor Forward (+100%).
C. Left Motor Stopped (0%), Right Motor Reverse (-100%).
D. Both Left and Right Motors set to 0% Duty Cycle.