–>

Easiest Circuit to Control a Motor With Arduino Using H-Bridge L293D

motor arduino

Here is how I made a simple circuit to control a DC Motor using Arduino. You can use this circuit with simple and short code to automate a DC motor from Arduino.

H-Bridge Integrated Circuit

The motor coil uses a relatively high current that Arduino cannot directly supply. That’s why we use this HBridge Integrated Circuit L293D.

This IC Integrated Circuit can drive two DC Motors in two directions for each motor.

Note:

This tutorial can be applied to the Arduino motor shield using the same code and configuration.

Connection

The IC has two identical elements to control two motors. We connect it using this simple circuit to power it, enable each element from Arduino and then wait for the action input signal from Arduino.

You can use this input signal to power the motor On or Off. And if you apply this signal on the other input from the same IC channel you get the motor to move in the opposite direction.

Code

As for the code we use a simple code you can get even from the Arduino LED Blink example. This example makes one Arduino PIN High and thus it drives the motor in one direction.

For driving the motor in the opposite direction, we have copied the Blink example one more time on another PIN to drive it in the opposite direction.

Here is the Tinkercad simulation that shows us how the circuit and code are running.

Recent Posts

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top