Make sure you common all the grounds in the circuit. Connect Vcc1 pin to 5V output on Arduino. Next, we need to supply 5 Volts for the L293D’s logic circuitry. So, we will connect external 9V power supply to the Vcc2 pin. In our experiment we are using DC Gearbox Motors(also known as ‘TT’ motors) that are usually found in two-wheel-drive robots. Start by connecting power supply to the motors. Now that we know everything about the IC, we can begin hooking it up to our Arduino! Wiring L293D motor driver IC with Arduino UNO But, with Pulse Width Modulation (PWM), we can actually control the speed of the motors. Pulling these pins HIGH will make the motors spin, pulling it LOW will make them stop. ENA and ENB are used to turn ON, OFF and control speed of motor A and motor B respectively.
The higher the duty cycle, the greater the average voltage being applied to the dc motor(High Speed) and the lower the duty cycle, the less the average voltage being applied to the dc motor(Low Speed).īelow image illustrates PWM technique with various duty cycles and average voltages. The average voltage is proportional to the width of the pulses known as Duty Cycle.
PWM is a technique where average value of the input voltage is adjusted by sending a series of ON-OFF pulses. A common technique for doing this is to use PWM (Pulse Width Modulation) The speed of a DC motor can be controlled by varying its input voltage. H-Bridge – For controlling rotation direction.This can be achieved by combining these two techniques. In order to have a complete control over DC motor, we have to control its speed and rotation direction. One of the easiest and inexpensive way to control stepper motors is to interface L293D Motor Driver IC with Arduino.