How to control a DC motor with an arduino and L293D H-bridge

Hi you all, :-)

Thank you for checking this new tutorial.

We will make a serie of tutorials on how DC motors with

You want to create a wheeled robot controled by an arduino uno board, control a DC motor with a variable speed and change the motor's direction. How do we usually do that? You can do it by changing the voltage between the motor pins but the torque will also change. And of course we want to keep our motor's torque to have effectiveness when moving our robot.

To do so, we'll use use our arduino board PWM "Pulse width modulation" (They are located on the pins: 3, 5, 6, 9 and 10 on the arduino Uno) and associate it with a H bridge (A L293 or a L293D). What is a H bridge? It's an association of 4 power transistors (NPN and PNP) and diode to protect the transistor. They may be MOSFETs or FETs (Those are popular for driven a lot of current: just what we need).