The duty cycle is given in percentage and the higher the duty cycle, the higher the voltage across the motor which also increases the speed of rotation. The voltage applied to the motor determines the speed of rotation of the motor by varying the width of this square wave called a duty cycle. PWM enables us to control the voltage applied to the motor in form of square wave pulses with a certain frequency. The direction of rotation is determined by the logic on these pins.
![l293d motor driver circuit datasheet l293d motor driver circuit datasheet](https://lastminuteengineers.com/wp-content/uploads/2018/12/L293D-Motor-Driver-Shield-Output-Terminals-Pinout.png)
![l293d motor driver circuit datasheet l293d motor driver circuit datasheet](https://files.readme.io/850b98a-L293D-pinout.png)
IN1, IN2, IN3 and IN4 pins are for controlling the direction of rotation of the motors. However the speed of rotation is better controlled using PWM signals. When these pins get a HIGH signal the motors will rotate and when they are LOW the motors stop moving. Each channel on the IC can deliver up to 600mA to the DC motor but the amount of current supplied to the motor depends on system’s power supply.ĮNA and ENB are the speed control pins for motor A and B respectively. This is where the DC motors having voltages between 4.5 to 36V are connected. OUT1 and OUT2 are the output terminals for motor A while OUT3 and OUT4 are output terminals for motor B. VCC2: is the power supply for the H-Bridge circuits for running the motors and is in the range 4.5V to 36V. VCC1: is the power supply for the IC circuitry and should be 5V. There are two power supply pins, VCC1 and VCC2. The diagram below shows the pin out of this motor driver. This motor driver comes as a 16-pin DIP IC package containing two H-bridge circuits therefore can control two DC motors at once or one stepper motor.
#L293D MOTOR DRIVER CIRCUIT DATASHEET HOW TO#
In this tutorial I will show you how to use this motor driver with Arduino in controlling a simple DC motor and a 28BYJ-48 unipolar stepper motor. The L293D motor driver IC is one of the cheap and easily available devices for controlling the speed and direction of rotation of DC and stepper motors.
#L293D MOTOR DRIVER CIRCUIT DATASHEET CODE#
Code for controlling the Stepper motor.Connecting the 28BYJ-48 Stepper Motor with L293D motor driver and Arduino.
![l293d motor driver circuit datasheet l293d motor driver circuit datasheet](https://hackster.imgix.net/uploads/attachments/899517/l293d-teaser-800x600_OzXvpSVo2K.jpg)