Summary of DC Motor Interfacing With PIC Microcontroller Using L293 Motor Driver IC
L293D is a dual H-bridge motor driver IC used to interface DC and stepper motors with microcontrollers. The article explains using L293D to drive a bidirectional DC motor with a PIC16F877A microcontroller, including MikroC code and Proteus simulation. It highlights H-bridge principles for reversing motor polarity without changing supply, advantages of using L293 over discrete transistor H-bridges, and the ICs enable pin for speed control via PWM—making this a common, simple robotics interface for PIC beginners.Parts used in the L293D PIC Motor Driver Project:
- L293D motor driver IC
- PIC16F877A microcontroller
- DC motor
- Power supply
- Connecting wires
- Proteus 8 simulation software (for simulation)
- MikroC compiler (for coding)
L293d is an H Bridge bidirectional motor driver IC used to interface DC motor and stepper motors to Microcontrollers.
CircuitsGallery.com already discussed about the working principle of L293 IC with an example of bidirectional motor driver circuit.It is very easy to make a DC motor control using microcontroller. In this article I’m gonna show you the interfacing of DC motor with PIC16F877A microcontroller using L293D motor driver with the help of Mikro C coding and Proteus 8 simulation. Basically it is a bidirectional motor driver circuit with PIC MCU.This is the most common circuit in robotics engineering. I’m sure this article will be helpful for PIC MCU beginners.
What is H Bridge?
H bridges are widely discussed topic in electronics. As we know, just changing the polarity of supply voltage causes rotating of DC motor in reverse direction.
But this method is not suitable for practical circuit. So, how to run DC motor in clockwise and anti-clockwise direction without changing the supply polarity?
Here comes the importance of H Bridge. In a typical H Bridge circuit two pairs of transistors are connected in a bridge fashion and the motor is driven through the collector terminal.
Read more: H Bridge motor driver circuit using transistors
Why L293?
Obviously we know that ICs make life easy!
- The transistor based H bridges are little complex and bulky and also time consuming while implementing practically.
- L293 is basically an H bridge IC capable of driving two motors simultaneously, that means it has two embedded H bridges inside!
Interfacing of L293 to DC motor and microcontroller is very easy and simple process.
The specialty of L293 is that it has dedicated ‘Enable Pin’ to control the motor. By manipulating this pin it is possible to control the speed of dc motor with Pulse Width Modulation technology.
For more detail: DC Motor Interfacing With PIC Microcontroller Using L293 Motor Driver IC
Quick Solutions to Questions related to L293D PIC Motor Driver Project:
- What is the role of L293D in the project?
L293D acts as a dual H-bridge motor driver IC to interface DC motor(s) with the PIC microcontroller and enables bidirectional control. - How does the H Bridge change motor direction?
An H Bridge changes the polarity across the motor by switching transistor pairs in a bridge configuration, allowing clockwise and anti-clockwise rotation without altering supply polarity. - Why use L293D instead of transistor based H bridges?
L293D simplifies implementation because it is less complex and bulky than discrete transistor H bridges and includes built-in H bridges for two motors. - Can L293D control motor speed?
Yes, speed can be controlled by using the dedicated Enable pin with Pulse Width Modulation (PWM). - How many motors can L293D drive simultaneously?
L293D can drive two motors simultaneously because it contains two embedded H bridges. - Which microcontroller is used in the example project?
The example uses the PIC16F877A microcontroller. - What tools are used for coding and simulation in the article?
The article uses MikroC for coding and Proteus 8 for simulation. - Is interfacing L293D to a microcontroller difficult?
No, interfacing L293D to DC motors and microcontrollers is described as very easy and simple.
Related projects
PIC16F877 Driving LCD in 4-Bit Mode using PIC16F877 with Proteus Simulation
Introduction This microcontroller project shows how a PIC16F877 can drive an LCD display using 4-bit mode inside a Proteus simulation.The project demonstrates...
Programmers & ICSP · PIC16F877AEPE PIC/LCD Demo using PIC16F877 with Proteus Simulation
IntroductionThe EPE PIC/LCD Demo is a classic microcontroller project that demonstrates how a PIC16F877 can fully control a PG12864F graphical LCD.Designed as...
Motors & Robotics · PIC16F877AEfficient Sun-Following Robot: A Solar Tracker with Microcontroller Control
Abstract The impending global challenge of dwindling non-renewable fuel resources underscores the urgency of transitioning towards renewable energy alternatives like solar power....
Communication & Interfacing · PIC18F4520CAN FD Node based on a PIC18 Microcontroller
The introduction sets the stage for an embedded systems project that involves developing a Embedded C CAN FD project using the MCP2517FD...
Communication & InterfacingLAN9662 Gigabit Switch: Optimized for Industrial Ethernet
Introduction It should come as little surprise therefore that one element of what is now more commonly referred to in some circles...
Communication & InterfacingPIC Microcontroller: Fundamentals & Applications for Students
Introduction Microcontrollers are the key components in the embedded systems market. A variety of embedded systems was formed and developed after the...

